summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2019-05-17 12:22:23 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2019-06-05 15:02:22 +0200
commit007d7371d9dc374a78493ad38fec865beee92514 (patch)
tree6595ca076ba4ad88298d51cd22156a9b9558a68f
parent7efdaedc9bdd844087caf5a0c3d8c537e4cbbe10 (diff)
downloadmeta-updater-007d7371d9dc374a78493ad38fec865beee92514.tar.gz
aktualizr-polling-interval: new config fragment.
Can be used for testing purposes after we increase the default polling interval in aktualizr. We no longer recommend anything less than an hour for production use cases, but it's still convenient to poll more frequently while testing. Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
-rw-r--r--README.adoc1
-rw-r--r--recipes-sota/config/aktualizr-polling-interval.bb29
-rw-r--r--recipes-sota/config/files/60-polling-interval.toml2
3 files changed, 32 insertions, 0 deletions
diff --git a/README.adoc b/README.adoc
index 1ca2bdd..7e6fb43 100644
--- a/README.adoc
+++ b/README.adoc
@@ -92,6 +92,7 @@ Your images will also need network connectivity to be able to reach an actual OT
92* `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. 92* `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.
93* `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set. 93* `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set.
94* `RESOURCE_xxx_pn-aktualizr` - controls maximum resource usage of the aktualizr service, when `aktualizr-resource-control` is installed on the image. See <<aktualizr service resource control>> for details. 94* `RESOURCE_xxx_pn-aktualizr` - controls maximum resource usage of the aktualizr service, when `aktualizr-resource-control` is installed on the image. See <<aktualizr service resource control>> for details.
95* `SOTA_POLLING_SEC` - sets polling interval for aktualizr to check for updates if aktualizr-polling-sec is included in the image.
95 96
96== Usage 97== Usage
97 98
diff --git a/recipes-sota/config/aktualizr-polling-interval.bb b/recipes-sota/config/aktualizr-polling-interval.bb
new file mode 100644
index 0000000..53c008a
--- /dev/null
+++ b/recipes-sota/config/aktualizr-polling-interval.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Set polling interval in Aktualizr"
2DESCRIPTION = "Configures aktualizr to poll at a custom frequency (suitable for testing or other purposes)"
3HOMEPAGE = "https://github.com/advancedtelematic/aktualizr"
4SECTION = "base"
5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad"
7
8inherit allarch
9
10SRC_URI = " \
11 file://60-polling-interval.toml \
12 "
13
14SOTA_POLLING_SEC ?= "30"
15
16do_install_append () {
17 install -m 0700 -d ${D}${libdir}/sota/conf.d
18 install -m 0644 ${WORKDIR}/60-polling-interval.toml ${D}${libdir}/sota/conf.d/60-polling-interval.toml
19
20 sed -i -e 's|@POLLING_SEC@|${SOTA_POLLING_SEC}|g' \
21 ${D}${libdir}/sota/conf.d/60-polling-interval.toml
22}
23
24FILES_${PN} = " \
25 ${libdir}/sota/conf.d/60-polling-interval.toml \
26 "
27
28# vim:set ts=4 sw=4 sts=4 expandtab:
29
diff --git a/recipes-sota/config/files/60-polling-interval.toml b/recipes-sota/config/files/60-polling-interval.toml
new file mode 100644
index 0000000..7d25d05
--- /dev/null
+++ b/recipes-sota/config/files/60-polling-interval.toml
@@ -0,0 +1,2 @@
1[uptane]
2polling_sec = @POLLING_SEC@