Source: postfix
Version: 3.8.2-1
Severity: normal
Tags: patch
User: helm...@debian.org
Usertags: dep17m2

We want to modify dh_installsystemd such that units get installed below
/usr in order to finalize the /usr-merge transition via DEP17. When
doing so at least one unit gets installed both below /lib (via
debian/rules) and to /usr/lib (via dh_installsystemd). Doing so is a
policy violation and therefore this bug will become release-critical
once I upload debhelper. I propose installing all units using
dh_installsystemd, because bookworm's dh_installsystemd (even in
bookworm-backports) will continue to install to /lib. Doing so will
later move all units to /usr in trixie, but the generator needs a
separate change. You may use dh-sequence-movetousr, which will also be a
noop in bookworm-backports, to that end.

Helmut
diff -Nru postfix-3.8.2/debian/changelog postfix-3.8.2/debian/changelog
--- postfix-3.8.2/debian/changelog      2023-09-14 20:08:10.000000000 +0200
+++ postfix-3.8.2/debian/changelog      2023-10-24 11:19:42.000000000 +0200
@@ -1,3 +1,10 @@
+postfix (3.8.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Install units using dh_installsystemd only. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 24 Oct 2023 11:19:42 +0200
+
 postfix (3.8.2-1) unstable; urgency=medium
 
   [Scott Kitterman]
diff -Nru postfix-3.8.2/debian/postfix-resolvconf.path 
postfix-3.8.2/debian/postfix-resolvconf.path
--- postfix-3.8.2/debian/postfix-resolvconf.path        2023-09-14 
19:53:19.000000000 +0200
+++ postfix-3.8.2/debian/postfix-resolvconf.path        1970-01-01 
01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-[Unit]
-Description=Watch for resolv.conf updates and restart postfix
-ConditionPathExists=/etc/resolv.conf
-
-[Path]
-PathChanged=/etc/resolv.conf
-Unit=postfix-resolvconf.service
-
-[Install]
-WantedBy=multi-user.target
-
diff -Nru postfix-3.8.2/debian/postfix-resolvconf.service 
postfix-3.8.2/debian/postfix-resolvconf.service
--- postfix-3.8.2/debian/postfix-resolvconf.service     2023-09-14 
19:53:19.000000000 +0200
+++ postfix-3.8.2/debian/postfix-resolvconf.service     1970-01-01 
01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-[Unit]
-Description=Copies updated resolv.conf to postfix chroot and restarts postfix.
-
-[Service]
-Type=simple
-ExecStart=/etc/resolvconf/update-libc.d/postfix
-
-[Install]
-WantedBy=multi-user.target
diff -Nru postfix-3.8.2/debian/postfix.dirs postfix-3.8.2/debian/postfix.dirs
--- postfix-3.8.2/debian/postfix.dirs   2023-09-14 19:53:19.000000000 +0200
+++ postfix-3.8.2/debian/postfix.dirs   2023-10-24 11:19:42.000000000 +0200
@@ -34,5 +34,4 @@
 var/spool/postfix/usr/lib/sasl2
 var/log
 var/lib/postfix
-lib/systemd/system
 lib/systemd/system-generators
diff -Nru postfix-3.8.2/debian/postfix.postfix-resolvconf.path 
postfix-3.8.2/debian/postfix.postfix-resolvconf.path
--- postfix-3.8.2/debian/postfix.postfix-resolvconf.path        1970-01-01 
01:00:00.000000000 +0100
+++ postfix-3.8.2/debian/postfix.postfix-resolvconf.path        2023-09-14 
19:53:19.000000000 +0200
@@ -0,0 +1,11 @@
+[Unit]
+Description=Watch for resolv.conf updates and restart postfix
+ConditionPathExists=/etc/resolv.conf
+
+[Path]
+PathChanged=/etc/resolv.conf
+Unit=postfix-resolvconf.service
+
+[Install]
+WantedBy=multi-user.target
+
diff -Nru postfix-3.8.2/debian/postfix.postfix-resolvconf.service 
postfix-3.8.2/debian/postfix.postfix-resolvconf.service
--- postfix-3.8.2/debian/postfix.postfix-resolvconf.service     1970-01-01 
01:00:00.000000000 +0100
+++ postfix-3.8.2/debian/postfix.postfix-resolvconf.service     2023-09-14 
19:53:19.000000000 +0200
@@ -0,0 +1,9 @@
+[Unit]
+Description=Copies updated resolv.conf to postfix chroot and restarts postfix.
+
+[Service]
+Type=simple
+ExecStart=/etc/resolvconf/update-libc.d/postfix
+
+[Install]
+WantedBy=multi-user.target
diff -Nru postfix-3.8.2/debian/rules postfix-3.8.2/debian/rules
--- postfix-3.8.2/debian/rules  2023-09-14 19:53:19.000000000 +0200
+++ postfix-3.8.2/debian/rules  2023-10-24 11:19:36.000000000 +0200
@@ -193,8 +193,6 @@
 
        install debian/configure-instance.sh $(libdir)
        install debian/postfix-instance-generator 
${base}/lib/systemd/system-generators/
-       install -m 644 debian/postfix@.service ${base}/lib/systemd/system/
-       install -m 644 debian/postfix-resolvconf.* ${base}/lib/systemd/system/
        install debian/ip-up.d ${base}/etc/ppp/ip-up.d/postfix
        install debian/ip-down.d ${base}/etc/ppp/ip-down.d/postfix
        install debian/ip-up.d ${base}/etc/network/if-up.d/postfix
@@ -209,8 +207,7 @@
        fi
 
 override_dh_installsystemd:
-       dh_installsystemd -p postfix --no-enable --no-start 
postfix-resolvconf.path
-       dh_installsystemd -p postfix --no-enable --no-start 
postfix-resolvconf.service
+       dh_installsystemd -p postfix --no-enable --no-start --name 
postfix-resolvconf
        dh_installsystemd -p postfix --no-restart-after-upgrade postfix.service
 
 execute_before_dh_gencontrol:

Reply via email to