summaryrefslogtreecommitdiff
path: root/debian.md
diff options
context:
space:
mode:
authorLars Wirzenius <lwirzenius@wikimedia.org>2020-05-15 15:52:28 +0300
committerLars Wirzenius <lwirzenius@wikimedia.org>2020-05-15 15:52:28 +0300
commitd002c90b67d7c58e3260f82e6e6daebd41e07c5b (patch)
treec4d8e910291dd983e8b1547209ce516b1786534d /debian.md
parent051426cfd7f8a66a78b02cc34da3f9e2e2372d13 (diff)
downloadwmf-talks-d002c90b67d7c58e3260f82e6e6daebd41e07c5b.tar.gz
Add debian packaging talk slides
Diffstat (limited to 'debian.md')
-rw-r--r--debian.md182
1 files changed, 182 insertions, 0 deletions
diff --git a/debian.md b/debian.md
new file mode 100644
index 0000000..2727479
--- /dev/null
+++ b/debian.md
@@ -0,0 +1,182 @@
+# 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 <liw@liw.fi> 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 <liw@liw.fi>
+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
+
+<https://wiki.debian.org/Packaging>
+
+<https://www.debian.org/devel/>
+
+-----------------------------------------------------------------------------
+
+# 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"
+...