[Boost-bugs] [Boost C++ Libraries] #4934: Please support DESTDIR/--destdir for installation into a virtual root

Subject: [Boost-bugs] [Boost C++ Libraries] #4934: Please support DESTDIR/--destdir for installation into a virtual root
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-12-05 16:33:55


#4934: Please support DESTDIR/--destdir for installation into a virtual root
---------------------------------------------+------------------------------
 Reporter: Roger Leigh <rleigh@…> | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Building Boost
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
---------------------------------------------+------------------------------
 If you've read the GNU coding standards or used GNU automake, as examples,
 these (and other) tools and standards specify a DESTDIR (destination
 directory) for "make install". The purpose is to separate the
 installation prefix/exec-prefix/libdir/includedir locations from the root
 where they actually get installed.

 As an example, if I configure with --prefix=/usr and libdir is
 ${prefix}/lib, "make install" will install into ${prefix}/lib.

 However, if I do "make DESTDIR=/tmp/tmpdir install", then installation
 will be into "/tmp/tmpdir/${prefix}/lib". It's actually installing into
 ${DESTDIR}${libdir}, where DESTDIR is empty by default.

 Why is this needed? It's mainly used for packaging purposes, because if I
 want to make .deb or .rpm packages, or even just a .tar.gz of the built
 files, I don't want to install onto the base system, I want to install
 into a temporary directory location (virtual root) so I can then package
 up the files.

 Now, I could use "--prefix=/tmp/tmpdir/usr", and this is in fact what
 Debian is currently doing. However, if I want to actually use the value
 of ${prefix}, it should be "/usr" and it's actually set to
 "/tmp/tmpdir/usr", which is obviously wrong.

 I would like to suggest that an additional bjam option --destdir would
 allow one to do this:

 {{{
   bjam --prefix=/usr --destdir=/tmp/tmpdir install
 }}}

 rather than the incorrect

 {{{
   bjam --prefix=/tmp/tmpdir/usr install
 }}}

 which is currently the only possible method to use.

 This is related to bug #1094 because this will insert the directory
 locations into the generated .pc file. If you bootstrap with the DESTDIR
 included in the --prefix, you'll end up with buggy .pc files containing
 the wrong locations. Using --destdir means the configured locations are
 always correct.


 Many thanks,
 Roger

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4934>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:05 UTC