Skip to content

deb: make dh-systemd dependency optional as it's deprecated#212

Merged
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:fix_build_dep
Feb 19, 2021
Merged

deb: make dh-systemd dependency optional as it's deprecated#212
thaJeztah merged 1 commit into
docker:masterfrom
thaJeztah:fix_build_dep

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

equivalent of docker/docker-ce-packaging#520 for containerd packaging

dh-systemd has been integrated into debhelper, starting with version 9.20160709,
and has been removed in Debian 11 "bullseye"

This patch updates the control file to not require it as a dependency
on current versions of debian that ship with that version of debhelper

Related discussions:

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822670
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958585

@thaJeztah
Copy link
Copy Markdown
Member Author

Failure on openSUSE is unrelated; not sure why it gets a 404; https://ci-next.docker.com/teams-core/blue/rest/organizations/jenkins/pipelines/containerd-packaging/branches/PR-212/runs/1/nodes/73/log/?start=0

+ make CREATE_ARCHIVE=1 docker.io/opensuse/leap:15
make BUILD_IMAGE="docker.io/opensuse/leap:15" build
make[1]: Entering directory '/home/ubuntu/workspace/containerd-packaging_PR-212'
git init src/github.com/opencontainers/runc
Initialized empty Git repository in /home/ubuntu/workspace/containerd-packaging_PR-212/src/github.com/opencontainers/runc/.git/
git -C src/github.com/opencontainers/runc remote add origin "https://github.com/opencontainers/runc.git"
git init src/github.com/containerd/containerd
Initialized empty Git repository in /home/ubuntu/workspace/containerd-packaging_PR-212/src/github.com/containerd/containerd/.git/
git -C src/github.com/containerd/containerd remote add origin "https://github.com/containerd/containerd.git"
curl: (22) The requested URL returned error: 404 Not Found
./scripts/checkout.sh src/github.com/opencontainers/runc ""
+ SRC=src/github.com/opencontainers/runc
+ REF=
+ REF_FETCH=
+ git -C src/github.com/opencontainers/runc ls-remote --refs --heads --tags origin
+ awk {print $2}
+ REF=
+ [ -n  ]
+ REF=FETCH_HEAD
+ git -C src/github.com/opencontainers/runc fetch --update-head-ok --depth 1 origin
From https://github.com/opencontainers/runc
 * branch            HEAD       -> FETCH_HEAD
+ git -C src/github.com/opencontainers/runc checkout -q FETCH_HEAD
./scripts/checkout.sh src/github.com/containerd/containerd "HEAD"
+ SRC=src/github.com/containerd/containerd
+ REF=HEAD
+ REF_FETCH=HEAD
+ awk {print $2}
+ git -C src/github.com/containerd/containerd ls-remote --refs --heads --tags origin HEAD
+ REF=
+ [ -n  ]
+ REF=FETCH_HEAD
+ git -C src/github.com/containerd/containerd fetch --update-head-ok --depth 1 origin HEAD
fatal: unable to access 'https://github.com/containerd/containerd.git/': Problem with the SSL CA cert (path? access rights?)
Makefile:76: recipe for target 'checkout' failed
make[1]: *** [checkout] Error 128
make[1]: Leaving directory '/home/ubuntu/workspace/containerd-packaging_PR-212'
Makefile:72: recipe for target 'docker.io/opensuse/leap:15' failed
make: *** [docker.io/opensuse/leap:15] Error 2
script returned exit code 2

@thaJeztah
Copy link
Copy Markdown
Member Author

@thaJeztah
Copy link
Copy Markdown
Member Author

Windows passed the first time, but failed on the second run (unrelated; looks to be a permissions issue on Jenkins?)

Unable to delete 'd:\jenkins\workspace\containerd-packaging_PR-212'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.

@thaJeztah
Copy link
Copy Markdown
Member Author

@silvin-lubecki @tianon PTAL

@thaJeztah
Copy link
Copy Markdown
Member Author

All green now 👍

silvin-lubecki
silvin-lubecki previously approved these changes Jan 12, 2021
Copy link
Copy Markdown
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit 👍

Comment thread debian/control Outdated
Build-Depends: libbtrfs-dev | btrfs-tools ,
debhelper,
dh-systemd,
debhelper (>= 9.20160709) | dh-systemd,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally I would suggest ending this in a ~ so that backports will satisfy it (a backport of 9.20160709 would typically have a version number like 9.20160709~bpo90), but in this case I wonder why we're keeping it so low?

Looking at https://packages.debian.org/search?keywords=debhelper and https://packages.ubuntu.com/search?keywords=debhelper, the only version of Debian that still has a version that's "too old" is the EOL Jessie release, and the only version of Ubuntu that's "too old" is Xenial (but backports has a new enough version, which is the route I'd recommend).

So here's what I'd suggest instead:

Suggested change
debhelper (>= 9.20160709) | dh-systemd,
debhelper (>= 10~),

(I think this also means you can ditch --with systemd in debian/rules)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally I would suggest ending this in a ~ so that backports will satisfy it (a backport of 9.20160709 would typically have a version number like 9.20160709~bpo90), but in this case I wonder why we're keeping it so low?

Ah, thanks; yes, I mostly copied the recommendation from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958585, but your recommendation definitely looks better

but backports has a new enough version, which is the route I'd recommend

You mean adding the backports repo before running deb build, or would it have that enabled by default?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it's already enabled by default: 😄

$ docker run --rm ubuntu:xenial grep backports /etc/apt/sources.list
## Also, please note that software in backports WILL NOT receive any review
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, perfect 👍 updated

dh-systemd has been integrated into debhelper, starting with version 9.20160709,
and has been removed in Debian 11 "bullseye"

This patch updates the control file to not require it as a dependency
on current versions of debian that ship with that version of debhelper

Related discussions:

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822670
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958585

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Copy Markdown
Member Author

removed the duplicate debhelper from the list 🤞

@thaJeztah
Copy link
Copy Markdown
Member Author

@silvin-lubecki @chris-crone ptal

Copy link
Copy Markdown
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
Copy link
Copy Markdown
Member Author

bringing this one in

@thaJeztah thaJeztah merged commit 0e59ba5 into docker:master Feb 19, 2021
@thaJeztah thaJeztah deleted the fix_build_dep branch February 19, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants