[debian-installer] microdpkg
The debian-installer is an effort to redesign and rewrite debian's installer for woody. It's just getting started. We've decided that the new installer will be modular, where modules are maintained by separate people, and can be installed into the installer itself while it is running, to give it additional capabilities (like the ability to partition a disk, or run an interactive shell, and so on). These modules will themselves be debian packages. So we need some rudimentary package management tools to be part of the base of the installer. Dpkg, at around 240k, is much too big. The target size is more like 24k. I'm calling this stripped down dpkg microdpkg. It is not intended to be fully compatable with dpkg, or to be a full-fledged replacement for it; it will support only those dpkg features we need to manage packages in the installer. I think that just like dpkg, it should be split into two programs: microdpkg-deb to handles the low-level unpacking of packages, and microdpkg, to do dependency checking, and so on. Maybe this will turn out not to make sense; some space might be saved if the two were combined. On the other hand, Erik Anderson might want to put microdpkg-deb in busybox -- Erik? If it is a seperate program, microdpkg-deb should implement the following switches, with the same behavior as dpkg-deb: (More may be added later, as needed.) --info, -I --field, -F --extract, -x It is expected that it will use busyboxes ar, gzip, and tar implementations to handle pulling packages apart. microdpkg will use microdpkg-deb to implement a subset of dpkg's functionality. It will just implement the following switches: (More may be added later, as needed.) -i, --install -r, --remove It will maintain /var/lib/dpkg/status and /var/lib/dpkg/info/* in a manner compatabile with dpkg. It will not support alternatives, diversions, and so forth. It will not support conffiles, nor will it support purging of packages, nor will it check to see if multiple packages contain the same file. It will not support preinst and prerm scripts, and will probably also not support the maintainer script error unwinding done by dpkg. In package metadata, it will use the following fields: Package, Status, Depends, Provides -- and will ignore the rest. (Thus, no suggestions, no reccommendations, no pe-dependencies, no conflicts.) It need not support OR'd boolean dependencies, or versioned dependencies. They will be written in C, or perhaps, in POSIX shell script (without any external commands except ar, tar, gunzip, though..). I'm looking for a few people who'd like to write this in the next week or so. I think Randolph Chung may have already done some preliminary work. If you'd like to help, make sure you're on the debian-boot mailing list and reply to this mail. -- see shy jo
Re: [debian-installer] microdpkg
Joey Hess wrote: They will be written in C, or perhaps, in POSIX shell script (without any external commands except ar, tar, gunzip, though..). If C, would it be ok if it was specific to busybox or would it have to be independent? If its writen specifically for busybox it could access ar, tar, and gzip internally through ther ar_main, tar_main and gzip_main so it could be quite small. I'm looking for a few people who'd like to write this in the next week or so. I think Randolph Chung may have already done some preliminary work. If you'd like to help, make sure you're on the debian-boot mailing list and reply to this mail. Im getting bogged down with forks and IPC with the C based debconf stuff i was attempting, i might have a quick look now. Glenn
Re: [debian-installer] microdpkg
On Sun Aug 20, 2000 at 09:25:14PM -0700, Joey Hess wrote: I think that just like dpkg, it should be split into two programs: microdpkg-deb to handles the low-level unpacking of packages, and microdpkg, to do dependency checking, and so on. Maybe this will turn out not to make sense; some space might be saved if the two were combined. On the other hand, Erik Anderson might want to put microdpkg-deb in busybox -- Erik? I'm very open to the idea, after we agree on how to approach it. Maybe I'm missing something though (I almost certainly am), but do we really need a 'microdpkg-deb'? Wouldn't just 'microdpkg' be enough? When we go to install the base system, we really just want to unpack the .debs and drop them into place. For this to take place we can do something like the following: #!/bin/sh # Lame 5 minute micro-dpkg shell script... # Erik Andersen [EMAIL PROTECTED] if [ -z $1 ]; then echo usage: udpkg packagename.deb exit 1; fi; FOO=`basename $1` PACKAGE=`echo $FOO | sed -e s/_.*//g` ROOT=/ DPKG_INFO_DIR=/var/lib/dpkg/info/ #For debugging only DPKG_INFO_DIR=/tmp/fff/info ROOT=/tmp/fff mkdir -p $DPKG_INFO_DIR ar -p $1 data.tar.gz | zcat | (cd $ROOT ; \ tar -xvf - $DPKG_INFO_DIR/$PACKAGE.list) ar -p $1 control.tar.gz | zcat | (cd $DPKG_INFO_DIR ; \ tar -xf - ) if [ -f $DPKG_INFO_DIR/postinst ] ; then mv $DPKG_INFO_DIR/postinst $DPKG_INFO_DIR/$PACKAGE.postinst fi if [ -f $DPKG_INFO_DIR/postrm ] ; then mv $DPKG_INFO_DIR/postrm $DPKG_INFO_DIR/$PACKAGE.postrm fi if [ -f $DPKG_INFO_DIR/preinst ] ; then mv $DPKG_INFO_DIR/preinst $DPKG_INFO_DIR/$PACKAGE.preinst fi if [ -f $DPKG_INFO_DIR/prerm ] ; then mv $DPKG_INFO_DIR/prerm $DPKG_INFO_DIR/$PACKAGE.prerm fi if [ -f $DPKG_INFO_DIR/md5sums ] ; then mv $DPKG_INFO_DIR/md5sums $DPKG_INFO_DIR/$PACKAGE.md5sums fi if [ -f $DPKG_INFO_DIR/control ] ; then mv $DPKG_INFO_DIR/control $DPKG_INFO_DIR/$PACKAGE.control fi exit 0; If we really wanted to be cool, we could even use parse the control file, check the depends and the md5sums and such. I suspect doing that is overkill though. -Erik -- Erik B. Andersen email: [EMAIL PROTECTED] --This message was written using 73% post-consumer electrons--