From: Jeremy Huntwork <[EMAIL PROTECTED]>
> Gerard Beekmans wrote:
> 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.
> 

I would have to agree that's a great way to start. In fact, that's pretty much 
all my build scripts do. Like jhalfs, I extract the commands directly from the 
book and use similar commands to the above to create a list of all files 
belonging the package and create a .tar.bz2 of the package itself. It's a 
simple bash script and could be easily extended to include file permissions and 
md5sums. Upgrading a package (once built) is just a simple uninstall-install 
operation. My scripts are pretty primitive though, and so they'll trample 
configuration files. But that's pretty easily avoided as well. There's no 
dependency tracking or auto-fetching of packages from a remote repository, but 
such goals shouldn't be the main focus. I think just something similar to what 
was mentioned above, and what I have, is a good place to start. It's a couple 
of simple scripts that are easily copy & pasted (or extracted direct from the 
book's XML sources), and it relies on standard UNIX tools.

Rich
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to