@@ -15,6 +15,15 @@ ARG distro=""
1515###
1616### Stage 0: build a dh-virtualenv
1717###
18+
19+ # This is only really needed on bionic and focal, since other distributions we
20+ # care about have a recent version of dh-virtualenv by default. Unfortunately,
21+ # it looks like focal is going to be with us for a while.
22+ #
23+ # (focal doesn't have a dh-virtualenv package at all. There is a PPA at
24+ # https://launchpad.net/~jyrki-pulliainen/+archive/ubuntu/dh-virtualenv, but
25+ # it's not obviously easier to use that than to build our own.)
26+
1827FROM ${distro} as builder
1928
2029RUN apt-get update -qq -o Acquire::Languages=none
@@ -27,7 +36,7 @@ RUN env DEBIAN_FRONTEND=noninteractive apt-get install \
2736 wget
2837
2938# fetch and unpack the package
30- # TODO: Upgrade to 1.2.2 once xenial is dropped
39+ # TODO: Upgrade to 1.2.2 once bionic is dropped (1.2.2 requires debhelper 12; bionic has only 11)
3140RUN mkdir /dh-virtualenv
3241RUN wget -q -O /dh-virtualenv.tar.gz https://github.com/spotify/dh-virtualenv/archive/ac6e1b1.tar.gz
3342RUN tar -xv --strip-components=1 -C /dh-virtualenv -f /dh-virtualenv.tar.gz
@@ -59,8 +68,6 @@ ENV LANG C.UTF-8
5968#
6069# NB: keep this list in sync with the list of build-deps in debian/control
6170# TODO: it would be nice to do that automatically.
62- # TODO: Remove the dh-systemd stanza after dropping support for Ubuntu xenial
63- # it's a transitional package on all other, more recent releases
6471RUN apt-get update -qq -o Acquire::Languages=none \
6572 && env DEBIAN_FRONTEND=noninteractive apt-get install \
6673 -yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
@@ -76,10 +83,7 @@ RUN apt-get update -qq -o Acquire::Languages=none \
7683 python3-venv \
7784 sqlite3 \
7885 libpq-dev \
79- xmlsec1 \
80- && ( env DEBIAN_FRONTEND=noninteractive apt-get install \
81- -yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \
82- dh-systemd || true )
86+ xmlsec1
8387
8488COPY --from=builder /dh-virtualenv_1.2~dev-1_all.deb /
8589
0 commit comments