A very short introduction to packaging .debs
Introductionπ
This mostly matches to all Debian-based distros (Debian, Ubuntu, Mint, β¦).
apt install coolpackage
All related file formats etc. are mostly defined in Debian, some small changes might be introduced by downstream distros (Ubuntu, β¦).
deb, dpkg, apt, repository, β¦
Notesπ
All examples use podman, but commands should work as-is with Docker, just
s/podman/docker/g.
.deb (the file format)π
deb822π
tar inside tar insideβ¦π
MVPπ
debian/changelog
debian/control
debian/copyright
debian/rules
debian/source/formatdpkg (the command)π
apt (the command)π
(apt) repository (the distribution point)π
sources.listπ
deb http://deb.debian.org/debian trixie main non-free-firmware
deb http://deb.debian.org/debian trixie-updates main non-free-firmware
deb http://deb.debian.org/debian-security trixie-security main contrib non-free non-free-firmwareStructure of an APT repositoryπ
root # (often: /debian or /ubuntu)
|-- dists # metadata
|-- pool # assets (sources and binaries; .deb, .tar, ...)
|-- ...Create new package from scratchπ
$ dh_make -s -c apache -e user@example.org -n -p coolpackage_1.0
Maintainer Name : unknown
Email-Address : user@example.org
Date : Thu, 06 Mar 2025 06:47:51 +0000
Package Name : coolpackage
Version : 1.0
License : apache
Package Type : single
Are the details correct? [Y/n/q]
Done. Please edit the files in the debian/ subdirectory now.See alsoπ
- https://www.debian.org/doc/debian-policy/
- https://wiki.debian.org/DebianRepository/Format
- https://wiki.debian.org/PackagingWithGit
- https://www.debian.org/doc/devel-manuals