From bf5b952eb2a92c48e640642f1086db3bf745f21d Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 29 Nov 2018 11:01:55 +0100 Subject: aktualizr: Bump to latest (d00d1a04cc2366d1a5f143b84b9f507f8bd32c44). Some OSTree improvements, reboot detection, retry failed downloads. 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 82449f0..d49f28c 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 = "348822d914f422a8d7b34a1e98cfdd1fa3cf816c" +SRCREV = "d00d1a04cc2366d1a5f143b84b9f507f8bd32c44" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From b33fc527b6f5470f18bd3d091a52ca2d6f769774 Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Wed, 7 Nov 2018 12:01:50 +0100 Subject: Add the requirement to sign a DCO Signed-off-by: Anton Gerasimov --- CONTRIBUTING.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index f12b95d..1cd1eef 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -13,6 +13,12 @@ Previously, some older branches were also regularly supported, and while they sh 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. +== Developer Certificate of Origin (DCO) + +All commits in pull requests must contain a `Signed-off-by:` line to indicate that the developer has agreed to the terms of the https://developercertificate.org[Developer Certificate of Origin]. A simple way to achieve that is to use the `-s` flag of `git commit`. + +New pull requests will automatically be checked by the https://probot.github.io/apps/dco/[probot/dco]. + == Contributor checklist * OTA-enabled build succeeds for at least one platform, the resulting image boots, and an update can be installed. This check is absolutely necessary for every pull request unless it only touches documentation. -- cgit v1.2.3-54-g00ecf From 4f267b8acf4c0c2401f827c08b0e18da943c873a Mon Sep 17 00:00:00 2001 From: Luka Pivk Date: Tue, 27 Nov 2018 12:42:14 +0100 Subject: classes/image_types_ostree.bbclass: add device tree to boot/devicetree-* Include device trees into boot/devicetree-*-checksum. Device trees with this name format get picked up by ostree and copied into boot/. Ostree also generates entry inside uEnv.txt called fdt_file pointing to this device tree. Normaly one would include only one device tree. If KERNEL_DEVICETREE includes more then one device tree this will add all the device trees but ostree will still pick only one device tree and include it into boot. We are working on modifications to ostree so it will pickup all the device trees. Signed-off-by: Luka Pivk --- README.adoc | 1 + classes/image_types_ostree.bbclass | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/README.adoc b/README.adoc index 994ad67..ea9bb21 100644 --- a/README.adoc +++ b/README.adoc @@ -88,6 +88,7 @@ Although we have used U-Boot so far, other boot loaders can be configured work w * `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_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. * `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set. +* `OSTREE_DEPLOY_DEVICETREE` - Set this to '1' to include devicetree(s) to boot == Usage diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 41b8d0d..d433acb 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -5,6 +5,7 @@ OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" OSTREE_COMMIT_BODY ??= "" OSTREE_UPDATE_SUMMARY ??= "0" +OSTREE_DEPLOY_DEVICETREE ??= "0" BUILD_OSTREE_TARBALL ??= "1" @@ -121,6 +122,14 @@ IMAGE_CMD_ostree () { touch boot/initramfs-${checksum} else cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum} + if [ "${OSTREE_DEPLOY_DEVICETREE}" = "1" ]; then + if test -n "${KERNEL_DEVICETREE}"; then + for DTS_FILE in ${KERNEL_DEVICETREE}; do + DTS_FILE_BASENAME=$(basename ${DTS_FILE}) + cp ${DEPLOY_DIR_IMAGE}/${DTS_FILE_BASENAME} boot/devicetree-${DTS_FILE_BASENAME}-${checksum} + done + fi + fi fi # Copy image manifest -- cgit v1.2.3-54-g00ecf From 6cfb8d4293131e61c5a216b724a1cf5d1ab5d1db Mon Sep 17 00:00:00 2001 From: Manikandan Kandasamy Date: Fri, 14 Dec 2018 11:20:39 +0100 Subject: Configure oe-selftests to run on specific node label Signed-off-by: Manikandan Kandasamy --- scripts/ci/Jenkinsfile.bleeding-selftest | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/ci/Jenkinsfile.bleeding-selftest b/scripts/ci/Jenkinsfile.bleeding-selftest index e50b4b6..8c2d1de 100644 --- a/scripts/ci/Jenkinsfile.bleeding-selftest +++ b/scripts/ci/Jenkinsfile.bleeding-selftest @@ -10,7 +10,9 @@ node { } pipeline { - agent any + agent { + node { label 'bitbake' } + } environment { TEST_AKTUALIZR_REMOTE = 'aktualizr' TEST_AKTUALIZR_DIR = 'aktualizr' -- cgit v1.2.3-54-g00ecf From 1552d64d7bc59cd6296cc8723b3f95d15a2b26ae Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Mon, 17 Dec 2018 15:28:31 -0200 Subject: ostree: upgrade to v2018.9 Update libostree to the v2018.9 release. Upstream release notes since v2018.7: - https://github.com/ostreedev/ostree/releases/tag/v2018.8 - https://github.com/ostreedev/ostree/releases/tag/v2018.9 Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index 3e3c951..93ae6e7 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -7,9 +7,9 @@ inherit autotools pkgconfig systemd bash-completion gobject-introspection SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" -SRCREV="3e96ec9811b5cfc5481f8b6b06c8d34d9a35408e" +SRCREV = "f3eba6bcec39c163eb831c02c148ffa483292906" -PV = "v2018.7" +PV = "v2018.9" S = "${WORKDIR}/git" @@ -61,6 +61,7 @@ FILES_${PN} = "${bindir} \ ${libdir}/ostree/ostree-remount \ ${libdir}/girepository-1.0/* \ ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system/*.path', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \ " FILES_${PN}-dev += " ${datadir}/gir-1.0" -- cgit v1.2.3-54-g00ecf From 03ed45db93f511ee5fbc766436d5330ca33bf278 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 7 Jan 2019 14:14:42 +0100 Subject: image_garagesign: Use a lock to fix concurrency problems. We remove GARAGE_SIGN_REPO at the start and end of this task, which causes trouble if two images call this task at the same time. This probably could be fixed in a better fashion (like putting the repo in an image-specific subdirectory) but this is quick and easy, and the task usually doesn't take long to run, so the lack of parallelization is not a big loss. Signed-off-by: Patrick Vacek --- classes/image_types_ostree.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 0820af7..5cb4d51 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -169,6 +169,9 @@ IMAGE_CMD_ostreepush () { IMAGE_TYPEDEP_garagesign = "ostreepush" do_image_garagesign[depends] += "unzip-native:do_populate_sysroot" +# This lock solves OTA-1866, which is that removing GARAGE_SIGN_REPO while using +# garage-sign simultaneously for two images often causes problems. +do_image_garagesign[lockfiles] += "${DEPLOY_DIR_IMAGE}/garagesign.lock" IMAGE_CMD_garagesign () { if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then # if credentials are issued by a server that doesn't support offline signing, exit silently -- cgit v1.2.3-54-g00ecf From 94d0516b9e83171d047b416dc551290daee9b44a Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 9 Jan 2019 15:35:07 +0100 Subject: sc-hsm-embedded: removed as it was never actually used. Signed-off-by: Patrick Vacek --- .../files/0001-Cross-compilation-tweaks.patch | 86 ---------------------- .../sc-hsm-embedded/sc-hsm-embedded_git.bb | 22 ------ 2 files changed, 108 deletions(-) delete mode 100644 recipes-support/sc-hsm-embedded/files/0001-Cross-compilation-tweaks.patch delete mode 100644 recipes-support/sc-hsm-embedded/sc-hsm-embedded_git.bb diff --git a/recipes-support/sc-hsm-embedded/files/0001-Cross-compilation-tweaks.patch b/recipes-support/sc-hsm-embedded/files/0001-Cross-compilation-tweaks.patch deleted file mode 100644 index b3a7622..0000000 --- a/recipes-support/sc-hsm-embedded/files/0001-Cross-compilation-tweaks.patch +++ /dev/null @@ -1,86 +0,0 @@ -From b6add28acb884b6006216e8422cc18504483c72e Mon Sep 17 00:00:00 2001 -From: Anton Gerasimov -Date: Fri, 8 Sep 2017 15:08:40 +0200 -Subject: [PATCH] Cross-compilation tweaks - ---- - m4/acx_openssl.m4 | 2 ++ - m4/acx_openssl_ecc.m4 | 3 +++ - m4/acx_openssl_fips.m4 | 2 ++ - m4/acx_openssl_gost.m4 | 2 ++ - 4 files changed, 9 insertions(+) - -diff --git a/m4/acx_openssl.m4 b/m4/acx_openssl.m4 -index e90c78f..9de6055 100644 ---- a/m4/acx_openssl.m4 -+++ b/m4/acx_openssl.m4 -@@ -25,6 +25,7 @@ AC_DEFUN([ACX_OPENSSL],[ - AC_CHECK_HEADERS([openssl/ssl.h],,[AC_MSG_ERROR([Can't find OpenSSL headers])]) - AC_CHECK_LIB(crypto, BN_new,,[AC_MSG_ERROR([Can't find OpenSSL library])]) - -+ if test "$cross_compiling" != yes; then - AC_MSG_CHECKING([for OpenSSL version]) - CHECK_OPENSSL_VERSION=m4_format(0x%02x%02x%02x000L, $1, $2, $3) - AC_LANG_PUSH([C]) -@@ -51,6 +52,7 @@ AC_DEFUN([ACX_OPENSSL],[ - AC_MSG_ERROR([OpenSSL library too old ($1.$2.$3 or later required)]) - ],[]) - AC_LANG_POP([C]) -+ fi - - CPPFLAGS=$tmp_CPPFLAGS - LIBS=$tmp_LIBS -diff --git a/m4/acx_openssl_ecc.m4 b/m4/acx_openssl_ecc.m4 -index 612c505..ba2389d 100644 ---- a/m4/acx_openssl_ecc.m4 -+++ b/m4/acx_openssl_ecc.m4 -@@ -1,4 +1,5 @@ - AC_DEFUN([ACX_OPENSSL_ECC],[ -+ if test "$cross_compiling" != yes; then - AC_MSG_CHECKING(for OpenSSL ECC support) - - tmp_CPPFLAGS=$CPPFLAGS -@@ -32,6 +33,8 @@ AC_DEFUN([ACX_OPENSSL_ECC],[ - ],[]) - AC_LANG_POP([C]) - -+ fi -+ - CPPFLAGS=$tmp_CPPFLAGS - LIBS=$tmp_LIBS - ]) -diff --git a/m4/acx_openssl_fips.m4 b/m4/acx_openssl_fips.m4 -index 0491397..896cdbf 100644 ---- a/m4/acx_openssl_fips.m4 -+++ b/m4/acx_openssl_fips.m4 -@@ -1,4 +1,5 @@ - AC_DEFUN([ACX_OPENSSL_FIPS],[ -+ if test "$cross_compiling" != yes; then - AC_MSG_CHECKING(for OpenSSL FIPS capable library) - - tmp_CPPFLAGS=$CPPFLAGS -@@ -47,4 +48,5 @@ AC_DEFUN([ACX_OPENSSL_FIPS],[ - - CPPFLAGS=$tmp_CPPFLAGS - LIBS=$tmp_LIBS -+ fi - ]) -diff --git a/m4/acx_openssl_gost.m4 b/m4/acx_openssl_gost.m4 -index dca489b..34c39d8 100644 ---- a/m4/acx_openssl_gost.m4 -+++ b/m4/acx_openssl_gost.m4 -@@ -1,4 +1,5 @@ - AC_DEFUN([ACX_OPENSSL_GOST],[ -+ if test "$cross_compiling" != yes; then - AC_MSG_CHECKING(for OpenSSL GOST support) - - tmp_CPPFLAGS=$CPPFLAGS -@@ -62,4 +63,5 @@ AC_DEFUN([ACX_OPENSSL_GOST],[ - - CPPFLAGS=$tmp_CPPFLAGS - LIBS=$tmp_LIBS -+ fi - ]) --- -2.7.4 - diff --git a/recipes-support/sc-hsm-embedded/sc-hsm-embedded_git.bb b/recipes-support/sc-hsm-embedded/sc-hsm-embedded_git.bb deleted file mode 100644 index 062d514..0000000 --- a/recipes-support/sc-hsm-embedded/sc-hsm-embedded_git.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Smartcard HSM driver" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=55b854a477953696452f698a3af5de1c" - -inherit autotools-brokensep - - -SRC_URI = "git://github.com/CardContact/sc-hsm-embedded.git;branch=master" -SRCREV="a45155d4249575ebdfb16ff26fdedbc4c4813002" - -S = "${WORKDIR}/git" - -DEPENDS += " openssl pcsc-lite" - -do_configure() { - autoreconf -fi - oe_runconf -} - -FILES_${PN} += "${libdir}" -FILES_SOLIBSDEV = "" - -- cgit v1.2.3-54-g00ecf From 6cc3ab1c90f84feed212ea5cc2b4e6b1af1b2b2e Mon Sep 17 00:00:00 2001 From: Luka Pivk Date: Thu, 10 Jan 2019 11:41:55 +0100 Subject: classes/image_types_ostree.bbclass: fix checksum calculation Adds initramfs and/or devicetree into checksum calculation. According to ostree documentation if devicetree and/or initramfs are included into ostree, checksum should also include them. Signed-off-by: Luka Pivk --- classes/image_types_ostree.bbclass | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 5cb4d51..138e02e 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -104,26 +104,27 @@ IMAGE_CMD_ostree () { ln -sf var/roothome root fi - checksum=`sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " "` - - cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum} - if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then # this is a hack for ostree not to override init= in kernel cmdline - # make it think that the initramfs is present (while it is in FIT image) + # since initramfs is fake file, it does not need to be included in checksum + checksum=$(sha256sum ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} | cut -f 1 -d " ") touch boot/initramfs-${checksum} else - cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum} - if [ "${OSTREE_DEPLOY_DEVICETREE}" = "1" ]; then - if test -n "${KERNEL_DEVICETREE}"; then - for DTS_FILE in ${KERNEL_DEVICETREE}; do - DTS_FILE_BASENAME=$(basename ${DTS_FILE}) - cp ${DEPLOY_DIR_IMAGE}/${DTS_FILE_BASENAME} boot/devicetree-${DTS_FILE_BASENAME}-${checksum} - done - fi + if [ "${OSTREE_DEPLOY_DEVICETREE}" = "1" ] && [ -n "${KERNEL_DEVICETREE}" ]; then + checksum=$(cat ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} ${KERNEL_DEVICETREE} | sha256sum | cut -f 1 -d " ") + for DTS_FILE in ${KERNEL_DEVICETREE}; do + DTS_FILE_BASENAME=$(basename ${DTS_FILE}) + cp ${DEPLOY_DIR_IMAGE}/${DTS_FILE_BASENAME} boot/devicetree-${DTS_FILE_BASENAME}-${checksum} + done + else + checksum=$(cat ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} | sha256sum | cut -f 1 -d " ") fi + cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum} fi + cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} boot/vmlinuz-${checksum} + # Copy image manifest cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest } -- cgit v1.2.3-54-g00ecf From 2782c5c6243736884bcb6f901ed828014601787f Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Mon, 14 Jan 2019 14:01:26 +0100 Subject: image_types_ota.bbclass: fix a typo type -> size. Signed-off-by: Ming Liu --- classes/image_types_ota.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 9883a68..fe3d1d8 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass @@ -93,7 +93,7 @@ IMAGE_CMD_ota () { IMAGE_TYPEDEP_ota-ext4 = "ota" do_image_ota_ext4[depends] = "e2fsprogs-native:do_populate_sysroot" IMAGE_CMD_ota-ext4 () { - # Calculate image type + # Calculate image size OTA_ROOTFS_SIZE=$(calculate_size `du -ks ${OTA_SYSROOT} | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}") if [ ${OTA_ROOTFS_SIZE} -lt 0 ]; then -- cgit v1.2.3-54-g00ecf From d49ae8261680ae2cfd4c0179eff013d2def92e1b Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Mon, 14 Jan 2019 14:06:48 +0100 Subject: meta: drop True option to getVar calls Search made with the following regex: getVar ?\((.*), True\), this is to be consistent with OE. Signed-off-by: Ming Liu --- classes/image_types_ostree.bbclass | 2 +- classes/image_types_ota.bbclass | 6 +++--- classes/sota.bbclass | 2 +- classes/sota_sanity.bbclass | 10 +++++----- recipes-sota/aktualizr/aktualizr-auto-prov.bb | 2 +- recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb | 2 +- recipes-sota/aktualizr/aktualizr-hsm-prov.bb | 2 +- recipes-sota/aktualizr/credentials.inc | 2 +- recipes-sota/aktualizr/garage-sign-version.inc | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 138e02e..29da78e 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -10,7 +10,7 @@ OSTREE_DEPLOY_DEVICETREE ??= "0" BUILD_OSTREE_TARBALL ??= "1" -SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'systemd', 'true', '')}" +SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'systemd', 'true', '')}" IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*" CONVERSION_CMD_tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${OTA_IMAGE_ROOTFS} . || [ $? -eq 1 ]" diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index fe3d1d8..a31cbd1 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass @@ -42,8 +42,8 @@ OTA_IMAGE_ROOTFS_task-image-ota = "${OTA_SYSROOT}" IMAGE_TYPEDEP_ota = "ostreecommit" do_image_ota[dirs] = "${OTA_SYSROOT}" do_image_ota[cleandirs] = "${OTA_SYSROOT}" -do_image_ota[depends] = "${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ - ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" +do_image_ota[depends] = "${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER') == 'grub' else ''} \ + ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER') == 'u-boot' else ''}" IMAGE_CMD_ota () { ostree admin --sysroot=${OTA_SYSROOT} init-fs ${OTA_SYSROOT} ostree admin --sysroot=${OTA_SYSROOT} os-init ${OSTREE_OSNAME} @@ -110,4 +110,4 @@ IMAGE_CMD_ota-ext4 () { mkfs.ext4 -O ^64bit ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ota-ext4 -L otaroot -d ${OTA_SYSROOT} } -do_image_wic[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '%s:do_image_ota_ext4' % d.getVar('IMAGE_BASENAME', True), '', d)}" +do_image_wic[depends] += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', '%s:do_image_ota_ext4' % d.getVar('IMAGE_BASENAME'), '', d)}" diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 93f59eb..ccc4526 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -21,7 +21,7 @@ WKS_FILE_sota ?= "sdimage-sota.wks" EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native" -INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot', 'cpio.gz.u-boot', 'cpio.gz')}" +INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER') == 'u-boot', 'cpio.gz.u-boot', 'cpio.gz')}" # Please redefine OSTREE_REPO in order to have a persistent OSTree repo export OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" diff --git a/classes/sota_sanity.bbclass b/classes/sota_sanity.bbclass index e47de19..8e80acb 100644 --- a/classes/sota_sanity.bbclass +++ b/classes/sota_sanity.bbclass @@ -1,17 +1,17 @@ # Sanity check the sota setup for common misconfigurations def sota_check_overrides(status, d): - for var in (d.getVar('SOTA_OVERRIDES_BLACKLIST', True) or "").split(): - if var in d.getVar('OVERRIDES', True).split(':'): + for var in (d.getVar('SOTA_OVERRIDES_BLACKLIST') or "").split(): + if var in d.getVar('OVERRIDES').split(':'): status.addresult("%s should not be a overrides, because it is a image fstype in updater layer, please check your OVERRIDES setting.\n" % var) def sota_check_required_variables(status, d): - for var in (d.getVar('SOTA_REQUIRED_VARIABLES', True) or "").split(): - if not d.getVar(var, True): + for var in (d.getVar('SOTA_REQUIRED_VARIABLES') or "").split(): + if not d.getVar(var): status.addresult("%s should be set in your local.conf.\n" % var) def sota_raise_sanity_error(msg, d): - if d.getVar("SANITY_USE_EVENTS", True) == "1": + if d.getVar("SANITY_USE_EVENTS") == "1": bb.event.fire(bb.event.SanityCheckFailed(msg), d) return diff --git a/recipes-sota/aktualizr/aktualizr-auto-prov.bb b/recipes-sota/aktualizr/aktualizr-auto-prov.bb index f506cab..308f552 100644 --- a/recipes-sota/aktualizr/aktualizr-auto-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-auto-prov.bb @@ -6,7 +6,7 @@ LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" DEPENDS = "aktualizr-native zip-native" -RDEPENDS_${PN}_append = "${@' aktualizr-auto-prov-creds' if d.getVar('SOTA_DEPLOY_CREDENTIALS', True) == '1' else ''}" +RDEPENDS_${PN}_append = "${@' aktualizr-auto-prov-creds' if d.getVar('SOTA_DEPLOY_CREDENTIALS') == '1' else ''}" PV = "1.0" PR = "6" diff --git a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb index 5893ed2..8dcda99 100644 --- a/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-ca-implicit-prov.bb @@ -10,7 +10,7 @@ LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" DEPENDS = "aktualizr aktualizr-native openssl-native" -RDEPENDS_${PN}_append = "${@' aktualizr-ca-implicit-prov-creds' if d.getVar('SOTA_DEPLOY_CREDENTIALS', True) == '1' else ''}" +RDEPENDS_${PN}_append = "${@' aktualizr-ca-implicit-prov-creds' if d.getVar('SOTA_DEPLOY_CREDENTIALS') == '1' else ''}" PV = "1.0" PR = "1" diff --git a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb index 7947edd..27aba0f 100644 --- a/recipes-sota/aktualizr/aktualizr-hsm-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-hsm-prov.bb @@ -6,7 +6,7 @@ LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" DEPENDS = "aktualizr aktualizr-native" -RDEPENDS_${PN}_append = "${@' aktualizr-ca-implicit-prov-creds softhsm-testtoken' if d.getVar('SOTA_DEPLOY_CREDENTIALS', True) == '1' else ''}" +RDEPENDS_${PN}_append = "${@' aktualizr-ca-implicit-prov-creds softhsm-testtoken' if d.getVar('SOTA_DEPLOY_CREDENTIALS') == '1' else ''}" SRC_URI = "" PV = "1.0" diff --git a/recipes-sota/aktualizr/credentials.inc b/recipes-sota/aktualizr/credentials.inc index 256c8ff..7c44257 100644 --- a/recipes-sota/aktualizr/credentials.inc +++ b/recipes-sota/aktualizr/credentials.inc @@ -1 +1 @@ -SRC_URI_append = "${@('file://' + d.getVar('SOTA_PACKED_CREDENTIALS', True)) if d.getVar('SOTA_PACKED_CREDENTIALS', True) else ''}" +SRC_URI_append = "${@('file://' + d.getVar('SOTA_PACKED_CREDENTIALS')) if d.getVar('SOTA_PACKED_CREDENTIALS') else ''}" diff --git a/recipes-sota/aktualizr/garage-sign-version.inc b/recipes-sota/aktualizr/garage-sign-version.inc index 1b89a3d..2cea6c9 100644 --- a/recipes-sota/aktualizr/garage-sign-version.inc +++ b/recipes-sota/aktualizr/garage-sign-version.inc @@ -1,11 +1,11 @@ python () { - if d.getVar("GARAGE_SIGN_VERSION", True) or not d.getVar("SOTA_PACKED_CREDENTIALS", True): + if d.getVar("GARAGE_SIGN_VERSION") or not d.getVar("SOTA_PACKED_CREDENTIALS"): return import json import urllib.request import zipfile - with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS", True), 'r') as zip_ref: + with zipfile.ZipFile(d.getVar("SOTA_PACKED_CREDENTIALS"), 'r') as zip_ref: try: with zip_ref.open('tufrepo.url', mode='r') as url_file: url = url_file.read().decode().strip(' \t\n') + '/health/version' -- cgit v1.2.3-54-g00ecf From 90402a607676cc56d718f1c84294f05ee571f416 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Thu, 17 Jan 2019 12:02:25 -0200 Subject: softhsm: bump to 2.5.0 Changes in 2.5.0: - Support for cross-compilation - Use RDRAND in OpenSSL if that engine is available - Support for EDDSA with vendor defined mechanisms - Replace PKCS11 headers with a version from p11-kit Recipe updated to build support for EdDSA since that is already available in latest OpenSSL (1.1.1a). HOMEPAGE and LICENSE also changed to match upstream. Signed-off-by: Ricardo Salveti --- .../files/0001-Cross-compilation-tweaks.patch | 86 ---------------------- recipes-support/softhsm/softhsm_git.bb | 31 ++++---- 2 files changed, 15 insertions(+), 102 deletions(-) delete mode 100644 recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch diff --git a/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch b/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch deleted file mode 100644 index b3a7622..0000000 --- a/recipes-support/softhsm/files/0001-Cross-compilation-tweaks.patch +++ /dev/null @@ -1,86 +0,0 @@ -From b6add28acb884b6006216e8422cc18504483c72e Mon Sep 17 00:00:00 2001 -From: Anton Gerasimov -Date: Fri, 8 Sep 2017 15:08:40 +0200 -Subject: [PATCH] Cross-compilation tweaks - ---- - m4/acx_openssl.m4 | 2 ++ - m4/acx_openssl_ecc.m4 | 3 +++ - m4/acx_openssl_fips.m4 | 2 ++ - m4/acx_openssl_gost.m4 | 2 ++ - 4 files changed, 9 insertions(+) - -diff --git a/m4/acx_openssl.m4 b/m4/acx_openssl.m4 -index e90c78f..9de6055 100644 ---- a/m4/acx_openssl.m4 -+++ b/m4/acx_openssl.m4 -@@ -25,6 +25,7 @@ AC_DEFUN([ACX_OPENSSL],[ - AC_CHECK_HEADERS([openssl/ssl.h],,[AC_MSG_ERROR([Can't find OpenSSL headers])]) - AC_CHECK_LIB(crypto, BN_new,,[AC_MSG_ERROR([Can't find OpenSSL library])]) - -+ if test "$cross_compiling" != yes; then - AC_MSG_CHECKING([for OpenSSL version]) - CHECK_OPENSSL_VERSION=m4_format(0x%02x%02x%02x000L, $1, $2, $3) - AC_LANG_PUSH([C]) -@@ -51,6 +52,7 @@ AC_DEFUN([ACX_OPENSSL],[ - AC_MSG_ERROR([OpenSSL library too old ($1.$2.$3 or later required)]) - ],[]) - AC_LANG_POP([C]) -+ fi - - CPPFLAGS=$tmp_CPPFLAGS - LIBS=$tmp_LIBS -diff --git a/m4/acx_openssl_ecc.m4 b/m4/acx_openssl_ecc.m4 -index 612c505..ba2389d 100644 ---- a/m4/acx_openssl_ecc.m4 -+++ b/m4/acx_openssl_ecc.m4 -@@ -1,4 +1,5 @@ - AC_DEFUN([ACX_OPENSSL_ECC],[ -+ if test "$cross_compiling" != yes; then - AC_MSG_CHECKING(for OpenSSL ECC support) - - tmp_CPPFLAGS=$CPPFLAGS -@@ -32,6 +33,8 @@ AC_DEFUN([ACX_OPENSSL_ECC],[ - ],[]) - AC_LANG_POP([C]) - -+ fi -+ - CPPFLAGS=$tmp_CPPFLAGS - LIBS=$tmp_LIBS - ]) -diff --git a/m4/acx_openssl_fips.m4 b/m4/acx_openssl_fips.m4 -index 0491397..896cdbf 100644 ---- a/m4/acx_openssl_fips.m4 -+++ b/m4/acx_openssl_fips.m4 -@@ -1,4 +1,5 @@ - AC_DEFUN([ACX_OPENSSL_FIPS],[ -+ if test "$cross_compiling" != yes; then - AC_MSG_CHECKING(for OpenSSL FIPS capable library) - - tmp_CPPFLAGS=$CPPFLAGS -@@ -47,4 +48,5 @@ AC_DEFUN([ACX_OPENSSL_FIPS],[ - - CPPFLAGS=$tmp_CPPFLAGS - LIBS=$tmp_LIBS -+ fi - ]) -diff --git a/m4/acx_openssl_gost.m4 b/m4/acx_openssl_gost.m4 -index dca489b..34c39d8 100644 ---- a/m4/acx_openssl_gost.m4 -+++ b/m4/acx_openssl_gost.m4 -@@ -1,4 +1,5 @@ - AC_DEFUN([ACX_OPENSSL_GOST],[ -+ if test "$cross_compiling" != yes; then - AC_MSG_CHECKING(for OpenSSL GOST support) - - tmp_CPPFLAGS=$CPPFLAGS -@@ -62,4 +63,5 @@ AC_DEFUN([ACX_OPENSSL_GOST],[ - - CPPFLAGS=$tmp_CPPFLAGS - LIBS=$tmp_LIBS -+ fi - ]) --- -2.7.4 - diff --git a/recipes-support/softhsm/softhsm_git.bb b/recipes-support/softhsm/softhsm_git.bb index c26903d..4dcfe7d 100644 --- a/recipes-support/softhsm/softhsm_git.bb +++ b/recipes-support/softhsm/softhsm_git.bb @@ -1,27 +1,26 @@ SUMMARY = "HSM emulator" -LICENSE = "BSD" +HOMEPAGE = "https://www.opendnssec.org/softhsm/" +LICENSE = "BSD-2-Clause & ISC" LIC_FILES_CHKSUM = "file://LICENSE;md5=ef3f77a3507c3d91e75b9f2bdaee4210" -inherit autotools-brokensep +DEPENDS = "openssl" +SRC_URI = "git://github.com/opendnssec/SoftHSMv2.git;branch=master" +SRCREV = "369df0383d101bc8952692c2a368ac8bc887d1b4" -SRC_URI = "git://github.com/opendnssec/SoftHSMv2.git;branch=master \ - file://0001-Cross-compilation-tweaks.patch" -SRCREV="1f7498c0c65b1b1ad5e1bdbd87e9d4b100705745" +PV = "2.5.0" S = "${WORKDIR}/git" -DEPENDS += " openssl" +inherit autotools pkgconfig -EXTRA_OECONF = "--disable-gost --with-openssl=${STAGING_LIBDIR}/.." +# EdDSA requires OpenSSL >= 1.1.1 +EXTRA_OECONF = "--enable-eddsa --disable-gost" -do_configure() { - unset docdir - sh ./autogen.sh - oe_runconf +do_configure_prepend() { + ( + cd ${S} + unset docdir + sh ./autogen.sh + ) } - -FILES_${PN} = "${bindir} \ - ${libdir}/softhsm \ - ${sysconfdir} \ - ${localstatedir}/lib/softhsm " -- cgit v1.2.3-54-g00ecf From 5ac462299def05b7a49be25a0076c611482cb9c9 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Thu, 17 Jan 2019 11:58:12 -0200 Subject: libp11: bump to git 57ca68f for EC signing support libp11 0.4.9 gives an error when EC keys are used for signing (pkcs11_try_pkey_ec_sign() not implemented), so bump to git 57ca68f (post 0.4.9) for EC signing support. Also drop workaround patch for OpenSSL 1.0.2.m since OE OpenSSL version is now at 1.1.1a. Signed-off-by: Ricardo Salveti --- ...und-for-a-buggy-version-of-openssl-1.0.2m.patch | 42 ---------------------- recipes-support/libp11/libp11_0.4.9.bb | 39 -------------------- recipes-support/libp11/libp11_git.bb | 40 +++++++++++++++++++++ 3 files changed, 40 insertions(+), 81 deletions(-) delete mode 100644 recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch delete mode 100644 recipes-support/libp11/libp11_0.4.9.bb create mode 100644 recipes-support/libp11/libp11_git.bb diff --git a/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch b/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch deleted file mode 100644 index 55f2ed3..0000000 --- a/recipes-support/libp11/files/0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch +++ /dev/null @@ -1,42 +0,0 @@ -From ccab5ce63dd5d3dbb4bd02998d21d34407e550f2 Mon Sep 17 00:00:00 2001 -From: Anton Gerasimov -Date: Fri, 19 Jan 2018 12:44:27 +0100 -Subject: [PATCH] Workaround for a buggy version of openssl (1.0.2m) - ---- - src/p11_pkey.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/src/p11_pkey.c b/src/p11_pkey.c -index 45d5ad3..75625e6 100644 ---- a/src/p11_pkey.c -+++ b/src/p11_pkey.c -@@ -139,8 +139,14 @@ static void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src) - - #endif - --#if OPENSSL_VERSION_NUMBER < 0x100020d0L || defined(LIBRESSL_VERSION_NUMBER) --static void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth, -+#if OPENSSL_VERSION_NUMBER < 0x10002110L || defined(LIBRESSL_VERSION_NUMBER) -+ -+# if (OPENSSL_VERSION_NUMBER & 0xFFFFFFF0) == 0x100020d0L -+# undef EVP_PKEY_meth_get_sign -+# undef EVP_PKEY_meth_get_decrypt -+# endif -+ -+void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth, - int (**psign_init) (EVP_PKEY_CTX *ctx), - int (**psign) (EVP_PKEY_CTX *ctx, - unsigned char *sig, size_t *siglen, -@@ -152,7 +158,7 @@ static void EVP_PKEY_meth_get_sign(EVP_PKEY_METHOD *pmeth, - *psign = pmeth->sign; - } - --static void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth, -+void EVP_PKEY_meth_get_decrypt(EVP_PKEY_METHOD *pmeth, - int (**pdecrypt_init) (EVP_PKEY_CTX *ctx), - int (**pdecrypt) (EVP_PKEY_CTX *ctx, - unsigned char *out, --- -2.15.1 - diff --git a/recipes-support/libp11/libp11_0.4.9.bb b/recipes-support/libp11/libp11_0.4.9.bb deleted file mode 100644 index 6d0165f..0000000 --- a/recipes-support/libp11/libp11_0.4.9.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Library for using PKCS" -DESCRIPTION = "\ -Libp11 is a library implementing a small layer on top of PKCS \ -make using PKCS" -HOMEPAGE = "http://www.opensc-project.org/libp11" -SECTION = "Development/Libraries" -LICENSE = "LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29" -DEPENDS = "libtool openssl" -RDEPENDS_${PN} += " opensc" - -SRC_URI = "git://github.com/OpenSC/libp11.git \ - file://0001-Workaround-for-a-buggy-version-of-openssl-1.0.2m.patch" -SRCREV = "e1210903291b1de9eabcad26e740a4b2fbcca692" - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -# Currently, Makefile dependencies are incorrectly defined which causes build errors -# if the number of jobs is high -# See https://github.com/OpenSC/libp11/issues/94 -PARALLEL_MAKE = "" -EXTRA_OECONF = "--disable-static" - -do_install_append () { - rm -rf ${D}${libdir}/*.la - rm -rf ${D}${docdir}/${BPN} -} - -FILES_${PN} = "${libdir}/engines*/pkcs11.so \ - ${libdir}/engines*/libpkcs11${SOLIBS} \ - ${libdir}/libp11${SOLIBS}" - -FILES_${PN}-dev = " \ - ${libdir}/engines*/libpkcs11${SOLIBSDEV} \ - ${libdir}/libp11${SOLIBSDEV} \ - ${libdir}/pkgconfig/libp11.pc \ - /usr/include" diff --git a/recipes-support/libp11/libp11_git.bb b/recipes-support/libp11/libp11_git.bb new file mode 100644 index 0000000..bedcdc8 --- /dev/null +++ b/recipes-support/libp11/libp11_git.bb @@ -0,0 +1,40 @@ +SUMMARY = "Library for using PKCS" +DESCRIPTION = "\ +Libp11 is a library implementing a small layer on top of PKCS \ +make using PKCS" +HOMEPAGE = "http://www.opensc-project.org/libp11" +SECTION = "Development/Libraries" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=fad9b3332be894bab9bc501572864b29" +DEPENDS = "libtool openssl" +RDEPENDS_${PN} += " opensc" + +SRC_URI = "git://github.com/OpenSC/libp11.git" +SRCREV = "57ca68ff67efa08e3be1f26dec6d23bf5bb977f2" + +PV = "0.4.9+git${SRCPV}" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +# Currently, Makefile dependencies are incorrectly defined which causes build errors +# if the number of jobs is high +# See https://github.com/OpenSC/libp11/issues/94 +PARALLEL_MAKE = "" +EXTRA_OECONF = "--disable-static" + +do_install_append () { + rm -rf ${D}${libdir}/*.la + rm -rf ${D}${docdir}/${BPN} +} + +FILES_${PN} = "${libdir}/engines*/pkcs11.so \ + ${libdir}/engines*/libpkcs11${SOLIBS} \ + ${libdir}/libp11${SOLIBS}" + +FILES_${PN}-dev = " \ + ${libdir}/engines*/libpkcs11${SOLIBSDEV} \ + ${libdir}/libp11${SOLIBSDEV} \ + ${libdir}/pkgconfig/libp11.pc \ + /usr/include" -- cgit v1.2.3-54-g00ecf From 73e50d717a50616d20faeb5b4cbdf5cb2483aa53 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Mon, 28 Jan 2019 13:53:27 +0100 Subject: aktualizr: bump to latest 1cad6d10286ade64b24021ca0e23de0d3b64f520 - OStree installations are considered complete after a reboot under the new version - image downloads are not parallelized anymore - various enhancements and bug fixes Signed-off-by: Laurent Bonnans --- 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 d49f28c..eb65ae0 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 = "d00d1a04cc2366d1a5f143b84b9f507f8bd32c44" +SRCREV = "1cad6d10286ade64b24021ca0e23de0d3b64f520" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 52893366bbf554a58572b3a0cbf83e4337a3f026 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Mon, 28 Jan 2019 14:51:54 +0100 Subject: Fix oe-selftest for `aktualizr once` CLI has changed Signed-off-by: Laurent Bonnans --- lib/oeqa/selftest/cases/updater.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 92bf6fc..08521d5 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -214,7 +214,7 @@ class ManualControlTests(OESelftestTestCase): def qemu_command(self, command): return qemu_send_command(self.qemu.ssh_port, command) - def test_manual_running_mode_once(self): + def test_manual_run_mode_once(self): """ Disable the systemd service then run aktualizr manually """ @@ -223,7 +223,7 @@ class ManualControlTests(OESelftestTestCase): self.assertIn(b'Can\'t open database', stdout, 'Aktualizr should not have run yet' + stderr.decode() + stdout.decode()) - stdout, stderr, retcode = self.qemu_command('aktualizr --running-mode=once') + stdout, stderr, retcode = self.qemu_command('aktualizr once') stdout, stderr, retcode = self.qemu_command('aktualizr-info') self.assertIn(b'Fetched metadata: yes', stdout, -- cgit v1.2.3-54-g00ecf From 3d3a0bf9faff855bb4bc0b17611036d3cfbc7ff9 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 29 Jan 2019 17:02:31 +0100 Subject: sota.conf: use reproducible builds by default Use reproducible builds by default. OSTree sets mtime to 0 at commit time anyway. This makes sure that all mtime timestamps are 0 already at build time. This is relevant for programs which relies on mtime of deployed artifacts at runtime. Python for instance writes the mtime of the source file into bytecode files (pyc) at build time. When OSTree then clears the mtime Python considers all bytecode files as stale. Reproducible binaries also avoid unnecessary differences between two OSTree commits. E.g. if the sstate cache is cleared between two OSTree commits OpenEmbedded might create slightly different binaries. Note however that not all all recipe generate reproducible binaries at this time. Signed-off-by: Stefan Agner --- conf/distro/sota.conf.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc index 8de9597..f6111bf 100644 --- a/conf/distro/sota.conf.inc +++ b/conf/distro/sota.conf.inc @@ -10,4 +10,10 @@ INHERIT += " sota" # Prelinking increases the size of downloads and causes build errors USER_CLASSES_remove = "image-prelink" +# Enable reproducible builds. Use 0 as mtime, the same as OSTree is using. +INHERIT += "reproducible_build_simple" + +export SOURCE_DATE_EPOCH ?= "0" +REPRODUCIBLE_TIMESTAMP_ROOTFS ?= "0" + HOSTTOOLS_append = " sync sha256sum" -- cgit v1.2.3-54-g00ecf From 168efb38411ed4feae6d99e4ae00c867ceff3fba Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Tue, 29 Jan 2019 21:05:38 +0100 Subject: sota.bbclass: fix a variable assignment regression A regression was introduced by commit 9dcfcdb9: [ classes, images: Use standard variables for initramfs ] it replaced OSTREE_INITRAMFS_IMAGE with INITRAMFS_FSTYPES which is fine, but the '??=' should be changed to "?=" as well, or else it will not take effect since INITRAMFS_FSTYPES's already set in bitbake.conf with '?='. Signed-off-by: Ming Liu --- classes/sota.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/sota.bbclass b/classes/sota.bbclass index ccc4526..92b4c43 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -21,7 +21,7 @@ WKS_FILE_sota ?= "sdimage-sota.wks" EXTRA_IMAGEDEPENDS_append_sota = " parted-native mtools-native dosfstools-native" -INITRAMFS_FSTYPES ??= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER') == 'u-boot', 'cpio.gz.u-boot', 'cpio.gz')}" +INITRAMFS_FSTYPES ?= "${@oe.utils.ifelse(d.getVar('OSTREE_BOOTLOADER') == 'u-boot', 'cpio.gz.u-boot', 'cpio.gz')}" # Please redefine OSTREE_REPO in order to have a persistent OSTree repo export OSTREE_REPO ?= "${DEPLOY_DIR_IMAGE}/ostree_repo" -- cgit v1.2.3-54-g00ecf From 495f5db09da6a1e5b7a16460d9f4bf26fbee2dff Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Tue, 5 Feb 2019 12:39:56 +0100 Subject: Add support for device tree overlays in FIT images Signed-off-by: Anton Gerasimov --- README.adoc | 5 ++++- classes/sota_raspberrypi.bbclass | 15 ++++++++++++++- recipes-sota/fit-conf/fit-conf.bb | 22 ++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 recipes-sota/fit-conf/fit-conf.bb diff --git a/README.adoc b/README.adoc index ea9bb21..27ecabf 100644 --- a/README.adoc +++ b/README.adoc @@ -81,6 +81,7 @@ Although we have used U-Boot so far, other boot loaders can be configured work w * `OSTREE_COMMIT_BODY` - Message attached to OSTree commit. Empty by default. * `OSTREE_COMMIT_SUBJECT` - Commit subject used by OSTree. Defaults to `Commit-id: ${IMAGE_NAME}` * `OSTREE_UPDATE_SUMMARY` - Set this to '1' to update summary of OSTree repository on each commit. '0' by default. +* `OSTREE_DEPLOY_DEVICETREE` - Set this to '1' to include devicetree(s) to boot * `INITRAMFS_IMAGE` - initramfs/initrd image that is used as a proxy while booting into OSTree deployment. Do not change this setting unless you are sure that your initramfs can serve as such a proxy. * `SOTA_PACKED_CREDENTIALS` - when set, your ostree commit will be pushed to a remote repo as a bitbake step. This should be the path to a zipped credentials file in https://github.com/advancedtelematic/aktualizr/blob/master/docs/credentials.adoc[the format accepted by garage-push]. * `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. @@ -88,7 +89,9 @@ Although we have used U-Boot so far, other boot loaders can be configured work w * `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_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. * `SOTA_HARDWARE_ID` - a custom hardware ID that will be written to the aktualizr config. Defaults to MACHINE if not set. -* `OSTREE_DEPLOY_DEVICETREE` - Set this to '1' to include devicetree(s) to boot +* `SOTA_MAIN_DTB` - base device tree to use with the kernel. Used together with FIT images. You can change it, and the device tree will also be changed after the update. +* `SOTA_DT_OVERLAYS` - whitespace-separated list of used device tree overlays for FIT image. This list is OSTree-updateable as well. +* `SOTA_EXTRA_CONF_FRAGS` - extra https://lxr.missinglinkelectronics.com/uboot/doc/uImage.FIT/overlay-fdt-boot.txt[configuration fragments] for FIT image. == Usage diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index 600f9e9..e1c0054 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass @@ -5,6 +5,13 @@ KERNEL_IMAGETYPE_sota = "fitImage" INITRAMFS_FSTYPES = "cpio.gz" OSTREE_KERNEL = "${KERNEL_IMAGETYPE}-${INITRAMFS_IMAGE}-${MACHINE}-${KERNEL_FIT_LINK_NAME}" +# DTB needs to be relocated to apply overlays +UBOOT_DTB_LOADADDRESS = "0x05000000" +UBOOT_DTBO_LOADADDRESS = "0x06000000" + +# Deploy config fragment list to OSTree root fs +IMAGE_INSTALL_append = " fit-conf" + PREFERRED_PROVIDER_virtual/bootloader_sota ?= "u-boot" UBOOT_ENTRYPOINT_sota ?= "0x00008000" @@ -18,7 +25,13 @@ IMAGE_BOOT_FILES_sota = "bcm2835-bootfiles/* u-boot.bin;${SDIMG_KERNELIMAGE}" KERNEL_DEVICETREE_raspberrypi2_sota ?= " bcm2709-rpi-2-b.dtb " KERNEL_DEVICETREE_raspberrypi3_sota ?= " bcm2710-rpi-3-b.dtb overlays/vc4-kms-v3d.dtbo overlays/rpi-ft5406.dtbo" +SOTA_MAIN_DTB_raspberrypi2 ?= "bcm2709-rpi-2-b.dtb" +SOTA_MAIN_DTB_raspberrypi3 ?= "bcm2710-rpi-3-b.dtb" + +SOTA_DT_OVERLAYS_raspberrypi3 ?= "vc4-kms-v3d.dtbo rpi-ft5406.dtbo" + # Kernel args normally provided by RPi's internal bootloader. Non-updateable -OSTREE_KERNEL_ARGS_sota ?= " 8250.nr_uarts=1 bcm2708_fb.fbwidth=720 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 usbhid.mousepoll=0 " +OSTREE_KERNEL_ARGS_sota ?= " 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=614 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 usbhid.mousepoll=0 " SOTA_CLIENT_FEATURES_append = " ubootenv" + diff --git a/recipes-sota/fit-conf/fit-conf.bb b/recipes-sota/fit-conf/fit-conf.bb new file mode 100644 index 0000000..c6cecec --- /dev/null +++ b/recipes-sota/fit-conf/fit-conf.bb @@ -0,0 +1,22 @@ +SUMMARY = "FIT image configuration for u-boot to use" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +do_install() { + mkdir -p ${D}${libdir} + echo -n "fit_conf=" >${D}${libdir}/fit_conf + + if [ -n ${SOTA_MAIN_DTB} ]; then + echo -n "#conf@${SOTA_MAIN_DTB}" >> ${D}${libdir}/fit_conf + fi + + for ovrl in ${SOTA_DT_OVERLAYS}; do + echo -n "#conf@overlays_${ovrl}" >> ${D}${libdir}/fit_conf + done + + for conf_frag in ${SOTA_EXTRA_CONF_FRAGS}; do + echo -n "#${conf_frag}" >> ${D}${libdir}/fit_conf + done +} + +FILES_${PN} += "${libdir}/fit_conf" -- cgit v1.2.3-54-g00ecf From 6f086f7c7ccb743003e583b0dbf65ee7f2f54eae Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Thu, 31 Jan 2019 10:26:47 +0100 Subject: aktualizr: drop duplicated file from FILES_${PN} "${bindir}/aktualizr-check-discovery" is being set in both FILES_${PN} and FILES_${PN}-tools, drop it from FILES_${PN}. Signed-off-by: Ming Liu --- recipes-sota/aktualizr/aktualizr_git.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index eb65ae0..b392de0 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -102,7 +102,6 @@ PACKAGES =+ " ${PN}-examples ${PN}-host-tools ${PN}-tools ${PN}-secondary " FILES_${PN} = " \ ${bindir}/aktualizr \ ${bindir}/aktualizr-info \ - ${bindir}/aktualizr-check-discovery \ ${systemd_unitdir}/system/aktualizr.service \ ${libdir}/sota/conf.d \ ${sysconfdir}/sota/conf.d \ -- cgit v1.2.3-54-g00ecf From 3217e9205c85d91be6a4e2ea13f7a30d4343f69f Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Thu, 31 Jan 2019 17:08:45 +0100 Subject: aktualizr: introduce PACKAGECONFIG There are several flaws in current aktualizr recipe: - It builds with 'BUILD_SYSTEMD=ON' by default but does not set DEPENDS to systemd, this is not leading to compilation errors so far because systemd is deployed into recipe sysroot by ostree if 'systemd' exists in DISTRO_FEATURES, but in other cases, it will cause compilation errors. - GARAGE_SIGN_SHA256 is being passed to EXTRA_OECMAKE even it's not set anythere, this will lead a wrong GARAGE_SIGN_SHA256_ARG to be set in cmake files. - pkgconfig is being called in aktualizr CMakeFile, so it needs inherit pkgconfig.bbclass To fix the above flaws, meanwhile to keep the code cleaner, we introduce PACKAGECONFIG to handle the configurations. Signed-off-by: Ming Liu --- recipes-sota/aktualizr/aktualizr_git.bb | 44 +++++++++++++++------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index b392de0..8bd65da 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -5,16 +5,9 @@ SECTION = "base" LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" -DEPENDS = "boost curl openssl libarchive libsodium asn1c-native sqlite3 " -DEPENDS_append_class-target = "ostree ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', ' libp11', '', d)} " -DEPENDS_append_class-native = "glib-2.0-native " - -RDEPENDS_${PN}_class-target = "lshw " -RDEPENDS_${PN}_append_class-target = "${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', ' slcand-start', '', d)} " -RDEPENDS_${PN}_append_class-target = " ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'ubootenv', ' u-boot-fw-utils aktualizr-uboot-env-rollback', '', d)} " - -RDEPENDS_${PN}_append_class-target = " ${PN}-tools " -RDEPENDS_${PN}-secondary_append_class-target = " ${PN}-tools " +DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" +RDEPENDS_${PN}_class-target = "${PN}-tools lshw" +RDEPENDS_${PN}-secondary_class-target = "${PN}-tools" PV = "1.0+git${SRCPV}" PR = "7" @@ -32,9 +25,7 @@ BRANCH ?= "master" S = "${WORKDIR}/git" -inherit cmake - -inherit systemd +inherit pkgconfig cmake systemd SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" SYSTEMD_SERVICE_${PN} = "aktualizr.service" @@ -44,17 +35,22 @@ BBCLASSEXTEND =+ "native" require garage-sign-version.inc -EXTRA_OECMAKE = "-DWARNING_AS_ERROR=OFF \ - -DCMAKE_BUILD_TYPE=Release \ - -DAKTUALIZR_VERSION=${PV} \ - -DBUILD_LOAD_TESTS=OFF" -EXTRA_OECMAKE_append_class-target = " -DBUILD_OSTREE=ON \ - ${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'hsm', '-DBUILD_P11=ON', '', d)} " -EXTRA_OECMAKE_append_class-native = " -DBUILD_SOTA_TOOLS=ON \ - -DBUILD_OSTREE=OFF \ - -DBUILD_SYSTEMD=OFF \ - -DGARAGE_SIGN_VERSION=${GARAGE_SIGN_VERSION} \ - -DGARAGE_SIGN_SHA256=${GARAGE_SIGN_SHA256}" +EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV}" + +GARAGE_SIGN_OPS = "${@ '-DGARAGE_SIGN_VERSION=%s' % d.getVar('GARAGE_SIGN_VERSION') if d.getVar('GARAGE_SIGN_VERSION') is not None else ''} \ + ${@ '-DGARAGE_SIGN_SHA256=%s' % d.getVar('GARAGE_SIGN_SHA256') if d.getVar('GARAGE_SIGN_SHA256') is not None else ''} \ + " + +PACKAGECONFIG ?= "ostree ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} ${@bb.utils.filter('SOTA_CLIENT_FEATURES', 'hsm serialcan ubootenv', d)}" +PACKAGECONFIG_class-native = "sota-tools" +PACKAGECONFIG[warning-as-error] = "-DWARNING_AS_ERROR=ON,-DWARNING_AS_ERROR=OFF," +PACKAGECONFIG[ostree] = "-DBUILD_OSTREE=ON,-DBUILD_OSTREE=OFF,ostree," +PACKAGECONFIG[hsm] = "-DBUILD_P11=ON,-DBUILD_P11=OFF,libp11," +PACKAGECONFIG[sota-tools] = "-DBUILD_SOTA_TOOLS=ON ${GARAGE_SIGN_OPS},-DBUILD_SOTA_TOOLS=OFF,glib-2.0," +PACKAGECONFIG[systemd] = "-DBUILD_SYSTEMD=ON,-DBUILD_SYSTEMD=OFF,systemd," +PACKAGECONFIG[load-tests] = "-DBUILD_LOAD_TESTS=ON,-DBUILD_LOAD_TESTS=OFF," +PACKAGECONFIG[serialcan] = ",,,slcand-start" +PACKAGECONFIG[ubootenv] = ",,,u-boot-fw-utils aktualizr-uboot-env-rollback" do_install_append () { install -d ${D}${libdir}/sota -- cgit v1.2.3-54-g00ecf From 7ec1ffc436e8725e40e1853d084054b554929041 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sun, 3 Feb 2019 13:12:29 +0100 Subject: aktualizr: split binaries to their own packages This patch mainly aims to fix the following issues: - ${libdir}/sota/conf.d is being put into aktualizr package, but ${libdir}/sota/*.toml is being put into aktualizr-host-tools, this does not make sense, if a end user only install aktualizr-host-tools to a target, he will miss the config files in ${libdir}/sota/conf.d. - A user should be able to install garage-deploy garage-push to a board if he wants to do that by choosing building aktualizr with sota-tools, but now it's not in that case, garage-deploy garage-push are only available for native. - It's not necessary to distinguish native/target when installing systemd services, they will be dropped by sstate from native sysroot any way. - It would be better that all binaries to be put into their own packages, so a end user can choose to install a package only with one binary, rather than having to install the entire aktualizr-host-tools. Introduce per-binary based packages for host tools, and gather all config files to aktualizr-configs, it will be depended by binary packages and main aktualizr package. Signed-off-by: Ming Liu --- recipes-sota/aktualizr/aktualizr_git.bb | 61 ++++++++++++++++----------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 8bd65da..fbc1bca 100755 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -5,9 +5,12 @@ SECTION = "base" LICENSE = "MPL-2.0" LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=9741c346eef56131163e13b9db1241b3" +require garage-sign-version.inc + DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" -RDEPENDS_${PN}_class-target = "${PN}-tools lshw" -RDEPENDS_${PN}-secondary_class-target = "${PN}-tools" +RDEPENDS_${PN}_class-target = "aktualizr-check-discovery aktualizr-configs lshw" +RDEPENDS_${PN}-secondary = "aktualizr-check-discovery" +RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-repo aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" PV = "1.0+git${SRCPV}" PR = "7" @@ -31,10 +34,6 @@ SYSTEMD_PACKAGES = "${PN} ${PN}-secondary" SYSTEMD_SERVICE_${PN} = "aktualizr.service" SYSTEMD_SERVICE_${PN}-secondary = "aktualizr-secondary.socket" -BBCLASSEXTEND =+ "native" - -require garage-sign-version.inc - EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DAKTUALIZR_VERSION=${PV}" GARAGE_SIGN_OPS = "${@ '-DGARAGE_SIGN_VERSION=%s' % d.getVar('GARAGE_SIGN_VERSION') if d.getVar('GARAGE_SIGN_VERSION') is not None else ''} \ @@ -80,48 +79,45 @@ do_install_append () { fi fi -} - -do_install_append_class-target () { install -m 0755 -d ${D}${systemd_unitdir}/system aktualizr_service=${@bb.utils.contains('SOTA_CLIENT_FEATURES', 'serialcan', '${WORKDIR}/aktualizr-serialcan.service', '${WORKDIR}/aktualizr.service', d)} install -m 0644 ${aktualizr_service} ${D}${systemd_unitdir}/system/aktualizr.service + + if ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'true', 'false', d)}; then + install -m 0755 ${B}/src/sota_tools/garage-sign/bin/* ${D}${bindir} + install -m 0644 ${B}/src/sota_tools/garage-sign/lib/* ${D}${libdir} + fi } -do_install_append_class-native () { - install -m 0755 ${B}/src/sota_tools/garage-sign/bin/* ${D}${bindir} - install -m 0644 ${B}/src/sota_tools/garage-sign/lib/* ${D}${libdir} +PACKAGESPLITFUNCS_prepend = "split_hosttools_packages " + +python split_hosttools_packages () { + bindir = d.getVar('bindir') + + # Split all binaries to their own packages except aktualizr-info, + # aktualizr-info should stay in main package aktualizr. + do_split_packages(d, bindir, r'^((?!(aktualizr-info)).*)$', '%s', 'Aktualizr tool - %s', extra_depends='aktualizr-configs', prepend=False) } -PACKAGES =+ " ${PN}-examples ${PN}-host-tools ${PN}-tools ${PN}-secondary " +PACKAGES_DYNAMIC = "^aktualizr-.* ^garage-.*" + +PACKAGES =+ "${PN}-examples ${PN}-secondary ${PN}-configs ${PN}-host-tools" + +ALLOW_EMPTY_${PN}-host-tools = "1" FILES_${PN} = " \ ${bindir}/aktualizr \ ${bindir}/aktualizr-info \ ${systemd_unitdir}/system/aktualizr.service \ - ${libdir}/sota/conf.d \ - ${sysconfdir}/sota/conf.d \ - ${sysconfdir}/sota/ecus/* \ " -FILES_${PN}-examples = " \ - ${bindir}/hmi-stub \ +FILES_${PN}-configs = " \ + ${sysconfdir}/sota/* \ + ${libdir}/sota/* \ " -FILES_${PN}-host-tools = " \ - ${bindir}/aktualizr-repo \ - ${bindir}/aktualizr-cert-provider \ - ${bindir}/garage-deploy \ - ${bindir}/garage-push \ - ${libdir}/sota/sota_autoprov.toml \ - ${libdir}/sota/sota_autoprov_primary.toml \ - ${libdir}/sota/sota_hsm_prov.toml \ - ${libdir}/sota/sota_implicit_prov_ca.toml \ - ${libdir}/sota/sota_uboot_env.toml \ - " - -FILES_${PN}-tools = " \ - ${bindir}/aktualizr-check-discovery \ +FILES_${PN}-examples = " \ + ${bindir}/hmi-stub \ " FILES_${PN}-secondary = " \ @@ -130,5 +126,6 @@ FILES_${PN}-secondary = " \ ${systemd_unitdir}/system/aktualizr-secondary.socket \ ${systemd_unitdir}/system/aktualizr-secondary.service \ " +BBCLASSEXTEND = "native" # vim:set ts=4 sw=4 sts=4 expandtab: -- cgit v1.2.3-54-g00ecf