From ba6edff3b5341b70752b789430fb59b7606de275 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 31 Oct 2018 12:29:26 +0100 Subject: Update packages removed for secondary-image. Signed-off-by: Patrick Vacek --- recipes-test/images/secondary-image.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-test/images/secondary-image.bb b/recipes-test/images/secondary-image.bb index 9adbdc5..e524386 100644 --- a/recipes-test/images/secondary-image.bb +++ b/recipes-test/images/secondary-image.bb @@ -10,9 +10,10 @@ LICENSE = "MIT" IMAGE_INSTALL_remove = " \ aktualizr \ aktualizr-auto-prov \ + aktualizr-auto-prov-creds \ aktualizr-ca-implicit-prov \ + aktualizr-ca-implicit-prov-creds \ aktualizr-hsm-prov \ - aktualizr-implicit-prov \ connman \ connman-client \ " -- cgit v1.2.3-54-g00ecf From 168dee76c552a7090e09625b174caf652465be5a Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 1 Nov 2018 12:10:07 +0100 Subject: secondary_image: also remove aktualizr-uboot-env-rollback. Signed-off-by: Patrick Vacek --- recipes-test/images/secondary-image.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes-test/images/secondary-image.bb b/recipes-test/images/secondary-image.bb index e524386..1a41169 100644 --- a/recipes-test/images/secondary-image.bb +++ b/recipes-test/images/secondary-image.bb @@ -14,6 +14,7 @@ IMAGE_INSTALL_remove = " \ aktualizr-ca-implicit-prov \ aktualizr-ca-implicit-prov-creds \ aktualizr-hsm-prov \ + aktualizr-uboot-env-rollback \ connman \ connman-client \ " -- cgit v1.2.3-54-g00ecf From d340d139730e04cfa81455e2397eddbc72416704 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 2 Nov 2018 10:46:38 +0100 Subject: classes: image_types_ostree: check OSTree repo existence using ostree Currently we assume if the OSTree repo exists, that there is a OSTree repo in it. This does not need to be true in general, and when using lockfiles bitbake will create the directory before the do_image_ostree task is executed the first time. Use ostree refs to detect whether the target directory contains a OSTree repo. Signed-off-by: Stefan Agner Signed-off-by: Patrick Vacek --- classes/image_types_ostree.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 5a17096..b884346 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -151,7 +151,7 @@ IMAGE_CMD_ostree () { rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 ln -s ${IMAGE_NAME}.rootfs.ostree.tar.bz2 ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 - if [ ! -d ${OSTREE_REPO} ]; then + if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then ostree --repo=${OSTREE_REPO} init --mode=archive-z2 fi -- cgit v1.2.3-54-g00ecf From 002ec3b4172e75c7cb836e7e035602f99cfda8fd Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 31 Oct 2018 19:10:23 +0100 Subject: classes: image_types_ostree: use locking during OSTree repo update The OSTree repository might be shared accross several individual OSTree builders. Use bitbakes lockfiles mechanism to lock the OSTree for exclusive use. Signed-off-by: Stefan Agner Signed-off-by: Patrick Vacek --- classes/image_types_ostree.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index b884346..dc0e9a2 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -6,6 +6,7 @@ do_image_ostree[depends] += "ostree-native:do_populate_sysroot \ unzip-native:do_populate_sysroot \ virtual/kernel:do_deploy \ ${OSTREE_INITRAMFS_IMAGE}:do_image_complete" +do_image_ostree[lockfiles] += "${OSTREE_REPO}/ostree.lock" export OSTREE_REPO export OSTREE_BRANCHNAME -- cgit v1.2.3-54-g00ecf From 9659ce1222e13462d92881a351e3614f3712c784 Mon Sep 17 00:00:00 2001 From: Arthur Taylor Date: Tue, 6 Nov 2018 16:14:36 +0100 Subject: Added 'thud' to list of supported releases Signed-off-by: Patrick Vacek --- CONTRIBUTING.adoc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 3d0f14d..f12b95d 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1,6 +1,15 @@ = Contributing -We welcome pull requests from anyone. The master branch is the primary branch for development, and if you wish to add new functionality, it probably belongs there. We attempt to maintain recent previous branches and welcome bug fixes and backports for those. Currently, the actively maintained branches are sumo, rocko, and pyro. Previously, morty was also a stable branch, but it has not been updated or actively maintained for a while. +We welcome pull requests from anyone. The master branch is the primary branch for development, and if you wish to add new functionality, it probably belongs there. We attempt to maintain recent previous branches and welcome bug fixes and backports for those. Currently, the actively maintained branches are: + +* thud +* sumo +* rocko + +Previously, some older branches were also regularly supported, and while they should still be stable, they have not been updated or actively maintained for a while. These branches include: + +* pyro +* morty If you are developing with meta-updater, it may be helpful to read the README and other documentation for link:README.adoc[this repo], https://github.com/advancedtelematic/aktualizr[aktualizr], and the https://github.com/advancedtelematic/updater-repo/[updater-repo], particularly the sections about development and debugging. -- cgit v1.2.3-54-g00ecf From 293b8afbf4dc884ea19015ae35fb0694083be0f3 Mon Sep 17 00:00:00 2001 From: Xavier Gully <42768701+xaviergully@users.noreply.github.com> Date: Tue, 6 Nov 2018 14:32:27 +0100 Subject: Update README.adoc Update the reference to https://connect.ota.here.com Signed-off-by: Patrick Vacek --- README.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index 0eb0451..177e788 100644 --- a/README.adoc +++ b/README.adoc @@ -128,7 +128,7 @@ ostree admin deploy --os=agl agl-snapshot:agl-ota === garage-push -The https://github.com/advancedtelematic/aktualizr[aktualizr repo] contains a tool, garage-push, which lets you push the changes in OSTree repository generated by bitbake process. It communicates with an http server capable of querying files with HEAD requests and uploading them with POST requests. In particular, this can be used with http://www.atsgarage.com/[ATS Garage]. garage-push is used as follows: +The https://github.com/advancedtelematic/aktualizr[aktualizr repo] contains a tool, garage-push, which lets you push the changes in OSTree repository generated by bitbake process. It communicates with an http server capable of querying files with HEAD requests and uploading them with POST requests. In particular, this can be used with https://connect.ota.here.com/[HERE OTA Connect]. garage-push is used as follows: .... garage-push --repo=/path/to/ostree-repo --ref=mybranch --credentials=/path/to/credentials.zip -- cgit v1.2.3-54-g00ecf From e55b1ccaa720fc2b2699213ea81c2088a576233d Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 8 Nov 2018 12:33:38 +0100 Subject: Replace more references to ATS Garage with HERE OTA Connect. Signed-off-by: Patrick Vacek --- README.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.adoc b/README.adoc index 177e788..2ded322 100644 --- a/README.adoc +++ b/README.adoc @@ -6,7 +6,7 @@ This layer enables over-the-air updates (OTA) with https://github.com/ostreedev/ https://github.com/ostreedev/ostree[OSTree] is a tool for atomic full file system upgrades with rollback capability. OSTree has several advantages over traditional dual-bank systems, but the most important one is that it minimizes network bandwidth and data storage footprint by sharing files with the same contents across file system deployments. -https://github.com/advancedtelematic/aktualizr[Aktualizr] (and https://github.com/advancedtelematic/rvi_sota_client[RVI SOTA client]) add authentication and provisioning capabilities to OTA and are integrated with OSTree. You can connect with the open-source https://github.com/advancedtelematic/rvi_sota_server[RVI SOTA server] or sign up for a free account at https://app.atsgarage.com[ATS Garage] to get started. +https://github.com/advancedtelematic/aktualizr[Aktualizr] (and https://github.com/advancedtelematic/rvi_sota_client[RVI SOTA client]) add authentication and provisioning capabilities to OTA and are integrated with OSTree. You can connect with these open-source applications or sign up for a free account at https://connect.ota.here.com/[HERE OTA Connect] to get started. [discrete] == Table of Contents @@ -17,7 +17,7 @@ toc::[] === Quickstart -If you don't already have a Yocto project that you want to add OTA to, you can use the https://docs.atsgarage.com/quickstarts/raspberry-pi.html[ATS Garage Quickstart] project to rapidly get up and running on a Raspberry Pi. It takes a standard https://www.yoctoproject.org/tools-resources/projects/poky[poky] distribution, and adds OTA and OSTree capabilities. +If you don't already have a Yocto project that you want to add OTA to, you can use the https://docs.atsgarage.com/quickstarts/raspberry-pi.html[HERE OTA Connect Quickstart] project to rapidly get up and running on a Raspberry Pi. It takes a standard https://www.yoctoproject.org/tools-resources/projects/poky[poky] distribution, and adds OTA and OSTree capabilities. === Adding meta-updater capabilities to your build @@ -145,7 +145,7 @@ First, you can set `SOTA_CLIENT_PROV` to control which provisioning recipe is us Second, you can write recipes to install additional config files with customized options. A few recipes already exist to address common needs and provide an example: * link:recipes-sota/config/aktualizr-example-interface.bb[aktualizr-example-interface.bb] will configure aktualizr to connect to an example interface for a legacy flasher. This is intended to be used in conjunction with the `aktualizr-examples` package. See https://github.com/advancedtelematic/aktualizr/blob/master/docs/legacysecondary.adoc[legacysecondary.adoc] in the aktualizr repo for more information. -* link:recipes-sota/config/aktualizr-disable-send-ip.bb[aktualizr-disable-send-ip.bb] disables the reporting of networking information to the server. This is enabled by default and supported by https://app.atsgarage.com[ATS Garage]. However, if you are using a different server that does not support this feature, you may want to disable it in aktualizr. +* link:recipes-sota/config/aktualizr-disable-send-ip.bb[aktualizr-disable-send-ip.bb] disables the reporting of networking information to the server. This is enabled by default and supported by https://connect.ota.here.com/[HERE OTA Connect]. However, if you are using a different server that does not support this feature, you may want to disable it in aktualizr. * link:recipes-sota/config/aktualizr-log-debug.bb[aktualizr-log-debug.bb] sets the log level of aktualizr to 0 (trace). The default is 2 (info). This recipe is intended for development and debugging purposes. To use these recipes, you will need to add them to your image with a line such as `IMAGE_INSTALL_append = " aktualizr-log-debug "` in your `local.conf`. -- cgit v1.2.3-54-g00ecf From be97c75b5b6522f1aa52c3966a4fccc4d6cf32d4 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Fri, 9 Nov 2018 10:19:09 +0100 Subject: aktualizr: bump to latest for server URL newline fix. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 9823943..b42f133 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -27,7 +27,7 @@ SRC_URI = " \ file://aktualizr-serialcan.service \ " -SRCREV = "3c1c77c005fc1f872f1e12080528ed6f8a32bbf3" +SRCREV = "4621a15779db38531fb386478232a9e8593e53f4" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From c2e3b38a4526eef473aba1a148cde28c69c39a39 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 12 Nov 2018 14:49:37 +0100 Subject: aktualizr: Fix virtual secondary support. Use /etc/sota/ecus as using /var/sota/ecus was conflicting with the provisioning recipes that also use /var/sota. Not totally ideal, but the best compromise I could find. Signed-off-by: Patrick Vacek --- README.adoc | 3 +-- classes/image_types_ostree.bbclass | 5 ----- recipes-sota/aktualizr/aktualizr-auto-prov.bb | 3 --- recipes-sota/aktualizr/aktualizr_git.bb | 7 +++++++ recipes-sota/aktualizr/environment.inc | 11 ++++------- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/README.adoc b/README.adoc index 2ded322..2f74c1d 100644 --- a/README.adoc +++ b/README.adoc @@ -83,8 +83,7 @@ Although we have used U-Boot so far, other boot loaders can be configured work w * `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. * `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. * `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). -* `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. -* `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`. +* `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. == Usage diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index dc0e9a2..e7ff2c4 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -123,11 +123,6 @@ IMAGE_CMD_ostree () { ln -sf var/roothome root fi - if [ -n "${SOTA_SECONDARY_ECUS}" ]; then - mkdir -p var/sota/ecus - cp ${SOTA_SECONDARY_ECUS} var/sota/ecus - fi - # Creating boot directories is required for "ostree admin deploy" mkdir -p boot/loader.0 diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index 01f21fa..39a5e6e 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb @@ -30,7 +30,6 @@ do_install() { fi install -m 0700 -d ${D}${libdir}/sota/conf.d - install -m 0700 -d ${D}${localstatedir}/sota aktualizr_toml=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'secondary-network', 'sota_autoprov_primary.toml', 'sota_autoprov.toml', d)} install -m 0644 ${STAGING_DIR_NATIVE}${libdir}/sota/${aktualizr_toml} \ @@ -40,8 +39,6 @@ do_install() { FILES_${PN} = " \ ${libdir}/sota/conf.d \ ${libdir}/sota/conf.d/20-${aktualizr_toml} \ - ${localstatedir}/sota \ - ${localstatedir}/sota/sota_provisioning_credentials.zip \ " # vim:set ts=4 sw=4 sts=4 expandtab: diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index b42f133..37dc6d4 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -70,6 +70,12 @@ do_install_append () { install -m 0644 ${WORKDIR}/aktualizr-secondary.service ${D}${systemd_unitdir}/system/aktualizr-secondary.service install -m 0700 -d ${D}${libdir}/sota/conf.d install -m 0700 -d ${D}${sysconfdir}/sota/conf.d + + if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ] && [ -e "${SOTA_SECONDARY_CONFIG_DIR}" ]; then + install -m 0700 -d ${D}${sysconfdir}/sota/ecus + install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ + fi + } do_install_append_class-target () { @@ -92,6 +98,7 @@ FILES_${PN} = " \ ${systemd_unitdir}/system/aktualizr.service \ ${libdir}/sota/conf.d \ ${sysconfdir}/sota/conf.d \ + ${sysconfdir}/sota/ecus/* \ " FILES_${PN}-examples = " \ diff --git a/recipes-sota/aktualizr/environment.inc b/recipes-sota/aktualizr/environment.inc index 16e789e..0b46a2e 100644 --- a/recipes-sota/aktualizr/environment.inc +++ b/recipes-sota/aktualizr/environment.inc @@ -1,11 +1,8 @@ -export SOTA_VIRTUAL_SECONDARIES - do_install_append() { - for sec in ${SOTA_VIRTUAL_SECONDARIES}; do - AKTUALIZR_PARAMETERS_VIRTUALSECS="${AKTUALIZR_PARAMETERS_VIRTUALSECS} --secondary-config $sec" - done - - echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_PARAMETERS_VIRTUALSECS}" > ${D}${libdir}/sota/sota.env + if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then + AKTUALIZR_CMDLINE_PARAMETERS="${AKTUALIZR_CMDLINE_PARAMETERS} --secondary-configs-dir /etc/sota/ecus" + fi + echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_CMDLINE_PARAMETERS}" > ${D}${libdir}/sota/sota.env } FILES_${PN}_append = " ${libdir}/sota/sota.env" -- cgit v1.2.3-54-g00ecf From 5632ca1fdd8a1ed494c5460558acc9354be6048e Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 13 Nov 2018 11:38:22 +0100 Subject: aktualizr: improve secondary config directory logic. Use -d and warn if directory is invalid. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr_git.bb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 37dc6d4..e44780f 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -71,9 +71,13 @@ do_install_append () { install -m 0700 -d ${D}${libdir}/sota/conf.d install -m 0700 -d ${D}${sysconfdir}/sota/conf.d - if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ] && [ -e "${SOTA_SECONDARY_CONFIG_DIR}" ]; then - install -m 0700 -d ${D}${sysconfdir}/sota/ecus - install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ + if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then + if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then + install -m 0700 -d ${D}${sysconfdir}/sota/ecus + install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ + else + bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})" + fi fi } -- cgit v1.2.3-54-g00ecf From 691eb035bea3a55f7e4257ce837865bec244830e Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 13 Nov 2018 12:18:41 +0100 Subject: aktualizr: use config instead of environment variables. This should make the secondary config dir process better anyway, and it finally gets rid of a hacky workaround that we'd been using for ages. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr-auto-prov.bb | 1 - recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | 1 - recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 1 - recipes-sota/aktualizr/aktualizr_git.bb | 1 + recipes-sota/aktualizr/environment.inc | 8 -------- recipes-sota/aktualizr/files/aktualizr-secondary.service | 1 - recipes-sota/aktualizr/files/aktualizr.service | 2 -- 7 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 recipes-sota/aktualizr/environment.inc diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index 39a5e6e..f506cab 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb @@ -12,7 +12,6 @@ PR = "6" SRC_URI = "" -require environment.inc require credentials.inc do_install() { 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 PV = "1.0" PR = "1" -require environment.inc require credentials.inc do_install() { diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index 151b543..08fffe9 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb @@ -12,7 +12,6 @@ SRC_URI = "" PV = "1.0" PR = "6" -require environment.inc require credentials.inc do_install() { diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index e44780f..9cc7c7a 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -75,6 +75,7 @@ do_install_append () { if [ -d "${SOTA_SECONDARY_CONFIG_DIR}" ]; then install -m 0700 -d ${D}${sysconfdir}/sota/ecus install -m 0644 "${SOTA_SECONDARY_CONFIG_DIR}"/* ${D}${sysconfdir}/sota/ecus/ + echo "[uptane]\nsecondary_configs_dir = /etc/sota/ecus/\n" > ${D}${libdir}/sota/conf.d/30-secondary-configs-dir.toml else bbwarn "SOTA_SECONDARY_CONFIG_DIR is set to an invalid directory (${SOTA_SECONDARY_CONFIG_DIR})" fi diff --git a/recipes-sota/aktualizr/environment.inc b/recipes-sota/aktualizr/environment.inc deleted file mode 100644 index 0b46a2e..0000000 --- a/recipes-sota/aktualizr/environment.inc +++ /dev/null @@ -1,8 +0,0 @@ -do_install_append() { - if [ -n "${SOTA_SECONDARY_CONFIG_DIR}" ]; then - AKTUALIZR_CMDLINE_PARAMETERS="${AKTUALIZR_CMDLINE_PARAMETERS} --secondary-configs-dir /etc/sota/ecus" - fi - echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_CMDLINE_PARAMETERS}" > ${D}${libdir}/sota/sota.env -} - -FILES_${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) [Service] RestartSec=10 Restart=always -EnvironmentFile=-/etc/sota/sota.env ExecStart=/usr/bin/aktualizr-secondary --config /usr/lib/sota/sota_secondary.toml 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 [Service] RestartSec=10 Restart=always -EnvironmentFile=/usr/lib/sota/sota.env -EnvironmentFile=-/etc/sota/sota.env ExecStart=/usr/bin/aktualizr $AKTUALIZR_CMDLINE_PARAMETERS [Install] -- cgit v1.2.3-54-g00ecf