Your message dated Tue, 17 Sep 2024 18:20:02 +0000
with message-id <e1sqcny-004alo...@fasolo.debian.org>
and subject line Bug#1055514: fixed in opensysusers 0.7.3-4
has caused the Debian Bug report #1055514,
regarding opensysusers: ineffective diversion of /bin/systemd-sysusers due to 
/usr-merge and DEP17
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1055514: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055514
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: opensysusers
Version: 0.7.3-2
Severity: serious
Tags: patch
User: helm...@debian.org
Usertags: dep17p3
Control: affects -1 + systemd

Hi,

opensysusers diverts /bin/systemd-sysusers. systemd has moved this file
to /usr/bin/systemd-sysusers in version 255~rc1-1. While this change is
not visible in an installation, the diversion no longer matches it. Thus
what ends up at systemd-sysusers now depends on the order of unpacks.
The diversion has become ineffective. This is a known problem category
and documented in DEP17[1] as P3.

Usually, the recommended mitigation for this kind of problem is
duplicating the diversion (M18) such that both /bin/systemd-sysusers and
/usr/bin/systemd-sysusers are diverted. I'm attaching a patch for this
approach, but I think this is not the preferred solution for this case.

I dug deeper as to why opensysusers would divert systemd-sysusers,
talked to systemd maintainers and Thomas Goirand and read about #947847
in the process. Given this background, I believe that the use of a
diversion is not a good solution and this was echoed by the CTTE
decision, which declined to overrule and considered diversion a
mechanism for experimentation. Three years later and with two stable
releases including opensysusers I hope we are past the experimentation
phase. The diversion setup bears a significant downside: While the API
existing API of the sysusers interface is relatively stable, systemd
keeps adding features and when systemd calls systemd-sysusers it wants
to be able to rely on its latest features. A diverted systemd-sysusers
may not provide what is needed here. Looking deeper into policy sections
7.4 and 7.5, the virtual package systemd-sysusers looks similar to
mail-transport-agent where each implementation
provides+conflicts+replaces mail-transport-agent. I think opensysusers
should do the same. Once doing so, the diversion (and thus this bug)
goes away entirely. The downside is that opensysusers and systemd are no
longer coinstallable. I'm also attaching a patch for this.

I caution that Thomas Goirand disagrees with this approach and
recommends that these packages remain coinstallable and that users may
choose the implementation. On the flip side, a user cannot choose to
have systemd as the provider of systemd-sysusers when opensysusers is
installed.

A possible compromise could be that opensysusers stops diverting
systemd-sysusers and installs the symbolic link without diversion such
that systemd becomes the preferred provider when coinstalled. It could
detect removal of systemd using file triggers and then reinstate the
link. Such a setup also requires little cooperation from systemd
maintainers, but it relies on an symbolic link that is completely
untracked by dpkg, so there is some fragility to be found here whereas
the conflict is conceptually simpler.

In any case, something needs to be done here. The latest systemd upload
now declares an unversioned conflict with opensysusers. It can become
versioned once opensysusers has addressed this bug in some way.

Helmut

