summaryrefslogtreecommitdiffstats
path: root/recipes-sota
diff options
context:
space:
mode:
authorPhil Wise <phil@advancedtelematic.com>2017-06-26 15:13:44 +0200
committerPhil Wise <phil@advancedtelematic.com>2017-06-26 15:17:32 +0200
commitdc234532add69842295902d35981dba886468da0 (patch)
tree9168d7c82698be2b66d951f2159986f4d627a06b /recipes-sota
parent45c155a67d3532ad32342fc512e8bf6341ab9e5d (diff)
downloadmeta-updater-dc234532add69842295902d35981dba886468da0.tar.gz
Aktualizr updates, including sync()
Perform sync() after provisioning Store sota.toml in updatable /usr directory
Diffstat (limited to 'recipes-sota')
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb9
-rw-r--r--recipes-sota/aktualizr/files/aktualizr-autoprovision.service2
2 files changed, 6 insertions, 5 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index 62ee9b0..39a8ac8 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -12,7 +12,7 @@ SRC_URI = " \
12 file://aktualizr-autoprovision.service \ 12 file://aktualizr-autoprovision.service \
13 file://sota_autoprov.toml \ 13 file://sota_autoprov.toml \
14 " 14 "
15SRCREV = "2e897310c611e2da46f8af888bb62c09b2a2906a" 15SRCREV = "33614fb9fc8f6c9ab5fae20c16d1dca0a330b07f"
16PV = "1.0+git${SRCPV}" 16PV = "1.0+git${SRCPV}"
17 17
18S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
@@ -23,13 +23,14 @@ inherit cmake systemd
23EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_OSTREE=ON -DAKTUALIZR_VERSION=${PV}" 23EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_OSTREE=ON -DAKTUALIZR_VERSION=${PV}"
24 24
25export SOTA_AUTOPROVISION_CREDENTIALS 25export SOTA_AUTOPROVISION_CREDENTIALS
26export SOTA_PACKED_CREDENTIALS
26 27
27do_install_append() { 28do_install_append() {
28 if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" -o -n "${SOTA_PACKED_CREDENTIALS}" ]; then 29 if [ -n "${SOTA_AUTOPROVISION_CREDENTIALS}" -o -n "${SOTA_PACKED_CREDENTIALS}" ]; then
29 install -d ${D}/${systemd_unitdir}/system 30 install -d ${D}/${systemd_unitdir}/system
30 install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service 31 install -m 0644 ${WORKDIR}/aktualizr-autoprovision.service ${D}/${systemd_unitdir}/system/aktualizr.service
31 install -d ${D}/var/sota 32 install -d ${D}/usr/lib/sota
32 install -m "0644" ${WORKDIR}/sota_autoprov.toml ${D}/var/sota/sota.toml 33 install -m "0644" ${WORKDIR}/sota_autoprov.toml ${D}/usr/lib/sota/sota.toml
33 else 34 else
34 install -d ${D}/${systemd_unitdir}/system 35 install -d ${D}/${systemd_unitdir}/system
35 install -m 0644 ${WORKDIR}/aktualizr-manual-provision.service ${D}/${systemd_unitdir}/system/aktualizr.service 36 install -m 0644 ${WORKDIR}/aktualizr-manual-provision.service ${D}/${systemd_unitdir}/system/aktualizr.service
@@ -39,5 +40,5 @@ do_install_append() {
39FILES_${PN} = " \ 40FILES_${PN} = " \
40 ${bindir}/aktualizr \ 41 ${bindir}/aktualizr \
41 ${systemd_unitdir}/system/aktualizr.service \ 42 ${systemd_unitdir}/system/aktualizr.service \
42 /var/sota/sota.toml \ 43 /usr/lib/sota/sota.toml \
43 " 44 "
diff --git a/recipes-sota/aktualizr/files/aktualizr-autoprovision.service b/recipes-sota/aktualizr/files/aktualizr-autoprovision.service
index a5b92e3..fd0ab09 100644
--- a/recipes-sota/aktualizr/files/aktualizr-autoprovision.service
+++ b/recipes-sota/aktualizr/files/aktualizr-autoprovision.service
@@ -8,7 +8,7 @@ Requires=network-online.target
8RestartSec=10 8RestartSec=10
9Restart=always 9Restart=always
10EnvironmentFile=/var/sota/sota_provisioning_url.env 10EnvironmentFile=/var/sota/sota_provisioning_url.env
11ExecStart=/bin/sh -c "/usr/bin/aktualizr --disable-keyid-validation --tls-server ${SOTA_GATEWAY_URI} --primary-ecu-hardware-id `cat /etc/hostname` --config /var/sota/sota.toml" 11ExecStart=/usr/bin/aktualizr --disable-keyid-validation --tls-server ${SOTA_GATEWAY_URI} --config /usr/lib/sota/sota.toml
12 12
13[Install] 13[Install]
14WantedBy=multi-user.target 14WantedBy=multi-user.target