Source: laptop-mode-tools
Version: 1.74-1.2
Severity: normal
Tags: patch
User: helm...@debian.org
Usertags: dep17m2

Dear Maintainer,

your package installs files related to systemd and 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 to
systemd.pc/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. systemd.pc in unstable already points to
/usr/lib.

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 laptop-mode-tools-1.74/debian/changelog laptop-mode-tools-1.74/debian/changelog
--- laptop-mode-tools-1.74/debian/changelog	2022-10-15 12:13:49.000000000 +0200
+++ laptop-mode-tools-1.74/debian/changelog	2023-12-09 00:26:16.000000000 +0100
@@ -1,3 +1,10 @@
+laptop-mode-tools (1.74-1.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Delegate placement of systemd/udev files to pkg-config data
+
+ -- Chris Hofstaedtler <z...@debian.org>  Sat, 09 Dec 2023 00:26:16 +0100
+
 laptop-mode-tools (1.74-1.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru laptop-mode-tools-1.74/debian/control laptop-mode-tools-1.74/debian/control
--- laptop-mode-tools-1.74/debian/control	2020-09-17 11:01:11.000000000 +0200
+++ laptop-mode-tools-1.74/debian/control	2023-12-09 00:24:16.000000000 +0100
@@ -4,7 +4,7 @@
 Maintainer: Ritesh Raj Sarraf <r...@debian.org>
 Homepage: https://github.com/rickysarraf/laptop-mode-tools
 Uploaders: Bart Samwel <b...@samwel.tk>
-Build-Depends: debhelper (>= 11), dpkg (>= 1.16.1)
+Build-Depends: debhelper (>= 11), dpkg (>= 1.16.1), pkgconf, systemd-dev
 Standards-Version: 3.9.8
 
 Package: laptop-mode-tools
diff -Nru laptop-mode-tools-1.74/debian/rules laptop-mode-tools-1.74/debian/rules
--- laptop-mode-tools-1.74/debian/rules	2020-09-17 11:01:11.000000000 +0200
+++ laptop-mode-tools-1.74/debian/rules	2023-12-09 00:25:50.000000000 +0100
@@ -10,6 +10,9 @@
 include /usr/share/dpkg/pkg-info.mk
 DEB_UPSTREAM_VERSION  = $(shell dpkg-parsechangelog -SVersion | cut -d- -f1)
 
+deb_systemdsystemunitdir = $(shell pkg-config --variable=systemdsystemunitdir systemd)
+deb_udevdir = $(shell pkg-config --variable=udevdir udev)
+
 get-orig-source:
 	uscan --force-download --rename --repack\
 		--download-version=$(DEB_UPSTREAM_VERSION) --destdir=.
@@ -63,8 +66,8 @@
 	install -m755 -d $(DESTDIR)/etc/apm/event.d
 	install -m755 -d $(DESTDIR)/etc/power/scripts.d
 	install -m755 -d $(DESTDIR)/etc/power/event.d
-	install -m755 -d $(DESTDIR)/lib/udev/rules.d
-	install -m755 -d $(DESTDIR)/lib/systemd/system
+	install -m755 -d $(DESTDIR)$(deb_udevdir)/rules.d
+	install -m755 -d $(DESTDIR)$(deb_systemdsystemunitdir)
 	install -m755 -d $(DESTDIR)/usr/lib/pm-utils/sleep.d
 	install -m755 -d $(DESTDIR)/etc/laptop-mode/batt-start
 	install -m755 -d $(DESTDIR)/etc/laptop-mode/batt-stop
@@ -83,11 +86,11 @@
 	install -m755 etc/apm/event.d/* $(DESTDIR)/etc/apm/event.d
 	install -m755 etc/power/scripts.d/* $(DESTDIR)/etc/power/scripts.d
 	install -m755 etc/power/event.d/* $(DESTDIR)/etc/power/event.d
-	install -m644 etc/rules/99-laptop-mode.rules $(DESTDIR)/lib/udev/rules.d
-	install -m755 etc/rules/lmt-udev $(DESTDIR)/lib/udev/lmt-udev
-	install -m644 etc/systemd/laptop-mode.service $(DESTDIR)/lib/systemd/system/laptop-mode.service
-	install -m644 etc/systemd/laptop-mode.timer $(DESTDIR)/lib/systemd/system/laptop-mode.timer
-	install -m644 etc/systemd/lmt-poll.service $(DESTDIR)/lib/systemd/system/lmt-poll.service
+	install -m644 etc/rules/99-laptop-mode.rules $(DESTDIR)$(deb_udevdir)/rules.d
+	install -m755 etc/rules/lmt-udev $(DESTDIR)$(deb_udevdir)/lmt-udev
+	install -m644 etc/systemd/laptop-mode.service $(DESTDIR)$(deb_systemdsystemunitdir)/laptop-mode.service
+	install -m644 etc/systemd/laptop-mode.timer $(DESTDIR)$(deb_systemdsystemunitdir)/laptop-mode.timer
+	install -m644 etc/systemd/lmt-poll.service $(DESTDIR)$(deb_systemdsystemunitdir)/lmt-poll.service
 	install -m644 etc/systemd/laptop-mode.conf.tmpfiles $(DESTDIR)/usr/lib/tmpfiles.d/laptop-mode.conf
 	install -m755 usr/lib/pm-utils/sleep.d/* $(DESTDIR)/usr/lib/pm-utils/sleep.d
 	install -m755 usr/sbin/laptop_mode $(DESTDIR)/usr/sbin

Reply via email to