docker-ce-packaging icon indicating copy to clipboard operation
docker-ce-packaging copied to clipboard

deb: use symlink to install systemd-sysusers

Open thaJeztah opened this issue 7 months ago • 4 comments

  • follow-up to https://github.com/docker/docker-ce-packaging/pull/1195
  • implementing https://github.com/docker/docker-ce-packaging/pull/1187#discussion_r2083279213

deb: use symlink to install systemd-sysusers

Using dh_installsysusers(1):

FILES

debian/package.sysusers If the file exists, it will be installed as /usr/lib/sysusers.d/package.conf.

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

thaJeztah avatar May 20 '25 11:05 thaJeztah

With this PR, there's a (dangling) symlink added, similar to the existing ones;

ls -la deb/common/
total 80
drwx------  15 thajeztah  staff   480 May 20 13:51 ./
drwx------  21 thajeztah  staff   672 May 20 13:38 ../
-rw-r--r--   1 thajeztah  staff  4382 May 20 12:53 control
-rw-r--r--   1 thajeztah  staff    15 Jun 21  2023 docker-ce-cli.manpages
-rw-r--r--   1 thajeztah  staff    12 Dec 26 14:14 docker-ce.dirs
lrwxr-xr-x   1 thajeztah  staff    53 Dec 26 14:14 docker-ce.docker.default@ -> ../engine/contrib/init/sysvinit-debian/docker.default
lrwxr-xr-x   1 thajeztah  staff    45 Dec 26 14:14 docker-ce.docker.init@ -> ../engine/contrib/init/sysvinit-debian/docker
lrwxr-xr-x   1 thajeztah  staff    45 Dec 26 14:14 docker-ce.docker.service@ -> ../engine/contrib/init/systemd/docker.service
lrwxr-xr-x   1 thajeztah  staff    44 Dec 26 14:14 docker-ce.docker.socket@ -> ../engine/contrib/init/systemd/docker.socket
lrwxr-xr-x   1 thajeztah  staff    46 May 20 13:51 docker-ce.docker.sysusers@ -> ../engine/contrib/systemd-sysusers/docker.conf
-rw-r--r--   1 thajeztah  staff    46 Dec 26 14:14 docker-ce.maintscript
-rw-r--r--   1 thajeztah  staff    18 Apr  2 16:14 docker-ce.manpages
-rw-r--r--   1 thajeztah  staff    14 Jun 21  2023 docs
-rwxr-xr-x   1 thajeztah  staff  8864 May 20 13:51 rules*
drwxr-xr-x   3 thajeztah  staff    96 Dec 26 13:18 source/

Something isn't working with this, but perhaps I'm either using the wrong name for the symlink, or we need to invoke something else?

I tried to install the package in a container;

apt-get -y  update && apt-get -y install ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
echo   "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get -y update
apt install ./docker-ce_0.0.0~20250520085713.af09051-1~debian.13~trixie_arm64.deb

After that, I don't see a file in /usr/lib/sysusers.d/

ls /usr/lib/sysusers.d/
basic.conf  dbus.conf  systemd-journal.conf  systemd-network.conf  systemd-timesync.conf

Also looked it it was perhaps installed in another location;

docker diff upbeat_euclid | grep sysusers
A /usr/share/man/man5/sysusers.d.5.gz
A /usr/share/man/man8/systemd-sysusers.8.gz
A /usr/share/man/man8/systemd-sysusers.service.8.gz
A /usr/bin/systemd-sysusers
A /usr/lib/sysusers.d
A /usr/lib/sysusers.d/basic.conf
A /usr/lib/sysusers.d/dbus.conf
A /usr/lib/sysusers.d/systemd-journal.conf
A /usr/lib/sysusers.d/systemd-network.conf
A /usr/lib/sysusers.d/systemd-timesync.conf
A /usr/lib/systemd/system/systemd-sysusers.service
A /usr/lib/systemd/system/sysinit.target.wants/systemd-sysusers.service

thaJeztah avatar May 20 '25 11:05 thaJeztah

oh! We probably need something like these to set --name=docker! https://github.com/docker/docker-ce-packaging/blob/fc7702737d2551f403208f44e25da6f210d017a1/deb/common/rules#L136-L142

thaJeztah avatar May 20 '25 20:05 thaJeztah

Ah! It's because we're still on 12?? https://github.com/docker/docker-ce-packaging/blob/fc7702737d2551f403208f44e25da6f210d017a1/deb/common/control#L10

https://tracker.debian.org/media/packages/d/debhelper/changelog-13.3.4

debhelper (13.3) unstable; urgency=medium

...
  * dh_installsysusers: New tool to install and integrate sysusers
    into debian packaging.  Thanks to Michael Biebl and Moritz
    Muehlenhoff for feedback and initial testing.
    (Closes: #962384)

thaJeztah avatar May 20 '25 21:05 thaJeztah

Doesn't look like adding debhelper-compat (= 13), helped either 😞

thaJeztah avatar May 20 '25 21:05 thaJeztah