On Tue, Sep 25, 2012 at 10:35:05PM +0100, Ken Moffat wrote: > On Tue, Sep 25, 2012 at 12:36:53PM -0600, Andrew Elian wrote: > > Hello, > > > Hi > > > > The approach I took was to install into DESTDIR (and etc) and then use > > dpkg to keep track of things. However, I differ from your approach, in > > that I do that as root. Not as safe, perhaps, but I've not run into the > > errors you have mentioned when working as root. > > > Until I started to rewrite my scripts, everything from about the > beginning of chapter 6 has been done as root (I have backups for > completed systems, builds are expendable). For the LFS packages, > I'm keen not to deviate too far from the book, otherwise I'll cause > myself pain in translating between the one and the other. For BLFS, > since I'm revising my scripts, I would prefer to build as a user. >
(closing this - sorry about tihe length, but if it saves anyone else from wasting their time on this fool's errand then it might be worthwhile) So, I got sudo working well enough to try DESTDIR installs : my normal user is *never* going to be allowed to do this (too easy to accidentally run an update without thinking, or when my blood sugar is low), but I always create an 'lfs' user so that I can build the next system. *That* user can do this, but only with the root password (so, su - lfs and then enter the root password when starting the script - after that, good to go for 12 hours on this pty : I loathe scripts which time out ;). For a straightforward package, that appears to work well enough, and simplifies the logging (just log what is in the DESTDIR). Unfortunately, the problems come with the non-simple packages. I'm aware that some packages fail in a user DESTDIR install because commands such as chmod fail. What I've now found is that building xulrunner is a real PITA (and, since firefox is one of the packages I update most frequently, currently with xulrunner, for me it is a showstopper). For a while, the DESTDIR install worked, but it also removed all the *.pyc files, which meant that a later *real* install failed. So, people who use DESTDIR probably ought to manually install from the DESTDIR, and remember to run ldconfig. I thought I could work around the missing *.pyc files, for the moment, by touching a .pyc file - but the DESTDIR install now fails before it gets that far: WARNING: Found 24 duplicate files taking 45426 bytes Stripped 76860 bytes Deoptimized 0/1151 in ./omni.ja /scratch/lfs/building/mozilla-release/xulrunner-build-dir/config/nsinstall -D /scratch/lfs/building/destdir/usr/lib/xulrunner-15.0.1 (cd ../../dist/xulrunner && tar -cvhf - .) | \ (cd /scratch/lfs/building/destdir/usr/lib/xulrunner-15.0.1 && tar -xf -) /bin/sh: line 1: cd: /scratch/lfs/building/destdir/usr/lib/xulrunner-15.0.1: No such file or directory ./ ./libxpcom.so make[1]: *** [install] Error 1 make[1]: Leaving directory `/scratch/lfs/building/mozilla-release/xulrunner-build-dir/xulrunner/installer' because the symlink for xulrunner-15.0.1 points to ../mozilla-plugins : no idea why it worked the first time, but already I've noted that doing a "correct" DESTDIR install for logging (i.e. with all the subsequent moves and whatevers) is aggravating. And what do I gain ? - as far as I can tell, merely simpler logging (as in : no need to create -before and -after logs, and then diff them). If the BLFS book wants to encourage people to copy and paste in non-scripted installs, that is fine. But for me it just causes pain when I'm running scripts. Also, using sudo to install xulrunner means that a regular user cannot rm -rf mozilla-release. I'll further note that fixing up sudo doesn't really give me any added security - it was interesting to learn how to do that, but AFAICS the benefit is zero. So, when I'm running my scripts to do the installs (but not when preparing edits for BLFS, after I find that the package seems to work when I *use* it), DESTDIR is a waste of time : if ever I'm tempted to revisit this, please shoot me.. ĸen -- das eine Mal als Tragödie, das andere Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
