Source: atop Version: 2.9.0-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, atop will install the atop.service unit twice. Once to /lib/systemd/system via debian/atop.install and once to /usr/lib/systemd/system via dh_installsystemd. Doing so is a policy violation. I'm attaching a patch that makes atop install all of its units using debhelper and thus choose a backports-safe location that does not violate policy. I note that the sleep hook is left as is, so more work is needed for atop down the road, but this piece is a bit urgent, because it will become an RC bug once I upload debhelper. Helmut
diff -Nru atop-2.9.0/debian/atop.install atop-2.9.0/debian/atop.install --- atop-2.9.0/debian/atop.install 2023-07-01 16:37:19.000000000 +0200 +++ atop-2.9.0/debian/atop.install 2023-10-16 20:31:22.000000000 +0200 @@ -1,3 +1 @@ debian/atop.wrapper usr/share/atop -debian/atop.service /lib/systemd/system -debian/atopacct.service /lib/systemd/system diff -Nru atop-2.9.0/debian/changelog atop-2.9.0/debian/changelog --- atop-2.9.0/debian/changelog 2023-07-01 16:37:19.000000000 +0200 +++ atop-2.9.0/debian/changelog 2023-10-16 20:32:18.000000000 +0200 @@ -1,3 +1,11 @@ +atop (2.9.0-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Install units only once when dh_installsystemd changes unit location. + (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Mon, 16 Oct 2023 20:32:18 +0200 + atop (2.9.0-1) unstable; urgency=medium * new upstream version 2.9.0 diff -Nru atop-2.9.0/debian/rules atop-2.9.0/debian/rules --- atop-2.9.0/debian/rules 2023-07-01 16:37:19.000000000 +0200 +++ atop-2.9.0/debian/rules 2023-10-16 20:32:18.000000000 +0200 @@ -7,7 +7,7 @@ override_dh_auto_clean: dh_auto_clean - rm -f debian/atop.service debian/atop.default debian/atopacct.service debian/atop.init debian/atopacct.init + rm -f debian/atop.service debian/atop.default debian/atop.atopacct.service debian/atop.init debian/atopacct.init debian/atop.atop-rotate.timer debian/atop.atop-rotate.service rm -f atop atopsar override_dh_installinit: @@ -18,13 +18,18 @@ dh_auto_install make sysvinstall DESTDIR=$(shell pwd)/debian/atop make install DESTDIR=$(shell pwd)/debian/atop + mv debian/atop/lib/systemd/system/atop-rotate.timer debian/atop.atop-rotate.timer + mv debian/atop/lib/systemd/system/atop-rotate.service debian/atop.atop-rotate.service + rmdir debian/atop/lib/systemd/system cp atop.default debian/atop.default cp atop.service debian/atop.service cp atop.default debian/atop.default - cp atopacct.service debian/atopacct.service + cp atopacct.service debian/atop.atopacct.service cp atop.init debian/atop.init cp atopacct.init debian/atopacct.init override_dh_installsystemd: - dh_installsystemd --no-enable --no-start atop-rotate.service - dh_installsystemd atop-rotate.timer atop.service atopacct.service + dh_installsystemd --name atop-rotate atop-rotate.timer + dh_installsystemd --name atop-rotate --no-enable --no-start atop-rotate.service + dh_installsystemd --name atopacct + dh_installsystemd atop.service