diff options
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-auto-prov.bb | 8 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | 11 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 6 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr-implicit-prov.bb | 6 | ||||
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 10 | ||||
-rw-r--r-- | recipes-sota/aktualizr/environment.inc | 3 | ||||
-rw-r--r-- | recipes-sota/config/aktualizr-disable-send-ip.bb | 5 | ||||
-rw-r--r-- | recipes-sota/config/aktualizr-example-interface.bb | 5 | ||||
-rw-r--r-- | recipes-sota/config/aktualizr-log-debug.bb | 5 |
9 files changed, 28 insertions, 31 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index 6b17114..1a42184 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb | |||
@@ -30,12 +30,12 @@ do_install() { | |||
30 | bbwarn "OSTREE_PUSH_CREDENTIALS is ignored. Please use SOTA_PACKED_CREDENTIALS" | 30 | bbwarn "OSTREE_PUSH_CREDENTIALS is ignored. Please use SOTA_PACKED_CREDENTIALS" |
31 | fi | 31 | fi |
32 | 32 | ||
33 | install -d ${D}${libdir}/sota | 33 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
34 | install -d ${D}${localstatedir}/sota | 34 | install -m 0700 -d ${D}${localstatedir}/sota |
35 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 35 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
36 | aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)} | 36 | aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)} |
37 | 37 | ||
38 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} ${D}${libdir}/sota/sota.toml | 38 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} ${D}${libdir}/sota/conf.d/20-sota.toml |
39 | 39 | ||
40 | # deploy SOTA credentials | 40 | # deploy SOTA credentials |
41 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then | 41 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then |
@@ -47,7 +47,7 @@ do_install() { | |||
47 | } | 47 | } |
48 | 48 | ||
49 | FILES_${PN} = " \ | 49 | FILES_${PN} = " \ |
50 | ${libdir}/sota/sota.toml \ | 50 | ${libdir}/sota/conf.d/20-sota.toml \ |
51 | ${localstatedir}/sota \ | 51 | ${localstatedir}/sota \ |
52 | ${localstatedir}/sota/sota_provisioning_credentials.zip \ | 52 | ${localstatedir}/sota/sota_provisioning_credentials.zip \ |
53 | " | 53 | " |
diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb index 51e313d..a118dfd 100644 --- a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | |||
@@ -26,7 +26,7 @@ export SOTA_CACERT_PATH | |||
26 | export SOTA_CAKEY_PATH | 26 | export SOTA_CAKEY_PATH |
27 | 27 | ||
28 | do_install() { | 28 | do_install() { |
29 | install -d ${D}${libdir}/sota | 29 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
30 | 30 | ||
31 | if [ -z "${SOTA_PACKED_CREDENTIALS}" ]; then | 31 | if [ -z "${SOTA_PACKED_CREDENTIALS}" ]; then |
32 | bberror "SOTA_PACKED_CREDENTIALS are required for implicit provisioning" | 32 | bberror "SOTA_PACKED_CREDENTIALS are required for implicit provisioning" |
@@ -51,21 +51,20 @@ do_install() { | |||
51 | bberror "SOTA_CAKEY_PATH should be set when using implicit provisioning" | 51 | bberror "SOTA_CAKEY_PATH should be set when using implicit provisioning" |
52 | fi | 52 | fi |
53 | 53 | ||
54 | install -d ${D}${libdir}/sota | 54 | install -m 0700 -d ${D}${localstatedir}/sota |
55 | install -d ${D}${localstatedir}/sota | 55 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml ${D}${libdir}/sota/conf.d/20-sota.toml |
56 | install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov_ca.toml ${D}${libdir}/sota/sota.toml | ||
57 | aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \ | 56 | aktualizr_cert_provider --credentials ${SOTA_PACKED_CREDENTIALS} \ |
58 | --device-ca ${SOTA_CACERT_PATH} \ | 57 | --device-ca ${SOTA_CACERT_PATH} \ |
59 | --device-ca-key ${SOTA_CAKEY_PATH} \ | 58 | --device-ca-key ${SOTA_CAKEY_PATH} \ |
60 | --root-ca \ | 59 | --root-ca \ |
61 | --server-url \ | 60 | --server-url \ |
62 | --local ${D}${localstatedir}/sota \ | 61 | --local ${D}${localstatedir}/sota \ |
63 | --config ${D}${libdir}/sota/sota.toml | 62 | --config ${D}${libdir}/sota/conf.d/20-sota.toml |
64 | } | 63 | } |
65 | 64 | ||
66 | FILES_${PN} = " \ | 65 | FILES_${PN} = " \ |
67 | ${localstatedir}/sota/* \ | 66 | ${localstatedir}/sota/* \ |
68 | ${libdir}/sota/sota.toml \ | 67 | ${libdir}/sota/conf.d/20-sota.toml \ |
69 | ${libdir}/sota/root.crt \ | 68 | ${libdir}/sota/root.crt \ |
70 | " | 69 | " |
71 | 70 | ||
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index 5f8da3c..290167f 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb | |||
@@ -18,15 +18,15 @@ require environment.inc | |||
18 | require credentials.inc | 18 | require credentials.inc |
19 | 19 | ||
20 | do_install() { | 20 | do_install() { |
21 | install -d ${D}${libdir}/sota | 21 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
22 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 22 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
23 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ | 23 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ |
24 | -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D} | 24 | -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_hsm_prov.toml -o ${D}${libdir}/sota/conf.d/20-sota.toml -p ${D} |
25 | fi | 25 | fi |
26 | } | 26 | } |
27 | 27 | ||
28 | FILES_${PN} = " \ | 28 | FILES_${PN} = " \ |
29 | ${libdir}/sota/sota.toml \ | 29 | ${libdir}/sota/conf.d/20-sota.toml \ |
30 | " | 30 | " |
31 | 31 | ||
32 | # vim:set ts=4 sw=4 sts=4 expandtab: | 32 | # vim:set ts=4 sw=4 sts=4 expandtab: |
diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb index cf3d22c..2f9980a 100644 --- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb | |||
@@ -18,15 +18,15 @@ require environment.inc | |||
18 | require credentials.inc | 18 | require credentials.inc |
19 | 19 | ||
20 | do_install() { | 20 | do_install() { |
21 | install -d ${D}${libdir}/sota | 21 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
22 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 22 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
23 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ | 23 | aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ |
24 | -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D} | 24 | -i ${STAGING_DIR_NATIVE}${libdir}/sota/sota_implicit_prov.toml -o ${D}${libdir}/sota/conf.d/20-sota.toml -p ${D} |
25 | fi | 25 | fi |
26 | } | 26 | } |
27 | 27 | ||
28 | FILES_${PN} = " \ | 28 | FILES_${PN} = " \ |
29 | ${libdir}/sota/sota.toml \ | 29 | ${libdir}/sota/conf.d/20-sota.toml \ |
30 | ${libdir}/sota/root.crt \ | 30 | ${libdir}/sota/root.crt \ |
31 | " | 31 | " |
32 | 32 | ||
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 4c18355..f455013 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -22,7 +22,7 @@ SRC_URI = " \ | |||
22 | file://aktualizr-secondary.socket \ | 22 | file://aktualizr-secondary.socket \ |
23 | file://aktualizr-serialcan.service \ | 23 | file://aktualizr-serialcan.service \ |
24 | " | 24 | " |
25 | SRCREV = "cbb586efcd5f14a5c6a2c7cf71d75f575bf3d13f" | 25 | SRCREV = "5fa9a79f1fb29266c862a9a6cb32082bb77844a5" |
26 | BRANCH ?= "master" | 26 | BRANCH ?= "master" |
27 | 27 | ||
28 | S = "${WORKDIR}/git" | 28 | S = "${WORKDIR}/git" |
@@ -54,21 +54,21 @@ EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON \ | |||
54 | do_install_append () { | 54 | do_install_append () { |
55 | rm -fr ${D}${libdir}/systemd | 55 | rm -fr ${D}${libdir}/systemd |
56 | rm -f ${D}${libdir}/sota/sota.toml # Only needed for the Debian package | 56 | rm -f ${D}${libdir}/sota/sota.toml # Only needed for the Debian package |
57 | install -d ${D}${libdir}/sota | 57 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
58 | install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml | 58 | install -m 0644 ${S}/config/sota_secondary.toml ${D}/${libdir}/sota/sota_secondary.toml |
59 | install -d ${D}${systemd_unitdir}/system | 59 | install -d ${D}${systemd_unitdir}/system |
60 | install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket | 60 | install -m 0644 ${WORKDIR}/aktualizr-secondary.socket ${D}${systemd_unitdir}/system/aktualizr-secondary.socket |
61 | install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service | 61 | install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service |
62 | install -m 0700 -d ${D}${sysconfdir}/sota/conf.d | ||
62 | } | 63 | } |
63 | 64 | ||
64 | do_install_append_class-target () { | 65 | do_install_append_class-target () { |
65 | install -d ${D}${systemd_unitdir}/system | 66 | install -m 0755 -d ${D}${systemd_unitdir}/system |
66 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} | 67 | aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} |
67 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service | 68 | install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service |
68 | } | 69 | } |
69 | 70 | ||
70 | do_install_append_class-native () { | 71 | do_install_append_class-native () { |
71 | install -d ${D}${libdir}/sota | ||
72 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml | 72 | install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml |
73 | install -m 0644 ${S}/config/sota_autoprov_primary.toml ${D}/${libdir}/sota/sota_autoprov_primary.toml | 73 | install -m 0644 ${S}/config/sota_autoprov_primary.toml ${D}/${libdir}/sota/sota_autoprov_primary.toml |
74 | install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml | 74 | install -m 0644 ${S}/config/sota_hsm_prov.toml ${D}/${libdir}/sota/sota_hsm_prov.toml |
@@ -85,7 +85,9 @@ FILES_${PN} = " \ | |||
85 | ${bindir}/aktualizr \ | 85 | ${bindir}/aktualizr \ |
86 | ${bindir}/aktualizr-info \ | 86 | ${bindir}/aktualizr-info \ |
87 | ${bindir}/aktualizr-check-discovery \ | 87 | ${bindir}/aktualizr-check-discovery \ |
88 | ${libdir}/sota/conf.d \ | ||
88 | ${systemd_unitdir}/system/aktualizr.service \ | 89 | ${systemd_unitdir}/system/aktualizr.service \ |
90 | ${sysconfdir}/sota/conf.d \ | ||
89 | " | 91 | " |
90 | 92 | ||
91 | FILES_${PN}-common = " \ | 93 | FILES_${PN}-common = " \ |
diff --git a/recipes-sota/aktualizr/environment.inc b/recipes-sota/aktualizr/environment.inc index 94806bd..16e789e 100644 --- a/recipes-sota/aktualizr/environment.inc +++ b/recipes-sota/aktualizr/environment.inc | |||
@@ -1,12 +1,11 @@ | |||
1 | export SOTA_VIRTUAL_SECONDARIES | 1 | export SOTA_VIRTUAL_SECONDARIES |
2 | 2 | ||
3 | do_install_append() { | 3 | do_install_append() { |
4 | AKTUALIZR_PARAMETERS_CONFIGFILE="--config /usr/lib/sota/sota.toml" | ||
5 | for sec in ${SOTA_VIRTUAL_SECONDARIES}; do | 4 | for sec in ${SOTA_VIRTUAL_SECONDARIES}; do |
6 | AKTUALIZR_PARAMETERS_VIRTUALSECS="${AKTUALIZR_PARAMETERS_VIRTUALSECS} --secondary-config $sec" | 5 | AKTUALIZR_PARAMETERS_VIRTUALSECS="${AKTUALIZR_PARAMETERS_VIRTUALSECS} --secondary-config $sec" |
7 | done | 6 | done |
8 | 7 | ||
9 | echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_PARAMETERS_CONFIGFILE} ${AKTUALIZR_PARAMETERS_VIRTUALSECS}" > ${D}${libdir}/sota/sota.env | 8 | echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_PARAMETERS_VIRTUALSECS}" > ${D}${libdir}/sota/sota.env |
10 | } | 9 | } |
11 | 10 | ||
12 | FILES_${PN}_append = " ${libdir}/sota/sota.env" | 11 | FILES_${PN}_append = " ${libdir}/sota/sota.env" |
diff --git a/recipes-sota/config/aktualizr-disable-send-ip.bb b/recipes-sota/config/aktualizr-disable-send-ip.bb index 32c55f3..ce492e9 100644 --- a/recipes-sota/config/aktualizr-disable-send-ip.bb +++ b/recipes-sota/config/aktualizr-disable-send-ip.bb | |||
@@ -5,18 +5,17 @@ SECTION = "base" | |||
5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
7 | 7 | ||
8 | DEPENDS = "aktualizr " | ||
9 | SRC_URI = " \ | 8 | SRC_URI = " \ |
10 | file://LICENSE \ | 9 | file://LICENSE \ |
11 | " | 10 | " |
12 | 11 | ||
13 | do_install_append () { | 12 | do_install_append () { |
14 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 13 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
15 | echo "[telemetry]\nreport_network = false\n" > ${D}${libdir}/sota/conf.d/disable-send-ip.toml | 14 | echo "[telemetry]\nreport_network = false\n" > ${D}${libdir}/sota/conf.d/30-disable-send-ip.toml |
16 | } | 15 | } |
17 | 16 | ||
18 | FILES_${PN} = " \ | 17 | FILES_${PN} = " \ |
19 | ${libdir}/sota/conf.d/disable-send-ip.toml \ | 18 | ${libdir}/sota/conf.d/30-disable-send-ip.toml \ |
20 | " | 19 | " |
21 | 20 | ||
22 | # vim:set ts=4 sw=4 sts=4 expandtab: | 21 | # vim:set ts=4 sw=4 sts=4 expandtab: |
diff --git a/recipes-sota/config/aktualizr-example-interface.bb b/recipes-sota/config/aktualizr-example-interface.bb index 05f63bf..52ebe1c 100644 --- a/recipes-sota/config/aktualizr-example-interface.bb +++ b/recipes-sota/config/aktualizr-example-interface.bb | |||
@@ -5,18 +5,17 @@ SECTION = "base" | |||
5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
7 | 7 | ||
8 | DEPENDS = "aktualizr " | ||
9 | SRC_URI = " \ | 8 | SRC_URI = " \ |
10 | file://LICENSE \ | 9 | file://LICENSE \ |
11 | " | 10 | " |
12 | 11 | ||
13 | do_install_append () { | 12 | do_install_append () { |
14 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 13 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
15 | echo "[uptane]\nlegacy_interface = \"/usr/bin/example-interface\"\n" > ${D}${libdir}/sota/conf.d/example-interface.toml | 14 | echo "[uptane]\nlegacy_interface = \"/usr/bin/example-interface\"\n" > ${D}${libdir}/sota/conf.d/30-example-interface.toml |
16 | } | 15 | } |
17 | 16 | ||
18 | FILES_${PN} = " \ | 17 | FILES_${PN} = " \ |
19 | ${libdir}/sota/conf.d/example-interface.toml \ | 18 | ${libdir}/sota/conf.d/30-example-interface.toml \ |
20 | " | 19 | " |
21 | 20 | ||
22 | # vim:set ts=4 sw=4 sts=4 expandtab: | 21 | # vim:set ts=4 sw=4 sts=4 expandtab: |
diff --git a/recipes-sota/config/aktualizr-log-debug.bb b/recipes-sota/config/aktualizr-log-debug.bb index 512599f..e32a414 100644 --- a/recipes-sota/config/aktualizr-log-debug.bb +++ b/recipes-sota/config/aktualizr-log-debug.bb | |||
@@ -5,18 +5,17 @@ SECTION = "base" | |||
5 | LICENSE = "MPL-2.0" | 5 | LICENSE = "MPL-2.0" |
6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" | 6 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" |
7 | 7 | ||
8 | DEPENDS = "aktualizr " | ||
9 | SRC_URI = " \ | 8 | SRC_URI = " \ |
10 | file://LICENSE \ | 9 | file://LICENSE \ |
11 | " | 10 | " |
12 | 11 | ||
13 | do_install_append () { | 12 | do_install_append () { |
14 | install -m 0700 -d ${D}${libdir}/sota/conf.d | 13 | install -m 0700 -d ${D}${libdir}/sota/conf.d |
15 | echo "[logger]\nloglevel = 0\n" > ${D}${libdir}/sota/conf.d/log-debug.toml | 14 | echo "[logger]\nloglevel = 0\n" > ${D}${libdir}/sota/conf.d/90-log-debug.toml |
16 | } | 15 | } |
17 | 16 | ||
18 | FILES_${PN} = " \ | 17 | FILES_${PN} = " \ |
19 | ${libdir}/sota/conf.d/log-debug.toml \ | 18 | ${libdir}/sota/conf.d/90-log-debug.toml \ |
20 | " | 19 | " |
21 | 20 | ||
22 | # vim:set ts=4 sw=4 sts=4 expandtab: | 21 | # vim:set ts=4 sw=4 sts=4 expandtab: |