[Helidelinux-devel] Re: Helide linux
Status: Abandoned
Brought to you by:
rveen
From: Bennett T. <be...@ra...> - 2004-03-08 18:52:48
|
2004-03-08T12:07:24 Hui Zhou: > Very intersting. So for your final distribution, is it just a > collection of binary bpm packages? Yup. Some day I may whomp up an installer, but really any rescue disk should work fine for that. A minimal load is a linux (kernel), lilo, and busybox. For compact server installs, you can exclude /var/lib/bpm (which installs the spec file and full sources), /usr/include (only needed for compiling stuff, obviously), and the docs /usr/share/{man,info,doc}. And after running lilo, you can remove it if you want. So a running bent linux might have nothing but a kernel and a busybox. Then you can pick and choose what other bits you want. > [...] and both the source file and spec file are just > used as tools to produce bpm packages? Here's a reasonable sample spec file: pkg nmap-3.50 =09 url http://download.insecure.org/nmap/dist/nmap-3.50.tar.bz2 =09 build \ tar xjf nmap-3.50.tar.bz2 cd nmap-3.50 LDFLAGS=3D'-static -s' CFLAGS=3D-Os ./configure --prefix=3D/usr --mand= ir=3D/usr/share/man --without-nmapfe --without-openssl make make prefix=3D$BPM_ROOT/usr mandir=3D$BPM_ROOT/usr/share/man install If you saved that into any file, the name doesn't matter, and ran bpmbuild filename then bpmbuild would use wget to download the sources, then it'd unpack them, build them, and prepare the binary package. The binary package would have all the files that were populated by that "make install", plus these three: /var/lib/bpm/nmap-3.50/spec /var/lib/bpm/nmap-3.50/src/nmap-3.50.tar.bz2 /var/lib/bpm/nmap-3.50/sha1 The spec file is a copy of the file you fed to bpmbuild, and the src/nmap-3.50.tar.bz2 is a copy of what wget pulled down. The sha1 is the output of find ... -type f|xargs openssl sha1, a manifest with crypto checksums. If bpmbuild is provided a dir as its arg, it expects to find it in the above layout, and if all the needed sources are present in src/ it'll skip the wget step. So after installing the resulting binary package, you can rebuild it with bpmbuild /var/tmp/bpm/nmap-3.50 > From the file name, seems the package is a compressed cpio > archive, [...] Yup. My current installer is bzip2 -d <pkg.cpio.bz2|(cd / && cpio -idm) > what's the major difference from rpm? There's little in common. bpm's spec files are vastly simpler. bpm binary packages are true cpio.bz2s --- no special tools required to install them. The bpm database in /var/lib/bpm/ is simple text files, not the opaque binary databases built with the non-free, proprietary Berkeley DB, that rpm puts into /var/lib/rpm/. At the moment, bpm is implemented with a simple bash script that calls gpath. Once I get around to focusing more on it, bpm will be re-written in perl, and use custom code for reading and writing cpios; the custom writer will provide programmatic control of the owner of the files in the archive, allowing me to skip a currently-required bpmpkgfix step (that must be run as root) that ends up unpacking and repacking the archive. The dedicated reader will allow very efficient, single-pass pre-extraction and analysis of the spec and sha1 files, as well as to-be-implemented dependency data, which in turn will allow the installer to offer helpful warnings. > When you feel comfortable, I would like to be a tester for your > ``bent'' system.:) You're welcome to look it over whenever you like. <URL:http://bent.latency.net/bent/> has my current work. If you want to experiment in a chrooted jail, it's ready to go. If you have a scratch system (or a system with a scratch partition) and a rescue disk of some sort you can use to do the initial partitioning/newfsing/bzip2|cpio-installing, you can make a bootstrapping system with as little as busybox+linux, or as much more as you wish. -Bennett |