From 298dfa1bfae4ed01bc75caa2834a7a09fcc5004b Mon Sep 17 00:00:00 2001 From: Anatoliy Odukha Date: Wed, 28 Oct 2020 21:01:10 +0200 Subject: aktualizr: Upgrade to 2020.10 release Signed-off-by: Anatoliy Odukha --- recipes-sota/aktualizr/aktualizr_git.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index c73947c..f9ccaeb 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -17,7 +17,7 @@ PRIVATE_LIBS_${PN}-ptest = "libaktualizr.so libaktualizr_secondary.so" PV = "1.0+git${SRCPV}" PR = "7" -GARAGE_SIGN_PV = "0.7.1-22-g1d0d714" +GARAGE_SIGN_PV = "0.7.2-9-g80ae114" SRC_URI = " \ gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ @@ -29,10 +29,10 @@ SRC_URI = " \ ${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''} \ " -SRC_URI[garagesign.md5sum] = "7be214beb64ce4ae443f7a4288b6d491" -SRC_URI[garagesign.sha256sum] = "b8524a03bb31551889790eca4ed44070f679d33a98b09e8220d7e0e965de68d8" +SRC_URI[garagesign.md5sum] = "2598ce3a468c40a58df3304fb71ea14b" +SRC_URI[garagesign.sha256sum] = "acbc814a9ed962a0d3b5bc397b14fef6a139e874e6cc3075671dab69bc8541fd" -SRCREV = "d4811f900c765f3b4e5b9ea76531bad7d830a691" +SRCREV = "1255aa24fe55f99b606027c8acc8cd80db29a282" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf From 6c6260c857f58b817d24ed662b58bfb9930c9070 Mon Sep 17 00:00:00 2001 From: Dominik Wild Date: Thu, 17 Sep 2020 15:19:04 +0200 Subject: image_types_ostree: fix chmod Signed-off-by: Dominik Wild --- classes/image_types_ostree.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 392a42a..4fe37a3 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -88,7 +88,7 @@ IMAGE_CMD_ostree () { if [ -n "${SYSTEMD_USED}" ]; then echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf} else - echo "mkdir -p /var/rootdirs/${dir}; chown 755 /var/rootdirs/${dir}" >>${tmpfiles_conf} + echo "mkdir -p /var/rootdirs/${dir}; chmod 755 /var/rootdirs/${dir}" >>${tmpfiles_conf} fi ln -sf var/rootdirs/${dir} ${dir} done @@ -101,7 +101,7 @@ IMAGE_CMD_ostree () { if [ -n "${SYSTEMD_USED}" ]; then echo "d /var/roothome 0700 root root -" >>${tmpfiles_conf} else - echo "mkdir -p /var/roothome; chown 700 /var/roothome" >>${tmpfiles_conf} + echo "mkdir -p /var/roothome; chmod 700 /var/roothome" >>${tmpfiles_conf} fi rm -rf root @@ -118,7 +118,7 @@ IMAGE_CMD_ostree () { if [ -n "${SYSTEMD_USED}" ]; then echo "d /var/usrlocal 0755 root root -" >>${tmpfiles_conf} else - echo "mkdir -p /var/usrlocal; chown 755 /var/usrlocal" >>${tmpfiles_conf} + echo "mkdir -p /var/usrlocal; chmod 755 /var/usrlocal" >>${tmpfiles_conf} fi dirs="bin etc games include lib man sbin share src" @@ -127,7 +127,7 @@ IMAGE_CMD_ostree () { if [ -n "${SYSTEMD_USED}" ]; then echo "d /var/usrlocal/${dir} 0755 root root -" >>${tmpfiles_conf} else - echo "mkdir -p /var/usrlocal/${dir}; chown 755 /var/usrlocal/${dir}" >>${tmpfiles_conf} + echo "mkdir -p /var/usrlocal/${dir}; chmod 755 /var/usrlocal/${dir}" >>${tmpfiles_conf} fi done -- cgit v1.2.3-54-g00ecf From 1118ab2e1f36a475472d534e0f6665a5508a41be Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Thu, 15 Oct 2020 12:27:10 -0300 Subject: ostree-kernel-initramfs: add back initramfs fit workaround Previous initramfs fit specific workaround was removed as part of commit 6eecf1593d, causing ostree to provide an init argument as part of the kernel command line arguments when it is not really needed. Bring back the workaround by simply generating an empty file in case kernel image type is fit and initramfs is also used by the target. Signed-off-by: Ricardo Salveti --- classes/sota.bbclass | 3 +-- .../ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/classes/sota.bbclass b/classes/sota.bbclass index fbd92b5..9241952 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -6,8 +6,7 @@ SOTA_HARDWARE_ID ??= "${MACHINE}" IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest" IMAGE_INSTALL_append_sota = " aktualizr aktualizr-info ${SOTA_CLIENT_PROV} \ - ostree os-release ostree-kernel \ - ${@'ostree-initramfs' if d.getVar('KERNEL_IMAGETYPE') != 'fitImage' else ''} \ + ostree os-release ostree-kernel ostree-initramfs \ ${@'ostree-devicetrees' if oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}') else ''}" IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" diff --git a/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb b/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb index 136bb22..94010f7 100644 --- a/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb +++ b/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb @@ -36,7 +36,13 @@ do_install() { cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} $kerneldir/vmlinuz - if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then + if [ "${KERNEL_IMAGETYPE}" = "fitImage" ]; then + if [ -n "${INITRAMFS_IMAGE}" ]; 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) + touch $kerneldir/initramfs.img + fi + else if [ -n "${INITRAMFS_IMAGE}" ]; then cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} $kerneldir/initramfs.img fi -- cgit v1.2.3-54-g00ecf From 448428d51152088406196979da9aa0bccd1742ae Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 28 Sep 2020 10:20:51 +0200 Subject: gpgme: Remove redundant bbappend. The version in poky already supports a native build. Signed-off-by: Patrick Vacek --- recipes-support/gpgme/gpgme_%.bbappend | 1 - 1 file changed, 1 deletion(-) delete mode 100644 recipes-support/gpgme/gpgme_%.bbappend diff --git a/recipes-support/gpgme/gpgme_%.bbappend b/recipes-support/gpgme/gpgme_%.bbappend deleted file mode 100644 index fccb949..0000000 --- a/recipes-support/gpgme/gpgme_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -BBCLASSEXTEND_append_sota = " native" -- cgit v1.2.3-54-g00ecf From d1225558e9a44ddc25066bd4ab858a0bbcb8ce14 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Mon, 28 Sep 2020 10:03:27 +0200 Subject: lshw: remove since it's been in meta-openembedded for a long time. And it's a newer version at that! Signed-off-by: Patrick Vacek --- recipes-support/lshw/files/cross-compile.patch | 39 ------------------------ recipes-support/lshw/files/ldflags.patch | 42 -------------------------- recipes-support/lshw/lshw_02.17.bb | 36 ---------------------- 3 files changed, 117 deletions(-) delete mode 100644 recipes-support/lshw/files/cross-compile.patch delete mode 100644 recipes-support/lshw/files/ldflags.patch delete mode 100644 recipes-support/lshw/lshw_02.17.bb diff --git a/recipes-support/lshw/files/cross-compile.patch b/recipes-support/lshw/files/cross-compile.patch deleted file mode 100644 index 221b7e5..0000000 --- a/recipes-support/lshw/files/cross-compile.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- - src/Makefile | 2 +- - src/core/Makefile | 2 +- - src/gui/Makefile | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - ---- a/src/Makefile -+++ b/src/Makefile -@@ -18,7 +18,7 @@ export MANDIR - export DATADIR - export SQLITE - --CXX?=c++ -+CXX?=$(CROSS_COMPILE)c++ - INCLUDES=-I./core/ - DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" - CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) ---- a/src/core/Makefile -+++ b/src/core/Makefile -@@ -1,6 +1,6 @@ - PACKAGENAME?=lshw - --CXX=c++ -+CXX?=$(CROSS_COMPILE)c++ - INCLUDES= - DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" - CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) ---- a/src/gui/Makefile -+++ b/src/gui/Makefile -@@ -1,7 +1,7 @@ - PACKAGENAME?=lshw - --CXX?=c++ --CC?=cc -+CXX?=$(CROSS_COMPILE)c++ -+CC?=$(CROSS_COMPILE)cc - STRIP?=strip - OBJCOPY?=objcopy - diff --git a/recipes-support/lshw/files/ldflags.patch b/recipes-support/lshw/files/ldflags.patch deleted file mode 100644 index d95699d..0000000 --- a/recipes-support/lshw/files/ldflags.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Naur /home/anton/lshw-old/src/Makefile lshw-B.02.17/src/Makefile ---- /home/anton/lshw-old/src/Makefile 2017-02-07 16:21:52.554738182 +0100 -+++ lshw-B.02.17/src/Makefile 2017-02-07 16:22:45.578588072 +0100 -@@ -25,9 +25,9 @@ - ifeq ($(SQLITE), 1) - CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3) - endif --LDFLAGS=-L./core/ -g -+LDEXTRAS=-L./core/ -g - ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) -- LDFLAGS+= -Wl,--as-needed -+ LDEXTRAS+= -Wl,--as-needed - endif - LDSTATIC=-static - LIBS=-llshw -lresolv -@@ -37,7 +37,7 @@ - - export CXXFLAGS - export LIBS --export LDFLAGS -+export LDEXTRAS - - DATAFILES = pci.ids usb.ids oui.txt manuf.txt - -@@ -51,7 +51,7 @@ - +make -C core all - - $(PACKAGENAME): core $(PACKAGENAME).o -- $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS) -+ $(CXX) $(LDFLAGS) ${LDEXTRAS} -o $@ $(PACKAGENAME).o $(LIBS) - - .PHONY: po - po: -@@ -69,7 +69,7 @@ - static: $(PACKAGENAME)-static - - $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o -- $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS) -+ $(CXX) $(LDSTATIC) $(LDFLAGS) ${LDEXTRAS} -o $@ $(PACKAGENAME).o $(LIBS) - $(STRIP) $@ - - .PHONY: compressed diff --git a/recipes-support/lshw/lshw_02.17.bb b/recipes-support/lshw/lshw_02.17.bb deleted file mode 100644 index 1ecc4c1..0000000 --- a/recipes-support/lshw/lshw_02.17.bb +++ /dev/null @@ -1,36 +0,0 @@ -# From meta-linaro -# http://git.linaro.org/openembedded/meta-linaro.git - -DESCRIPTION = "A small tool to provide detailed information on the hardware \ -configuration of the machine. It can report exact memory configuration, \ -firmware version, mainboard configuration, CPU version and speed, cache \ -configuration, bus speed, etc. on DMI-capable or EFI systems." -SUMMARY = "Hardware lister" -HOMEPAGE = "http://ezix.org/project/wiki/HardwareLiSter" -SECTION = "console/tools" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -DEPENDS = "pciutils \ - usbutils" -COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" - -SRC_URI="http://ezix.org/software/files/lshw-B.${PV}.tar.gz \ - file://cross-compile.patch \ - file://ldflags.patch \ - " - -SRC_URI[md5sum] = "a5feb796cb302850eaf5b4530888e3ed" -SRC_URI[sha256sum] = "eb9cc053fa0f1e78685cb695596e73931bfb55d2377e3bc3b8b94aff4c5a489c" - -S="${WORKDIR}/lshw-B.${PV}" - -do_compile() { - # build core only - don't ship gui - oe_runmake -C src core -} - -do_install() { - oe_runmake install DESTDIR=${D} - # data files provided by dependencies - rm -rf ${D}/usr/share/lshw -} -- cgit v1.2.3-54-g00ecf From ab4f02a233efebb038cadd73e9cbaab4428b155c Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Wed, 21 Oct 2020 10:11:04 +0200 Subject: aktualizr: Don't put unused configs in the image. Because every aktualizr package was depending on aktualizr-configs, all of the default configs were getting installed to /usr/lib/sota, despite that by default none of them were ever used on the device. That dependency has been removed. The provisioning recipes still install the recipes they need to the default location that aktualizr actually uses (/usr/lib/sota/conf.d). If you want to use anything else, a specific recipe should be created to do so. This change rendered the aktualizr-host-tools package useless, so it has been removed. Signed-off-by: Patrick Vacek --- recipes-sota/aktualizr/aktualizr-device-prov-hsm.bb | 2 +- recipes-sota/aktualizr/aktualizr-device-prov.bb | 2 +- recipes-sota/aktualizr/aktualizr-shared-prov.bb | 2 +- recipes-sota/aktualizr/aktualizr_git.bb | 9 +++------ 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr-device-prov-hsm.bb b/recipes-sota/aktualizr/aktualizr-device-prov-hsm.bb index 8f28c03..7239bfd 100644 --- a/recipes-sota/aktualizr/aktualizr-device-prov-hsm.bb +++ b/recipes-sota/aktualizr/aktualizr-device-prov-hsm.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 inherit allarch -# We need to get the config files from the aktualizr-host-tools package built by +# We need to get the config files from the aktualizr-configs package built by # the aktualizr (target) recipe. DEPENDS = "aktualizr" diff --git a/recipes-sota/aktualizr/aktualizr-device-prov.bb b/recipes-sota/aktualizr/aktualizr-device-prov.bb index 55f398d..391b098 100644 --- a/recipes-sota/aktualizr/aktualizr-device-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-device-prov.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 inherit allarch -# We need to get the config files from the aktualizr-host-tools package built by +# We need to get the config files from the aktualizr-configs package built by # the aktualizr (target) recipe. DEPENDS = "aktualizr" diff --git a/recipes-sota/aktualizr/aktualizr-shared-prov.bb b/recipes-sota/aktualizr/aktualizr-shared-prov.bb index 0f712df..0c54f32 100644 --- a/recipes-sota/aktualizr/aktualizr-shared-prov.bb +++ b/recipes-sota/aktualizr/aktualizr-shared-prov.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7 inherit allarch -# We need to get the config files from the aktualizr-host-tools package built by +# We need to get the config files from the aktualizr-configs package built by # the aktualizr (target) recipe. DEPENDS = "aktualizr" RDEPENDS_${PN}_append = "${@' aktualizr-shared-prov-creds' if oe.types.boolean(d.getVar('SOTA_DEPLOY_CREDENTIALS')) else ''}" diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index f9ccaeb..1e5aa18 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -7,8 +7,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=815ca599c9df247a0c7f619bab123dad" DEPENDS = "boost curl openssl libarchive libsodium sqlite3 asn1c-native" DEPENDS_append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' coreutils-native net-tools-native ostree-native aktualizr-native ', '', d)}" -RDEPENDS_${PN}_class-target = "${PN}-configs ${PN}-hwid lshw" -RDEPENDS_${PN}-host-tools = "aktualizr aktualizr-cert-provider ${@bb.utils.contains('PACKAGECONFIG', 'sota-tools', 'garage-deploy garage-push', '', d)}" +RDEPENDS_${PN}_class-target = "${PN}-hwid lshw" RDEPENDS_${PN}-ptest += "bash cmake curl python3-misc python3-modules openssl-bin sqlite3 valgrind" @@ -133,14 +132,12 @@ python split_hosttools_packages () { bindir = d.getVar('bindir') # Split all binaries to their own packages. - do_split_packages(d, bindir, '^(.*)$', '%s', 'Aktualizr tool - %s', extra_depends='aktualizr-configs', prepend=False) + do_split_packages(d, bindir, '^(.*)$', '%s', 'Aktualizr tool - %s', extra_depends='', prepend=False) } PACKAGES_DYNAMIC = "^aktualizr-.* ^garage-.*" -PACKAGES =+ "${PN}-host-tools ${PN}-info ${PN}-lib ${PN}-resource-control ${PN}-configs ${PN}-secondary ${PN}-secondary-lib ${PN}-sotatools-lib" - -ALLOW_EMPTY_${PN}-host-tools = "1" +PACKAGES =+ "${PN}-info ${PN}-lib ${PN}-resource-control ${PN}-configs ${PN}-secondary ${PN}-secondary-lib ${PN}-sotatools-lib" FILES_${PN} = " \ ${bindir}/aktualizr \ -- cgit v1.2.3-54-g00ecf