summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-11-13 12:18:41 +0100
committerPatrick Vacek <patrickvacek@gmail.com>2018-11-13 13:57:45 +0100
commit691eb035bea3a55f7e4257ce837865bec244830e (patch)
tree79856b19cbcd8c342d52a9ad491310b011fb8ec4 /recipes-sota/aktualizr
parent5632ca1fdd8a1ed494c5460558acc9354be6048e (diff)
downloadmeta-updater-691eb035bea3a55f7e4257ce837865bec244830e.tar.gz
aktualizr: use config instead of environment variables.fix/rocko/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.bb1
-rw-r--r--recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb1
-rw-r--r--recipes-sota/aktualizr/aktualizr-hsm-prov.bb1
-rwxr-xr-xrecipes-sota/aktualizr/aktualizr_git.bb1
-rw-r--r--recipes-sota/aktualizr/environment.inc8
-rw-r--r--recipes-sota/aktualizr/files/aktualizr-secondary.service1
-rw-r--r--recipes-sota/aktualizr/files/aktualizr.service2
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
13SRC_URI = "" 13SRC_URI = ""
14 14
15require environment.inc
16require credentials.inc 15require credentials.inc
17 16
18do_install() { 17do_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
15PV = "1.0" 15PV = "1.0"
16PR = "1" 16PR = "1"
17 17
18require environment.inc
19require credentials.inc 18require credentials.inc
20 19
21do_install() { 20do_install() {
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb
index 151b543..08fffe9 100644
--- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb
@@ -12,7 +12,6 @@ SRC_URI = ""
12PV = "1.0" 12PV = "1.0"
13PR = "6" 13PR = "6"
14 14
15require environment.inc
16require credentials.inc 15require credentials.inc
17 16
18do_install() { 17do_install() {
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index e44780f..9cc7c7a 100755
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -75,6 +75,7 @@ do_install_append () {
75 if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then 75 if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then
76 install -m 0700 -d ${D}${sysconfdir}/sota/ecus 76 install -m 0700 -d ${D}${sysconfdir}/sota/ecus
77 install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ 77 install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/
78 echo "[uptane]\nsecondary_configs_dir = /etc/sota/ecus/\n" > ${D}${libdir}/sota/conf.d/30-secondary-configs-dir.toml
78 else 79 else
79 bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})" 80 bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})"
80 fi 81 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 @@
1do_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
8FILES_${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]
5RestartSec=10 5RestartSec=10
6Restart=always 6Restart=always
7EnvironmentFile=-/etc/sota/sota.env
8ExecStart=/usr/bin/aktualizr-secondary --config /usr/lib/sota/sota_secondary.toml 7ExecStart=/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]
6RestartSec=10 6RestartSec=10
7Restart=always 7Restart=always
8EnvironmentFile=/usr/lib/sota/sota.env
9EnvironmentFile=-/etc/sota/sota.env
10ExecStart=/usr/bin/aktualizr $AKTUALIZR_CMDLINE_PARAMETERS 8ExecStart=/usr/bin/aktualizr $AKTUALIZR_CMDLINE_PARAMETERS
11 9
12[Install] 10[Install]