summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2017-11-30 10:41:38 +0100
committerAnton Gerasimov <anton@advancedtelematic.com>2017-12-04 16:26:44 +0100
commit85095e8dc9beda9a3c6e070bc303276ac02a7281 (patch)
treeeb9d16e4d6d608b26de2b7037d6b5617461718cc
parent3289bddc47d52673495c5274cf5a62f98c41dc9b (diff)
downloadmeta-updater-85095e8dc9beda9a3c6e070bc303276ac02a7281.tar.gz
Use *.toml files provided in aktualizr github repo
This enables backwards incompatible changes to configuration format
-rw-r--r--recipes-sota/aktualizr/aktualizr-auto-prov.bb5
-rw-r--r--recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb3
-rw-r--r--recipes-sota/aktualizr/aktualizr-implicit-prov.bb3
-rw-r--r--recipes-sota/aktualizr/aktualizr_git.bb7
-rw-r--r--recipes-sota/aktualizr/files/sota_autoprov.toml14
-rw-r--r--recipes-sota/aktualizr/files/sota_hsm_test.toml18
-rw-r--r--recipes-sota/aktualizr/files/sota_implicit_prov.toml11
7 files changed, 10 insertions, 51 deletions
diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb
index 4436d48..e44530a 100644
--- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base" 4SECTION = "base"
5LICENSE = "MPL-2.0" 5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" 6LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=9741c346eef56131163e13b9db1241b3"
7DEPENDS = "zip-native" 7DEPENDS = "aktualizr-native zip-native"
8RDEPENDS_${PN} = "aktualizr" 8RDEPENDS_${PN} = "aktualizr"
9PV = "1.0" 9PV = "1.0"
10PR = "6" 10PR = "6"
@@ -12,7 +12,6 @@ PR = "6"
12SRC_URI = " \ 12SRC_URI = " \
13 file://LICENSE \ 13 file://LICENSE \
14 file://aktualizr.service \ 14 file://aktualizr.service \
15 file://sota_autoprov.toml \
16 " 15 "
17 16
18SYSTEMD_SERVICE_${PN} = "aktualizr.service" 17SYSTEMD_SERVICE_${PN} = "aktualizr.service"
@@ -39,7 +38,7 @@ do_install_append() {
39 install -d ${D}/${systemd_unitdir}/system 38 install -d ${D}/${systemd_unitdir}/system
40 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service 39 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service
41 install -d ${D}${libdir}/sota 40 install -d ${D}${libdir}/sota
42 install -m "0644" ${WORKDIR}/sota_autoprov.toml ${D}${libdir}/sota/sota.toml 41 install -m "0644" ${STAGING_DIR_NATIVE}/${libdir}/sota/sota_autoprov.toml ${D}${libdir}/sota/sota.toml
43 42
44 # deploy SOTA credentials 43 # deploy SOTA credentials
45 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then 44 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then
diff --git a/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb
index 33e472b..cc34528 100644
--- a/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-hsm-test-prov.bb
@@ -11,7 +11,6 @@ RDEPENDS_${PN} = "aktualizr softhsm softhsm-testtoken"
11SRC_URI = " \ 11SRC_URI = " \
12 file://LICENSE \ 12 file://LICENSE \
13 file://aktualizr.service \ 13 file://aktualizr.service \
14 file://sota_hsm_test.toml \
15 " 14 "
16PV = "1.0" 15PV = "1.0"
17PR = "6" 16PR = "6"
@@ -25,7 +24,7 @@ do_install() {
25 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service 24 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service
26 install -d ${D}${libdir}/sota 25 install -d ${D}${libdir}/sota
27 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \ 26 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} --no-root-ca \
28 -i ${WORKDIR}/sota_hsm_test.toml -o ${D}${libdir}/sota/sota.toml -p ${D} 27 -i ${STAGING_DIR_NATIVE}/${libdir}/sota/sota_hsm_test.toml -o ${D}${libdir}/sota/sota.toml -p ${D}
29} 28}
30 29
31FILES_${PN} = " \ 30FILES_${PN} = " \
diff --git a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb
index a1db87f..5688b95 100644
--- a/recipes-sota/aktualizr/aktualizr-implicit-prov.bb
+++ b/recipes-sota/aktualizr/aktualizr-implicit-prov.bb
@@ -12,7 +12,6 @@ PR = "1"
12SRC_URI = " \ 12SRC_URI = " \
13 file://LICENSE \ 13 file://LICENSE \
14 file://aktualizr.service \ 14 file://aktualizr.service \
15 file://sota_implicit_prov.toml \
16 " 15 "
17 16
18SYSTEMD_SERVICE_${PN} = "aktualizr.service" 17SYSTEMD_SERVICE_${PN} = "aktualizr.service"
@@ -24,7 +23,7 @@ do_install() {
24 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service 23 install -m 0644 ${WORKDIR}/aktualizr.service ${D}/${systemd_unitdir}/system/aktualizr.service
25 install -d ${D}${libdir}/sota 24 install -d ${D}${libdir}/sota
26 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \ 25 aktualizr_implicit_writer -c ${SOTA_PACKED_CREDENTIALS} \
27 -i ${WORKDIR}/sota_implicit_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D} 26 -i ${STAGING_DIR_NATIVE}/${libdir}/sota/sota_implicit_prov.toml -o ${D}${libdir}/sota/sota.toml -p ${D}
28} 27}
29 28
30FILES_${PN} = " \ 29FILES_${PN} = " \
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb
index d6beecb..e713571 100644
--- a/recipes-sota/aktualizr/aktualizr_git.bb
+++ b/recipes-sota/aktualizr/aktualizr_git.bb
@@ -18,7 +18,7 @@ PR = "7"
18SRC_URI = " \ 18SRC_URI = " \
19 git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \ 19 git://github.com/advancedtelematic/aktualizr;branch=${BRANCH} \
20 " 20 "
21SRCREV = "860553a1c98513bf43f6ce98491bf65addcf7e48" 21SRCREV = "1fb258b13547e229043113380e4a69d404756524"
22BRANCH ?= "master" 22BRANCH ?= "master"
23 23
24S = "${WORKDIR}/git" 24S = "${WORKDIR}/git"
@@ -40,6 +40,10 @@ do_install_append_class-target () {
40do_install_append_class-native () { 40do_install_append_class-native () {
41 rm -f ${D}${bindir}/aktualizr 41 rm -f ${D}${bindir}/aktualizr
42 rm -f ${D}${bindir}/aktualizr-info 42 rm -f ${D}${bindir}/aktualizr-info
43 install -d ${D}${libdir}/sota
44 install -m 0644 ${S}/config/sota_autoprov.toml ${D}/${libdir}/sota/sota_autoprov.toml
45 install -m 0644 ${S}/config/sota_hsm_test.toml ${D}/${libdir}/sota/sota_hsm_test.toml
46 install -m 0644 ${S}/config/sota_implicit_prov.toml ${D}/${libdir}/sota/sota_implicit_prov.toml
43} 47}
44 48
45FILES_${PN}_class-target = " \ 49FILES_${PN}_class-target = " \
@@ -50,4 +54,5 @@ FILES_${PN}_class-native = " \
50 ${bindir}/aktualizr_implicit_writer \ 54 ${bindir}/aktualizr_implicit_writer \
51 ${bindir}/garage-deploy \ 55 ${bindir}/garage-deploy \
52 ${bindir}/garage-push \ 56 ${bindir}/garage-push \
57 ${libdir}/sota/* \
53 " 58 "
diff --git a/recipes-sota/aktualizr/files/sota_autoprov.toml b/recipes-sota/aktualizr/files/sota_autoprov.toml
deleted file mode 100644
index 9fbb093..0000000
--- a/recipes-sota/aktualizr/files/sota_autoprov.toml
+++ /dev/null
@@ -1,14 +0,0 @@
1[tls]
2certificates_directory = "/var/sota/"
3ca_file = "root.crt"
4client_certificate = "client.pem"
5pkey_file = "pkey.pem"
6
7[uptane]
8metadata_path = "/var/sota/metadata"
9private_key_path = "ecukey.der"
10public_key_path = "ecukey.pub"
11
12[provision]
13provision_path = "/var/sota/sota_provisioning_credentials.zip"
14
diff --git a/recipes-sota/aktualizr/files/sota_hsm_test.toml b/recipes-sota/aktualizr/files/sota_hsm_test.toml
deleted file mode 100644
index 28aefc2..0000000
--- a/recipes-sota/aktualizr/files/sota_hsm_test.toml
+++ /dev/null
@@ -1,18 +0,0 @@
1[tls]
2certificates_directory = "/var/sota/"
3ca_file = "/var/sota/token/root.crt"
4client_certificate = "01"
5cert_source = "pkcs11"
6pkey_file = "02"
7pkey_source = "pkcs11"
8
9[p11]
10module = "/usr/lib/softhsm/libsofthsm2.so"
11pass = "1234"
12
13[uptane]
14metadata_path = "/var/sota/metadata"
15key_source = "pkcs11"
16private_key_path = "03"
17public_key_path = "03"
18
diff --git a/recipes-sota/aktualizr/files/sota_implicit_prov.toml b/recipes-sota/aktualizr/files/sota_implicit_prov.toml
deleted file mode 100644
index 756c868..0000000
--- a/recipes-sota/aktualizr/files/sota_implicit_prov.toml
+++ /dev/null
@@ -1,11 +0,0 @@
1[tls]
2certificates_directory = "/var/sota/"
3ca_file = "/usr/lib/sota/root.crt"
4client_certificate = "client.pem"
5pkey_file = "pkey.pem"
6
7[uptane]
8metadata_path = "/var/sota/metadata"
9private_key_path = "ecukey.der"
10public_key_path = "ecukey.pub"
11