[Debian-astro-maintainers] Bug#1057800: libapogee3: let dh_installudev pick location of udev rules

Helmut Grohne helmut at subdivi.de
Tue Mar 26 09:05:25 GMT 2024


reassign 1057800 libapogee3t64
found 1057800 libapogee3/3.2+20221221183454-1.1
user helmutg at debian.org
usertags 1057800 + dep17p1
affects 1057800 + libapogee3
severity 1057800 important
thanks

Hi,

On Fri, Dec 08, 2023 at 05:35:01PM +0100, Chris Hofstaedtler wrote:
> your package installs files related to udev, into /lib. These
> files need to be moved to /usr/lib as part of Debian's usr-merge
> effort [1].
> 
> Attached you will find a patch to use dh_installudev to install
> the udev rule. When dh_installudev gets changed in unstable, your
> package will benefit via a binNMU or the next normal upload.

Due to time64, a latent DEP17 P1 problem has been introduced. It does
not affect the version in unstable yet, because Chris patch has not been
applied yet. Applying it would now make libapogee3t64 rc-buggy.

Hence, I am attaching an updated patch that adds a mitigation. Unlike
the earlier patch, my patch must not be included in an upload to
bookworm-backports or earlier. If you plan to backport libapogee, you
must revert both time64 and this patch.

I've successfully tested the patch both with piuparts and with a
manually crafted upgrade:

mmdebstrap trixie /dev/null --include libapogee-dev --customize-hook='echo "deb http://deb.debian.org/debian sid main" > "$1/etc/apt/sources.list.d/sid.list"' --chrooted-customize-hook="apt-get update" --customize-hook="upload libapogee3t64_3.2+20221221183454-1.2_amd64.deb /l.deb" --customize-hook="upload libapogee-dev_3.2+20221221183454-1.2_amd64.deb /d.deb" --chrooted-customize-hook="apt-get -y install libcurl3t64-gnutls; dpkg --auto-deconfigure --unpack /l.deb /d.deb; dpkg -r libapogee3; apt-get -y install /l.deb /d.deb" --chrooted-customize-hook="dpkg --verify"

Helmut
-------------- next part --------------
diff -Nru libapogee3-3.2+20221221183454/debian/changelog libapogee3-3.2+20221221183454/debian/changelog
--- libapogee3-3.2+20221221183454/debian/changelog	2024-02-29 09:39:11.000000000 +0100
+++ libapogee3-3.2+20221221183454/debian/changelog	2024-03-26 09:21:56.000000000 +0100
@@ -1,3 +1,10 @@
+libapogee3 (3.2+20221221183454-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Move files to /usr and mitigate file loss. (Closes: #1057800)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Tue, 26 Mar 2024 09:21:56 +0100
+
 libapogee3 (3.2+20221221183454-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru libapogee3-3.2+20221221183454/debian/control libapogee3-3.2+20221221183454/debian/control
--- libapogee3-3.2+20221221183454/debian/control	2024-02-29 09:39:11.000000000 +0100
+++ libapogee3-3.2+20221221183454/debian/control	2024-03-26 09:21:56.000000000 +0100
@@ -17,7 +17,7 @@
 Package: libapogee3t64
 Provides: ${t64:Provides}
 Replaces: libapogee3
-Breaks: libapogee3 (<< ${source:Version})
+Conflicts: libapogee3 (<< ${source:Version})
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Apogee Library for camera control
diff -Nru libapogee3-3.2+20221221183454/debian/libapogee3t64.install libapogee3-3.2+20221221183454/debian/libapogee3t64.install
--- libapogee3-3.2+20221221183454/debian/libapogee3t64.install	2022-12-21 19:34:59.000000000 +0100
+++ libapogee3-3.2+20221221183454/debian/libapogee3t64.install	2024-03-26 09:12:28.000000000 +0100
@@ -1,4 +1,4 @@
 usr/lib/*/libapogee.so.3.2
 usr/lib/*/libapogee.so.3
 etc/Apogee/camera/*.txt
-lib/udev/rules.d/99-apogee.rules lib/udev/rules.d
+lib/udev/rules.d/99-apogee.rules usr/lib/udev/rules.d
diff -Nru libapogee3-3.2+20221221183454/debian/libapogee3t64.lintian-overrides libapogee3-3.2+20221221183454/debian/libapogee3t64.lintian-overrides
--- libapogee3-3.2+20221221183454/debian/libapogee3t64.lintian-overrides	2024-02-29 09:39:05.000000000 +0100
+++ libapogee3-3.2+20221221183454/debian/libapogee3t64.lintian-overrides	2024-03-26 09:21:47.000000000 +0100
@@ -1 +1,5 @@
 libapogee3t64: package-name-doesnt-match-sonames libapogee3
+# begin-remove-after: released:trixie
+# DEP17P7 mitigation
+diversion-for-unknown-file lib/udev/rules.d/99-apogee.rules [*]
+# end-remove-after
diff -Nru libapogee3-3.2+20221221183454/debian/libapogee3t64.postinst libapogee3-3.2+20221221183454/debian/libapogee3t64.postinst
--- libapogee3-3.2+20221221183454/debian/libapogee3t64.postinst	1970-01-01 01:00:00.000000000 +0100
+++ libapogee3-3.2+20221221183454/debian/libapogee3t64.postinst	2024-03-26 09:21:56.000000000 +0100
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = configure; then
+	dpkg-divert --no-rename --package libapogee3t64 --divert /lib/udev/rules.d/99-apogee.rules.usr-is-merged --remove /lib/udev/rules.d/99-apogee.rules
+fi
+# end-remove-after
+
+#DEBHELPER#
+
diff -Nru libapogee3-3.2+20221221183454/debian/libapogee3t64.preinst libapogee3-3.2+20221221183454/debian/libapogee3t64.preinst
--- libapogee3-3.2+20221221183454/debian/libapogee3t64.preinst	1970-01-01 01:00:00.000000000 +0100
+++ libapogee3-3.2+20221221183454/debian/libapogee3t64.preinst	2024-03-26 09:21:56.000000000 +0100
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+# begin-remove-after: released:trixie
+if test "$1" = upgrade || test "$1" = install; then
+	dpkg-divert --no-rename --package libapogee3t64 --divert /lib/udev/rules.d/99-apogee.rules.usr-is-merged --add /lib/udev/rules.d/99-apogee.rules
+fi
+# end-remove-after
+
+#DEBHELPER#


More information about the Debian-astro-maintainers mailing list