[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1056692: marked as done (libhamlib4: Add protective diversion for udev rules shared file)



Your message dated Mon, 27 Nov 2023 16:35:34 +0000
with message-id <E1r7ea6-009Zqd-0S@fasolo.debian.org>
and subject line Bug#1056692: fixed in hamlib 4.5.5-3
has caused the Debian Bug report #1056692,
regarding libhamlib4: Add protective diversion for udev rules shared file
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 owner@bugs.debian.org
immediately.)


-- 
1056692: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056692
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libhamlib4
Version: 4.5.5-2
Severity: important
Tags: patch
User: helmutg@debian.org
Usertags: dep17p7
X-Debbugs-Cc: helmutg@debian.org

Dear Maintainer,

libhamlib4 contains udev rules which are installed to /lib; these files
need to be moved to /usr/lib as part of Debian's usr-merge effort.
Because libhamlib4 is Multi-Arch: same, an unfortunate corner-case can
occur whereby shared files (such as the udev rules) may be erroneously
removed on upgrades (please see DEP17[1] P7: Shared multiarch file
loss).

I attached a patch which avoids the problem by implementating
DEP17 M10 (Protective diversions for shared files) for the affected files.

Please consider applying this patch at your earliest convenience. This
bug will be upgraded to release critical soon, as it blocks the overall
usr-merge effort which is being undertaken for the trixie release.

Best regards,
Miguel.

1. https://subdivi.de/~helmut/dep17.html



diff -Nru hamlib-4.5.5/debian/changelog hamlib-4.5.5/debian/changelog
--- hamlib-4.5.5/debian/changelog	2023-06-18 20:00:08.000000000 +0100
+++ hamlib-4.5.5/debian/changelog	2023-11-24 14:19:21.000000000 +0000
@@ -1,3 +1,9 @@
+hamlib (4.5.5-3) UNRELEASED; urgency=medium
+
+  * Install libhamlib4.rules into /usr, with protective diversion.
+
+ -- Miguel Landaeta <nomadium@debian.org>  Fri, 24 Nov 2023 14:19:21 +0000
+
 hamlib (4.5.5-2) unstable; urgency=medium
 
   * Remove transitional packages libhamlib2-perl, libhamlib2-tcl,
diff -Nru hamlib-4.5.5/debian/libhamlib4.install hamlib-4.5.5/debian/libhamlib4.install
--- hamlib-4.5.5/debian/libhamlib4.install	2021-01-01 23:20:20.000000000 +0000
+++ hamlib-4.5.5/debian/libhamlib4.install	2023-11-24 14:19:21.000000000 +0000
@@ -1 +1,2 @@
 usr/lib/*/libhamlib.so.*
+debian/60-libhamlib4.rules	usr/lib/udev/rules.d
diff -Nru hamlib-4.5.5/debian/libhamlib4.postinst hamlib-4.5.5/debian/libhamlib4.postinst
--- hamlib-4.5.5/debian/libhamlib4.postinst	1970-01-01 01:00:00.000000000 +0100
+++ hamlib-4.5.5/debian/libhamlib4.postinst	2023-11-24 14:19:21.000000000 +0000
@@ -0,0 +1,23 @@
+#!/bin/sh
+# postinst script for lihamlib
+
+set -e
+
+dpkg-maintscript-helper rm_conffile /etc/udev/60-libhamlib4.rules -- "$@"
+
+rm -f /etc/udev/rules.d/60-libhamlib4.rules
+
+# begin-remove-after: released:forky
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "configure" ]; then
+    # At this point, the package will have installed the same file in */usr*.
+    dpkg-divert --package usr-is-merged --no-rename \
+        --divert /lib/udev/rules.d/60-libhamlib4.rules.usr-is-merged \
+        --remove /lib/udev/rules.d/60-libhamlib4.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff -Nru hamlib-4.5.5/debian/libhamlib4.postrm hamlib-4.5.5/debian/libhamlib4.postrm
--- hamlib-4.5.5/debian/libhamlib4.postrm	1970-01-01 01:00:00.000000000 +0100
+++ hamlib-4.5.5/debian/libhamlib4.postrm	2023-11-24 14:19:21.000000000 +0000
@@ -0,0 +1,21 @@
+#!/bin/sh
+# postrm script for libhamlib
+
+set -e
+
+dpkg-maintscript-helper rm_conffile /etc/udev/60-libhamlib4.rules -- "$@"
+
+# begin-remove-after: released:forky
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "remove" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT" = "1" ]; then
+    # Cleanup in case package is removed before upgrade is finished (postinst ran).
+    dpkg-divert --package usr-is-merged --no-rename \
+        --divert /lib/udev/rules.d/60-libhamlib4.rules.usr-is-merged \
+        --remove /lib/udev/rules.d/60-libhamlib4.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff -Nru hamlib-4.5.5/debian/libhamlib4.preinst hamlib-4.5.5/debian/libhamlib4.preinst
--- hamlib-4.5.5/debian/libhamlib4.preinst	1970-01-01 01:00:00.000000000 +0100
+++ hamlib-4.5.5/debian/libhamlib4.preinst	2023-11-24 14:19:21.000000000 +0000
@@ -0,0 +1,20 @@
+#!/bin/sh
+# preinst script for libhamlib
+
+set -e
+
+dpkg-maintscript-helper rm_conffile /etc/udev/60-libhamlib4.rules -- "$@"
+
+# begin-remove-after: released:forky
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "upgrade" ]; then
+    dpkg-divert --package usr-is-merged --no-rename \
+        --divert /lib/udev/rules.d/60-libhamlib4.rules.usr-is-merged \
+        --add /lib/udev/rules.d/60-libhamlib4.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff -Nru hamlib-4.5.5/debian/60-libhamlib4.rules hamlib-4.5.5/debian/60-libhamlib4.rules
--- hamlib-4.5.5/debian/60-libhamlib4.rules	1970-01-01 01:00:00.000000000 +0100
+++ hamlib-4.5.5/debian/60-libhamlib4.rules	2021-01-02 00:27:23.000000000 +0000
@@ -0,0 +1,12 @@
+#
+# Enable uaccess for common embedded USB-serial converters so that
+# applications which call usb_detach_kernel_driver_np() won't need sudo.
+#
+# This file was installed by the package 'libhamlib4'
+
+# FTDI USB Serial Device converter
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", TAG+="uaccess"
+
+# VOTI USBasp AVR Programmer
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="16c0", ATTR{idProduct}=="05dc", TAG+="uaccess"
+
diff -Nru hamlib-4.5.5/debian/libhamlib4.udev hamlib-4.5.5/debian/libhamlib4.udev
--- hamlib-4.5.5/debian/libhamlib4.udev	2021-01-02 00:27:23.000000000 +0000
+++ hamlib-4.5.5/debian/libhamlib4.udev	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-#
-# Enable uaccess for common embedded USB-serial converters so that
-# applications which call usb_detach_kernel_driver_np() won't need sudo.
-#
-# This file was installed by the package 'libhamlib4'
-
-# FTDI USB Serial Device converter
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", TAG+="uaccess"
-
-# VOTI USBasp AVR Programmer
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="16c0", ATTR{idProduct}=="05dc", TAG+="uaccess"
-


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-4-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libhamlib4 depends on:
ii  libc6           2.37-12
ii  libgcc-s1       13.2.0-6
ii  libindiclient1  1.9.9+dfsg-3
ii  libstdc++6      13.2.0-6
ii  libusb-1.0-0    2:1.0.26-1

libhamlib4 recommends no packages.

libhamlib4 suggests no packages.
diff -Nru hamlib-4.5.5/debian/changelog hamlib-4.5.5/debian/changelog
--- hamlib-4.5.5/debian/changelog	2023-06-18 20:00:08.000000000 +0100
+++ hamlib-4.5.5/debian/changelog	2023-11-24 14:19:21.000000000 +0000
@@ -1,3 +1,9 @@
+hamlib (4.5.5-3) UNRELEASED; urgency=medium
+
+  * Install libhamlib4.rules into /usr, with protective diversion.
+
+ -- Miguel Landaeta <nomadium@debian.org>  Fri, 24 Nov 2023 14:19:21 +0000
+
 hamlib (4.5.5-2) unstable; urgency=medium
 
   * Remove transitional packages libhamlib2-perl, libhamlib2-tcl,
