From c5643b9b4051ff1a2fecb701a1fc86cfb5a54b33 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 91060a9e63fd895595a4355b6df53a819b0b2879 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 73b1502f82af33730ad9366436e156fba5e45834 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 819cc6d..550fd18 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -155,7 +155,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 af499c285520e85b43405bb601aa59f22f9a2428 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 550fd18..bd02b8c 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 d5ae12049ff6c22bc8c402a91a41c3a7a226769c 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 8db605cfd1e6a657c978e890f0ab0226bdce9fdb 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 5002377..197a2ea 100644 --- a/README.adoc +++ b/README.adoc @@ -131,7 +131,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 efb295a583fac8b724d831d6208e81ca2392e820 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 197a2ea..88f01db 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 @@ -148,7 +148,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 5814372bd936fded8718fde3695b6f0bdd9cebf3 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Fri, 9 Nov 2018 10:18:19 +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 50a9f16..2b6ad38 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 9ee93cde1360e9ca8ba326db696515ffd7460f41 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 88f01db..ee88efa 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 * `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 bd02b8c..4bcfc9b 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -127,11 +127,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 2b6ad38..39767d4 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -69,6 +69,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 () { @@ -91,6 +97,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 47e11a62653a5cade8ec87c47533afd26a79d9cc 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 39767d4..61ec786 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -70,9 +70,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 ed85c34d6518f5442a9b859c8cffb5cb69047ebd 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 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 = "" 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 61ec786..14de9fa 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -74,6 +74,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