diff options
author | Phil Wise <phil@advancedtelematic.com> | 2017-06-26 15:13:44 +0200 |
---|---|---|
committer | Phil Wise <phil@advancedtelematic.com> | 2017-06-26 15:17:32 +0200 |
commit | dc234532add69842295902d35981dba886468da0 (patch) | |
tree | 9168d7c82698be2b66d951f2159986f4d627a06b /recipes-sota/aktualizr | |
parent | 45c155a67d3532ad32342fc512e8bf6341ab9e5d (diff) | |
download | meta-updater-dc234532add69842295902d35981dba886468da0.tar.gz |
Aktualizr updates, including sync()
Perform sync() after provisioning
Store sota.toml in updatable /usr directory
Diffstat (limited to 'recipes-sota/aktualizr')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 9 | ||||
-rw-r--r-- | recipes-sota/aktualizr/files/aktualizr-autoprovision.service | 2 |
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 | " |
15 | SRCREV = "2e897310c611e2da46f8af888bb62c09b2a2906a" | 15 | SRCREV = "33614fb9fc8f6c9ab5fae20c16d1dca0a330b07f" |
16 | PV = "1.0+git${SRCPV}" | 16 | PV = "1.0+git${SRCPV}" |
17 | 17 | ||
18 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
@@ -23,13 +23,14 @@ inherit cmake systemd | |||
23 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_OSTREE=ON -DAKTUALIZR_VERSION=${PV}" | 23 | EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_OSTREE=ON -DAKTUALIZR_VERSION=${PV}" |
24 | 24 | ||
25 | export SOTA_AUTOPROVISION_CREDENTIALS | 25 | export SOTA_AUTOPROVISION_CREDENTIALS |
26 | export SOTA_PACKED_CREDENTIALS | ||
26 | 27 | ||
27 | do_install_append() { | 28 | do_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() { | |||
39 | FILES_${PN} = " \ | 40 | FILES_${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 | |||
8 | RestartSec=10 | 8 | RestartSec=10 |
9 | Restart=always | 9 | Restart=always |
10 | EnvironmentFile=/var/sota/sota_provisioning_url.env | 10 | EnvironmentFile=/var/sota/sota_provisioning_url.env |
11 | ExecStart=/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" | 11 | ExecStart=/usr/bin/aktualizr --disable-keyid-validation --tls-server ${SOTA_GATEWAY_URI} --config /usr/lib/sota/sota.toml |
12 | 12 | ||
13 | [Install] | 13 | [Install] |
14 | WantedBy=multi-user.target | 14 | WantedBy=multi-user.target |