Debian Packages

To download these packages using Debian-based package/dependency management tools, add the following lines to your /etc/apt/sources.list file (or to the configuration dialogue in your chosen tools):

deb lenny paul
deb-src lenny paul

You may then need to run the following command, or you can import my key information first and then return to run this command (using sudo or as root):

apt-get update

New and updated packages should become available. Be warned that these could compete with packages obtained through the standard repositories, even though I try to prevent such things from occurring.

Importing Key Information

My signing key can be imported into your system as follows:

apt-key add paul.asc

Generally, you should try and verify such keys and not just trust those you find on the Internet. I exported this key as follows:

gpg -a --export 9F308B3C > paul.asc

Making This Repository

First, I had to set up a build environment for package building under Debian Lenny (the current stable version), not the distribution I am actually using (using sudo or as root):

pbuilder create --distribution lenny --mirror

(Here, I choose a local mirror.)

Then, taking Shed Skin as an example, I exported the package code from Subversion into a separate directory:

svn export . ../shedskin-snapshot-20100114

I then added suitable packaging files to the distribution.

In the exported code directory, I then ran the build process in the build environment (sandbox) created above.

pdebuild --auto-debsign --debsign-k 9F308B3C

(Where 9F308B3C is taken from gpg --list-keys and refers to the key I sign the packages with.)

Hopefully, the binary package then emerges in the /var/cache/pbuilder/result/ directory, while some other related files appear in the parent directory.

Repository Structure

The structure of this repository was built locally and looks like this:


Populating the Repository

The binary package created above is copied into the repository as follows, along with a changelog for the binary package:

cp /var/cache/pbuilder/result/shedskin_0.3-1_all.deb dists/lenny/paul/binary-i386/
cp /var/cache/pbuilder/result/shedskin_0.3-1_i386.changes dists/lenny/paul/binary-i386/

The source files are copied from their location as follows:

cp /var/cache/pbuilder/result/shedskin_0.3-1.dsc dists/lenny/paul/source/
cp /var/cache/pbuilder/result/shedskin_0.3-1.tar.gz dists/lenny/paul/source/

And from the parent directory of the build directory:

cp shedskin_0.3-1_source.changes dists/lenny/paul/source/

Finalising the Repository

To make sure that the repository is usable, a number of activities need to be performed:

  1. Source and package indexes must be created.
  2. A release file must be created and signed.

I found that thanks to the efforts of others, the following script could be used to do this work:

rm dists/lenny/Release*

apt-ftparchive packages dists/lenny/paul/binary-i386/ > dists/lenny/paul/binary-i386/Packages
gzip -9c dists/lenny/paul/binary-i386/Packages > dists/lenny/paul/binary-i386/Packages.gz

apt-ftparchive sources dists/lenny/paul/source/ > dists/lenny/paul/source/Sources
gzip -9c dists/lenny/paul/source/Sources > dists/lenny/paul/source/Sources.gz

apt-ftparchive release dists/lenny \
        -o APT::FTPArchive::Release::Origin="Paul Boddie" \
        -o APT::FTPArchive::Release::Codename="lenny" \
        -o APT::FTPArchive::Release::Architecture="all" \
        > Release

mv Release dists/lenny/
gpg -a -b --sign -o dists/lenny/Release.gpg dists/lenny/Release

Finally, the files are uploaded to the public site.