> related to the build).  I now use a hack to not try to log modified or
> deleted files when installing /etc/passwd and /etc/groups (still don't
> understand those issues) and I manage to record /mnt/lfs/etc as
> created (I do these before entering chroot, so I can run that in one
> go) although passwd is correctly shown as '/etc/passwd'.

Ken, FWIW in my (B)LFS build scripts I have five functions, describe,
setup, build, finish, remove, and a case statement at the end to take
an argument for what to do (with a 6th option "all" which is setup,
build, finish).

The idea is: build is pretty much what the book says to do, produce
"binaries" that I can restore when I'm cloning a fresh system.  It
starts my package manager watching just before "make install", then
generates the "removal script", and tarballs all those files just
before the function ends.  Most often setup is the useradd/groupadd
stuff, because restoring /etc/passwd is history dependent.  Finish is
usually where I customize config files.  Remove is where I undo what
setup & finish did before having my package manager remove the binaries
it saw being installed, i.e. userdel, rm /etc/yadayada.conf.  When I am
cloning, my clone script runs the setup function, restores the
immutable binaries saved by my package manager at the end of build, and
then finish function.  This separation gives me enough flexibility to
use the same scripts for building and cloning.  It recognizes there are
some things that can and some that can't be just laid down from an
original tarball.

My package manager does recognize new files from changed files, and
won't remove one that was already there.  But neither will it restore
the file.  It's up to me to decide to restore the original package, if
that's right.  Maybe yes, maybe no.

And everything is in bash scripts where I can get at it when I
need to! ;-)
-- 
Paul Rogers
[email protected]
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL :-)

        

-- 
http://www.fastmail.com - Email service worth paying for. Try it for free

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to