Skip to contentSkip to conversation

gpsd: Correct the installation of gpsd.hotplug if systemd is not enabled

PATCH New Peter Kjellerstedt 1 participant 2 messages Aug 28, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gpsd: Correct the installation of gpsd.hotplug if systemd is not enabled

---
 ...ect-the-installation-of-gpsd.hotplug.patch | 29 +++++++++++++++++++
 meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb  |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd/0001-SConscript-Correct-the-installation-of-gpsd.hotplug.patch
meta-oe/recipes-navigation/gpsd/gpsd/0001-SConscript-Correct-the-installation-of-gpsd.hotplug.patch new file +29 -0
new file mode 100644
index 000000000..172f47825
@@ -0,0 +1,29 @@
+From c7183b2cc4a42f6ca7c2dc687ee7881efe9aeb73 Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <[email protected]>
+Date: Sat, 28 Aug 2021 14:22:02 +0200
+Subject: [PATCH] SConscript: Correct the installation of gpsd.hotplug
+
+Without this, `scons systemd=false && scons udev-install` fails with:
+
+  cp .../gpsd/gpsd-3.23.1~dev/gpsd.hotplug /home/pkj/gpsd/foobar/lib/udev
+  cp: cannot stat '.../gpsd/gpsd-3.23.1~dev/gpsd.hotplug': No such file or directory
+
+Upstream-Status: Submitted [https://gitlab.com/gpsd/gpsd/-/merge_requests/277]
+Signed-off-by: Peter Kjellerstedt <[email protected]>
+---
+ SConscript | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/SConscript b/SConscript
+index 1cd3354e1..e578012f5 100644
+--- a/SConscript
++++ b/SConscript
+@@ -3060,7 +3060,7 @@ if env['systemd']:
+     hotplug_wrapper_install = []
+ else:
+     hotplug_wrapper_install = [
+-        'cp $SRCDIR/gpsd.hotplug ' + DESTDIR + env['udevdir'],
++        'cp $SRCDIR/../gpsd.hotplug ' + DESTDIR + env['udevdir'],
+         'chmod a+x ' + DESTDIR + env['udevdir'] + '/gpsd.hotplug'
+     ]
+ 
meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb +1 -0
index bf5e0efed..98f0e67a8 100644
@@ -6,6 +6,7 @@ DEPENDS = "dbus ncurses python3 pps-tools"
 PROVIDES = "virtual/gpsd"
 
 SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+    file://0001-SConscript-Correct-the-installation-of-gpsd.hotplug.patch \
     file://gpsd.init \
 "
 SRC_URI[md5sum] = "b4f96cb01cbc06542b1cb66b3296078d"
#1 lore raw

PATCH 2/2 gpsd: Do not install gpsd.hotplug unconditionally

gpsd.hotplug is only needed if systemd is not used, in which case it will be installed by scons.

---
 meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb | 4 ----
 1 file changed, 4 deletions(-)
meta-oe/recipes-navigation/gpsd/gpsd_3.23.bb +0 -4
index 98f0e67a8..aaf742929 100644
@@ -72,10 +72,6 @@ do_install:append() {
     install -d ${D}${sysconfdir}/default
     install -m 0644 ${S}/packaging/deb/etc_default_gpsd ${D}${sysconfdir}/default/gpsd.default
 
-    # Support for udev
-    install -d ${D}${nonarch_base_libdir}/udev
-    install -m 0755 ${S}/gpsd.hotplug ${D}${nonarch_base_libdir}/udev
-
     # Support for python
     install -d ${D}${PYTHON_SITEPACKAGES_DIR}/gps
     install -m 755 ${S}/gps/*.py ${D}${PYTHON_SITEPACKAGES_DIR}/gps