Skip to content

Instantly share code, notes, and snippets.

@abitrolly
Last active December 17, 2020 13:14
Show Gist options
  • Save abitrolly/8ba39389d61fae686974b0f378db21fb to your computer and use it in GitHub Desktop.
Save abitrolly/8ba39389d61fae686974b0f378db21fb to your computer and use it in GitHub Desktop.
Debian Packaging

Several files contain instructions for packing a software for Debian. The all should be placed in debian/ subdirectory. If upstream sources already come with debian/ dir, they are said to be debianized or native. If there is no such dir, then it is added by diff (.diff.gz) or a separate archive (.debian.tar.gz).

The source code with debian/ dir should be compressed and pushed to Debian to build.

debian package types

native debian package

  • upstream source comes in .orig.tar.gz

non-native debian package

  • upstream source comes in .tar.gz

explanation

For making a package out of some source Debian needs instructions. These instructions are placed into debian/ subdirectory. For native packages, upstream source (in .tar.gz) already includes the debian/ subdir. For non-native packages, upstream code (in .orig.tar.gz) is missing the debian/ dir. The debian/ dir for it is packed into .diff.gz file and supplied along.

https://man7.org/linux/man-pages/man1/dpkg-source.1.html#SOURCE_PACKAGE_FORMATS

dh-make or dh_make
  • [-] doesn't provide public domain choice of license, generates a lot of files, needs cd into dir
  • [+] generates upstream source archive from dir

debmake

  • [-] needs explicit option to support .orig.tar.xz
comments and empty lines in Debian .dsc

Both not allowed. Empty lines are for separating paragraphs, and there is only one paragraph in .dsc.

https://www.debian.org/doc/debian-policy/ch-controlfields.html#debian-source-control-files-dsc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment