Source: spice-vdagent
Version: 0.22.1-3
Tags: ftbfs patch
User: helm...@debian.org
Usertags: dep17m2

We want to change the value of systemdsystemunitdir in systemd.pc to
point below /usr. spice-vdagent's upstream build system consumes this
variable while the packaging hard codes its current value. As we change
it, spice-vdagent will FTBFS. A very similar failure happens when
udevdir is changed in udev.pc. Consider applying the attached patch to
avoid this kind of failure.

Helmut
diff -Nru spice-vdagent-0.22.1/debian/changelog 
spice-vdagent-0.22.1/debian/changelog
--- spice-vdagent-0.22.1/debian/changelog       2022-05-31 21:33:55.000000000 
+0200
+++ spice-vdagent-0.22.1/debian/changelog       2023-09-26 11:13:56.000000000 
+0200
@@ -1,3 +1,11 @@
+spice-vdagent (0.22.1-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS when systemd.pc changes systemdsystemunitdir and when udev.pc
+    changes unitdir. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Tue, 26 Sep 2023 11:13:56 +0200
+
 spice-vdagent (0.22.1-3) unstable; urgency=medium
 
   [ Abhijith PA ]
diff -Nru spice-vdagent-0.22.1/debian/control 
spice-vdagent-0.22.1/debian/control
--- spice-vdagent-0.22.1/debian/control 2022-05-31 21:33:55.000000000 +0200
+++ spice-vdagent-0.22.1/debian/control 2023-09-26 11:11:38.000000000 +0200
@@ -17,6 +17,7 @@
                pkg-config,
                procps,
                systemd,
+               systemd-dev,
                udev,
                libdrm-dev
 Standards-Version: 4.5.0
diff -Nru spice-vdagent-0.22.1/debian/rules spice-vdagent-0.22.1/debian/rules
--- spice-vdagent-0.22.1/debian/rules   2022-05-31 21:33:55.000000000 +0200
+++ spice-vdagent-0.22.1/debian/rules   2023-09-26 11:13:35.000000000 +0200
@@ -6,6 +6,8 @@
 #export DH_VERBOSE=1
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export deb_systemdsystemunitdir = $(shell pkg-config 
--variable=systemdsystemunitdir systemd | sed s,^/,,)
+export deb_udevdir = $(shell pkg-config --variable=udevdir udev | sed s,^/,,)
 
 override_dh_auto_install:
        dh_auto_install --destdir=$(CURDIR)/debian/tmp
@@ -22,4 +24,4 @@
 execute_after_dh_install:
 # We cannot add this to the .link file because dh_link is called after
 # dh_systemd_* helpers during normal build
-       dh_link lib/systemd/system/spice-vdagentd.service 
lib/systemd/system/spice-vdagent.service
+       dh_link $(deb_systemdsystemunitdir)/spice-vdagentd.service 
$(deb_systemdsystemunitdir)/spice-vdagent.service
diff -Nru spice-vdagent-0.22.1/debian/spice-vdagent.install 
spice-vdagent-0.22.1/debian/spice-vdagent.install
--- spice-vdagent-0.22.1/debian/spice-vdagent.install   2022-05-31 
21:33:55.000000000 +0200
+++ spice-vdagent-0.22.1/debian/spice-vdagent.install   2023-09-26 
11:13:48.000000000 +0200
@@ -1,6 +1,6 @@
 etc/xdg/autostart/spice-vdagent.desktop
-lib/systemd/system
-lib/udev/rules.d
+${env:deb_systemdsystemunitdir}
+${env:deb_udevdir}/rules.d
 usr/bin
 usr/lib/systemd/user
 usr/lib/tmpfiles.d

Reply via email to