diff -Nru hamlib-4.5.5/debian/libhamlib4.install hamlib-4.5.5/debian/libhamlib4.install
--- hamlib-4.5.5/debian/libhamlib4.install	2021-01-01 23:20:20.000000000 +0000
+++ hamlib-4.5.5/debian/libhamlib4.install	2023-11-24 14:19:21.000000000 +0000
@@ -1 +1,2 @@
 usr/lib/*/libhamlib.so.*
+debian/60-libhamlib4.rules	usr/lib/udev/rules.d
diff -Nru hamlib-4.5.5/debian/libhamlib4.postinst hamlib-4.5.5/debian/libhamlib4.postinst
--- hamlib-4.5.5/debian/libhamlib4.postinst	1970-01-01 01:00:00.000000000 +0100
+++ hamlib-4.5.5/debian/libhamlib4.postinst	2023-11-24 14:19:21.000000000 +0000
@@ -0,0 +1,23 @@
+#!/bin/sh
+# postinst script for lihamlib
+
+set -e
+
+dpkg-maintscript-helper rm_conffile /etc/udev/60-libhamlib4.rules -- "$@"
+
+rm -f /etc/udev/rules.d/60-libhamlib4.rules
+
+# begin-remove-after: released:forky
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "configure" ]; then
+    # At this point, the package will have installed the same file in */usr*.
+    dpkg-divert --package usr-is-merged --no-rename \
+        --divert /lib/udev/rules.d/60-libhamlib4.rules.usr-is-merged \
+        --remove /lib/udev/rules.d/60-libhamlib4.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff -Nru hamlib-4.5.5/debian/libhamlib4.postrm hamlib-4.5.5/debian/libhamlib4.postrm
--- hamlib-4.5.5/debian/libhamlib4.postrm	1970-01-01 01:00:00.000000000 +0100
+++ hamlib-4.5.5/debian/libhamlib4.postrm	2023-11-24 14:19:21.000000000 +0000
@@ -0,0 +1,21 @@
+#!/bin/sh
+# postrm script for libhamlib
+
+set -e
+
+dpkg-maintscript-helper rm_conffile /etc/udev/60-libhamlib4.rules -- "$@"
+
+# begin-remove-after: released:forky
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "remove" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT" = "1" ]; then
+    # Cleanup in case package is removed before upgrade is finished (postinst ran).
+    dpkg-divert --package usr-is-merged --no-rename \
+        --divert /lib/udev/rules.d/60-libhamlib4.rules.usr-is-merged \
+        --remove /lib/udev/rules.d/60-libhamlib4.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff -Nru hamlib-4.5.5/debian/libhamlib4.preinst hamlib-4.5.5/debian/libhamlib4.preinst
--- hamlib-4.5.5/debian/libhamlib4.preinst	1970-01-01 01:00:00.000000000 +0100
+++ hamlib-4.5.5/debian/libhamlib4.preinst	2023-11-24 14:19:21.000000000 +0000
@@ -0,0 +1,20 @@
+#!/bin/sh
+# preinst script for libhamlib
+
+set -e
+
+dpkg-maintscript-helper rm_conffile /etc/udev/60-libhamlib4.rules -- "$@"
+
+# begin-remove-after: released:forky
+# protective diversion of files moved from / to /usr, to avoid file loss.
+# Only for upgrades.
+if [ "$1" = "upgrade" ]; then
+    dpkg-divert --package usr-is-merged --no-rename \
+        --divert /lib/udev/rules.d/60-libhamlib4.rules.usr-is-merged \
+        --add /lib/udev/rules.d/60-libhamlib4.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
+exit 0
diff -Nru hamlib-4.5.5/debian/60-libhamlib4.rules hamlib-4.5.5/debian/60-libhamlib4.rules
--- hamlib-4.5.5/debian/60-libhamlib4.rules	1970-01-01 01:00:00.000000000 +0100
+++ hamlib-4.5.5/debian/60-libhamlib4.rules	2021-01-02 00:27:23.000000000 +0000
@@ -0,0 +1,12 @@
+#
+# Enable uaccess for common embedded USB-serial converters so that
+# applications which call usb_detach_kernel_driver_np() won't need sudo.
+#
+# This file was installed by the package 'libhamlib4'
+
+# FTDI USB Serial Device converter
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", TAG+="uaccess"
+
+# VOTI USBasp AVR Programmer
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="16c0", ATTR{idProduct}=="05dc", TAG+="uaccess"
+
diff -Nru hamlib-4.5.5/debian/libhamlib4.udev hamlib-4.5.5/debian/libhamlib4.udev
--- hamlib-4.5.5/debian/libhamlib4.udev	2021-01-02 00:27:23.000000000 +0000
+++ hamlib-4.5.5/debian/libhamlib4.udev	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-#
-# Enable uaccess for common embedded USB-serial converters so that
-# applications which call usb_detach_kernel_driver_np() won't need sudo.
-#
-# This file was installed by the package 'libhamlib4'
-
-# FTDI USB Serial Device converter
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", TAG+="uaccess"
-
-# VOTI USBasp AVR Programmer
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="16c0", ATTR{idProduct}=="05dc", TAG+="uaccess"
-

