Small http based apt repository howto
Imagine that you have created and released some rpms, it is now
possible to provide the same rpms via your own apt repository on your
internet service provider (ISP) http pages. The only thing you need
is enough disk space at your ISP.
- Make sure you've the tools provided by the
apt-rpm project installed.
Test this by executing: "which genbasedir" and "which genpkglist",
which must result in respectively: /usr/bin/genbasedir and
/usr/bin/genpkglist or something similar. Or check if you have the
rpm "apt" installed: rpm -qi apt.
- Create a directory structure like
here <name> may be any arbitrary name. However, easy to understand
names are: unstable, tested and stable. You're adviced to use 1 of those
- Copy your binary rpms to the directory:
- Copy your source rpms to the directory:
- Use the tool "genbasedir" to create the apt database(s). The databases
will end up in: ..../<architecture>/base. The directory base is
created by the tool genbasedir.
genbasedir --progress --flat --bz2only /home/joe/public_html/i386 tested
genbasedir --progress --flat --bz2only /home/joe/public_html/i386
- Create the same relative directory structure as created under 2)
in your webserver (remote/ISP environment). This is the directory
- You must now upload the files located at your harddisk in the
directories: base, RPMS.<name> and SRPMS.<name> to the same
directories in your webserver environment.
- It's now time to compose the uri that will be stored in the
/etc/apt/sources.list file at your client's system.
Let's assume that you created the directory structure under your
home directory at the webserver and the url for your webserver is:
This will result in the following uri:
rpm http://www.apt.com/joe <architecture>
rpm http://www.apt.com/joe i386
- You now have created an APT repository. Last thing to do is to
announce your repository to the world.
An example of an http based apt repository can be found
here (homevision) and
here (apt for SuSE).
The /etc/apt/sources.list uri for this repository is:
rpm http://home.wanadoo.nl/sbron i386 untested
The archive name "i386" above may be replaced by e.g.
This would than result in
rpm http://www.apt.com/joe okna/2002-i386 untested
Have fun. I'm looking forward to many http based apt repositories!
Last modified: 22 April 2007