On 17 Sep 2011, [email protected] outgrape: >>> This is really easy with one of the BSDs or a source-based Linux >>> distro and much more unpleasant with a Linux-based binary package >>> manager. >> What are the caveats with a binary package manager (vs. >> source-based)? It seems like it ought to work fine/as-well. > > Well, I'm not Nix, but my usual answer to that is that binary packages > are usually very dogmatic about where they have to be installed.
I was more worried that they generally have post-install actions that assume the package installation machine is equivalent to the machine on which the packages will run, so insist on doing things like restarting and killing daemons. > This > is fine if that matches up well with what Nix's scheme wants, but only > rarely do binary packages' built-in paths match up well enough to deal > well with unusual filesystem-layout hackery. What unusual filesystem layout? bash-4.1$ ls -l /trees/fold total 60 drwxr-xr-x 2 root root 4096 Jul 28 17:01 bin drwxr-xr-x 2 root root 4096 Aug 30 15:23 boot drwxr-xr-x 2 root root 4096 Jun 6 2009 dev drwxr-xr-x 26 root root 4096 Aug 31 19:48 etc drwxr-xr-x 15 root root 4096 Oct 30 2010 home drwxr-xr-x 4 root root 4096 Jul 28 17:01 lib drwxr-xr-x 3 root root 4096 Sep 19 2009 mnt drwxr-xr-x 2 root root 4096 Mar 21 2004 proc drwxr-xr-x 8 root root 4096 Feb 28 2009 root drwxrwxrwt 2 root root 4096 Apr 1 17:48 run drwxr-xr-x 3 root root 4096 Jul 28 17:01 sbin drwxr-xr-x 2 root root 4096 Feb 5 2005 sys drwxr-xr-x 2 root root 4096 Mar 7 2010 tmp drwxr-xr-x 8 root root 4096 Apr 17 13:49 usr drwxr-xr-x 13 root root 4096 Apr 1 17:52 var lrwxrwxrwx 1 root root 3 Jun 7 2009 lib32 -> lib Perfectly normal filesystem. It's just not located at / on this machine. I don't expect things to *run* from there: should I need to run them on the build machine, I chroot in and all the paths match up. --- well, a perfectly normal filesystem if you ignore that it doesn't have e.g. a compiler (that's located on the host). But most firewalls don't have those. Installing into a subtree rooted in one place while keeping the paths pointing at another is easy: make install DESTDIR=... or make install prefix= (depending on the package). It's been a while since I used the ports system but I'm fairly sure you can tell it to install into an fs rooted at an unusual location while running from a different location. -- NULL && (void) _______________________________________________ Soekris-tech mailing list [email protected] http://lists.soekris.com/mailman/listinfo/soekris-tech
