Debian Packaging

From Timon's Wiki
Revision as of 21:33, 3 May 2023 by Timon (talk | contribs)

Debian folder

The "debian"-Folder should be in the root of the project. It contains all Metadata and scripts for creating the final package.

Required Files

These files are the bare minimum to create a Debian package

control

The "control" file contains metadata about the package like version and dependencies, mostly used by package managers like apt. Full specification at: https://www.debian.org/doc/debian-policy/ch-controlfields.html

Building the package

Backports

Packages are typical first build for "sid" ("unstable") and after a few days also released for the current testing distribution (Currently code name "bookworm"). Older Stable distributions only get package updates for bug fixes. New features are only distributed with "backports". Backports are packages original build for a newer distribution, e.g. sid and are rebuilt for older distributions to provide new features.

Naming

The Version of a backported package should end with ~bpoDISTRO+BACKPORT_REVISION with "DISTRO" being replaces with the target distribution number, e.g. 10 for "buster" and "BACKPORT_REVISION" is the package revision number starting at 1.

dch --bpo will automatically create the correct changelog entry for the backport.

Distribution list with Examples
Codename Number Example
Bullseye 11 1.2.3-4~bpo11+1
Buster 10 1.2.3-4~bpo10+1
Focal 22.04 1.2.3-4~bpo22.04+1
Bionic 20.04 1.2.3-4~bpo20.04+1

Packages are only backported to the last 2 Distributions.