diff mbox series

[meta-oe] lirc: Fix build with usrmerge feature building on ubuntu hosts

Message ID 20230316210229.291737-1-raj.khem@gmail.com
State New
Headers show
Series [meta-oe] lirc: Fix build with usrmerge feature building on ubuntu hosts | expand

Commit Message

Khem Raj March 16, 2023, 9:02 p.m. UTC
We get a very cryptic error during do_package

ERROR: Didn't find service unit 'lircmd.service', specified in SYSTEMD_SERVICE:lirc.

The reason is on ubuntu build hosts configure pokes at build host and
decided its ubuntu and applies hardcoded value of /lib/systemd/system
for systemdunitdir instead of /usr/lib/systemd/system as passed from
recipe

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../lirc/lirc/0001-Unbolt-ubuntu-hack.patch   | 26 +++++++++++++++++++
 .../recipes-connectivity/lirc/lirc_0.10.2.bb  |  1 +
 2 files changed, 27 insertions(+)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Unbolt-ubuntu-hack.patch
diff mbox series

Patch

diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Unbolt-ubuntu-hack.patch b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Unbolt-ubuntu-hack.patch
new file mode 100644
index 0000000000..e58a93b6f6
--- /dev/null
+++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc/0001-Unbolt-ubuntu-hack.patch
@@ -0,0 +1,26 @@ 
+From ca126a2832aaff0deef3ba7eaf411dd0dc43b068 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 16 Mar 2023 11:31:14 -0700
+Subject: [PATCH] Unbolt ubuntu hack
+
+This bites during cross compiling where the target is different than
+build host and build host might be ubuntu but that does not matter in
+cross compilation case. This fails builds when usrmerge feature is used
+
+Upstream-Status: Inappropriates [ Cross-compile specific ]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -429,7 +429,7 @@ AC_CHECK_LIB([udev], [udev_device_new_fr
+ ])
+ 
+ dnl Ubuntu's systemd pkg-config seems broken beyond repair. So:
+-kernelversion=`cat /proc/version || echo "non-linux"`
++kernelversion="cross-compiled"
+ AS_CASE([$kernelversion],
+   [*Ubuntu*],[
+     AC_MSG_NOTICE([Hardwiring Ubuntu systemd setup])
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
index 458d9d7cdd..88e3f0486b 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-connectivity/lirc/lirc_0.10.2.bb
@@ -21,6 +21,7 @@  SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2 \
            file://lirc_options.conf \
            file://lirc.tmpfiles \
            file://0001-Makefile.am-do-not-clobber-PYTHONPATH-from-build-env.patch \
+           file://0001-Unbolt-ubuntu-hack.patch \
            "
 SRC_URI[sha256sum] = "3d44ec8274881cf262f160805641f0827ffcc20ade0d85e7e6f3b90e0d3d222a"