A Debian Archive Kit (dak) HowTo

This document describes setting up and configuring a dak repository for managing debian package repositories.


dak is a collection of tools that work together to manage a debian package repository. Designed and used by debian to maintain debian's packages, it is a toolset designed for maintaining a large data set, or lots of packages. In the current version of Debian 5.0 Lenny there are more than 20,000 packages for example - this is the type of repository dak was built for. If you are looking to create a personal repository or something smaller that what debian does, you may want to look at different tools other than dak.

Getting dak's Source Code

The source code for dak is kept in a git repository: [http://ftp-master.debian.org/git/ dak source] I am going to describe installing dak from source code as opposed to using a package. So we'll need git to get the source code to install dak on our machine, use git like this;

$ git clone http://ftp-master.debian.org/git/dak.git 

Now that we have dak's code, the first thing to do is to tell dak about the environment in which it will be run. This is done by editing the configuration files.


As one of the README files states, dak looks for its configuration files in /etc/dak/, so we'll create dak.conf there as well as apt.conf. If you do not have those config files you will not be able to run dak - you'll just get a warning saying dak cannot find the config file in the form of a python stack trace:

> SystemError: E:Opening configuration file /etc/dak/dak.conf - ifstream::ifstream (2 No such file or directory)

If you see this error you can assume that you need to create your dak.conf file. dak comes with a configuration file already, if you go into dak's source directory, i.e. dak, you will find it under config/examples/. This file is pretty minimal but some of the dak documentation says to start with this file rather than the config/examples/debian/dak.conf since that configuration is so specific to debian.

Along with the dak.conf file you will need to add the apt.conf in the same directory, though if you want to put the apt.conf file somewhere else you can define that location in dak.conf like this;

    // Optional filename of apt-ftparchive's config file; if not
    // present, the file is assumed to be 'apt.conf' in the same
    // directory as this file.
    AptConfig                "/org/ftp.debian.org/dak/config/debian/apt.conf";


[http://wiki.debian.org/DebianEdu/HowTo/Ftpmaster dak description at Debian Edu]