summaryrefslogtreecommitdiffstats
path: root/recipes-core
diff options
context:
space:
mode:
authorEnrico Jorns <ejo@pengutronix.de>2015-09-08 17:43:43 +0200
committerEnrico Jorns <ejo@pengutronix.de>2016-01-22 09:31:43 +0100
commitc20a61ed5bfdd040a760c09054ba782c3832e4f1 (patch)
treebbf257f0171ae5847c72eeeaa6cc379a46a29def /recipes-core
parente09578d41a0e5f25980ac1e6da863b601ddc8c2f (diff)
downloadmeta-ptx-c20a61ed5bfdd040a760c09054ba782c3832e4f1.tar.gz
meta-ptx-c20a61ed5bfdd040a760c09054ba782c3832e4f1.tar.xz
rauc: Introduce RAUC_KEYRING_FILE to specify keyring file path
Set the RAUC_KEYRING_FILE variable to the path (withouth 'file://') where the keyring file of your choice is located Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Diffstat (limited to 'recipes-core')
-rw-r--r--recipes-core/rauc/rauc.inc17
-rw-r--r--recipes-core/rauc/rauc_git.bb2
2 files changed, 13 insertions, 6 deletions
diff --git a/recipes-core/rauc/rauc.inc b/recipes-core/rauc/rauc.inc
index 349fdd6..b4b6889 100644
--- a/recipes-core/rauc/rauc.inc
+++ b/recipes-core/rauc/rauc.inc
@@ -14,6 +14,11 @@ FILES_${PN}_append = " /mnt/rauc"
inherit autotools pkgconfig gettext systemd
+RAUC_KEYRING_FILE ??= "openssl-ca/dev-ca.pem"
+RAUC_KEYRING_FILE[doc] = "Path to keyring file to be placed in rauc images"
+
+SRC_URI += "file://${RAUC_KEYRING_FILE}"
+
do_install_append () {
# Create rauc config dir
install -d ${D}${sysconfdir}/rauc
@@ -26,11 +31,13 @@ do_install_append () {
install -m 0644 ${WORKDIR}/system.conf ${D}${sysconfdir}/rauc/system.conf
fi
- # Pem files
- install -d ${D}${sysconfdir}/rauc/openssl-ca
- for pem in `find ${WORKDIR} -name '*.pem'`; do \
- install -m 0644 $pem ${D}${sysconfdir}/rauc/openssl-ca/; \
- done
+ # CA file
+ if [ -f ${WORKDIR}/${RAUC_KEYRING_FILE} ]; then
+ install -d ${D}${sysconfdir}/rauc/openssl-ca
+ install -m 0644 ${WORKDIR}/${RAUC_KEYRING_FILE} ${D}${sysconfdir}/rauc/openssl-ca/; \
+ else
+ bbwarn "No keyring file provided"
+ fi
# D-bus service
install -d ${D}${sysconfdir}/dbus-1/system.d/
diff --git a/recipes-core/rauc/rauc_git.bb b/recipes-core/rauc/rauc_git.bb
index 04d5cb4..6ede2d0 100644
--- a/recipes-core/rauc/rauc_git.bb
+++ b/recipes-core/rauc/rauc_git.bb
@@ -3,7 +3,7 @@ PR = "r9"
SRC_URI_append = " \
git://github.com/jluebbe/rauc.git;protocol=https \
- file://openssl-ca/dev-ca.pem "
+ "
PV = "0+git${SRCPV}"
S = "${WORKDIR}/git"