[1] https://subdivi.de/~helmut/dep17.html
diff --minimal -Nru opensysusers-0.7.3/debian/changelog 
opensysusers-0.7.3/debian/changelog
--- opensysusers-0.7.3/debian/changelog 2022-11-20 16:18:16.000000000 +0100
+++ opensysusers-0.7.3/debian/changelog 2023-11-07 08:38:13.000000000 +0100
@@ -1,3 +1,11 @@
+opensysusers (0.7.3-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Duplicate diversion to mitigate DEP17 P3 via M18. (Closes: #-1)
+  * Move to /usr.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 07 Nov 2023 08:38:13 +0100
+
 opensysusers (0.7.3-2) unstable; urgency=medium
 
   * d/preinst: remove -u option.
diff --minimal -Nru opensysusers-0.7.3/debian/opensysusers.links 
opensysusers-0.7.3/debian/opensysusers.links
--- opensysusers-0.7.3/debian/opensysusers.links        2022-11-20 
16:11:31.000000000 +0100
+++ opensysusers-0.7.3/debian/opensysusers.links        2023-11-07 
08:38:13.000000000 +0100
@@ -1 +1 @@
-/usr/bin/opensysusers-sysusers   /bin/systemd-sysusers
+/usr/bin/opensysusers-sysusers   /usr/bin/systemd-sysusers
diff --minimal -Nru opensysusers-0.7.3/debian/opensysusers.lintian-overrides 
opensysusers-0.7.3/debian/opensysusers.lintian-overrides
--- opensysusers-0.7.3/debian/opensysusers.lintian-overrides    2022-11-20 
16:11:31.000000000 +0100
+++ opensysusers-0.7.3/debian/opensysusers.lintian-overrides    2023-11-07 
08:38:13.000000000 +0100
@@ -4,4 +4,6 @@
 # Creating sysusers.d is intentional
 opensysusers: package-contains-empty-directory [usr/lib/sysusers.d/]
 # The manpage is provided by the systemd package
-opensysusers: no-manual-page [bin/systemd-sysusers]
+opensysusers: no-manual-page [usr/bin/systemd-sysusers]
+# DEP17 M18 not recognized by lintian
+opensysusers: diversion-for-unknown-file bin/systemd-sysusers [preinst:*]
diff --minimal -Nru opensysusers-0.7.3/debian/opensysusers.postrm 
opensysusers-0.7.3/debian/opensysusers.postrm
--- opensysusers-0.7.3/debian/opensysusers.postrm       2022-11-20 
16:15:39.000000000 +0100
+++ opensysusers-0.7.3/debian/opensysusers.postrm       2023-11-07 
08:38:10.000000000 +0100
@@ -3,15 +3,30 @@
 set -e
 
 if [ "$1" = "remove" ] || [ "$1" = "abort-install" ] || [ "$1" = "disappear" ] 
; then
-       dpkg-divert --package opensysusers --remove --rename \
+       dpkg-divert --package opensysusers --remove --no-rename \
         --divert /bin/systemd-sysusers.real /bin/systemd-sysusers
+       dpkg-divert --package opensysusers --remove --no-rename \
+       --divert /usr/bin/systemd-sysusers.real /usr/bin/systemd-sysusers
 fi
 
 if [ "abort-upgrade" = "$1" ] && dpkg --compare-versions "$2" lt 0.6-1; then
-       dpkg-divert --package opensysusers --remove --rename \
+       dpkg-divert --package opensysusers --remove --no-rename \
         --divert /bin/systemd-sysusers.real /bin/systemd-sysusers
 fi
 
+if [ "$1" = abort-upgrade ] && dpkg --compare-versions "$2" lt 0.7.3-2.1~; then
+       dpkg-divert --package opensysusers --remove --no-rename \
+       --divert /usr/bin/systemd-sysusers.real /usr/bin/systemd-sysusers
+fi
+
+if [ "$1" = "remove" ] || [ "$1" = "abort-install" ] || [ "$1" = "disappear" ] 
; then
+       for f in /usr/bin/systemd-sysusers /bin/systemd-sysusers; do
+               if [ -e "$DPKG_ROOT$f.real" ] && ! [ -e "$DPKG_ROOT$f" ]; then
+                       mv "$DPKG_ROOT$f.real" "$DPKG_ROOT$f"
+               fi
+       done
+fi
+
 #DEBHELPER#
 
 exit 0
diff --minimal -Nru opensysusers-0.7.3/debian/opensysusers.preinst 
opensysusers-0.7.3/debian/opensysusers.preinst
--- opensysusers-0.7.3/debian/opensysusers.preinst      2022-11-20 
16:11:53.000000000 +0100
+++ opensysusers-0.7.3/debian/opensysusers.preinst      2023-11-07 
08:35:14.000000000 +0100
@@ -7,10 +7,23 @@
 fi
 
 if [ upgrade != "$1" ] || dpkg --compare-versions "$2" lt 0.6-1; then
-    dpkg-divert --package opensysusers --add --rename \
+    dpkg-divert --package opensysusers --add --no-rename \
         --divert /bin/systemd-sysusers.real /bin/systemd-sysusers
 fi
 
+if [ upgrade != "$1" ] || dpkg --compare-versions "$2" lt 0.7.3-2.1~; then
+    dpkg-divert --package opensysusers --add --no-rename \
+       --divert /usr/bin/systemd-sysusers.real /usr/bin/systemd-sysusers
+fi
+
+if [ upgrade != "$1" ]; then
+    for f in /usr/bin/systemd-sysusers /bin/systemd-sysusers; do
+        if [ -e "$DPKG_ROOT$f" ] && ! [ -e "$DPKG_ROOT$f.real" ]; then
+            mv "$DPKG_ROOT$f" "$DPKG_ROOT$f.real"
+        fi
+    done
+fi
+
 #DEBHELPER#
 
 exit 0
diff --minimal -Nru opensysusers-0.7.3/debian/changelog 
opensysusers-0.7.3/debian/changelog
--- opensysusers-0.7.3/debian/changelog 2022-11-20 16:18:16.000000000 +0100
+++ opensysusers-0.7.3/debian/changelog 2023-11-07 16:34:41.000000000 +0100
@@ -1,3 +1,10 @@
+opensysusers (0.7.3-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Declare Conflicts+Replaces systemd-sysusers. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 07 Nov 2023 16:34:41 +0100
+
 opensysusers (0.7.3-2) unstable; urgency=medium
 
   * d/preinst: remove -u option.
diff --minimal -Nru opensysusers-0.7.3/debian/control 
opensysusers-0.7.3/debian/control
--- opensysusers-0.7.3/debian/control   2022-11-20 16:11:31.000000000 +0100
+++ opensysusers-0.7.3/debian/control   2023-11-07 16:30:08.000000000 +0100
@@ -14,7 +14,9 @@
 Homepage: https://github.com/cromerc/opensysusers.git
 
 Package: opensysusers
+Conflicts: systemd-sysusers
 Provides: systemd-sysusers
+Replaces: systemd-sysusers
 Architecture: all
 Depends:
  ${misc:Depends},
diff --minimal -Nru opensysusers-0.7.3/debian/opensysusers.postinst 
opensysusers-0.7.3/debian/opensysusers.postinst
--- opensysusers-0.7.3/debian/opensysusers.postinst     1970-01-01 
01:00:00.000000000 +0100
+++ opensysusers-0.7.3/debian/opensysusers.postinst     2023-11-07 
16:33:50.000000000 +0100
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 0.7.3-2.1~; then
+       dpkg-divert --package opensysusers --remove --no-rename \
+       --divert /bin/systemd-sysusers.real /bin/systemd-sysusers
+fi
+
+#DEBHELPER#
+
+exit 0
diff --minimal -Nru opensysusers-0.7.3/debian/opensysusers.postrm 
opensysusers-0.7.3/debian/opensysusers.postrm
--- opensysusers-0.7.3/debian/opensysusers.postrm       2022-11-20 
16:15:39.000000000 +0100
+++ opensysusers-0.7.3/debian/opensysusers.postrm       1970-01-01 
01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ "$1" = "remove" ] || [ "$1" = "abort-install" ] || [ "$1" = "disappear" ] 
; then
-       dpkg-divert --package opensysusers --remove --rename \
-        --divert /bin/systemd-sysusers.real /bin/systemd-sysusers
-fi
-
-if [ "abort-upgrade" = "$1" ] && dpkg --compare-versions "$2" lt 0.6-1; then
-       dpkg-divert --package opensysusers --remove --rename \
-        --divert /bin/systemd-sysusers.real /bin/systemd-sysusers
-fi
-
-#DEBHELPER#
-
-exit 0
diff --minimal -Nru opensysusers-0.7.3/debian/opensysusers.preinst 
opensysusers-0.7.3/debian/opensysusers.preinst
--- opensysusers-0.7.3/debian/opensysusers.preinst      2022-11-20 
16:11:53.000000000 +0100
+++ opensysusers-0.7.3/debian/opensysusers.preinst      2023-11-07 
16:30:39.000000000 +0100
@@ -6,11 +6,6 @@
        update-alternatives --remove-all sysusers
 fi
 
-if [ upgrade != "$1" ] || dpkg --compare-versions "$2" lt 0.6-1; then
-    dpkg-divert --package opensysusers --add --rename \
-        --divert /bin/systemd-sysusers.real /bin/systemd-sysusers
-fi
-
 #DEBHELPER#
 
 exit 0

--- End Message ---
--- Begin Message ---
Source: opensysusers
Source-Version: 0.7.3-4
Done: Andrea Pappacoda <and...@pappacoda.it>

We believe that the bug you reported is fixed in the latest version of
opensysusers, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1055...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andrea Pappacoda <and...@pappacoda.it> (supplier of updated opensysusers 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 17 Sep 2024 19:38:59 +0200
Source: opensysusers
Architecture: source
Version: 0.7.3-4
Distribution: unstable
Urgency: medium
Maintainer: Andrea Pappacoda <and...@pappacoda.it>
Changed-By: Andrea Pappacoda <and...@pappacoda.it>
Closes: 1055514
Changes:
 opensysusers (0.7.3-4) unstable; urgency=medium
 .
   * d/changelog: correct closed bug for previous entry
   * Move to /usr and duplicate diversion to mitigate DEP17 P3 via M18.
     Thanks to Helmut for the patch! (Closes: #1055514)
Checksums-Sha1:
 252358781e20c2622abd2c4572ad6dad586e5d4d 1472 opensysusers_0.7.3-4.dsc
 0ff066483aeffddc6585679f01216db43cf27faa 5932 
opensysusers_0.7.3-4.debian.tar.xz
Checksums-Sha256:
 cf2d5e55f983fdf92be23d9bbf447d54eb7ab0b819cd4926c37e7160297cf95e 1472 
opensysusers_0.7.3-4.dsc
 2d697996851fe6266b65bbb84ba2ea87031ed496170d8a5d3aba1675a4389c55 5932 
opensysusers_0.7.3-4.debian.tar.xz
Files:
 8cea4b972595a24c751dc5cf9322315d 1472 admin optional opensysusers_0.7.3-4.dsc
 35bad57fc223179a693fb38ada846329 5932 admin optional 
opensysusers_0.7.3-4.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQS6VuNIvZRFHt7JcAdKkgiiRVB3pwUCZunCoAAKCRBKkgiiRVB3
p7teAP9k7oztTyEYvtDh+WM406ELnRO5oNerxvPHyJTw89SoNAEAzVbwxxyvZhYA
djz9l7vV4PHFg2l1xOGQBjJj6BHKkQI=
=6MNI
-----END PGP SIGNATURE-----

Attachment: pgpWrSnympcLh.pgp
Description: PGP signature


--- End Message ---

Reply via email to