--- End Message ---
--- Begin Message ---
Source: hamlib
Source-Version: 4.5.5-3
Done: tony mancill <tmancill@debian.org>

We believe that the bug you reported is fixed in the latest version of
hamlib, 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 1056692@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
tony mancill <tmancill@debian.org> (supplier of updated hamlib 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 ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 27 Nov 2023 08:01:42 -0800
Source: hamlib
Architecture: source
Version: 4.5.5-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Hamradio Maintainers <debian-hams@lists.debian.org>
Changed-By: tony mancill <tmancill@debian.org>
Closes: 1056692
Changes:
 hamlib (4.5.5-3) unstable; urgency=medium
 .
   * Team upload
 .
   [ Christoph Berg ]
   * Remove old libhamlib2 Provides/Replaces/Breaks against the buster
     packages.
   * debian/tests: Update lua package name
 .
   [ tony mancill ]
   * Add protective diversion for udev rules shared file (Closes: #1056692)
     Thank you to MigueL Landaeta for the patch.
   * Add lintian-override fir udev usr-merge diversion
Checksums-Sha1:
 b2e75162ac30d9080f6510c6edf36ad0d15d1301 3087 hamlib_4.5.5-3.dsc
 eb99107bf6fbd5f86369de4243a1ad4ddaae19e2 28004 hamlib_4.5.5-3.debian.tar.xz
 d1a904ca952071cc0e6b6e595f05ea1290253554 17029 hamlib_4.5.5-3_amd64.buildinfo
Checksums-Sha256:
 edfc10743116e68845ad93dc72ea04770e3c59d42da7b37bce50de5eb8b3c9ba 3087 hamlib_4.5.5-3.dsc
 807b1be40086ac69856c159559e719ed1344f8b7728e44703d9eda65e783c068 28004 hamlib_4.5.5-3.debian.tar.xz
 5ab4e7e45b332bc6a0d1241b557f019147db818e44563b8d179059351cde6ea4 17029 hamlib_4.5.5-3_amd64.buildinfo
Files:
 c8471b9309fa940745d9923cff5ba3d7 3087 hamradio optional hamlib_4.5.5-3.dsc
 6c43e8e721ee1ed7a538a7f3d223be69 28004 hamradio optional hamlib_4.5.5-3.debian.tar.xz
 f738bb2037272cc917124926dcd7abfe 17029 hamradio optional hamlib_4.5.5-3_amd64.buildinfo

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

iQJIBAEBCgAyFiEE5Qr9Va3SequXFjqLIdIFiZdLPpYFAmVkv40UHHRtYW5jaWxs
QGRlYmlhbi5vcmcACgkQIdIFiZdLPpbNbg//Ze8p+rvMT/jOt0TnSxeEHdtb0r4h
4FBJRPB/9fA3HoJ38XKfViclLA96hW3S7rOLBd08dfxoC5BK0xK2Y0qDbwEGdsmn
otN5e5Mhx7J3cYBXpPlhLxM05kWaENUntbqHpg4xuEsDK4KnzymRSOrFgkov9ZYb
9f1zetQUfVUKkJEBBZocA5CTjeDEvD2Bi26GKwZERAwOod9JkLoYcPSc9Rtxa6Yt
YuH6+iW1kozIbdpREOx33EdwCdkjonKtWQJAlkjsLRI7EXjy69xrYe/ErsNgwlZb
ttt0oRhTarNdDO/4nuQu0QKo4YJEVd5txLf5sZWkIXTX3kTbxu8+HQIyxz3zdwWe
6q4Ud7Yi002ZiNfAak8sMZEb4iGIBZGgnajxFRi8Fd9ueM3O6QUWWaSd+sn7IXnr
zWtRgorRqDCsyLoWh4wfD4RcwlkODJQuXOWNyfIgBmDhvP2q8i8ko/NYZlbv9SRc
DiFuJuEuU0GD+YzfiLEbnz0a46rhnPAJQnDHqusrqEStx1qFZxRHFwfZJ98pHHyQ
0gEfWbBqYyDCrXMWa5MKF0XM8tP4PXR6EzQb4+TaW1SY09wltsVL9cuH4FKxIaD9
FES0P209icSP5QOwwSSxFZlFJvZh5rbrrGfgM36l1ZFInQFxEIDSWcmMaZY0s7wp
7kTanzV68ulQyHw=
=mvty
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: