mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bastian Stender <bst@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Bastian Stender <bst@pengutronix.de>
Subject: [ptxdist] [PATCH v2] rauc: install rauc service wrapper script for non-systemd systems
Date: Tue, 13 Feb 2018 17:59:30 +0100	[thread overview]
Message-ID: <20180213165930.529-1-bst@pengutronix.de> (raw)

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

                 reply	other threads:[~2018-02-13 16:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180213165930.529-1-bst@pengutronix.de \
    --to=bst@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox