Source: battery-stats Version: 0.5.6-2 Severity: normal Tags: patch User: [email protected] 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. The same patch can be found here as a salsa merge request: https://salsa.debian.org/debian/battery-stats/-/merge_requests/3 Most of the patch really changes the upstream build system, and it should be suitable for upstream too. 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 battery-stats-0.5.6/debian/changelog battery-stats-0.5.6/debian/changelog --- battery-stats-0.5.6/debian/changelog 2021-11-13 14:00:48.000000000 +0100 +++ battery-stats-0.5.6/debian/changelog 2023-12-07 23:11:15.000000000 +0100 @@ -1,3 +1,10 @@ +battery-stats (0.5.6-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Delegate placement of udev and systemd files to pkg-config data + + -- Chris Hofstaedtler <[email protected]> Thu, 07 Dec 2023 23:11:15 +0100 + battery-stats (0.5.6-2) unstable; urgency=medium [ Ondřej Nový ] diff -Nru battery-stats-0.5.6/debian/control battery-stats-0.5.6/debian/control --- battery-stats-0.5.6/debian/control 2021-11-13 13:37:03.000000000 +0100 +++ battery-stats-0.5.6/debian/control 2023-12-07 23:10:25.000000000 +0100 @@ -8,7 +8,9 @@ cmake, gnuplot-nox (>= 4) | gnuplot-qt, libtext-csv-perl, - imagemagick + imagemagick, + pkgconf, + systemd-dev Standards-Version: 4.5.0 Homepage: https://github.com/petterreinholdtsen/battery-stats/ Vcs-Browser: https://salsa.debian.org/debian/battery-stats diff -Nru battery-stats-0.5.6/debian/patches/1001-Use-systemd-pkgconfig-data.patch battery-stats-0.5.6/debian/patches/1001-Use-systemd-pkgconfig-data.patch --- battery-stats-0.5.6/debian/patches/1001-Use-systemd-pkgconfig-data.patch 1970-01-01 01:00:00.000000000 +0100 +++ battery-stats-0.5.6/debian/patches/1001-Use-systemd-pkgconfig-data.patch 2023-12-07 23:11:15.000000000 +0100 @@ -0,0 +1,28 @@ +Index: battery-stats-0.5.6/data/CMakeLists.txt +=================================================================== +--- battery-stats-0.5.6.orig/data/CMakeLists.txt ++++ battery-stats-0.5.6/data/CMakeLists.txt +@@ -1,3 +1,9 @@ ++include(FindPkgConfig) ++pkg_check_modules(UDEV REQUIRED udev) ++pkg_get_variable(UDEV_DIR udev udev_dir) ++pkg_check_modules(SYSTEMD REQUIRED systemd) ++pkg_get_variable(SYSTEMD_SLEEP_DIR systemd systemd_sleep_dir) ++ + # conf + install(FILES + conf/battery-stats.conf +@@ -39,11 +45,11 @@ install( + FILE(GLOB SYSTEMDSLEEP_FILES "systemd-system-sleep/*") + install( + PROGRAMS ${SYSTEMDSLEEP_FILES} +- DESTINATION /lib/systemd/system-sleep ++ DESTINATION ${SYSTEMD_SLEEP_DIR} + ) + + FILE(GLOB UDEVRULES_FILES "udev-rules.d/*") + install( + FILES ${UDEVRULES_FILES} +- DESTINATION /lib/udev/rules.d ++ DESTINATION ${UDEV_DIR}/rules.d + ) diff -Nru battery-stats-0.5.6/debian/patches/series battery-stats-0.5.6/debian/patches/series --- battery-stats-0.5.6/debian/patches/series 2021-11-13 13:54:23.000000000 +0100 +++ battery-stats-0.5.6/debian/patches/series 2023-12-07 23:10:54.000000000 +0100 @@ -1,2 +1,3 @@ 0001-Update-to-python3.patch 1000-add-more-power-supplies-support.patch +1001-Use-systemd-pkgconfig-data.patch

