Processed: Re: Bug#1057421: sysstat: FTBFS: dh_install: warning: Cannot find (any matches for) "debian/tmp/lib/systemd/" (tried in ., debian/tmp)

2023-12-07 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + patch
Bug #1057421 [src:sysstat] sysstat: FTBFS: dh_install: warning: Cannot find 
(any matches for) "debian/tmp/lib/systemd/" (tried in ., debian/tmp)
Added tag(s) patch.

-- 
1057421: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057421
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#1057421: sysstat: FTBFS: dh_install: warning: Cannot find (any matches for) "debian/tmp/lib/systemd/" (tried in ., debian/tmp)

2023-12-07 Thread Chris Hofstaedtler
Control: tags -1 + patch

* Chris Hofstaedtler :
> systemd.pc changed systemd_system_unit_dir to point to /usr. As a
> consequence, your package now FTBFS in unstable.

Please find a patch fixing this attached. It should also work if
sysstat is backported without additional changes.

Best,
Chris
diff -Nru sysstat-12.6.1/debian/changelog sysstat-12.6.1/debian/changelog
--- sysstat-12.6.1/debian/changelog	2022-12-04 22:23:25.0 +0100
+++ sysstat-12.6.1/debian/changelog	2023-12-07 21:50:19.0 +0100
@@ -1,3 +1,11 @@
+sysstat (12.6.1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FBTS when systemdsystemunitdir changes in systemd.pc. (Closes:
+#1057421)
+
+ -- Chris Hofstaedtler   Thu, 07 Dec 2023 21:50:19 +0100
+
 sysstat (12.6.1-1) unstable; urgency=medium
 
   * New upstream stable version: fixes size_t overflow in sa_common.c
diff -Nru sysstat-12.6.1/debian/control sysstat-12.6.1/debian/control
--- sysstat-12.6.1/debian/control	2022-12-04 22:23:25.0 +0100
+++ sysstat-12.6.1/debian/control	2023-12-07 21:48:26.0 +0100
@@ -6,7 +6,8 @@
gettext,
libsensors-dev,
pkg-config,
-   systemd
+   systemd,
+   systemd-dev
 Standards-Version: 4.6.1
 Rules-Requires-Root: no
 Homepage: http://sebastien.godard.pagesperso-orange.fr/
diff -Nru sysstat-12.6.1/debian/rules sysstat-12.6.1/debian/rules
--- sysstat-12.6.1/debian/rules	2022-12-04 22:23:25.0 +0100
+++ sysstat-12.6.1/debian/rules	2023-12-07 21:50:09.0 +0100
@@ -19,6 +19,8 @@
 
 DFLAGS :=
 
+export deb_systemdsystemunitdir=$(shell pkgconf --variable=systemdsystemunitdir systemd | sed s,^/,,)
+
 %:
 	dh ${@}
 
diff -Nru sysstat-12.6.1/debian/sysstat.install sysstat-12.6.1/debian/sysstat.install
--- sysstat-12.6.1/debian/sysstat.install	2022-12-04 22:23:25.0 +0100
+++ sysstat-12.6.1/debian/sysstat.install	2023-12-07 21:50:17.0 +0100
@@ -1,5 +1,5 @@
 debian/debian-sa1 usr/lib/sysstat
 debian/tmp/etc/
-debian/tmp/lib/systemd/
+debian/tmp/${env:deb_systemdsystemunitdir}
 debian/tmp/usr/
 debian/tmp/var/


Bug#1057421: sysstat: FTBFS: dh_install: warning: Cannot find (any matches for) "debian/tmp/lib/systemd/" (tried in ., debian/tmp)

2023-12-04 Thread Chris Hofstaedtler
Source: sysstat
Version: 12.6.1-1
Severity: serious
Tags: ftbfs
User: helm...@debian.org
Usertags: dep17m2

Dear Maintainer,

systemd.pc changed systemd_system_unit_dir to point to /usr. As a
consequence, your package now FTBFS in unstable. Due to a human
mistake this problem was not caught before making the change; we'd
like to apologize.

FTBFS log snippet:
>> if [ -n "/usr/lib/systemd/system" -a -n "/usr/lib/systemd/system-sleep" -a 
>> -d "/<>/debian/tmp/usr/lib/systemd/system-sleep" ]; then \
>>  install -m 755 cron/sysstat.sleep 
>> /<>/debian/tmp/usr/lib/systemd/system-sleep; \
>> fi
>> make[2]: Leaving directory '/<>'
>> mv /<>/debian/tmp/usr/bin/sar 
>> /<>/debian/tmp/usr/bin/sar.sysstat
>> mv /<>/debian/tmp/usr/share/man/man1/sar.1 
>> /<>/debian/tmp/usr/share/man/man1/sar.sysstat.1
>> rm -rf /<>/debian/tmp/usr/doc
>> make[1]: Leaving directory '/<>'
>>dh_install
>> dh_install: warning: Cannot find (any matches for) "debian/tmp/lib/systemd/" 
>> (tried in ., debian/tmp)
>> 
>> dh_install: warning: sysstat missing files: debian/tmp/lib/systemd/
>> dh_install: error: missing files, aborting
>> make: *** [debian/rules:23: binary] Error 25
>> dpkg-buildpackage: error: debian/rules binary subprocess returned exit 
>> status 2


It seems likely you'll need to adapt a debhelper .install file for
the /usr path.

Note: if you intend to backport your package to bookworm or earlier,
please revert any changes for moving to /usr.

Best,
Chris



sysstat_12.6.1-1.gz
Description: application/gzip