A Debian Archive Kit (dak) HowTo

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

Introduction

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. Below is a list of other repository management tools;

dpkg-scanpackages and dpkg-scansources (from the dpkg-dev package)
debarchiver
reprepro (previously called mirrorer)
apt-move
mini-dinstall (for personal repos)
mini-dak (used by debian-ports.org)
perl library (to manipulate ar archives)
apt-ftparchiver (from the apt-utils package)

Getting dak's Source Code

The source code for dak is kept in a git repository: 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.

Configuration

dak looks for its configuration files in /etc/dak/, so you'll need to 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 some configuration files, if you go into dak's source directory, i.e. dak, you will find them under config/. For example, the config/examples/dak.conf This file is pretty minimal but you might want to start with this file rather than the config/examples/debian/dak.conf since that configuration is so specific to debian. There are configuration files under debian-security which also might be helpful.

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";

A specific README file address the configuration files, find it in dak/docs/README.config.

Now that we have our configuration files in place, we can try to run dak by running dak.py like this;

./dak.py

Nothing will happen of course except that dak will spit out some help information. That help information lists all of the arguments you can pass to dak. Furthermore, we need to set up the database for dak.

Resources

dak description at Debian Edu