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

Bug#1052993: fwupd FTBFS when systemd.pc changes systemdsystemunitdir



Source: fwupd
Version: 1.9.5-1
Tags: ftbfs patch
User: helmutg@debian.org
Usertags: dep17m2

We want to change the value of systemdsystemunitdir in systemd.pc to
point below /usr. fwupd's upstream build system consumes this variable
while the packaging hard codes its current value. As we change the
value, fwupd will FTBFS. Consider applying the attached patch to avoid
this failure.

Helmut
diff -Nru fwupd-1.9.5/debian/changelog fwupd-1.9.5/debian/changelog
--- fwupd-1.9.5/debian/changelog	2023-09-06 03:36:39.000000000 +0200
+++ fwupd-1.9.5/debian/changelog	2023-09-26 19:13:49.000000000 +0200
@@ -1,3 +1,10 @@
+fwupd (1.9.5-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS when systemd.pc changes systemdsystemunitdir. (Closes: #-1)
+
+ -- Helmut Grohne <helmut@subdivi.de>  Tue, 26 Sep 2023 19:13:49 +0200
+
 fwupd (1.9.5-1) unstable; urgency=medium
 
   * New upstream version (1.9.5)
diff -Nru fwupd-1.9.5/debian/control fwupd-1.9.5/debian/control
--- fwupd-1.9.5/debian/control	2023-09-06 03:36:39.000000000 +0200
+++ fwupd-1.9.5/debian/control	2023-09-26 19:13:49.000000000 +0200
@@ -66,6 +66,7 @@
 	python3-typogrify,
 	shared-mime-info,
 	systemd (>= 231),
+        systemd-dev,
 	udev,
 	umockdev,
 	valac,
diff -Nru fwupd-1.9.5/debian/fwupd.install fwupd-1.9.5/debian/fwupd.install
--- fwupd-1.9.5/debian/fwupd.install	2023-09-05 02:58:31.000000000 +0200
+++ fwupd-1.9.5/debian/fwupd.install	2023-09-26 19:13:49.000000000 +0200
@@ -12,9 +12,7 @@
 usr/share/metainfo/*
 usr/libexec/fwupd/*
 usr/share/man/*
-lib/systemd/system/*
 lib/systemd/system-shutdown/*
-lib/udev/rules.d/*
 data/fwupd.conf etc/fwupd
 debian/fwupd.pkla /var/lib/polkit-1/localauthority/10-vendor.d
 usr/lib/*/fwupd-*/*.so
diff -Nru fwupd-1.9.5/debian/rules fwupd-1.9.5/debian/rules
--- fwupd-1.9.5/debian/rules	2023-09-06 03:36:11.000000000 +0200
+++ fwupd-1.9.5/debian/rules	2023-09-26 19:13:49.000000000 +0200
@@ -58,6 +58,8 @@
 	find debian/tmp/usr -type f -name "*a" -print | xargs rm -f
 	sed -i 's,wheel,sudo,' debian/tmp/usr/share/polkit-1/rules.d/org.freedesktop.fwupd.rules
 	dh_install
+	dh_install -pfwupd $$(pkg-config --variable=systemdsystemunitdir systemd | sed s,^/,,)
+	dh_install -pfwupd $$(pkg-config --variable=udevdir udev | sed s,^/,,)/rules.d
 	#install MSR conf if needed (depending on distro)
 	[ ! -d debian/tmp/usr/lib/modules-load.d ] || dh_install -pfwupd usr/lib/modules-load.d
 	[ ! -d debian/tmp/lib/modules-load.d ] || dh_install -pfwupd lib/modules-load.d
@@ -78,6 +80,7 @@
 
 	# avoid shipping an empty directory
 	[ ! -d debian/fwupd/lib/systemd ] || find debian/fwupd/lib/systemd -type d -empty -delete
+	[ ! -d debian/fwupd/usr/lib/systemd ] || find debian/fwupd/usr/lib/systemd -type d -empty -delete
 
 override_dh_strip_nondeterminism:
 	dh_strip_nondeterminism -Xfirmware-example.xml.gz

Reply to: