Package Management

Alexander E. Patrakov patrakov at gmail.com
Wed Feb 27 21:58:27 PST 2008


2008/2/28, Jeremy Huntwork <jhuntwork at linuxfromscratch.org>:

> 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.
>
>  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.
>
>  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.

I don't oppose the idea, but have some worries. Namely, adding goals
in the process is a sure way to a mess in the code and instructions,
because old assumptions are hard to weed out. Take, for example,
Midnight Commander that was not designed with UTF-8 in mind. The patch
is huge and still imperfect.

The other alternative is to stick with a known package manager such as
RPM and thus automatically have all goals provided by it. I still have
RPM instructions from LeafOS, and will check at home whether the
upstream bug about file conflicts is resolved.

OTOH, the need to DESTDIRize the instructions and find out
post-installation steps does exist independently from RPM, so we can
start working in parallel on this task.

Here is why RPM:

There are only three families of DESTDIR-based binary package
management system in the world: RPM, deb, and tar-based. A tar-based
system is already suggested. Dpkg requires an enormous amount of
infrastructure just to bootstrap it to a point where the dpkg-deb
--build command works (i.e., produces a package from a DESTDIR and
informational files such as a package description), and that's still
much less than an old-time Debian user would expect (i.e., where the
"debian/rules" files work).

-- 
Alexander E. Patrakov



More information about the lfs-dev mailing list