Skip to content

Commit 6e7db7f

Browse files
authored
Merge pull request #699 from thaJeztah/revert_debhelper_update
[master] Revert "Update "deb" packaging to use "dh_installsystemd""
2 parents 9e18d43 + cafc21c commit 6e7db7f

File tree

9 files changed

+77
-23
lines changed

9 files changed

+77
-23
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
target:
20-
- debian-buster
2120
- debian-bullseye
22-
- ubuntu-bionic
23-
- ubuntu-focal
24-
- ubuntu-impish
25-
- ubuntu-jammy
2621
steps:
2722
-
2823
name: Checkout

deb/common/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

deb/common/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Build-Depends: bash,
77
ca-certificates,
88
cmake,
99
dh-apparmor,
10-
debhelper-compat (= 12),
10+
debhelper (>= 10~) | dh-systemd,
1111
gcc,
1212
git,
1313
libbtrfs-dev | btrfs-tools,

deb/common/docker-ce.docker.service

Lines changed: 0 additions & 1 deletion
This file was deleted.

deb/common/docker-ce.docker.socket

Lines changed: 0 additions & 1 deletion
This file was deleted.

deb/common/docker-ce.docker.upstart

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
description "Docker daemon"
2+
3+
start on (filesystem and net-device-up IFACE!=lo)
4+
stop on runlevel [!2345]
5+
6+
limit nofile 524288 1048576
7+
8+
# Having non-zero limits causes performance problems due to accounting overhead
9+
# in the kernel. We recommend using cgroups to do container-local accounting.
10+
limit nproc unlimited unlimited
11+
12+
respawn
13+
14+
kill timeout 20
15+
16+
pre-start script
17+
# see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount
18+
if grep -v '^#' /etc/fstab | grep -q cgroup \
19+
|| [ ! -e /proc/cgroups ] \
20+
|| [ ! -d /sys/fs/cgroup ]; then
21+
exit 0
22+
fi
23+
if ! mountpoint -q /sys/fs/cgroup; then
24+
mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
25+
fi
26+
(
27+
cd /sys/fs/cgroup
28+
for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do
29+
mkdir -p $sys
30+
if ! mountpoint -q $sys; then
31+
if ! mount -n -t cgroup -o $sys cgroup $sys; then
32+
rmdir $sys || true
33+
fi
34+
fi
35+
done
36+
)
37+
end script
38+
39+
script
40+
# modify these in /etc/default/$UPSTART_JOB (/etc/default/docker)
41+
DOCKERD=/usr/bin/dockerd
42+
DOCKER_OPTS=
43+
if [ -f /etc/default/$UPSTART_JOB ]; then
44+
. /etc/default/$UPSTART_JOB
45+
fi
46+
exec "$DOCKERD" $DOCKER_OPTS --raw-logs
47+
end script
48+
49+
# Don't emit "started" event until docker.sock is ready.
50+
# See https://github.com/docker/docker/issues/6647
51+
post-start script
52+
DOCKER_OPTS=
53+
DOCKER_SOCKET=
54+
if [ -f /etc/default/$UPSTART_JOB ]; then
55+
. /etc/default/$UPSTART_JOB
56+
fi
57+
58+
if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then
59+
DOCKER_SOCKET=/var/run/docker.sock
60+
else
61+
DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\W*unix://\K(\S+)' | sed 1q)
62+
fi
63+
64+
if [ -n "$DOCKER_SOCKET" ]; then
65+
while ! [ -e "$DOCKER_SOCKET" ]; do
66+
initctl status $UPSTART_JOB | grep -qE "(stop|respawn)/" && exit 1
67+
echo "Waiting for $DOCKER_SOCKET"
68+
sleep 0.1
69+
done
70+
echo "$DOCKER_SOCKET is up"
71+
fi
72+
end script

deb/common/docker-ce.maintscript

Lines changed: 0 additions & 3 deletions
This file was deleted.

deb/common/rules

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,15 @@ override_dh_auto_test:
6262
override_dh_strip:
6363
# Go has lots of problems with stripping, so just don't
6464

65-
# http://manpages.debian.org/dh_dwz
66-
override_dh_dwz:
67-
# 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)
68-
@# https://packages.debian.org/debhelper
69-
@# https://packages.ubuntu.com/debhelper
70-
7165
override_dh_auto_install:
7266
# docker-ce-cli install
7367
install -D -m 0644 cli/contrib/completion/fish/docker.fish debian/docker-ce-cli/usr/share/fish/vendor_completions.d/docker.fish
7468
install -D -m 0644 cli/contrib/completion/zsh/_docker debian/docker-ce-cli/usr/share/zsh/vendor-completions/_docker
7569
install -D -m 0755 cli/build/docker debian/docker-ce-cli/usr/bin/docker
7670

7771
# docker-ce install
72+
install -D -m 0644 engine/contrib/init/systemd/docker.service debian/docker-ce/lib/systemd/system/docker.service
73+
install -D -m 0644 engine/contrib/init/systemd/docker.socket debian/docker-ce/lib/systemd/system/docker.socket
7874
install -D -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/dockerd) debian/docker-ce/usr/bin/dockerd
7975
install -D -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/docker-proxy) debian/docker-ce/usr/bin/docker-proxy
8076
install -D -m 0755 /usr/local/bin/docker-init debian/docker-ce/usr/bin/docker-init
@@ -102,10 +98,6 @@ override_dh_installinit:
10298
# use "docker" as our service name, not "docker-ce"
10399
dh_installinit --name=docker
104100

105-
override_dh_installsystemd:
106-
# use "docker" as our service name, not "docker-ce"
107-
dh_installsystemd --name=docker
108-
109101
override_dh_shlibdeps:
110102
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
111103

deb/ubuntu-bionic/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ FROM ${GO_IMAGE} AS golang
88
FROM ${BUILD_IMAGE}
99

1010
ARG DEBIAN_FRONTEND=noninteractive
11-
ARG SUITE
12-
RUN apt-get update && apt-get install -y curl devscripts equivs git debhelper/${SUITE}-backports dwz/${SUITE}-backports
11+
RUN apt-get update && apt-get install -y curl devscripts equivs git
1312

1413
ENV GOPROXY=direct
1514
ENV GO111MODULE=off

0 commit comments

Comments
 (0)