Source: dnscrypt-proxy Version: 2.0.45+ds1-1.1 Tags: patch User: helm...@debian.org Usertags: dep17m2
We want to change dh_installsystemd to install units to /usr to finalize the /usr-merge transition via DEP17. When doing so, dnscrypt-proxy will install some units twice. It'll install units via debian/dnscrypt-proxy.install to /lib/systemd/system and then dh_installsystemd will install some of the same units to /usr/lib/systemd/system. Such behaviour is prohibited by debian policy. It is not a problem now, but will become an RC bug once I upload debhelper. I'm attaching a patch for your convenience. Helmut
diff -Nru dnscrypt-proxy-2.0.45+ds1/debian/changelog dnscrypt-proxy-2.0.45+ds1/debian/changelog --- dnscrypt-proxy-2.0.45+ds1/debian/changelog 2023-03-25 15:24:36.000000000 +0100 +++ dnscrypt-proxy-2.0.45+ds1/debian/changelog 2023-10-16 20:49:51.000000000 +0200 @@ -1,3 +1,10 @@ +dnscrypt-proxy (2.0.45+ds1-1.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Install systemd units only once using dh_installsystemd. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Mon, 16 Oct 2023 20:49:51 +0200 + dnscrypt-proxy (2.0.45+ds1-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy-resolvconf.service dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy-resolvconf.service --- dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy-resolvconf.service 2023-03-25 14:23:25.000000000 +0100 +++ dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy-resolvconf.service 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -[Unit] -Description=DNSCrypt proxy resolvconf support -Documentation=https://github.com/DNSCrypt/dnscrypt-proxy/wiki -After=dnscrypt-proxy.socket -Requires=dnscrypt-proxy.socket -ConditionFileIsExecutable=/sbin/resolvconf - -[Service] -Type=oneshot -RemainAfterExit=true -ExecStart=/bin/sh -c 'systemctl show dnscrypt-proxy.socket \ - | grep "Listen.*Datagram" \ - | cut -d "=" -f 2 \ - | cut -d ":" -f 1 \ - | awk \'{ print "nameserver " $1 }\' \ - | /sbin/resolvconf -a lo.dnscrypt-proxy' -ExecStop=/sbin/resolvconf -d lo.dnscrypt-proxy - -[Install] -WantedBy=multi-user.target -Also=dnscrypt-proxy.socket diff -Nru dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy.dnscrypt-proxy-resolvconf.service dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy.dnscrypt-proxy-resolvconf.service --- dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy.dnscrypt-proxy-resolvconf.service 1970-01-01 01:00:00.000000000 +0100 +++ dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy.dnscrypt-proxy-resolvconf.service 2023-03-25 14:23:25.000000000 +0100 @@ -0,0 +1,21 @@ +[Unit] +Description=DNSCrypt proxy resolvconf support +Documentation=https://github.com/DNSCrypt/dnscrypt-proxy/wiki +After=dnscrypt-proxy.socket +Requires=dnscrypt-proxy.socket +ConditionFileIsExecutable=/sbin/resolvconf + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=/bin/sh -c 'systemctl show dnscrypt-proxy.socket \ + | grep "Listen.*Datagram" \ + | cut -d "=" -f 2 \ + | cut -d ":" -f 1 \ + | awk \'{ print "nameserver " $1 }\' \ + | /sbin/resolvconf -a lo.dnscrypt-proxy' +ExecStop=/sbin/resolvconf -d lo.dnscrypt-proxy + +[Install] +WantedBy=multi-user.target +Also=dnscrypt-proxy.socket diff -Nru dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy.install dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy.install --- dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy.install 2023-03-25 14:23:25.000000000 +0100 +++ dnscrypt-proxy-2.0.45+ds1/debian/dnscrypt-proxy.install 2023-10-16 20:49:19.000000000 +0200 @@ -1,5 +1,2 @@ debian/tmp/usr/bin/* usr/sbin debian/dnscrypt-proxy.toml /etc/dnscrypt-proxy -debian/dnscrypt-proxy.service /lib/systemd/system -debian/dnscrypt-proxy.socket /lib/systemd/system -debian/dnscrypt-proxy-resolvconf.service /lib/systemd/system diff -Nru dnscrypt-proxy-2.0.45+ds1/debian/rules dnscrypt-proxy-2.0.45+ds1/debian/rules --- dnscrypt-proxy-2.0.45+ds1/debian/rules 2023-03-25 14:59:33.000000000 +0100 +++ dnscrypt-proxy-2.0.45+ds1/debian/rules 2023-10-16 20:49:46.000000000 +0200 @@ -9,9 +9,8 @@ %: dh $@ --builddirectory=_build --buildsystem=golang -override_dh_installsystemd: - dh_installsystemd dnscrypt-proxy.service dnscrypt-proxy.socket \ - dnscrypt-proxy-resolvconf.service +execute_after_dh_installsystemd: + dh_installsystemd --name dnscrypt-proxy-resolvconf override_dh_auto_install: dh_auto_install --destdir=debian/tmp