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

Dear Maintainer,

your package installs files related to udev and systemd, 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/systemd files to udev.pc/systemd.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. systemd.pc was already updated
in unstable.

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

Per the wiki, it is advisable to upload to experimental first, and
wait a few days for the dumat tool to check your package. The same
is advisable when any structural changes are done in the trixie
cycle.

Thank you for considering,
Chris

[1] https://wiki.debian.org/UsrMerge
diff -Nru bumblebee-3.2.1/debian/bumblebee.install bumblebee-3.2.1/debian/bumblebee.install
--- bumblebee-3.2.1/debian/bumblebee.install	2023-01-05 01:53:42.000000000 +0100
+++ bumblebee-3.2.1/debian/bumblebee.install	2023-12-07 23:44:03.000000000 +0100
@@ -1,10 +1,10 @@
 etc/bumblebee/bumblebee.conf
 etc/bumblebee/xorg.conf.nvidia
 etc/bumblebee/xorg.conf.nouveau
-lib/udev/rules.d/99-bumblebee-nvidia-dev.rules
+${env:deb_udevdir}/rules.d/99-bumblebee-nvidia-dev.rules
 usr/bin/optirun
 usr/bin/bumblebee-bugreport
 usr/sbin/bumblebeed
 etc/bumblebee/*                       usr/share/bumblebee/default-conf/
 debian/bumblebee.conf                 usr/share/bumblebee/modprobe.d/
-scripts/systemd/bumblebeed.service    lib/systemd/system/
+scripts/systemd/bumblebeed.service    ${env:deb_systemdsystemunitdir}/
diff -Nru bumblebee-3.2.1/debian/changelog bumblebee-3.2.1/debian/changelog
--- bumblebee-3.2.1/debian/changelog	2023-01-05 01:53:42.000000000 +0100
+++ bumblebee-3.2.1/debian/changelog	2023-12-07 23:44:03.000000000 +0100
@@ -1,3 +1,10 @@
+bumblebee (3.2.1-29.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Delegate placement of udev and systemd files to pkg-config data
+
+ -- Chris Hofstaedtler <z...@debian.org>  Thu, 07 Dec 2023 23:44:03 +0100
+
 bumblebee (3.2.1-29) unstable; urgency=medium
 
   * Switch to dh-sequence-bash-completion.
diff -Nru bumblebee-3.2.1/debian/control bumblebee-3.2.1/debian/control
--- bumblebee-3.2.1/debian/control	2023-01-05 01:53:42.000000000 +0100
+++ bumblebee-3.2.1/debian/control	2023-12-07 23:41:44.000000000 +0100
@@ -16,6 +16,7 @@
  libx11-dev,
  pkg-config,
  libkmod-dev,
+ systemd-dev,
 Rules-Requires-Root: no
 Standards-Version: 4.6.2
 Homepage: https://launchpad.net/~bumblebee
diff -Nru bumblebee-3.2.1/debian/rules bumblebee-3.2.1/debian/rules
--- bumblebee-3.2.1/debian/rules	2023-01-05 01:53:42.000000000 +0100
+++ bumblebee-3.2.1/debian/rules	2023-12-07 23:44:03.000000000 +0100
@@ -57,12 +57,16 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 include /usr/share/dpkg/default.mk
 
+export deb_systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,)
+export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)
+
 %:
 	dh $@
 
 override_dh_auto_configure: $(MAINTSCRIPTS_GENERATED)
 ifeq ($(VENDOR),Ubuntu)
 	dh_auto_configure -- \
+		--with-udev-rules=/$(deb_udevdir)/rules.d
 		CONF_DRIVER_MODULE_NVIDIA=nvidia \
 		CONF_LDPATH_NVIDIA=/usr/lib/nvidia-current:/usr/lib32/nvidia-current:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu \
 		CONF_MODPATH_NVIDIA=/usr/lib/nvidia-current/xorg,/usr/lib/xorg/modules \
@@ -70,6 +74,7 @@
 		CONF_XORG_BINARY=/usr/lib/xorg/Xorg
 else
 	dh_auto_configure -- \
+		--with-udev-rules=/$(deb_udevdir)/rules.d
 		CONF_DRIVER_MODULE_NVIDIA=nvidia \
 		CONF_LDPATH_NVIDIA=/usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/x86_64-linux-gnu:/usr/lib/i386-linux-gnu \
 		CONF_MODPATH_NVIDIA=/usr/lib/nvidia,/usr/lib/xorg/modules \

Reply via email to