summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb7
-rwxr-xr-xrecipes-sota/aktualizr/aktualizr_git.bb3
-rw-r--r--recipes-sota/config/aktualizr-auto-reboot.bb21
-rw-r--r--recipes-sota/config/files/35-enable-auto-reboot.toml2
4 files changed, 31 insertions, 2 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb b/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
index 34460af..0628a61 100644
--- a/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
+++ b/recipes-sota/aktualizr/aktualizr-auto-prov-creds.bb
@@ -11,9 +11,14 @@ require credentials.inc
11do_install() { 11do_install() {
12 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 12 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
13 install -m 0700 -d ${D}${localstatedir}/sota 13 install -m 0700 -d ${D}${localstatedir}/sota
14 cp ${SOTA_PACKED_CREDENTIALS} ${D}${localstatedir}/sota/sota_provisioning_credentials.zip 14 cp "${SOTA_PACKED_CREDENTIALS}" ${D}${localstatedir}/sota/sota_provisioning_credentials.zip
15 # Device should not be able to push data to treehub 15 # Device should not be able to push data to treehub
16 zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json 16 zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip treehub.json
17 # Device has no use for the API Gateway. Remove if present. See:
18 # https://github.com/advancedtelematic/ota-plus-server/pull/1913/
19 if unzip -l ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url > /dev/null; then
20 zip -d ${D}${localstatedir}/sota/sota_provisioning_credentials.zip api_gateway.url
21 fi
17 fi 22 fi
18} 23}
19 24
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 3b48e58..9dd90e8 100755
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -23,7 +23,8 @@ SRC_URI = " \
23 file://aktualizr-serialcan.service \ 23 file://aktualizr-serialcan.service \
24 " 24 "
25 25
26SRCREV = "2aa9d93ccea09ec327789eecf858de561ef632da" 26
27SRCREV = "c2da7b5dfe34ebe3482042dd461543da291c43bd"
27BRANCH ?= "master" 28BRANCH ?= "master"
28 29
29S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"
diff --git a/recipes-sota/config/aktualizr-auto-reboot.bb b/recipes-sota/config/aktualizr-auto-reboot.bb
new file mode 100644
index 0000000..1317fd4
--- /dev/null
+++ b/recipes-sota/config/aktualizr-auto-reboot.bb
@@ -0,0 +1,21 @@
1SUMMARY = "Enable auto reboot to apply updates"
2DESCRIPTION = "Configures aktualizr to auto reboot just after new updates installation in order to apply them"
3HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base"
5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
7
8SRC_URI = " \
9 file://35-enable-auto-reboot.toml \
10 "
11
12do_install_append () {
13 install -m 0700 -d ${D}${libdir}/sota/conf.d
14 install -m 0644 ${WORKDIR}/35-enable-auto-reboot.toml ${D}${libdir}/sota/conf.d/35-enable-auto-reboot.toml
15}
16
17FILES_${PN} = " \
18 ${libdir}/sota/conf.d/35-enable-auto-reboot.toml \
19 "
20
21# vim:set ts=4 sw=4 sts=4 expandtab:
diff --git a/recipes-sota/config/files/35-enable-auto-reboot.toml b/recipes-sota/config/files/35-enable-auto-reboot.toml
new file mode 100644
index 0000000..f83810e
--- /dev/null
+++ b/recipes-sota/config/files/35-enable-auto-reboot.toml
@@ -0,0 +1,2 @@
1[uptane]
2force_install_completion = true