Re: [RFC][PATCH] proper DESTDIR handling for device-mapper and LVM2

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

 



Alasdair G Kergon wrote:

Thanks for the tidying: I'll work through this properly late next week. (Office moves today.) Quick comments: I'd prefer not to see DESTDIR in Makefiles though: only in the template, and some (I thought most?) people *do* want to pick up some include files etc. from their DESTDIR (they're not
installed on their main system, or the ones on their system are different
versions from the ones in DESTDIR which has the correct environment the
software uses when it runs): perhaps that should be split into a separate
configuration option (enabled by default)?

To keep DESTDIR only in the template, you'll have to replace the


bindir = @bindir@

lines (and similar) in make.tmpl with

bindir = $(DESTDIR)@bindir@

to avoid the problem of @bindir@ not including ${prefix}. Just don't bother putting $(DESTDIR) into prefix/exec_prefix at all, IMHO.

I can't speak to what everyone else does with DESTDIR, but most packaging systems point DESTDIR to an _empty_ subtree to do the install into, so they can package up all the resulting files. If someone wanted to build LVM2 on a system that had device-mapper _only_ installed into DESTDIR (i.e. /usr/lib did not contain libdevmapper.so, /usr/include did not contain libdevmapper.h, etc.) this would take a lot more work than what was already in the Makefiles, and even then it would tend to break because /usr/sbin/lvm would end up linked to

/foo/usr/lib/libdevmapper.so

instead of

/usr/lib/libdevmapper.so

and so /usr/sbin/lvm wouldn't run properly once the DESTDIR directory was used as a real environment.

So just to be completely redundant <G>, I'll reiterate the way I've always seen DESTDIR used: it's used _only_ at "make install" time to redirect the installation to a different path than the package was compiled to run from.

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux