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

Bug#1057822: libpsm2: use udev.pc to place udev rules



Source: libpsm2
Version: 11.2.185-2
Severity: normal
Tags: patch
User: helmutg@debian.org
Usertags: dep17m2

Dear Maintainer,

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 delegate the exact placement of
the udev files to udev.pc (using pkg-config). This should work today
in unstable and, if necessary, for bookworm. Once udev.pc in
unstable points to /usr/lib your package will benefit automatically
after a binNMU or any other upload.
I'll note the upstream makefile already supports this.

Later during the trixie cycle I expect this bug class to raise in
priority.

If during the trixie cycle your package will undergo structural
changes or any other file moves, please see the wiki and upload
to experimental first when these changes are done.

Thank you for considering,
Chris

[1] https://wiki.debian.org/UsrMerge
diff -Nru libpsm2-11.2.185/debian/changelog libpsm2-11.2.185/debian/changelog
--- libpsm2-11.2.185/debian/changelog	2022-10-14 05:13:28.000000000 +0200
+++ libpsm2-11.2.185/debian/changelog	2023-12-08 23:58:29.000000000 +0100
@@ -1,3 +1,10 @@
+libpsm2 (11.2.185-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Use udev.pc to place udev rules
+
+ -- Chris Hofstaedtler <zeha@debian.org>  Fri, 08 Dec 2023 23:58:29 +0100
+
 libpsm2 (11.2.185-2) unstable; urgency=medium
 
   * Team upload.
diff -Nru libpsm2-11.2.185/debian/control libpsm2-11.2.185/debian/control
--- libpsm2-11.2.185/debian/control	2022-10-14 05:12:14.000000000 +0200
+++ libpsm2-11.2.185/debian/control	2023-12-08 23:58:29.000000000 +0100
@@ -11,6 +11,8 @@
 Homepage: https://github.com/01org/opa-psm2
 Build-Depends: debhelper-compat (= 13),
                libnuma-dev,
+               pkgconf,
+               systemd-dev,
 
 Package: libpsm2-2
 Architecture: amd64
diff -Nru libpsm2-11.2.185/debian/libpsm2-2-compat.install libpsm2-11.2.185/debian/libpsm2-2-compat.install
--- libpsm2-11.2.185/debian/libpsm2-2-compat.install	2022-10-14 05:12:14.000000000 +0200
+++ libpsm2-11.2.185/debian/libpsm2-2-compat.install	2023-12-08 23:58:29.000000000 +0100
@@ -1,3 +1,3 @@
 etc/modprobe.d/libpsm2-compat.conf
-lib/udev/rules.d/40-psm-compat.rules
+${env:deb_udevdir}/rules.d/40-psm-compat.rules
 usr/lib/libpsm2-2
diff -Nru libpsm2-11.2.185/debian/rules libpsm2-11.2.185/debian/rules
--- libpsm2-11.2.185/debian/rules	2022-10-14 05:12:42.000000000 +0200
+++ libpsm2-11.2.185/debian/rules	2023-12-08 23:58:29.000000000 +0100
@@ -12,6 +12,8 @@
 	debian/libpsm2-2-compat.prerm \
 	debian/libpsm2-2-compat.postrm
 
+export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)
+
 %:
 	dh $@
 
@@ -53,7 +55,7 @@
 	mv $(DESTDIR)/$(LIBDIR)/psm2-compat/libpsm_infinipath.so.* $(DESTDIR)/usr/lib/libpsm2-2/
 	sed -i 's~/libpsm2/~/libpsm2-2/~g' $(DESTDIR)/etc/modprobe.d/libpsm2-compat.conf
 	rmdir $(DESTDIR)/$(LIBDIR)/psm2-compat/
-	rm -f $(DESTDIR)/lib/udev/rules.d/40-psm.rules
+	rm -f $(DESTDIR)/$(deb_udevdir)/rules.d/40-psm.rules
 
 # libpsm2-2 contains the compatibility library. Don't process it for dependencies.
 .PHONY: override_dh_makeshlibs

Reply to: