releases and stuff

Robert Connolly robert at linuxfromscratch.org
Tue Nov 9 19:28:50 PST 2004


I'm going to sleep soon so I don't have time for a reply to this thread right 
now. I would like to share something though, this was my original idea. 
Please note the major flaw to this is that hard links only work on the same 
filesystem, so if /usr is on a different partition this isn't going to work 
very well, but maybe it can be adapted in some weird way.

-- Begin package create --
$ install -d ~/temp/fakeroot && cd ~/temp/fakeroot

$ find /{bin,etc,include,lib,sbin,usr,var,opt} -type d -exec install -d 
`pwd`/'{}' ';'
find: /var/run/usb: Permission denied
find: /var/tmp/kdecache-root: Permission denied

$ find /{bin,etc,include,lib,sbin,usr,var,opt}-type f -exec /bin/ln '{}' 
`pwd`/'{}' ';'

$ find /{bin,etc,include,lib,sbin,usr,var,opt}-type l -exec /bin/ln '{}' 
`pwd`/'{}' ';'

/* If you are reinstalling the package, do your deinstall here to remove the 
links. */

$ find . > .root.fs.list

/* Move new package to . */

# chroot /home/ashes/temp/fakeroot /bin/bash

# su - ashes
No directory, logging in with HOME=/
-su: /dev/null: No such file or directory
-su: /dev/null: No such file or directory

$ cd ispell-3.2.06.epa7
...
$ make && make install

$ exit
logout

# exit
exit

/* Out of chroot now */

$ cat .root.fs.list | xargs rm

/* This isn't perfect, might have to run it a few times. */

$ find . -empty -type d | xargs rmdir
/* Untill rmdir returns 1 (I think) */
$ find . -empty -type d | xargs rmdir
rmdir: too few arguments

$ rm .bash_history

/* If you want sha1sums of everything. */

$ find . -type f -exec /usr/bin/sha1sum '{}' ';' > .sha1sums

/* Make a file list and maybe export it. */

$ find . -type f > .flist
$ find . -type l >> .flist
$ install -m444 .flist /var/pkg/flist/ispell-3.2.06.epa7-p1.flist

$ tar cvjf ispell-3.2.06.epa7-p1.tbz2 .

--- End package create ---

Keep in mind I never tried this before 5 minutes ago, this is my first time. 
This is a binary package creator that can be used by a regular user, minus 
the chroot. It works with new and unknown packages, requiring no cooperation 
from the source package. It will give a permission denied if a new file tries 
to overwrite an existing file. The database can't be more simple or human 
readable. Requires no new software. But... its slow to use, and won't work 
(as far as I can tell right now) with more than one partition.

robert



More information about the hlfs-dev mailing list