mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH v2] rauc: install rauc service wrapper script for non-systemd systems
@ 2018-02-13 16:59 Bastian Stender
  0 siblings, 0 replies; only message in thread
From: Bastian Stender @ 2018-02-13 16:59 UTC (permalink / raw)
  To: ptxdist; +Cc: Bastian Stender

This is called by dbus activation via
/usr/share/dbus-1/system-services/de.pengutronix.rauc.service when
systemd is not used.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
---
Changes since v1:
- added patch to prevent package host path leakage
---
 ...le.am-do-not-package-data-rauc-service.sh.patch | 39 ++++++++++++++++++++++
 patches/rauc-0.3/series                            |  4 +++
 rules/rauc.make                                    |  3 ++
 3 files changed, 46 insertions(+)
 create mode 100644 patches/rauc-0.3/0001-Makefile.am-do-not-package-data-rauc-service.sh.patch
 create mode 100644 patches/rauc-0.3/series

diff --git a/patches/rauc-0.3/0001-Makefile.am-do-not-package-data-rauc-service.sh.patch b/patches/rauc-0.3/0001-Makefile.am-do-not-package-data-rauc-service.sh.patch
new file mode 100644
index 000000000..7a75907aa
--- /dev/null
+++ b/patches/rauc-0.3/0001-Makefile.am-do-not-package-data-rauc-service.sh.patch
@@ -0,0 +1,39 @@
+From: Bastian Stender <bst@pengutronix.de>
+Date: Tue, 13 Feb 2018 13:53:35 +0100
+Subject: [PATCH] Makefile.am: do not package data/rauc-service.sh
+
+Packaging the dbus wrapper script renders the corresponding .in file useless.
+@bindir@ is ignored making the systemd service fail if the rauc binary
+location differs from the packaging host.
+
+e119229 ("Makefile.am: do not package data/*.service") fixed this for
+all .in files in data until then. This bug was introduced later on.
+
+Fixes: dcd184d ("dbus: use wrapper when starting rauc service")
+Signed-off-by: Bastian Stender <bst@pengutronix.de>
+---
+ Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 93c752f44241..47c350d8d511 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -90,7 +90,7 @@ dbuspolicydir = $(DBUS_POLICYDIR)
+ dist_dbuspolicy_DATA = data/de.pengutronix.rauc.conf
+ 
+ dbuswrapperdir = $(libexecdir)
+-dist_dbuswrapper_SCRIPTS = data/rauc-service.sh
++nodist_dbuswrapper_SCRIPTS = data/rauc-service.sh
+ 
+ EXTRA_DIST += data/rauc.service.in \
+ 	      data/de.pengutronix.rauc.service.in \
+@@ -210,7 +210,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = "--without-systemdunitdir"
+ CLEANFILES = $(gdbus_installer_generated) \
+ 	     $(nodist_systemdunit_DATA) \
+ 	     $(nodist_dbussystem_DATA) \
+-	     $(dist_dbuswrapper_SCRIPTS) \
++	     $(nodist_dbuswrapper_SCRIPTS) \
+ 	     data/rauc.service \
+ 	     test/empty.dat \
+ 	     test/test-results/rauc.*.counts \
diff --git a/patches/rauc-0.3/series b/patches/rauc-0.3/series
new file mode 100644
index 000000000..c15be9e72
--- /dev/null
+++ b/patches/rauc-0.3/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Makefile.am-do-not-package-data-rauc-service.sh.patch
+# cd1816e4885f0563e78bd81d3d65732a  - git-ptx-patches magic
diff --git a/rules/rauc.make b/rules/rauc.make
index bc3b9462a..c7879f348 100644
--- a/rules/rauc.make
+++ b/rules/rauc.make
@@ -81,6 +81,9 @@ ifdef PTXCONF_INITMETHOD_SYSTEMD
 		/usr/lib/systemd/system/rauc-mark-good.service)
 	@$(call install_link, rauc, ../rauc-mark-good.service, \
 		/usr/lib/systemd/system/multi-user.target.wants/rauc-mark-good.service)
+else
+	@$(call install_copy, rauc, 0, 0, 0755, -, \
+		/usr/libexec/rauc-service.sh)
 endif
 
 	@$(call install_finish, rauc)
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-13 16:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 16:59 [ptxdist] [PATCH v2] rauc: install rauc service wrapper script for non-systemd systems Bastian Stender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox