[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Package names on http://www.debian.org/FTP/



J. H. M. Dassen writes:
 > It's not just you. The machine that hosts www.debian.org has switched OS
 > to Solaris. The FTP interface requires a 'dpkg-deb' binary, but I have
 > been unable to compile one for solaris.

Sorry if this is inappropriate -- I've got a couple hundred more email
messages to read to catch up to today, but: it's not very hard to do
the work of dpkg-deb in a shell script.  It's not as efficient as the
compiled dpkg-deb, but there's nothing all that difficult.  Also, if
you're only needing one set of options to dpkg-deb it's a lot simpler
to write than the full-blown interface.

Here's a basic sketch (without options processing).  I've not tested
this, so read for structure:

#!/bin/sh

set -e
d=`pwd`
t=/tmp/$$
trap 'echo failed rc=$?; rm -rf $t' 0
mkdir $t
cd $t
for pkg in *; do
	cat $pkg | (
		read version	# something like 0.939000
		read cntlen
		dd 2>/dev/null bs=$cntlen count=1 | tar zxf # DEBIAN/
		tar zxfv >.list #        contents
	)
done

# do whatever here

trap 'rm -rf $t' 0

The control files (control, preinst, postrm, etc.) appear in DEBIAN/.

Most of the options to dpkg-deb consist of extracting different pieces
of information from the archive.  For efficiency purposes, you'll
typically not want to follow this brute force model exactly.

But, lack of Solaris support for some feature Ian's using for data
integrity (and efficiency) shouldn't stop you from taking apart debian
packages.

Then again, Ian's free to change the package format, and there's been
some discussion of alternate formats, and I've not looked at the code
for quite some time -- this might not even work.

-- 
Raul



Reply to: