dists ... contains meta information split up in releases, target platforms (architecture), etc.

... contains meta information split up in releases, target platforms (architecture), etc. pool ... contains the actual pool of software installation packages (.deb files)

set up the necessary directory structure put our (updated) .deb files into the pool tree run two commands using the apt-ftparchive tool to generate the repository meta data files (Release file, and Packages files for each architecture)

Code: (repository root) + dists | + stable (= suite) | + main (= section) | + binary-i386 (= architecture) + pool + main (= section) + m (= first letter of your software's name) + mysoftware (= umbrella name of your packages)

Code: APT::FTPArchive::Release { Version "1.0"; Origin "Peter Bittner Linux Hacking"; Label "Personal Debian Repository"; Suite "personal"; Codename "personal"; Architectures "i386"; Components "main"; Description "My personal repository for Debian/Lenny"; } APT::FTPArchive::Contents "no"; Default { Packages::Extensions ".deb"; Packages::Compress ". gzip bzip2"; Sources::Compress ". gzip bzip2"; MaxContentsChange 25000; }; Dir { ArchiveDir "/home/bittner/Development/debian/mirror"; }; Tree "dists/personal" { Sections "main"; Architectures "i386"; }; TreeDefault { Directory "pool/personal/main"; }; BinDirectory "pool/personal" { Packages "dists/personal/main/binary-i386/Packages"; };

Code: $ apt-ftparchive generate --contents=off personal-archive.conf $ apt-ftparchive -c personal-archive.conf release dists/personal > dists/personal/Release

If you write software for Linux and you write them for Debian systems (Debian, Ubuntu, and others ) you may want to provide your software asinstallation packages. And one day eventually you will want to set up a repository so others can download and install your software without fuzz.If you look at a Debian mirror (e.g. http://ftp.debian.org/debian/ ) you will find out one day that packages and meta information is split up into two main directories on the root level:We will do the same thing with our repository. I assume you already have your software packed infiles ( read this article to find out how to do this ).To build our repository we need toIf you have it simple your directory structure will look like this:For each software you will eventually add directories in, if you love hierarchical order. But those subdirectories are optional. If you provide packages for different architectures give them distict names (e.g., etc.) and put them into the same directory in thesubtree.For the last step we need to prepare a configuration file for apt-ftparchive , let's call itYou can use this configuration almost right away, the only unfortunate thing here is theoption (= your repository root): This must be an absolute path name. So, unless you're also calledchange it.Then run the following two commands to generate the metadata files of your repository:Now you have all your files in place in thesubtree as well (check forand thefiles, and see what is in there!). Running these commands will be necessary again each time you copy an updated version of anyfile into thetree of your repository.If you want others to access your repository over the web you can set up an Apache web server and place your personal repository in a Virtual Host in there. But that's another story... (a rather simple one)It's interesting to note thatwill not descend yoursubtree if you forget about thesection in the configuration file. Also, theshouldn't be necessary, but thedirective seems to be ignored.I believe these are bugs of the tool, correct me if I'm wrong...