diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-10-10 13:49:50 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2019-10-21 12:11:22 +0200 |
commit | b525b5d980b9ed1b506ede29485261c5ec04074a (patch) | |
tree | bfee40aa25998514b35b918c3442ffd8bcdc84ef | |
parent | aaa329a0a3cfd2456be8fa26e1d53dd076da2fd9 (diff) | |
download | meta-updater-b525b5d980b9ed1b506ede29485261c5ec04074a.tar.gz |
Example config for a virtual secondary.
Useful for updating an arbitrary file in /var.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
-rw-r--r-- | recipes-sota/config/aktualizr-virtualsec.bb | 27 | ||||
-rw-r--r-- | recipes-sota/config/files/30-virtualsec.toml | 3 | ||||
-rw-r--r-- | recipes-sota/config/files/virtualsec.json | 14 |
3 files changed, 44 insertions, 0 deletions
diff --git a/recipes-sota/config/aktualizr-virtualsec.bb b/recipes-sota/config/aktualizr-virtualsec.bb new file mode 100644 index 0000000..b7d55aa --- /dev/null +++ b/recipes-sota/config/aktualizr-virtualsec.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "Example virtual secondary in aktualizr" | ||
2 | DESCRIPTION = "Creates an example virtual secondary to be used to update an arbitrary file on the primary" | ||
3 | HOMEPAGE = "https://github.com/advancedtelematic/aktualizr" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "MPL-2.0" | ||
6 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
7 | |||
8 | inherit allarch | ||
9 | |||
10 | SRC_URI = " \ | ||
11 | file://30-virtualsec.toml \ | ||
12 | file://virtualsec.json \ | ||
13 | " | ||
14 | |||
15 | do_install_append () { | ||
16 | install -m 0700 -d ${D}${libdir}/sota/conf.d | ||
17 | install -m 0644 ${WORKDIR}/30-virtualsec.toml ${D}${libdir}/sota/conf.d/30-virtualsec.toml | ||
18 | install -m 0644 ${WORKDIR}/virtualsec.json ${D}${libdir}/sota/virtualsec.json | ||
19 | } | ||
20 | |||
21 | FILES_${PN} = " \ | ||
22 | ${libdir}/sota/conf.d/30-virtualsec.toml \ | ||
23 | ${libdir}/sota/virtualsec.json \ | ||
24 | " | ||
25 | |||
26 | # vim:set ts=4 sw=4 sts=4 expandtab: | ||
27 | |||
diff --git a/recipes-sota/config/files/30-virtualsec.toml b/recipes-sota/config/files/30-virtualsec.toml new file mode 100644 index 0000000..987f692 --- /dev/null +++ b/recipes-sota/config/files/30-virtualsec.toml | |||
@@ -0,0 +1,3 @@ | |||
1 | [uptane] | ||
2 | secondary_config_file = "/usr/lib/sota/virtualsec.json" | ||
3 | |||
diff --git a/recipes-sota/config/files/virtualsec.json b/recipes-sota/config/files/virtualsec.json new file mode 100644 index 0000000..dcdcdba --- /dev/null +++ b/recipes-sota/config/files/virtualsec.json | |||
@@ -0,0 +1,14 @@ | |||
1 | { | ||
2 | "virtual": [ | ||
3 | { | ||
4 | "partial_verifying": "false", | ||
5 | "ecu_hardware_id": "external-config", | ||
6 | "full_client_dir": "/var/sota/external-config", | ||
7 | "ecu_private_key": "sec.private", | ||
8 | "ecu_public_key": "sec.public", | ||
9 | "firmware_path": "/var/sota/external-config/config.txt", | ||
10 | "target_name_path": "/var/sota/external-config/target_name", | ||
11 | "metadata_path": "/var/sota/external-config/metadata" | ||
12 | } | ||
13 | ] | ||
14 | } | ||