summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-11-13 13:57:11 +0100
committerGitHub <noreply@github.com>2018-11-13 13:57:11 +0100
commit1ea28491acef1c272d1614da1ea4dab3e3e5e43a (patch)
tree44fcbb3cc1365a9d3776f400d7839019fae49d38
parent24c144dff972a851a487da2a563587009b664516 (diff)
parent1063b5af1db42c486a8b79ee65b168003ebc36cd (diff)
downloadmeta-updater-1ea28491acef1c272d1614da1ea4dab3e3e5e43a.tar.gz
Merge pull request #426 from advancedtelematic/fix/master/newline-etc
aktualizr: bump to latest for server URL newline fix.
-rw-r--r--README.adoc3
-rw-r--r--classes/image_types_ostree.bbclass5
-rw-r--r--recipes-sota/aktualizr/aktualizr-auto-prov.bb4
-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.bb14
-rw-r--r--recipes-sota/aktualizr/environment.inc11
-rw-r--r--recipes-sota/aktualizr/files/aktualizr-secondary.service1
-rw-r--r--recipes-sota/aktualizr/files/aktualizr.service2
9 files changed, 14 insertions, 28 deletions
diff --git a/README.adoc b/README.adoc
index d30e76b..6424a28 100644
--- a/README.adoc
+++ b/README.adoc
@@ -86,8 +86,7 @@ Although we have used U-Boot so far, other boot loaders can be configured work w
86* `SOTA_DEPLOY_CREDENTIALS` - when set to '1' (default value), deploys credentials to the built image. Override it in `local.conf` to built a generic image that can be provisioned manually after the build. 86* `SOTA_DEPLOY_CREDENTIALS` - when set to '1' (default value), deploys credentials to the built image. Override it in `local.conf` to built a generic image that can be provisioned manually after the build.
87* `SOTA_CLIENT_PROV` - which provisioning method to use. Valid options are https://github.com/advancedtelematic/aktualizr/blob/master/docs/automatic-provisioning.adoc[`aktualizr-auto-prov`], https://github.com/advancedtelematic/aktualizr/blob/master/docs/implicit-provisioning.adoc[`aktualizr-ca-implicit-prov`], and https://github.com/advancedtelematic/aktualizr/blob/master/docs/hsm-provisioning.adoc[`aktualizr-hsm-prov`]. The default is `aktualizr-auto-prov`. This can also be set to an empty string to avoid using a provisioning recipe. 87* `SOTA_CLIENT_PROV` - which provisioning method to use. Valid options are https://github.com/advancedtelematic/aktualizr/blob/master/docs/automatic-provisioning.adoc[`aktualizr-auto-prov`], https://github.com/advancedtelematic/aktualizr/blob/master/docs/implicit-provisioning.adoc[`aktualizr-ca-implicit-prov`], and https://github.com/advancedtelematic/aktualizr/blob/master/docs/hsm-provisioning.adoc[`aktualizr-hsm-prov`]. The default is `aktualizr-auto-prov`. This can also be set to an empty string to avoid using a provisioning recipe.
88* `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client). 88* `SOTA_CLIENT_FEATURES` - extensions to aktualizr. The only valid options are `hsm` (to build with HSM support) and `secondary-network` (to set up a simulated 'in-vehicle' network with support for a primary node with a DHCP server and a secondary node with a DHCP client).
89* `SOTA_SECONDARY_ECUS` - a list of paths separated by spaces of JSON configuration files for virtual secondaries on the host. These will be installed into `/var/sota/ecus` on the device. 89* `SOTA_SECONDARY_CONFIG_DIR` - a directory containing JSON configuration files for virtual secondaries on the host. These will be installed into `/etc/sota/ecus` on the device and automatically provided to aktualizr.
90* `SOTA_VIRTUAL_SECONDARIES` - a list of paths separated by spaces of JSON configuration files for virtual secondaries installed on the device. If `SOTA_SECONDARY_ECUS` is used to install them, then you can expect them to be installed in `/var/sota/ecus`.
91 90
92== Usage 91== Usage
93 92
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 0db8e50..5286efc 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -126,11 +126,6 @@ IMAGE_CMD_ostree () {
126 ln -sf var/roothome root 126 ln -sf var/roothome root
127 fi 127 fi
128 128
129 if [ -n "${SOTA_SECONDARY_ECUS}" ]; then
130 mkdir -p var/sota/ecus
131 cp ${SOTA_SECONDARY_ECUS} var/sota/ecus
132 fi
133
134 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "` 129 checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "`
135 130
136 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum} 131 cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum}
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb
index 01f21fa..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() {
@@ -30,7 +29,6 @@ do_install() {
30 fi 29 fi
31 30
32 install -m 0700 -d ${D}${libdir}/sota/conf.d 31 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)} 32 aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)}
35 33
36 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \ 34 install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \
@@ -40,8 +38,6 @@ do_install() {
40FILES_${PN} = " \ 38FILES_${PN} = " \
41 ${libdir}/sota/conf.d \ 39 ${libdir}/sota/conf.d \
42 ${libdir}/sota/conf.d/20-${aktualizr_toml} \ 40 ${libdir}/sota/conf.d/20-${aktualizr_toml} \
43 ${localstatedir}/sota \
44 ${localstatedir}/sota/sota_provisioning_credentials.zip \
45 " 41 "
46 42
47# vim:set ts=4 sw=4 sts=4 expandtab: 43# vim:set ts=4 sw=4 sts=4 expandtab:
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 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 = ""
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 50a9f16..14de9fa 100755
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -27,7 +27,7 @@ SRC_URI = " \
27 file://aktualizr-serialcan.service \ 27 file://aktualizr-serialcan.service \
28 " 28 "
29 29
30SRCREV = "3c1c77c005fc1f872f1e12080528ed6f8a32bbf3" 30SRCREV = "4621a15779db38531fb386478232a9e8593e53f4"
31BRANCH ?= "master" 31BRANCH ?= "master"
32 32
33S = "${WORKDIR}/git" 33S = "${WORKDIR}/git"
@@ -69,6 +69,17 @@ do_install_append () {
69 install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service 69 install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service
70 install -m 0700 -d ${D}${libdir}/sota/conf.d 70 install -m 0700 -d ${D}${libdir}/sota/conf.d
71 install -m 0700 -d ${D}${sysconfdir}/sota/conf.d 71 install -m 0700 -d ${D}${sysconfdir}/sota/conf.d
72
73 if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then
74 if [ -d "${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 echo "[uptane]\nsecondary_configs_dir = /etc/sota/ecus/\n" > ${D}${libdir}/sota/conf.d/30-secondary-configs-dir.toml
78 else
79 bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})"
80 fi
81 fi
82
72} 83}
73 84
74do_install_append_class-target () { 85do_install_append_class-target () {
@@ -91,6 +102,7 @@ FILES_${PN} = " \
91 ${systemd_unitdir}/system/aktualizr.service \ 102 ${systemd_unitdir}/system/aktualizr.service \
92 ${libdir}/sota/conf.d \ 103 ${libdir}/sota/conf.d \
93 ${sysconfdir}/sota/conf.d \ 104 ${sysconfdir}/sota/conf.d \
105 ${sysconfdir}/sota/ecus/* \
94 " 106 "
95 107
96FILES_${PN}-examples = " \ 108FILES_${PN}-examples = " \
diff --git a/recipes-sota/aktualizr/environment.inc b/recipes-sota/aktualizr/environment.inc
deleted file mode 100644
index 16e789e..0000000
--- a/recipes-sota/aktualizr/environment.inc
+++ /dev/null
@@ -1,11 +0,0 @@
1export SOTA_VIRTUAL_SECONDARIES
2
3do_install_append() {
4 for sec in ${SOTA_VIRTUAL_SECONDARIES}; do
5 AKTUALIZR_PARAMETERS_VIRTUALSECS="${AKTUALIZR_PARAMETERS_VIRTUALSECS} --secondary-config $sec"
6 done
7
8 echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_PARAMETERS_VIRTUALSECS}" > ${D}${libdir}/sota/sota.env
9}
10
11FILES_${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]