bug-autoconf
[Top][All Lists]
Advanced

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

Re: distributions build with autoconf are not re-locatable


From: C.J. Adams-Collier
Subject: Re: distributions build with autoconf are not re-locatable
Date: Sat, 29 Sep 2007 11:17:33 -0700

Just finished reading through the texi files...

It seems that the gnulib approach requires a bit more work to make a
given program re-locatable... I was thinking that all of the paths
could be determined at run time using pkg-config and stored to
environment variables.  The default paths (no environment variable
set) could be hard coded as the values passed to ./configure.
However, if environment variables are set, they would be used instead.

This requires a bit of work to a package's .pc.in file in order to
define all paths made use of by the package.  However, this would
centralize all path definitions to a single location.

Oh, by the way, pkg-config sets a variable, ${pcfiledir} as it
iterates over $PKG_CONFIG_PATH's colon-delimited list of paths.  If
all paths are defined as relative to ${pcfiledir}, modification of
$PKG_CONFIG_PATH and moving the root of the package is all that would
be required to relocate a package.  I wrote a bit about it last night
after laying awake for hours thinking about it :)

http://wp.colliertech.org/cj/?p=164

Cheers,

C.J.

On 9/29/07, C.J. Adams-Collier <address@hidden> wrote:
> Alrighty.  I'll put something together.  Thanks for the links.
>
> On 9/29/07, Eric Blake <address@hidden> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > According to C.J. Adams-Collier on 9/28/2007 7:02 PM:
> > > Hey all,
> > >
> > > Since we allow multiple absolute paths to be specified as arguments to
> > > ./configure, there is no easy way to re-locate a distribution, short
> > > of finding a relative path between --prefix and other paths specified
> > > as absolute.
> >
> > This sounds like a good use case for the relocatable-{lib,prog,script}
> > modules in gnulib; here's the texinfo source for the documentation
> > regarding their use:
> >
> > http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/relocatable.texi;h=b79fb18;hb=HEAD
> > http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=blob;f=doc/relocatable-maint.texi;h=c743d4a;hb=HEAD
> >
> > >
> > > To allow autoconf to participate in the generation of relocatable
> > > distributions, I propose that except in the case of --prefix, the use
> > > of absolute paths by path args be deprecated.
> >
> > You would have to propose this change to the GNU Coding Standards first,
> > address@hidden, since this would be a change to:
> > http://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables
> >
> > >
> > > Current functionality:
> > >
> > > Specification of an absolute path is allowed for all path args.
> > >
> > > Proposed post-deprecation functionality:
> > >
> > > Specification of an absolute path is only allowed for --prefix.   If
> > > an absolute path is specified for a path arg other than --prefix, the
> > > absolute path will be converted to a path relative to the value of
> > > --prefix.
> >
> > Not always possible (consider people who do --prefix=/usr
> > - --sysconfdir=/etc).  But if you care to write a patch, we will certainly
> > take a look at it.
> >
> > As it is, the documentation for autoconf _already_ recommends using
> > relative paths - for example, bindir defaults to '$(exec_prefix)/bin', so
> > that it appears relative to --exec-prefix.
> >
> > - --
> > Don't work too hard, make some time for fun as well!
> >
> > Eric Blake             address@hidden
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.5 (Cygwin)
> > Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFG/k5f84KuGfSFAYARAut3AJ4hqLPZH3A81A97Rv9jgHbGl3nrsQCfQNCd
> > xK8daycZ/+x5UFv5GTm9y+M=
> > =5Pvn
> > -----END PGP SIGNATURE-----
> >
>
>
> --
> moo.
>


-- 
moo.




reply via email to

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