diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-11-12 14:49:37 +0100 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-11-13 13:57:33 +0100 |
commit | c2e3b38a4526eef473aba1a148cde28c69c39a39 (patch) | |
tree | d417f6d65c0102950eac72e5da6235993b5aaa76 /recipes-sota | |
parent | be97c75b5b6522f1aa52c3966a4fccc4d6cf32d4 (diff) | |
download | meta-updater-c2e3b38a4526eef473aba1a148cde28c69c39a39.tar.gz |
aktualizr: Fix virtual secondary support.
Use /etc/sota/ecus as using /var/sota/ecus was conflicting with the
provisioning recipes that also use /var/sota. Not totally ideal, but the
best compromise I could find.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
Diffstat (limited to 'recipes-sota')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-auto-prov.bb | 3 | ||||
-rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 7 | ||||
-rw-r--r-- | recipes-sota/aktualizr/environment.inc | 11 |
3 files changed, 11 insertions, 10 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index 01f21fa..39a5e6e 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb | |||
@@ -30,7 +30,6 @@ do_install() { | |||
30 | fi | 30 | fi |
31 | 31 | ||
32 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 32 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
33 | install -m 0700 -d ${D}${localstatedir}/sota | ||
34 | aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)} | 33 | aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)} |
35 | 34 | ||
36 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \ | 35 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \ |
@@ -40,8 +39,6 @@ do_install() { | |||
40 | FILES_${PN} = " \ | 39 | FILES_${PN} = " \ |
41 | ${libdir}/sota/conf.d \ | 40 | ${libdir}/sota/conf.d \ |
42 | ${libdir}/sota/conf.d/20-${aktualizr_toml} \ | 41 | ${libdir}/sota/conf.d/20-${aktualizr_toml} \ |
43 | ${localstatedir}/sota \ | ||
44 | ${localstatedir}/sota/sota_provisioning_credentials.zip \ | ||
45 | " | 42 | " |
46 | 43 | ||
47 | # vim:set ts=4 sw=4 sts=4 expandtab: | 44 | # vim:set ts=4 sw=4 sts=4 expandtab: |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index b42f133..37dc6d4 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -70,6 +70,12 @@ do_install_append () { | |||
70 | install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service | 70 | install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service |
71 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 71 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
72 | install -m 0700 -d ${D}${sysconfdir}/sota/conf.d | 72 | install -m 0700 -d ${D}${sysconfdir}/sota/conf.d |
73 | |||
74 | if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ] && [ -e "${SOTA_SECONDARY_CONFIG_DIR}" ]; then | ||
75 | install -m 0700 -d ${D}${sysconfdir}/sota/ecus | ||
76 | install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ | ||
77 | fi | ||
78 | |||
73 | } | 79 | } |
74 | 80 | ||
75 | do_install_append_class-target () { | 81 | do_install_append_class-target () { |
@@ -92,6 +98,7 @@ FILES_${PN} = " \ | |||
92 | ${systemd_unitdir}/system/aktualizr.service \ | 98 | ${systemd_unitdir}/system/aktualizr.service \ |
93 | ${libdir}/sota/conf.d \ | 99 | ${libdir}/sota/conf.d \ |
94 | ${sysconfdir}/sota/conf.d \ | 100 | ${sysconfdir}/sota/conf.d \ |
101 | ${sysconfdir}/sota/ecus/* \ | ||
95 | " | 102 | " |
96 | 103 | ||
97 | FILES_${PN}-examples = " \ | 104 | FILES_${PN}-examples = " \ |
diff --git a/recipes-sota/aktualizr/environment.inc b/recipes-sota/aktualizr/environment.inc index 16e789e..0b46a2e 100644 --- a/recipes-sota/aktualizr/environment.inc +++ b/recipes-sota/aktualizr/environment.inc | |||
@@ -1,11 +1,8 @@ | |||
1 | export SOTA_VIRTUAL_SECONDARIES | ||
2 | |||
3 | do_install_append() { | 1 | do_install_append() { |
4 | for sec in ${SOTA_VIRTUAL_SECONDARIES}; do | 2 | if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then |
5 | AKTUALIZR_PARAMETERS_VIRTUALSECS="${AKTUALIZR_PARAMETERS_VIRTUALSECS} --secondary-config $sec" | 3 | AKTUALIZR_CMDLINE_PARAMETERS="${AKTUALIZR_CMDLINE_PARAMETERS} --secondary-configs-dir /etc/sota/ecus" |
6 | done | 4 | fi |
7 | 5 | echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_CMDLINE_PARAMETERS}" > ${D}${libdir}/sota/sota.env | |
8 | echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_PARAMETERS_VIRTUALSECS}" > ${D}${libdir}/sota/sota.env | ||
9 | } | 6 | } |
10 | 7 | ||
11 | FILES_${PN}_append = " ${libdir}/sota/sota.env" | 8 | FILES_${PN}_append = " ${libdir}/sota/sota.env" |