[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: general loadable integration

From: Mike Frysinger
Subject: Re: general loadable integration
Date: Thu, 16 Jul 2015 22:49:44 -0400

On 16 Jul 2015 14:53, Chet Ramey wrote:
> On 7/14/15 5:11 AM, Mike Frysinger wrote:
> > On 14 Jul 2015 11:35, Pierre Gaston wrote:
> >> I think adoption would be difficult considering even a useful loadable
> >> builtin like "finfo" has not found its way into default installations, b
> ut
> >> for instance I can imagine bash programmable completion could go another
> >> level with an embedded interpreter that lets you access the readline
> >> internals.
> > 
> > finfo is under the "examples" directory, and all of the loadable logic is
> n't
> > exactly trivial to package.  it feels kind of bolted on, especially when 
> you
> > try to build & install things.  if we want the loadables to be more of a 
> first
> > class concept than something people only play around with locally on thei
> r own
> > systems, this needs polishing.
> It's not quite bolted on, but it does assume access to the bash source
> tree, since the header files have to be available.  The build tree needs
> to be available as well, since the generated headers are required and

headers can be installed easily.  Gentoo does this under the path (arbitrarily 
picked) of /usr/include/bash-plugins/.  we install a crap ton of headers 
because it's not clear what is fair game for plugins.

> the logic to create shared objects comes for free with the bash configure.

that's not really that much magic though ?  seems pretty trivial to document 
this process ?

> The examples directory is just intended to give developers a flavor of
> how to write a loadable builtin.

perhaps, but i quoted this thread that covers one ("finfo") that was explicitly 
called out ...

> The original rationale is that the loadable builtins can be installed
> anywhere, though the example Makefile does not suggest a location, but
> that developers are the ones who need a development environment (the bash
> source tree).  Linux vendors could build and include loadable builtins
> as part of their distributions, for example, since they obviously have
> the bash sources.

Gentoo does this as well -- by hand.  seems pretty easy to add a rule that'd 
install it.

> I suppose the first thing needed to make that work, and maybe the only
> thing needed to make that work, is agreement on the name of a search path
> environment variable that enable can use to find loadable builtins.

Gentoo uses a subdir of the ABI libdir (e.g. /usr/lib64/bash/).  but i think 
that could easily be a configure time option that'd simply default to 

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]