# Introduction * Why? * How? ----------------------------------------------------------------------------- # Why? * install repeatedly (test environments) * install on many hosts (scap) * others need to install ----------------------------------------------------------------------------- # Overview ![](debian.svg) ----------------------------------------------------------------------------- # In commands ~~~sh $ git archive HEAD | gzip > ../heippa_0.6.orig.tar.gz $ dpkg-buildpackage -us -uc $ lintian $ ls -l .. heippa heippa_0.6-1_amd64.buildinfo heippa_0.6-1_amd64.changes heippa_0.6-1_amd64.deb heippa_0.6-1.debian.tar.xz heippa_0.6-1.dsc heippa_0.6.orig.tar.gz heippa-dbgsym_0.6-1_amd64.deb $ ~~~ ----------------------------------------------------------------------------- # `debian/changelog` ~~~{.text .numberLines} heippa (0.6-1) unstable; urgency=medium * Trigger release build -- Lars W Tue, 17 Jul 2018 23:11:24 +0300 ~~~ Use the `dch` command to add a new entry. Formatting MUST be followed strictly. ----------------------------------------------------------------------------- # `debian/control` ~~~{.text .numberLines} Source: heippa Maintainer: Lars Wirzenius Section: misc Priority: optional Standards-Version: 3.9.2 Build-Depends: debhelper (>= 7.3.8) Package: heippa Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: short desc Long desc. ~~~ ----------------------------------------------------------------------------- # `debian/rules` ~~~{.makefile .numberLines} #!/usr/bin/make -f %: dh $@ override_dh_auto_install: dh_install ~~~ ----------------------------------------------------------------------------- # `debian/install` ~~~{.text .numberLines} heippa usr/bin ~~~ ----------------------------------------------------------------------------- # Hands on! * `http://git.liw.fi/heippa/` * Debian with the following installed: - build-essential - lintian - fakeroot - anything listed as a build-dependency in debian/control - should probably have root * `ssh guestX@95.217.208.205` for a suitable X (1..10) - declare which one you choose - password on chat ----------------------------------------------------------------------------- # Scap `debian/rules` ~~~{.makefile .numberLines} #!/usr/bin/make -f export PYBUILD_NAME=scap export DEB_BUILD_OPTIONS=nocheck PKG_VERSION = $(shell dpkg-parsechangelog -S Version) %: dh $@ --with python2,bash-completion \ --buildsystem=pybuild override_dh_auto_configure: dh_auto_configure echo "__version__ = '$(PKG_VERSION)'" \ > scap/version.py ~~~ ----------------------------------------------------------------------------- # What next? * upload to an APT repository? - `dput` or `dupload` - requires permission from the repository admins * setting up your own APT repository? - reprepro or aptly, probably - not for the faint of heart * make a package? - you _will_ run into trouble, don't be shy to ask for help - WMF employs several current and former Debian developers ----------------------------------------------------------------------------- # Further reading ----------------------------------------------------------------------------- # Legalese Copyright 2020 Wikimedia Foundation This content is licensed under the Creative Commons Attribution-ShareAlike 4.0 International ([CC BY-SA 4.0][]) licence. [CC BY-SA 4.0]: https://creativecommons.org/licenses/by-sa/4.0/ --- title: "Debian packaging" author: "Lars Wirzenius / Wikimedia Foundation" date: "Version for 2020-05-18" ...