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

Re: make install modifying



On Tue, 2002-11-19 at 16:39, Danny Sauer wrote:
> Presently, I'm setting up a netboot system (several), and am finding it
> rather annoying to build apps for that system.  For example, I want to
> get openssh installed on it.  So, I download and run
> 	./configure --prefix=/netboot/common/root/usr/
> (well, sysconf's specified too, but you get the picture.
> 
> Anyway, that compiles and make install works just fine, but then
> the binaries expect to find config files in /netboot/common/root/usr/etc,
> but since /netboot/common/root is mounted on / that doesn't work well.
> Setting --prefix=/ screws up the "make install" stage.
> 
> Is there a reasonably standard way to make "make install" assume a
> sort-of chroot-like environment when installing?  I can copy the
> binaries by hand, but that's time-consuming, and doesn't have the
> handy side-effect of creating default config files, server keys, etc.
> 
> Tips (aside from "just install a distribution and copy the files you
> need to the netboot root")?

Most autotools-based projects support a variable called DESTDIR, which
performs the same function as a "chroot" thing for the build.  To use
it, just give DESTDIR to make when doing the make install.  So:

  ./configure --prefix=/usr
  make
  make install DESTDIR=/netboot/common/root

That should install the files to /netboot/common/root/usr, but work
properly.  It'll also probably trigger the detection code in your
configure script to put config files in /etc instead of /usr/etc and so
on.


-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.