From 02e976e82fae6b26619d42993140a2c1a7c13db6 Mon Sep 17 00:00:00 2001 From: Zee314159 <252806294@qq.com> Date: Fri, 26 Jul 2019 08:53:36 +0200 Subject: Dont patch credentials Unzip files in tmp directory, updated comments Fixed a zip bug Grouped elements with warnings With a fancier loop Signed-off-by: Zee314159 <252806294@qq.com> (cherry-picked from commit 672fcc51d92522c8e2de794ef561e8dd281f7f20) --- recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'recipes-sota') diff --git a/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb index dbb5fde..2701c07 100644 --- a/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb +++ b/recipes-sota/aktualizr/aktualizr-shared-prov-creds.bb @@ -14,14 +14,17 @@ require credentials.inc do_install() { if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then install -m 0700 -d ${D}${localstatedir}/sota - cp "${SOTA_PACKED_CREDENTIALS}" ${D}${localstatedir}/sota/sota_provisioning_credentials.zip - # Device should not be able to push data to treehub - zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json - # Device has no use for the API Gateway. Remove if present. See: - # https://github.com/advancedtelematic/ota-plus-server/pull/1913/ - if unzip -l ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url > /dev/null; then - zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url - fi + # root.json contains the root metadata for bootstrapping the Uptane metadata verification process. + # autoprov.url has the URL to the device gateway on the server, which is where we send most of our requests. + # autoprov_credentials.p12 contains the shared provisioning credentials. + for var in root.json autoprov.url autoprov_credentials.p12; do + if unzip -l "${SOTA_PACKED_CREDENTIALS}" $var > /dev/null; then + unzip "${SOTA_PACKED_CREDENTIALS}" $var -d ${T} + zip -mj -q ${D}${localstatedir}/sota/sota_provisioning_credentials.zip ${T}/$var + else + bbwarn "$var is missing from credentials.zip" + fi + done fi } -- cgit v1.2.3-54-g00ecf From ac80208941f6637dd5f687fc89041eee70770038 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 25 Jun 2019 16:00:44 +0200 Subject: Bump aktualizr and garage-sign versions to the latest. Both include support for mutual TLS in the garage tools. Signed-off-by: Patrick Vacek (cherry-picked from commit 8fa3a60d39476903745cb80f6130bb8c412e0694) --- recipes-sota/aktualizr/aktualizr_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'recipes-sota') diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 31d7acb..d32fc30 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -15,7 +15,7 @@ RDEPENDS_${PN}-ptest += "bash cmake curl python3-misc python3-modules sqlite3 va PV = "1.0+git${SRCPV}" PR = "7" -GARAGE_SIGN_PV = "0.7.0-3-gf5ba640" +GARAGE_SIGN_PV = "0.7.0-19-g89ec974" SRC_URI = " \ gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ @@ -28,10 +28,10 @@ SRC_URI = " \ " # for garage-sign archive -SRC_URI[md5sum] = "e104ccd4f32e52571a5fc0e5042db050" -SRC_URI[sha256sum] = "c590be1a57523bfe097af82279eda5c97cf40ae47fb27162cf33c469702c8a9b" +SRC_URI[md5sum] = "3ed27c1142860cd9b4a2594067312b8b" +SRC_URI[sha256sum] = "e54eef3863118f373c3ebd9e2877f9de5bab4950ed157a15fb4f4ec575bc2ece" -SRCREV = "9c592cf9d8dfcd995d47753f2be7bd1a2b56c7da" +SRCREV = "03778511cc937d07bf53a8092f8b268e65f5d9a6" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf