Unmet Build Dependency: dh-systemd (Missing on 22.04 LTS Ubuntu)
utkonos opened this issue · comments
There is no longer a package dh-systemd on Ubuntu 22.04. The package build command fails with the following error:
$ dpkg-buildpackage -us -uc -b
dpkg-buildpackage: info: source package coredns
dpkg-buildpackage: info: source version 0-0
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Miek Gieben <miek@coredns.io>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
dpkg-checkbuilddeps: error: Unmet build dependencies: dh-systemd
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
I am not familiar with how this works, but there is another bug in a different package that mentions dh-systemd in context of 22.04 LTS:
Update Build-Depends to use debhelper (>= 9.20160709) instead of dh-systemd.
https://bugs.launchpad.net/ubuntu/+source/at/+bug/1946843
20.04 LTS was the last version that contained this package:
The package dh-systemd
is a transitional package. It only exists in older Debian and Ubuntu releases. I have made a PR that adjusts the packaging control file to correct for this. This has been tested on Ubuntu Focal and Jammy the LTS versions before and after the transitional package was removed. The PR works in both.
The PR is a permanent fix, but here is a quickie workaround:
apt install dpkg-dev debhelper jq
git clone https://github.com/coredns/deployment
cd deployment/
sed -i '3s/, dh-systemd//' debian/control
dpkg-buildpackage -us -uc -b