thomas at equinox.homelinux.org
Thu Feb 28 12:59:41 PST 2008
Am Donnerstag, 28. Februar 2008 00:18:16 schrieb Jeremy Huntwork:
> Gerard Beekmans wrote:
> > For LFS purposes we first need to determine how far we want to take
> > package management. In its utmost basic form we can provide commands in
> > the book to collect a list of installed files before and after the
> > installation of a package. Compare the two lists with a program like
> > 'diff', some post-processing to clean up the results, and voila, a file
> > you can later on loop through 'rm' to remove the just installed files.
> Because PM can be a complex and varied subject, I would suggest that we
> start small. Start with a POC LFS that employs DESTDIR and a _very
> simple_ way to package. The two main initial goals might be:
> 1. Know what files have been installed by the package and where they
> were installed.
> 2. Store the compiled package for possible use on another system.
Fully aggreed to that and ++ if PM should be taken into the book (or whatever
it will be). Just only one question I still have. To what goal should the
implementation of a PM lead. Ok, there was the idea of knowing which files
where installed and the option to uninstall them. Both, i personally, never
needed. On the other side, package management or better, the packages itself
suggest some kind of comfort. Getting and installing a package and all will
be fine. This is what we know from RPM etc. I think there is much danger in
it because the PM would push the LFS project into the role of a package
provider which finally is nothing else than a distro. Who will build such
packages to be downloaded? Who will do the QA for those packages, for which
arch will they be built? Who will download them? Never say never, but at the
moment i could not imagine that i'll use a binary on my system (ok, there
will some exceptions ala FlashPlayer).
> It would be very easy to accomplish that with tar only:
> make DESTDIR=/tmp/package install
> cd /tmp/package
> tar -cjf package.tar.bz2 ./
> tar -tf package.tar.bz2 >/var/packagedata/package
> cd /
> tar -xf /tmp/package/package.tar.bz2
> The above commands could probably be condensed even further or made
> slightly more robust, but it should demonstrate how easy it is to keep
> track of installed files.
And will be one part to proof that the "make DESTDIR=xxx install" produces
> As we develop the idea further, and we wish include educational points
> in LFS about more advanced concepts of Package Management, we could
> bring in other features.
Find attached a script which I built just as a proof of concept and just for
learning to create a file which contains informations about itself. It is a
script which creates another script with the (binary) package merged to it.
You can simply run this created script to install the packge. Just an
/path/to/makepkg.sh -d /path/to/destdir pkgname
This will create a pkgname.bin. Executing that pkgname.bin, the files will be
installed in /. You may even add pre- and post-install routines. It assumes
that tar and dd are available on the system.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4059 bytes
Desc: not available
More information about the lfs-dev