Source: lirc
Version: 0.10.1-7.2
Severity: normal
Tags: ftbfs patch
User: helm...@debian.org
Usertags: dep17m2

systemd wants to change the value of systemdsystemunitdir in systemd.pc
to point to user. The lirc upstream code consumes this value to
determine the placement of systemd units. Unfortunately, the packaging
hard codes the current value, so when systemd changes it, lirc will
FTBFS. I'm attaching a patch to fix that.

Helmut
diff -Nru lirc-0.10.1/debian/changelog lirc-0.10.1/debian/changelog
--- lirc-0.10.1/debian/changelog        2022-12-28 12:25:42.000000000 +0100
+++ lirc-0.10.1/debian/changelog        2023-09-20 10:40:12.000000000 +0200
@@ -1,3 +1,11 @@
+lirc (0.10.1-7.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS when systemdsystemunitdir changes in systemd.pc. (Closes: #-1)
+  * Also fix build vs host confusion.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 20 Sep 2023 10:40:12 +0200
+
 lirc (0.10.1-7.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru lirc-0.10.1/debian/install lirc-0.10.1/debian/install
--- lirc-0.10.1/debian/install  2022-12-28 12:25:42.000000000 +0100
+++ lirc-0.10.1/debian/install  2023-09-20 10:40:12.000000000 +0200
@@ -1,7 +1,7 @@
 #! /usr/bin/dh-exec
 
 etc/lirc
-[linux-any] lib/systemd/*
+[linux-any] ${systemdsystemunitdir}
 [linux-any] usr/lib/tmpfiles.d/*
 [linux-any] usr/bin/lirc-make-devinput
 [linux-any] usr/bin/irpipe
diff -Nru lirc-0.10.1/debian/rules lirc-0.10.1/debian/rules
--- lirc-0.10.1/debian/rules    2022-12-28 12:25:42.000000000 +0100
+++ lirc-0.10.1/debian/rules    2023-09-20 10:40:12.000000000 +0200
@@ -5,6 +5,8 @@
 export DEB_BUILD_MAINT_OPTIONS      = hardening=+all
 export DEB_LDFLAGS_MAINT_APPEND     = -Wl,--as-needed
 
+export systemdsystemunitdir=$(shell pkg-config --variable=systemdsystemunitdir 
systemd | sed s,^/,,)
+
 %:
        dh $@ --with python3
 
@@ -20,7 +22,7 @@
 
 override_dh_auto_configure: debian/lirc.preinst
 override_dh_auto_configure:
-ifeq ($(DEB_BUILD_ARCH_OS), linux)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        dh_auto_configure -- \
            SH_PATH=/bin/sh \
            MODINFO=/sbin/modinfo \
@@ -44,7 +46,7 @@
        find debian/tmp -name *.la -delete
        rm -f debian/tmp/usr/share/doc/lirc/lirc.org/api-docs/api-docs
        chmod 755 debian/tmp/usr/share/lirc/python-pkg/lirc/lirctool
-ifeq ($(DEB_BUILD_ARCH_OS), linux)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        mkdir -p debian/tmp/usr/lib/tmpfiles.d
        echo "d /run/lirc  0755  root  root  10d" \
            > debian/tmp/usr/lib/tmpfiles.d/lirc.conf
@@ -67,7 +69,7 @@
 endif
 
 override_dh_installsystemd:
-ifeq ($(DEB_BUILD_ARCH_OS), linux)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        dh_installsystemd -p lirc lircd.socket
        dh_installsystemd -p lirc --no-enable --no-start lircd.service
        dh_installsystemd -p lirc --no-enable --no-start irexec.service

Reply via email to