diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-11-13 12:18:41 +0100 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-11-13 12:20:17 +0100 |
commit | 1063b5af1db42c486a8b79ee65b168003ebc36cd (patch) | |
tree | 44fcbb3cc1365a9d3776f400d7839019fae49d38 /recipes-sota/aktualizr | |
parent | 2a5447189d13948b4e052d92c59da9d439feb807 (diff) | |
download | meta-updater-1063b5af1db42c486a8b79ee65b168003ebc36cd.tar.gz |
aktualizr: use config instead of environment variables.fix/master/newline-etc
This should make the secondary config dir process better anyway, and it
finally gets rid of a hacky workaround that we'd been using for ages.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
Diffstat (limited to 'recipes-sota/aktualizr')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-auto-prov.bb | 1 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | 1 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 1 | ||||
-rwxr-xr-x | recipes-sota/aktualizr/aktualizr_git.bb | 1 | ||||
-rw-r--r-- | recipes-sota/aktualizr/environment.inc | 8 | ||||
-rw-r--r-- | recipes-sota/aktualizr/files/aktualizr-secondary.service | 1 | ||||
-rw-r--r-- | recipes-sota/aktualizr/files/aktualizr.service | 2 |
7 files changed, 1 insertions, 14 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index 39a5e6e..f506cab 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb | |||
@@ -12,7 +12,6 @@ PR = "6" | |||
12 | 12 | ||
13 | SRC_URI = "" | 13 | SRC_URI = "" |
14 | 14 | ||
15 | require environment.inc | ||
16 | require credentials.inc | 15 | require credentials.inc |
17 | 16 | ||
18 | do_install() { | 17 | do_install() { |
diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb index 2763185..5893ed2 100644 --- a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | |||
@@ -15,7 +15,6 @@ RDEPENDS_${PN}_append = "${@' aktualizr-ca-implicit-prov-creds' if d.getVar('SOT | |||
15 | PV = "1.0" | 15 | PV = "1.0" |
16 | PR = "1" | 16 | PR = "1" |
17 | 17 | ||
18 | require environment.inc | ||
19 | require credentials.inc | 18 | require credentials.inc |
20 | 19 | ||
21 | do_install() { | 20 | do_install() { |
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index e915046..7947edd 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb | |||
@@ -12,7 +12,6 @@ SRC_URI = "" | |||
12 | PV = "1.0" | 12 | PV = "1.0" |
13 | PR = "6" | 13 | PR = "6" |
14 | 14 | ||
15 | require environment.inc | ||
16 | require credentials.inc | 15 | require credentials.inc |
17 | 16 | ||
18 | do_install() { | 17 | do_install() { |
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 61ec786..14de9fa 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -74,6 +74,7 @@ do_install_append () { | |||
74 | if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then | 74 | if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then |
75 | install -m 0700 -d ${D}${sysconfdir}/sota/ecus | 75 | install -m 0700 -d ${D}${sysconfdir}/sota/ecus |
76 | install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ | 76 | install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ |
77 | echo "[uptane]\nsecondary_configs_dir = /etc/sota/ecus/\n" > ${D}${libdir}/sota/conf.d/30-secondary-configs-dir.toml | ||
77 | else | 78 | else |
78 | bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})" | 79 | bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})" |
79 | fi | 80 | fi |
diff --git a/recipes-sota/aktualizr/environment.inc b/recipes-sota/aktualizr/environment.inc deleted file mode 100644 index 0b46a2e..0000000 --- a/recipes-sota/aktualizr/environment.inc +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | do_install_append() { | ||
2 | if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then | ||
3 | AKTUALIZR_CMDLINE_PARAMETERS="${AKTUALIZR_CMDLINE_PARAMETERS} --secondary-configs-dir /etc/sota/ecus" | ||
4 | fi | ||
5 | echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_CMDLINE_PARAMETERS}" > ${D}${libdir}/sota/sota.env | ||
6 | } | ||
7 | |||
8 | FILES_${PN}_append = " ${libdir}/sota/sota.env" | ||
diff --git a/recipes-sota/aktualizr/files/aktualizr-secondary.service b/recipes-sota/aktualizr/files/aktualizr-secondary.service index a1e0e1b..9628ee3 100644 --- a/recipes-sota/aktualizr/files/aktualizr-secondary.service +++ b/recipes-sota/aktualizr/files/aktualizr-secondary.service | |||
@@ -4,6 +4,5 @@ Description=Aktualizr SOTA Client (UPTANE Secondary) | |||
4 | [Service] | 4 | [Service] |
5 | RestartSec=10 | 5 | RestartSec=10 |
6 | Restart=always | 6 | Restart=always |
7 | EnvironmentFile=-/etc/sota/sota.env | ||
8 | ExecStart=/usr/bin/aktualizr-secondary --config /usr/lib/sota/sota_secondary.toml | 7 | ExecStart=/usr/bin/aktualizr-secondary --config /usr/lib/sota/sota_secondary.toml |
9 | 8 | ||
diff --git a/recipes-sota/aktualizr/files/aktualizr.service b/recipes-sota/aktualizr/files/aktualizr.service index 6de4474..726809e 100644 --- a/recipes-sota/aktualizr/files/aktualizr.service +++ b/recipes-sota/aktualizr/files/aktualizr.service | |||
@@ -5,8 +5,6 @@ After=network.target | |||
5 | [Service] | 5 | [Service] |
6 | RestartSec=10 | 6 | RestartSec=10 |
7 | Restart=always | 7 | Restart=always |
8 | EnvironmentFile=/usr/lib/sota/sota.env | ||
9 | EnvironmentFile=-/etc/sota/sota.env | ||
10 | ExecStart=/usr/bin/aktualizr $AKTUALIZR_CMDLINE_PARAMETERS | 8 | ExecStart=/usr/bin/aktualizr $AKTUALIZR_CMDLINE_PARAMETERS |
11 | 9 | ||
12 | [Install] | 10 | [Install] |