Anybody want to port ipkg to busybox?

Andy Green andy at warmcat.com
Mon Feb 13 17:56:04 UTC 2006


Rob Landley wrote:

> Query: what format is the new rpm database in?  If you're sucking in a 
> dependency on sleepcat's db, that has a significant "ick" factor.
> 
> In an off-list discussion of ipkg support, somebody brought up the possibility 
> of having a common database backend for rpm, dpkg, and ipkg, that stored the 

Well it uses a cunning plan which makes implementation of the "database"
extremely efficient on busybox footprint: on package install it copies
the RPM header wholesale into /var/lib/rpm named as the package
basename.  So for (a real) example, you install a 25K
iptables-1.3.4.20060130-7.arm.rpm, and a 2025-byte file
/var/lib/rpm/iptables is generated.  The biggest on my system is the one
for busybox, 17725 bytes from a 346K RPM.  Since this is basically the
RPM without cpio archive, all of the existing RPM parsing routines "just
work" when pointed at it giving extreme efficiency and no real database.

Detection of what is installed consists of walking /var/lib/rpm/*
looking inside what is there as the need arises,eg

# rpm -qa
gcc-4.0.2-24
mtd-20050122.orig-1
php-5.1.1-4
curl-7.15.1-4
lsof-4.76-3
nmap-4.00-10
zlib-1.2.3-1
audio-uk-0.1-21
linux-2.6.15-122
speex-1.1.11.1-6
vpman-0.1-52
iptables-1.3.4.20060130-7
terminfo-0.1-3
basefilesystem-0.1-8
dropbear-0.47-9
ntpclient-2003.194-1
readline-5.1-22
openssl-libs-0.9.8a-1
watchdog-monitor-0.1-4
libedit-0.3-11
ncurses-5.5-1
network-0.1-5
libgcc-4.0.2-2
u-boot-1.1.4-30
procps-3.2.6-8
uClibc-0.9.28-8
tinylogin-1.4-2
gcc-libstdc++-4.0.2-24
lighttpd-1.4.8-8
octotux-utils-0.1-17
busybox-1.1.0-37
# rpm -q -l tinylogin
/bin/addgroup
/bin/adduser
/bin/delgroup
/bin/deluser
/bin/tinylogin
/usr/bin/passwd
/usr/bin/vlock
#

The RPM frontend is not compressed, so if you use a compressed
filesystem the /var/lib/rpm/* "database" will be half what it seems.  If
the other package formats can use this trick, I really recommend it.

-Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4492 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060213/bb9e7d85/attachment.bin 


More information about the busybox mailing list