Debian Packaging: Difference between revisions

From Timon's Wiki
Created blank page
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
==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 <code>~bpoDISTRO+BACKPORT_REVISION</code> 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.
<code>dch --bpo</code> will automatically create the correct changelog entry for the backport.
{| class="wikitable"
|+Distribution list with Examples
!Codename
!Number
!Example
|-
|Bullseye
|11
|<code>1.2.3-4~bpo11+1</code>
|-
|Buster
|10
|<code>1.2.3-4~bpo10+1</code>
|-
|Jammy
|22.04
|<code>1.2.3-4~bpo22.04+1</code>
|-
|Focal
|20.04
|<code>1.2.3-4~bpo20.04+1</code>
|}
Packages are only backported to the last 2 Distributions.

Latest revision as of 20:54, 24 May 2023

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
Jammy 22.04 1.2.3-4~bpo22.04+1
Focal 20.04 1.2.3-4~bpo20.04+1

Packages are only backported to the last 2 Distributions.