For the most part, debian documentation is good. However, this week, while trying to setup a third-party repository for testing our debian/ubuntu port of vPostMaster, I discovered that the documentation for setting up a new apt repository leaves something to be desired. Unfortunately, this documentation is sorely needed; compared with the command to setup a yum repository for Red Hat, setting up a debian repository is quite user-unfriendly.
This document seemed to be the most likely source of information on how to quickly setup a debian repository:
Apparently, I'm not the only one who feels that it lacks in some important areas. This page, which eventually led me to the correct setup says:
“The main source of information during my discovery process was Aaron Isotton's Debian Repository HOWTO. This document gives an excellent overview of the process, but is lacking in some areas. Specifically, the finer details of generating all the files necessary to make your repository work.”
In other words, the Debian Repository HOWTO is a good starting point, however, it doesn't give all of the information you'll need to actually setup a repository.
Below, I'll briefly cover what I did to get our repository setup, and then what areas could be more clear in the repository HOWTO. This may be something I could contribute to, but I still don't really know enough about the details to do it justice at this point.
How I set up a debian apt repository
For our setup, I was only including two packages. The necessary directory setup never made sense to me, but I was able to put all of the binary and source files into the same directory and it seemed to work.
Copy all of the files created by the buildpackage process into your repository directory. I.e. the files created with
$ dpkg-buildpackage -rfakeroot
as explained in the Debian New Maintainers' Guide.
* Create the Release file.
* Create the package description files with these commands:
$ dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz $ dpkg-scansources . /dev/null | gzip -9c > Sources.gz
I've bolded text above that needs more explination.
The Release file
Apparently you need a Release file in each directory in your repository that contains any packages (source or binary). The repository HOWTO led me to believe that this was optional and only needed if you use Pinning (which is never explained). There's also some conflicting information about the minimum required fields that need to be in this file. I had to find myself several examples before I felt confident that I had what was needed. This is what worked:
Archive: unstable Origin: Tummy.com Label: Debian vPostMaster Architecture: all i386 source
This indicates that the repository is for debian “unstable”, includes the company name as the origin, I've named it “Debian vPostMaster” as the descriptive Label, and since I'm including source and binary packages for all architectures and i386, that list of architecture.
The blow is what worked for our setup. The URLs may yet change, so if you're interested in vPostMaster on debian or ubuntu, check the official vPostMaster download page for details about what lines you should add when the port has been tested and is released.
# tummy.com repository for vpostmaster deb http://yum1.tummy.com/vpostmaster/debian/unstable / deb-src http://yum1.tummy.com/vpostmaster/debian/unstable /
I had some problems with variations of the above, even after modifying the repository directory on the web server. Lines such as
deb http://yum1.tummy.com/vpostmaster/debian unstable deb http://yum1.tummy.com/vpostmaster/debian unstable non-free
caused apt to search in directories that were non-obvious. And without the Release file in the directory, I may have even had the directory tree setup correctly and not known it.
Suggestions for the Repository HOWTO