Yet another LPM

Gilles Espinasse g.esp at free.fr
Thu Mar 29 07:36:09 PDT 2007


Selon Robert Connolly <robert at linuxfromscratch.org>:

...
> An index file for package management is just a side effect, not the goal. I
> think a UnionFS system would be overkill.
>
> Off the top of my head I'm thinking something like this:
>
> find / -wholename '/sources' -prune -o \
> 	-wholename '/etc/index' -prune -o -print > /etc/index/base.list
> # Install man-pages
> find / -wholename '/sources' -prune -o \
> 	-wholename '/etc/index' -prune -o -print > /etc/index/total.txt
> #
> diff /etc/index/base.list /etc/index/total.txt > /etc/index/man-pages.list
>
> I'm not sure how well this works when a package is reinstalled or upgraded.
>
> There's an Mtree program that does something like this but the output of
> Mtree
> isn't as easy to read as Find's, and Mtree isn't as flexable as Find. It's
> pretty easy to add an -exec option to run sha1sum, or gpg if you want to get
> nuts. Find's -ls option prints the inode, timestamp, ownership, size, and I
> don't know what the other (second) field is. The only thing I see Mtree doing
> more is giving file type, although file(1) can do that with the -exec option
> but not as quickly as Mtree.
>
> The diff's would need to be searched for <>'s going in the wrong direction,
> indicating that a file was replaced by another package.
>
> OpenSSL can encrypt the index files to secure them for a tripwire.
>
> It shouldn't be hard to work with these index's to make them work with any
> package manager, if desired. Your UnionFS idea and this indexing idea could
> work together, with or without some modifications.
>
> The purpose is to know which files came from which package so everything is
> accounted for, and what their attributes (ownership, size, checksum) are
> supposed to be, while not inhibiting us from doing more with it (like mtree
> does).
>
> robert
>
We do the find way on IPCop in lfs/Config in POSTBUILD
http://ipcop.cvs.sourceforge.net/ipcop/ipcop/lfs/Config?revision=1.39&view=markup

We do not use a checksum there to track file origin but follow in the log wich
files will be include in installation.
If you want only see the find, goes on some previous version.
It appear a valuable time saving to reuse the list of installed files on
POSTBUILD for the next PREBUILD.

Gilles



More information about the hlfs-dev mailing list