%% Debian for Developers %% Copyright 2001 Wichert Akkerman %% %% Presented at the LinuxWorld Conference & Expo San Francisco, August 2001 %% %% Abstract: %% A full GNU/Linux distribution is made up from a packaging system, %% a large amount of software and a lot of subsystems and policies %% that make sure everything forms one consistent system. %% %% This tutorial shows how Debian is build, includes an explanation %% of the packaging system and describes the various subsystems and %% policies surrounding them from a developers perspective. %% %% %% Define the fonts we will use %% %deffont "standard" tfont "arial.ttf" %deffont "typewriter" tfont "cour.ttf" %deffont "italic" tfont "ariali.ttf" %% %% Default settings for special lines %% %default 1 leftfill, fore "black", back "white", bimage "background.bmp" %default 2 size 7, vgap 10, prefix " ", font "standard" %default 3 size 2, bar "gray70", vgap 10 %default 4 size 5, vgap 30, font "standard" %% %% Default settings for indented lines %% %tab 1 size 5, vgap 40, prefix " ", icon box "green" 50 %tab 2 size 4, vgap 40, prefix " ", icon arc "red" 50 %tab 3 size 3, vgap 40, prefix " ", icon delta3 "blue" 40 %% %%%%%%%%%%%%%%%%%% %page %nodefault, font "standard", fore "black", back "white", bimage "background.bmp" %center Debian a developers walk-through %size 5 Wichert Akkerman Robert van der Meulen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Overview What is Debian? Why packages Package formats Packaging system Building packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page What is Debian %font "italic" `The Debian Project is an association of individuals who have made common cause to create a free operating system.' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page What is Debian? More specifically, Debian: is a completely open volunteer organization run on a large number of architectures (6 released) is quite international is one of the most popular GNU/Linux distributions is the largest GNU/Linux distribution (3901 packages) works with companies to develop and maintain software is focused on Freedom is well represented in the free software world Free Standards Group Gnome Foundation board Linux International Linux Professional Institute Linux Standards Base XFree86 ... %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Why use a packaging system continuous configuring and compiling of sotware takes a lot of time easy to make mistakes have to keep track of archive sites keeps track of installed packages easy install, upgrade and removal package relations insure system integrity %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Why use a distribution single source of packages well integrated system support others have a similar system so can help distribution support channels security updates %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page What exactly is a package? A package is a combination of files that can be installed on a system and metadata that describes those files. As such it is the basic block with which a packaging system works. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page What exactly is a package? There are two types of packages: binary packages source packages For both the same design principles hold: easily extractable using only standard UNIX tools easily extendible easily modifiable without special tools %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Binary package format Binary packages contain the data that you install on a filesystem. Debian uses the deb format which is an %cont, font "typewriter" ar %font "standard" file that consists of three files: debian-binary: version information control.tar.gz: package metadata data.tar.gz: the to-be-installed data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Binary package format %center, newimage "package.eps" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page The control data The control.tar.gz file contains several files which describe the package: control: metadata maintainer scripts preinst postinst prerm postrm other files config template %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Package metadata The metadata describes the contents of a package. It has both the information the package system needs and descriptive information for users: name version architecture dependencies description etc. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Metadata syntax As almost all files in the Debian package system a RFC822 style syntax is used: field names and values seperatons by colon (:) multi-line fields by starting extra lines with whitespace blocks seperated by newline %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Version numbers A version number consists of two parts: the upstream version, and the debian revision, which are seperated by a hyphen (-). Each part may consist of alphanumeric ASCII characters and the characters `.', `+', `-' and `:'. If there is no debian revision then the upstream version is not allowed to have a -. Comparing version number is done by breaking them into pieces and comparing those from left to right. Pieces are seperated by a transition from numbers to characters and by non-alphanumeric characters. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Example control file %font "typewriter", size 3 Package: modutils Version: 2.4.7-4 Section: base Priority: required Architecture: i386 Depends: libc6 (>= 2.2.3-7), sysvinit (>=2.71-2) Suggests: ksymoops Replaces: manpages (<=1.15-3) Installed-Size: 467 Origin: debian Maintainer: Wichert Akkerman Bugs: debbugs://bugs.debian.org/ Description: Linux module utilities. These utilities are intended to make a Linux modular kernel manageable for all users, administrators and distribution maintainers. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Maintainer scripts Currently there are 4 maintainer scripts that dpkg will use: preinst postinst prerm postrm Other files that can be present: config template %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Source package format The source packages format is designed to make it trivial to access the untouched upstream source and the Debian specific changes. This is done by using two or three seperate files: a .dsc file that describes the source package a .tar.gz file with the untouched upstream source an optional .diff.gz file with the Debian changes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Debian native source A Debian native source is a source which is already completely setup to build packages. Since it needs no modifications no .diff.gz file is used. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page non-native sources Most sources need some modification: adding a debian/ subdirectory with the packaging magic modifying paths to be FHS complient portability changes These changes are stored in a compressed (unified) diff. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page The .dsc file The source description (.dsc) file contains information about a source. It contains: administrative info package name maintainer standards version the list the binary packages that are build from it the list of architectures for which it can be build a list of system requirements that are needed for a build a list of the source files themselves %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Example .dsc file %font "typewriter", size 3 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Format: 1.0 Source: modutils Version: 2.4.7-3 Binary: modutils-full, modutils-basic, modutils Origin: debian Maintainer: Wichert Akkerman Architecture: any Standards-Version: 3.5.0 Build-Depends: flex, bison, dpkg-dev (>= 1.9.0) Files: 5781f69e9b4e7ad9f7ff5f5802affa9f 253256 modutils_2.4.7.orig.tar.gz e0c63a62f9314798cc7ab92ef037aa53 19593 modutils_2.4.7-3.diff.gz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iQIeBAEUAwAGBQI7fupUAAoJEH18BjbHbzjSEBwIAIkZ3eq7Ctga+/+h/OAu+cIK 9inW51wlhy99B1KZreq9YaklAGAz68k0JocA6F0Xmdx4EsgrOdc5QhpQPKW3HTwY j2gnnru4RsW2f6OQpQzW8ekqhHKRMwAzcF0daOlHxe7+kV3uTibbc9xSLvlxmtcz Ab47fQQfktv4qle+3dvlolw= =BDW1 -----END PGP SIGNATURE----- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page The packaging system The packaging system consists of various parts that work together. They can roughly be divided in three parts: System management Development Archive management %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page System management tools: dpkg libapt-get debconf frontends (aptitude,deity,dselect) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page dpkg dpkg is the low-level tool used to manipulate packages and manage the package status information. In order to not be tied completely to a single package format a lot of the work to build and extract a package file is handled by a seperate tool called %cont, font "typewriter" dpkg-deb. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page dpkg database (/var/lib/dpkg) dpkg stores all its data in the /var/lib/dpkg directory as seperate text files. The important files are: available status diversions info/ alternatives/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page status Stores both the current and wanted state of a package. Has a copy of the package control information for installed packages. %font "typewriter", size 3 Package: emacs19 Status: purge ok not-installed Priority: optional Section: editors %font "standard", size 5 Status has three entries wanted state (unknown, install, hold, deinstall, purge) error state (ok, reinstreq) current state (not-installed, unpacked, half-configured, installed, half-installed, config-files) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page libapt-pkg dpkg is a low-level way of dealing with packages; for non-trivial \ tasks more intelligence is required. This is provided by the apt \ library, which gives us: high-level logic for dealing with package relations can handle complex installations and upgrades database with lists of available packages ability to download packages if needed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page apt methods Stand-alone tools which libapt can use to download files using a \ specific protocol. Currently supported are: cdrom copy file ftp http %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Example apt configuration %font "typewriter", size 3 # Our local mirror deb file:/local/debian/archive potato mirror local deb file:/local/debian/archive woody mirror local # Dutch mirror deb http://ftp.debian.nl/debian potato main contrib non-free deb-src http://ftp.debian.nl/debian potato main contrib non-free deb http://ftp.debian.nl/debian woody main contrib non-free deb-src http://ftp.debian.nl/debian woody main contrib non-free ## Non-US deb http://non-us.debian.org/debian-non-US potato/non-US main contrib non-free deb-src http://non-us.debian.org/debian-non-US potato/non-US main contrib non-free deb http://non-us.debian.org/debian-non-US woody/non-US main contrib non-free deb-src http://non-us.debian.org/debian-non-US woody/non-US main contrib non-free ## Security updates deb http://security.debian.org/ potato/updates main contrib non-free deb-src http://security.debian.org/ potato/updates main contrib non-free %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page dselect The traditional frontend to the Debian package management system. dselect is part of the dpkg sources and uses the dpkg datafiles directly. dselect consists of multiple parts: the dselect frontend itself, and dselect methods which abstract updating the list of available packages, installing packages and removing packages. These days the most common dselect method is.... %pause apt. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Putting it all together %center, newimage "overview.eps" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page A world of packages Packages rarely are useful by themselves: often a package needs another package, for example it uses a library, or needs a an external tool to do some work. These relations between packages are reflected in a diverse set of relations. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Package relations Pre-Depends: list of packages that have to be fully installed before dpkg can start installing this package. Depends: list of packages that have to be fully installed before dpkg can configure this package. Conflicts: list of packages that can not be installed at the same time Replaces: a list of packages whose files a package is allowed to overwrite Recommends: a list of packages that might also be useful Suggests: a weaker form of Recommends %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Alternatives explosion Dependencies and conflicts can cumbersome with an increasing number alternatives for a package: everytime a new alternative was introduced all packages referencing it needed to be updated. An example: Assume sendmail, postfix and exim are the only MTAs available. Mutt and other mail user software will then have to use a dependency like this: %font "typewriter", size 3 Package: mutt Depends: sendmail | postfix | exim %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Alternatives explosion The resulting package relations look like this: %center, newimage "simple-depends.eps" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page It's a mess of relations Now a new MTA is introduced: smail. Mutt and all similar packages need to be updated: %font "typewriter", size 3 Package: mutt Depends: sendmail | postfix | exim | smail %center, newimage "complex-depends.eps" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Virtual packages To make this easier to handle we use virtual packages. This provides a method to state that a package provides a certain interface or functionality. This is done by introducing a provides-relation. Using this we now get: %font "typewriter", size 3 Package: mutt Depends: mail-transport-agent Package: sendmail Provides: mail-transport-agent Package: smail Provides: mail-transport-agent %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Virtual packages in action The package relations become a lot simpler: %center, newimage "virtual-depends.eps" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Building packages Building packages involves a few things: understanding the dpkg-dev tools and their files knowing the Debian policy guidelines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page the debian/ subdirectory The dpkg-dev tools use a couple of special files in the debian/ subdirectory that describe the source and the packages that are build from it, and contain the instructions for building the package. These files have to be in every source. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page the debian/ subdirectory The special files are: debian/changelog debian/control debian/rules %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page debian/changelog Any changes to the source are listed in the debian/changelog file. This file is also used to extract the version number for the packages being build. To facilitate this a special format is used that is parsed by dpkg-parsechangelog. %font "typewriter", size 3 modutils (2.4.7-4) unstable; urgency=low * Make flag_unresolved_error a static int in depmod.c so things compile again for combined 32/64 binaries -- Wichert Akkerman Sun, 19 Aug 2001 13:14:23 +0200 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page debian/control This file describes the source and the packages that are generated from it. It contains multiple parts: the first part describes the source each following part describes a binary package. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page debian/control example %font "typewriter", size 3 Source: modutils Section: base Priority: required Maintainer: Wichert Akkerman Standards-Version: 3.5.0 Build-Depends: flex, bison, dpkg-dev (>= 1.9.0) Bugs: debbugs://bugs.debian.org/ Origin: debian Package: modutils Architecture: any Depends: ${shlibs:Depends}, sysvinit (>=2.71-2) Replaces: manpages (<=1.15-3) Suggests: ksymoops Description: Linux module utilities. These utilities are intended to make a Linux modular kernel manageable for all users, administrators and distribution maintainers. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page debian/control fields Source description fields Source Section Priority Maintainer Standards-Version Build-* Bugs Origin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page debian/control fields Package description fields Package Architecture Essential Pre-Depends, Depends, Recommends, Suggests, Replaces, Conflicts Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page debian/control example %font "typewriter", size 3 Source: modutils Section: base Priority: required Maintainer: Wichert Akkerman Standards-Version: 3.5.0 Build-Depends: flex, bison, dpkg-dev (>= 1.9.0) Bugs: debbugs://bugs.debian.org/ Origin: debian Package: modutils Architecture: any Depends: ${shlibs:Depends}, sysvinit (>=2.71-2) Replaces: manpages (<=1.15-3) Suggests: ksymoops Description: Linux module utilities. These utilities are intended to make a Linux modular kernel manageable for all users, administrators and distribution maintainers. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page debian/rules Framework for building packages: configure build install clean up %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Basic steps in building a package build all binaries, documentation, etc. construct a temporary directory and install everything in there install special Debian files use dpkg-shlibdeps to generate library dependencies use dpkg-gencontrol to generate a control file build the deb (dpkg --build) check the deb (lintian) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page The dpkg-dev utilities The utilties involved in building a package are: dpkg-source dpkg-checkbuilddeps dpkg-shlibdeps dpkg-gencontrol dpkg-genchanges dpkg-buildpackage dpkg-distaddfile %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Lintian Policy violations Bugs Common errors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page dpkg-divert/update-alternatives dpkg-divert is used to override other packages' files. update-alternatives is used to have alternative versions of a program. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Complex packages and package actions Renaming a package Splitting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Maintaining a debian archive Sources Packages The override file %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Development tools: dpkg-dev debhelper %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Archive management tools: dpkg-scanpackages & dpkg-scansources apt-ftparchive %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page Archive structure The packaging systems uses Packages and Sources files to get information about packages and their location. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page dpkg-scanpackages Basic tool to generate a Packages file. Syntax is: %font "typewriter", size 3 dpkg-scanpackages [] %font "standard", size 5 This generates an index of the packages in %cont, font "typewriter" %cont, font "standard" with the overrides in %cont, font "typewriter" . %cont, font "standard" An optional extra prefix can be added as well. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page The override file This file can be used to change the section and priority information of a package. %font "typewriter", size 3 amiga-fdisk required admin at important admin cron important admin debian-cd optional contrib/admin xezmlm optional contrib/admin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page apt-ftparchive Another tool to create indexes for packages. The advantages of apt-ftparchive are: generates Contents files as well can create multiple indexes in one command caches data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %page apt-ftparchive configuration %font "typewriter", size 3 Default { Package::Compress ". gzip"; Sources::Compress ". gzip"; Contents::Compress ". gzip"; }; Dir { ArchiveDir "/local/debian/archive"; OverrideDir "/local/debian/archive/indices"; }; Tree "dists/potato" { Sections "local mirror"; Architectures "i386"; BinCacheDb "/local/debian/archive/indices/potato.db"; };