[OE-core] [PATCH] ca-certificates: remove Debianism in run-parts invocation

Ross Burton ross.burton at intel.com
Mon Jul 6 14:21:36 UTC 2015


ca-certificates comes from Debian but not all distros (i.e. Fedora) have a
leaner run-parts that doesn't support the -- separator between options and
paths, which causes this error:

| Running hooks in [...]/rootfs/etc/ca-certificates/update.d...
| [...]/usr/sbin/update-ca-certificates: line 194: Not: command not found

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 ...ertificates-don-t-use-Debianisms-in-run-p.patch | 33 ++++++++++++++++++++++
 .../ca-certificates/ca-certificates_20141019.bb    |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch

diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch b/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch
new file mode 100644
index 0000000..d7d487e
--- /dev/null
+++ b/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch
@@ -0,0 +1,33 @@
+ca-certificates is a package from Debian, but some host distros such as Fedora
+have a leaner run-parts provided by cron which doesn't support --verbose or the
+ -- separator between arguments and paths.
+
+This solves errors such as
+
+| Running hooks in [...]/rootfs/etc/ca-certificates/update.d...
+| [...]/usr/sbin/update-ca-certificates: line 194: Not: command not found
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton at intel.com>
+---
+ sbin/update-ca-certificates | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
+index fed9c25..29ecc69 100755
+--- a/sbin/update-ca-certificates
++++ b/sbin/update-ca-certificates
+@@ -186,9 +186,7 @@ echo "$ADDED_CNT added, $REMOVED_CNT removed; done."
+ 
+ HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
+ echo -n "Running hooks in $HOOKSDIR...."
+-VERBOSE_ARG=
+-[ "$verbose" = 0 ] || VERBOSE_ARG=--verbose
+-eval run-parts $VERBOSE_ARG --test -- $HOOKSDIR | while read hook
++eval run-parts --test $HOOKSDIR | while read hook
+ do
+   ( cat $ADDED
+     cat $REMOVED ) | $hook || echo E: $hook exited with code $?.
+-- 
+2.1.4
+
diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20141019.bb b/meta/recipes-support/ca-certificates/ca-certificates_20141019.bb
index 421b87e..cc58e4d 100644
--- a/meta/recipes-support/ca-certificates/ca-certificates_20141019.bb
+++ b/meta/recipes-support/ca-certificates/ca-certificates_20141019.bb
@@ -17,6 +17,7 @@ SRCREV = "2b8a047c78aadbecd90bf8e49ccf68898a211610"
 SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
            file://0001-update-ca-certificates-remove-c-rehash.patch \
            file://0002-update-ca-certificates-use-SYSROOT.patch \
+           file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
            file://default-sysroot.patch \
            file://sbindir.patch"
 
-- 
2.1.4




More information about the Openembedded-core mailing list