Skip to content

pkg/containerd: deb: remove obsolete override_dh_systemd_start - #549

Merged
thaJeztah merged 1 commit into
docker:mainfrom
thaJeztah:bump_debhelper
Oct 29, 2026
Merged

thaJeztah merged 1 commit into
docker:mainfrom
thaJeztah:bump_debhelper

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

Relates to:

pkg/containerd: deb: remove obsolete override_dh_systemd_start

Commit containerd-packaging@ca48bd1 explicitly enabled restart-after-upgrade to address docker/for-linux#813.

Commit 9a1150137dd6d98dc2f6268479065c14ea2efc12 additionally replaced try-restart with restart in the generated postinst. When package removal had already stopped the service, try-restart would leave it stopped.

Debhelper 10.10.6 fixed the latter behavior upstream (Debian 879727), and restart-after-upgrade is the default in compat 10 and later. All supported build distributions therefore provide the intended behavior without this override.

The override is also already unused: dh_installsystemd replaced dh_systemd_start in the default sequence in compat 11.

Remove the override as it's now redundant.

Verified that there's no difference;

# Before removing the override.
docker buildx bake pkg-containerd-debian12 --set pkg-containerd-debian12.platforms=linux/arm64

docker run -it --rm -v ./:/src -w /src debian

before_deb=$(find bin/pkg/containerd/debian12 -name 'containerd.io_*.deb' -print -quit)
dpkg-deb --control "$before_deb" ./containerd-control-before

# Remove the override, then rebuild.
docker buildx bake pkg-containerd-debian12 --set pkg-containerd-debian12.platforms=linux/arm64

after_deb=$(find bin/pkg/containerd/debian12 -name 'containerd.io_*.deb' -print -quit)
dpkg-deb --control "$after_deb" ./containerd-control-after

for script in postinst prerm postrm; do
    diff -u "./containerd-control-before/$script" "./containerd-control-after/$script"
done

Commit [containerd-packaging@ca48bd1] explicitly enabled
restart-after-upgrade to address docker/for-linux#813.

Commit 9a1150137dd6d98dc2f6268479065c14ea2efc12 additionally replaced
try-restart with restart in the generated postinst. When package
removal had already stopped the service, try-restart would leave
it stopped.

Debhelper 10.10.6 fixed the latter behavior upstream (Debian [879727]),
and restart-after-upgrade is the default in compat 10 and later.
All supported build distributions therefore provide the intended
behavior without this override.

The override is also already unused: dh_installsystemd replaced
dh_systemd_start in the default sequence in compat 11.

Remove the override as it's now redundant.

[containerd-packaging@ca48bd1]: docker/containerd-packaging@ca48bd1
[containerd-packaging@9a11501]: docker/containerd-packaging@9a11501
[879727]: https://bugs.debian.org/879727

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
thaJeztah requested a review from a team as a code owner October 29, 2026 13:05
@thaJeztah
thaJeztah merged commit 99eb71b into docker:main Oct 29, 2026
187 checks passed
@thaJeztah
thaJeztah deleted the bump_debhelper branch October 29, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants