diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03e81047f7..ca90d7953f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,12 @@ jobs: fail-fast: false matrix: target: + - debian-buster - debian-bullseye + - ubuntu-bionic + - ubuntu-focal + - ubuntu-impish + - ubuntu-jammy steps: - name: Checkout diff --git a/deb/common/compat b/deb/common/compat deleted file mode 100644 index f599e28b8a..0000000000 --- a/deb/common/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/deb/common/control b/deb/common/control index 8b6ce4a28f..653f6e705a 100644 --- a/deb/common/control +++ b/deb/common/control @@ -7,7 +7,7 @@ Build-Depends: bash, ca-certificates, cmake, dh-apparmor, - debhelper (>= 10~) | dh-systemd, + debhelper-compat (= 12), gcc, git, libbtrfs-dev | btrfs-tools, diff --git a/deb/common/docker-ce.docker.service b/deb/common/docker-ce.docker.service new file mode 120000 index 0000000000..6bd6b9f43a --- /dev/null +++ b/deb/common/docker-ce.docker.service @@ -0,0 +1 @@ +engine/contrib/init/systemd/docker.service \ No newline at end of file diff --git a/deb/common/docker-ce.docker.socket b/deb/common/docker-ce.docker.socket new file mode 120000 index 0000000000..975ffdb12b --- /dev/null +++ b/deb/common/docker-ce.docker.socket @@ -0,0 +1 @@ +engine/contrib/init/systemd/docker.socket \ No newline at end of file diff --git a/deb/common/docker-ce.docker.upstart b/deb/common/docker-ce.docker.upstart deleted file mode 100644 index d58f7d6ac8..0000000000 --- a/deb/common/docker-ce.docker.upstart +++ /dev/null @@ -1,72 +0,0 @@ -description "Docker daemon" - -start on (filesystem and net-device-up IFACE!=lo) -stop on runlevel [!2345] - -limit nofile 524288 1048576 - -# Having non-zero limits causes performance problems due to accounting overhead -# in the kernel. We recommend using cgroups to do container-local accounting. -limit nproc unlimited unlimited - -respawn - -kill timeout 20 - -pre-start script - # see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount - if grep -v '^#' /etc/fstab | grep -q cgroup \ - || [ ! -e /proc/cgroups ] \ - || [ ! -d /sys/fs/cgroup ]; then - exit 0 - fi - if ! mountpoint -q /sys/fs/cgroup; then - mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup - fi - ( - cd /sys/fs/cgroup - for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do - mkdir -p $sys - if ! mountpoint -q $sys; then - if ! mount -n -t cgroup -o $sys cgroup $sys; then - rmdir $sys || true - fi - fi - done - ) -end script - -script - # modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) - DOCKERD=/usr/bin/dockerd - DOCKER_OPTS= - if [ -f /etc/default/$UPSTART_JOB ]; then - . /etc/default/$UPSTART_JOB - fi - exec "$DOCKERD" $DOCKER_OPTS --raw-logs -end script - -# Don't emit "started" event until docker.sock is ready. -# See https://github.com/docker/docker/issues/6647 -post-start script - DOCKER_OPTS= - DOCKER_SOCKET= - if [ -f /etc/default/$UPSTART_JOB ]; then - . /etc/default/$UPSTART_JOB - fi - - if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then - DOCKER_SOCKET=/var/run/docker.sock - else - DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\W*unix://\K(\S+)' | sed 1q) - fi - - if [ -n "$DOCKER_SOCKET" ]; then - while ! [ -e "$DOCKER_SOCKET" ]; do - initctl status $UPSTART_JOB | grep -qE "(stop|respawn)/" && exit 1 - echo "Waiting for $DOCKER_SOCKET" - sleep 0.1 - done - echo "$DOCKER_SOCKET is up" - fi -end script diff --git a/deb/common/docker-ce.maintscript b/deb/common/docker-ce.maintscript new file mode 100644 index 0000000000..70fe2b6434 --- /dev/null +++ b/deb/common/docker-ce.maintscript @@ -0,0 +1,3 @@ +# *technically* this "5:21~" should be something more specific like "5:22.06.1-1~" (the first released version to introduce this "rm_conffile" line), but as long as it's strictly *newer* than the last version to ship the conffile and stricly *older* than the first version with the rm_conffile line, it should work fine (so we're using the will-never-exist major version of "21" as our in-between release for the 20.xx to 22.xx) +rm_conffile /etc/init/docker.conf 5:21~ +# this should stick around in the package until there are no more users who will ever upgrade from "5:20.xx" to something newer (it's reasonably harmless for this to stay indefinitely) diff --git a/deb/common/rules b/deb/common/rules index 9b495e9388..d3e8b61526 100755 --- a/deb/common/rules +++ b/deb/common/rules @@ -62,6 +62,12 @@ override_dh_auto_test: override_dh_strip: # Go has lots of problems with stripping, so just don't +# http://manpages.debian.org/dh_dwz +override_dh_dwz: + # dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed) + @# https://packages.debian.org/debhelper + @# https://packages.ubuntu.com/debhelper + override_dh_auto_install: # docker-ce-cli install install -D -m 0644 cli/contrib/completion/fish/docker.fish debian/docker-ce-cli/usr/share/fish/vendor_completions.d/docker.fish @@ -69,8 +75,6 @@ override_dh_auto_install: install -D -m 0755 cli/build/docker debian/docker-ce-cli/usr/bin/docker # docker-ce install - install -D -m 0644 engine/contrib/init/systemd/docker.service debian/docker-ce/lib/systemd/system/docker.service - install -D -m 0644 engine/contrib/init/systemd/docker.socket debian/docker-ce/lib/systemd/system/docker.socket install -D -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/dockerd) debian/docker-ce/usr/bin/dockerd install -D -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/docker-proxy) debian/docker-ce/usr/bin/docker-proxy install -D -m 0755 /usr/local/bin/docker-init debian/docker-ce/usr/bin/docker-init @@ -98,6 +102,10 @@ override_dh_installinit: # use "docker" as our service name, not "docker-ce" dh_installinit --name=docker +override_dh_installsystemd: + # use "docker" as our service name, not "docker-ce" + dh_installsystemd --name=docker + override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info diff --git a/deb/ubuntu-bionic/Dockerfile b/deb/ubuntu-bionic/Dockerfile index fb0399149c..8457a65528 100644 --- a/deb/ubuntu-bionic/Dockerfile +++ b/deb/ubuntu-bionic/Dockerfile @@ -8,7 +8,8 @@ FROM ${GO_IMAGE} AS golang FROM ${BUILD_IMAGE} ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y curl devscripts equivs git +ARG SUITE +RUN apt-get update && apt-get install -y curl devscripts equivs git debhelper/${SUITE}-backports dwz/${SUITE}-backports ENV GOPROXY=direct ENV GO111MODULE=off