From 45ca7786ffa34a2b640a5637675eaeeb595dad85 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sun, 26 Jan 2020 15:58:59 +0100 Subject: initramfs-ostree-image: drop image_repo_manifest from IMAGE_CLASSES We should remove image_repo_manifest from IMAGE_CLASSES instead of dropping buildinfo_manifest from IMAGE_PREPROCESS_COMMAND, which would ensure the entire class not to be inherited. Signed-off-by: Ming Liu --- recipes-core/images/initramfs-ostree-image.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-core/images/initramfs-ostree-image.bb b/recipes-core/images/initramfs-ostree-image.bb index 7e03f3d..936c59a 100644 --- a/recipes-core/images/initramfs-ostree-image.bb +++ b/recipes-core/images/initramfs-ostree-image.bb @@ -13,6 +13,8 @@ IMAGE_LINGUAS = "" LICENSE = "MIT" +IMAGE_CLASSES_remove = "image_repo_manifest" + IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" # Avoid circular dependencies @@ -28,5 +30,3 @@ IMAGE_ROOTFS_EXTRA_SPACE = "0" IMAGE_OVERHEAD_FACTOR = "1.0" BAD_RECOMMENDATIONS += "busybox-syslog" - -IMAGE_PREPROCESS_COMMAND_remove = "buildinfo_manifest;" -- cgit v1.2.3-54-g00ecf From 574664c2dba05769c2ee00bef2be6ad0dac16e24 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sun, 26 Jan 2020 22:14:20 +0100 Subject: meta: move HOSTTOOLS definitions to sota.conf.inc HOSTTOOLS and HOSTTOOLS_NONFATAL are global variables that being handled in base_eventhandler, so they must be defined in config files or in INHERIT classes or classes being inherited by base.bbclass, or else we might run into the following problems: ``` $ bitbake pkgname $ bitbake imgname ``` the HOSTTOOLS and HOSTTOOLS_NONFATAL in the above image recipe, for instance, 'repo python' in image_repo_manifest.bbclass, they would not be copied to HOSTTOOLS_DIR. Signed-off-by: Ming Liu --- classes/image_repo_manifest.bbclass | 2 -- classes/sota.bbclass | 2 -- classes/target_version_example.bbclass | 2 -- conf/distro/sota.conf.inc | 3 ++- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass index 0b311bd..72dc28f 100644 --- a/classes/image_repo_manifest.bbclass +++ b/classes/image_repo_manifest.bbclass @@ -9,8 +9,6 @@ # For more information, see: # https://web.archive.org/web/20161224194009/https://wiki.cyanogenmod.org/w/Doc:_Using_manifests -HOSTTOOLS_NONFATAL += "repo python" - # Write build information to target filesystem buildinfo_manifest () { if [ $(which repo) ]; then diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 7bf17a4..71bd303 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass @@ -1,7 +1,5 @@ DISTROOVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" -HOSTTOOLS_NONFATAL += "java" - SOTA_CLIENT ??= "aktualizr" SOTA_CLIENT_PROV ??= "aktualizr-shared-prov" SOTA_DEPLOY_CREDENTIALS ?= "1" diff --git a/classes/target_version_example.bbclass b/classes/target_version_example.bbclass index ef119fb..c0b5aec 100644 --- a/classes/target_version_example.bbclass +++ b/classes/target_version_example.bbclass @@ -1,7 +1,5 @@ # Writes target version to be used by garage-sign -HOSTTOOLS += " git " - deploy_target_version () { version=$(git --git-dir=${METADIR}/.repo/manifests/.git/ rev-parse HEAD) echo -n ${version} > ${STAGING_DATADIR_NATIVE}/target_version diff --git a/conf/distro/sota.conf.inc b/conf/distro/sota.conf.inc index f6111bf..1d5f8df 100644 --- a/conf/distro/sota.conf.inc +++ b/conf/distro/sota.conf.inc @@ -16,4 +16,5 @@ INHERIT += "reproducible_build_simple" export SOURCE_DATE_EPOCH ?= "0" REPRODUCIBLE_TIMESTAMP_ROOTFS ?= "0" -HOSTTOOLS_append = " sync sha256sum" +HOSTTOOLS += "git sync sha256sum" +HOSTTOOLS_NONFATAL += "java repo python" -- cgit v1.2.3-54-g00ecf From 2654dcf0848fbb9783dd627b05f39ffe9a3623b1 Mon Sep 17 00:00:00 2001 From: Mykhaylo Sul Date: Wed, 5 Feb 2020 12:58:57 +0100 Subject: OTA-4388: Conf variable to specify an update type for secondary Signed-off-by: Mykhaylo Sul --- .../demo-config/files/30-ostree-pacman.toml | 2 -- .../demo-config/files/30-pacman-config.toml | 2 ++ recipes-test/demo-config/secondary-config.bb | 22 +++++++++++++++++++--- 3 files changed, 21 insertions(+), 5 deletions(-) delete mode 100644 recipes-test/demo-config/files/30-ostree-pacman.toml create mode 100644 recipes-test/demo-config/files/30-pacman-config.toml diff --git a/recipes-test/demo-config/files/30-ostree-pacman.toml b/recipes-test/demo-config/files/30-ostree-pacman.toml deleted file mode 100644 index d2cf5b8..0000000 --- a/recipes-test/demo-config/files/30-ostree-pacman.toml +++ /dev/null @@ -1,2 +0,0 @@ -[pacman] -type = "ostree" diff --git a/recipes-test/demo-config/files/30-pacman-config.toml b/recipes-test/demo-config/files/30-pacman-config.toml new file mode 100644 index 0000000..750cf5c --- /dev/null +++ b/recipes-test/demo-config/files/30-pacman-config.toml @@ -0,0 +1,2 @@ +[pacman] +type = @UPDATE_TYPE@ diff --git a/recipes-test/demo-config/secondary-config.bb b/recipes-test/demo-config/secondary-config.bb index 58b18df..638f0ae 100644 --- a/recipes-test/demo-config/secondary-config.bb +++ b/recipes-test/demo-config/secondary-config.bb @@ -10,16 +10,32 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" SECONDARY_SERIAL_ID ?= "" SOTA_HARDWARE_ID ?= "${MACHINE}-sndry" SECONDARY_HARDWARE_ID ?= "${SOTA_HARDWARE_ID}" +SECONDARY_UPDATE_TYPE ?= "ostree" + +UPDATE_TYPE = "${SECONDARY_UPDATE_TYPE}" +python () { + update_type = d.getVar('UPDATE_TYPE') + if update_type not in [ 'ostree', 'file']: + bb.fatal('Unsupported type of an update specified for secondary: SECONDARY_UPDATE_TYPE = {}\n' + 'Supported update types are: ostree and file' + .format(update_type)) + + if update_type == 'file': + d.setVar('UPDATE_TYPE', 'none') +} SRC_URI = "\ - file://30-ostree-pacman.toml \ + file://30-pacman-config.toml \ file://35-network-config.toml \ file://45-id-config.toml \ " + do_install () { install -m 0700 -d ${D}${libdir}/sota/conf.d - install -m 0644 ${WORKDIR}/30-ostree-pacman.toml ${D}${libdir}/sota/conf.d/30-ostree-pacman.toml + + install -m 0644 ${WORKDIR}/30-pacman-config.toml ${D}${libdir}/sota/conf.d/30-pacman-config.toml + sed -i -e 's|@UPDATE_TYPE@|${UPDATE_TYPE}|g' ${D}${libdir}/sota/conf.d/30-pacman-config.toml install -m 0644 ${WORKDIR}/35-network-config.toml ${D}${libdir}/sota/conf.d/35-network-config.toml sed -i -e 's|@PORT@|${SECONDARY_PORT}|g' \ @@ -36,7 +52,7 @@ do_install () { FILES_${PN} = " \ ${libdir}/sota/conf.d \ - ${libdir}/sota/conf.d/30-ostree-pacman.toml \ + ${libdir}/sota/conf.d/30-pacman-config.toml \ ${libdir}/sota/conf.d/35-network-config.toml \ ${libdir}/sota/conf.d/45-id-config.toml \ " -- cgit v1.2.3-54-g00ecf From 27f73e3b4466f81b9c7dd808741da6caaa3cb9ed Mon Sep 17 00:00:00 2001 From: Mykhaylo Sul Date: Thu, 23 Jan 2020 15:01:15 +0100 Subject: Get the second IP from DHCP to access Inet Signed-off-by: Mykhaylo Sul --- recipes-test/demo-network-config/secondary-network-config.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-test/demo-network-config/secondary-network-config.bb b/recipes-test/demo-network-config/secondary-network-config.bb index ca83d53..66641c3 100644 --- a/recipes-test/demo-network-config/secondary-network-config.bb +++ b/recipes-test/demo-network-config/secondary-network-config.bb @@ -21,7 +21,7 @@ do_install() { SECONDARY_IP ?= "10.0.3.2" IP_ADDR = "${SECONDARY_IP}" -CONF_TYPE = "static" +CONF_TYPE ?= "${@ 'multihomed' if d.getVar('MACHINE') == 'raspberrypi3' and d.getVar('RPI_WIFI_ENABLE') != '1' else 'static'}" require network-config.inc -- cgit v1.2.3-54-g00ecf From 1cf84956442108d2c6713a12b9fe0a5bfe07536e Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Thu, 6 Feb 2020 15:50:24 +0100 Subject: Remove a debug print in qemucommand.py Was missed during review Signed-off-by: Laurent Bonnans --- scripts/qemucommand.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 86b5b9f..30929ac 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py @@ -40,7 +40,6 @@ def random_mac(): class QemuCommand(object): def __init__(self, args): - print(args) self.enable_u_boot = True self.dry_run = args.dry_run self.overlay = args.overlay -- cgit v1.2.3-54-g00ecf From c6154200e06686c46df18eecd2d60e6b2f3789f4 Mon Sep 17 00:00:00 2001 From: Mykhaylo Sul Date: Fri, 7 Feb 2020 10:09:56 +0100 Subject: fix: make secondaries' network less intrusive Signed-off-by: Mykhaylo Sul --- recipes-test/demo-config/shared-conf.inc | 4 ++-- recipes-test/demo-network-config/files/25-dhcp-server.network | 4 ++-- recipes-test/demo-network-config/primary-network-config.bb | 2 +- recipes-test/demo-network-config/secondary-network-config.bb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/recipes-test/demo-config/shared-conf.inc b/recipes-test/demo-config/shared-conf.inc index c5ab598..5523406 100644 --- a/recipes-test/demo-config/shared-conf.inc +++ b/recipes-test/demo-config/shared-conf.inc @@ -1,5 +1,5 @@ -SECONDARY_IP ?= "10.0.3.2" +SECONDARY_IP ?= "192.168.254.2" SECONDARY_PORT ?= "9050" -PRIMARY_IP ?= "10.0.3.1" +PRIMARY_IP ?= "192.168.254.1" PRIMARY_PORT ?= "9040" PRIMARY_WAIT_TIMEOUT ?= "240" diff --git a/recipes-test/demo-network-config/files/25-dhcp-server.network b/recipes-test/demo-network-config/files/25-dhcp-server.network index 4766f9a..03bb302 100644 --- a/recipes-test/demo-network-config/files/25-dhcp-server.network +++ b/recipes-test/demo-network-config/files/25-dhcp-server.network @@ -4,9 +4,9 @@ Name=enp0s4 [Network] Description=Private internal network between aktualizr Primary and Secondary nodes DHCPServer=yes -Address=10.0.3.1/24 +Address=192.168.254.1/24 IPForward=yes IPMasquerade=yes [DHCPServer] -PoolOffset=10 \ No newline at end of file +PoolOffset=10 diff --git a/recipes-test/demo-network-config/primary-network-config.bb b/recipes-test/demo-network-config/primary-network-config.bb index 544a5ec..7ee873f 100644 --- a/recipes-test/demo-network-config/primary-network-config.bb +++ b/recipes-test/demo-network-config/primary-network-config.bb @@ -15,7 +15,7 @@ do_install() { install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/ } -PRIMARY_IP ?= "10.0.3.1" +PRIMARY_IP ?= "192.168.254.1" IP_ADDR = "${PRIMARY_IP}" CONF_TYPE ?= "${@ 'multihomed' if d.getVar('MACHINE') == 'raspberrypi3' and d.getVar('RPI_WIFI_ENABLE') != '1' else 'static'}" diff --git a/recipes-test/demo-network-config/secondary-network-config.bb b/recipes-test/demo-network-config/secondary-network-config.bb index 66641c3..b268cd3 100644 --- a/recipes-test/demo-network-config/secondary-network-config.bb +++ b/recipes-test/demo-network-config/secondary-network-config.bb @@ -19,7 +19,7 @@ do_install() { install -m 0644 ${WORKDIR}/27-dhcp-client-external.network ${D}${libdir}/systemd/network/ } -SECONDARY_IP ?= "10.0.3.2" +SECONDARY_IP ?= "192.168.254.2" IP_ADDR = "${SECONDARY_IP}" CONF_TYPE ?= "${@ 'multihomed' if d.getVar('MACHINE') == 'raspberrypi3' and d.getVar('RPI_WIFI_ENABLE') != '1' else 'static'}" -- cgit v1.2.3-54-g00ecf From dd88667dec94fcf15ae8f797e8a280f91af2351e Mon Sep 17 00:00:00 2001 From: Kostiantyn Bushko Date: Fri, 14 Feb 2020 16:06:11 +0200 Subject: test: shared cred provisioning for non-ostree case Signed-off-by: Kostiantyn Bushko --- .gitignore | 1 + lib/oeqa/selftest/cases/testutils.py | 1 + lib/oeqa/selftest/cases/updater_qemux86_64.py | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/.gitignore b/.gitignore index 8d35cb3..147f162 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ __pycache__ *.pyc +.idea/ diff --git a/lib/oeqa/selftest/cases/testutils.py b/lib/oeqa/selftest/cases/testutils.py index ea7781b..3455fa8 100644 --- a/lib/oeqa/selftest/cases/testutils.py +++ b/lib/oeqa/selftest/cases/testutils.py @@ -49,6 +49,7 @@ def qemu_boot_image(imagename, **kwargs): args.overlay = kwargs.get('overlay', None) args.dry_run = kwargs.get('dry_run', False) args.secondary_network = kwargs.get('secondary_network', False) + args.uboot_enable = kwargs.get('uboot_enable', 'yes') qemu = QemuCommand(args) cmdline = qemu.command_line() diff --git a/lib/oeqa/selftest/cases/updater_qemux86_64.py b/lib/oeqa/selftest/cases/updater_qemux86_64.py index 5f152ad..08220f4 100644 --- a/lib/oeqa/selftest/cases/updater_qemux86_64.py +++ b/lib/oeqa/selftest/cases/updater_qemux86_64.py @@ -112,6 +112,32 @@ class SharedCredProvTests(OESelftestTestCase): verifyProvisioned(self, machine, hwid) +class SharedCredProvTestsNonOSTree(SharedCredProvTests): + + def setUpLocal(self): + layer = "meta-updater-qemux86-64" + result = runCmd('bitbake-layers show-layers') + if re.search(layer, result.output) is None: + self.meta_qemu = metadir() + layer + runCmd('bitbake-layers add-layer "%s"' % self.meta_qemu) + else: + self.meta_qemu = None + self.append_config('MACHINE = "qemux86-64"') + self.append_config('SOTA_CLIENT_PROV = ""') + self.append_config('IMAGE_FSTYPES_remove = "ostreepush garagesign garagecheck"') + self.append_config('SOTA_HARDWARE_ID = "plain_reibekuchen_314"') + + self.append_config('DISTRO = "poky"') + self.append_config('DISTRO_FEATURES_append = " systemd"') + self.append_config('VIRTUAL-RUNTIME_init_manager = "systemd"') + self.append_config('PREFERRED_RPROVIDER_virtual/network-configuration ??= "networkd-dhcp-conf"') + self.append_config('PACKAGECONFIG_pn-aktualizr = ""') + self.append_config('SOTA_DEPLOY_CREDENTIALS = "1"') + self.append_config('IMAGE_INSTALL_append += "aktualizr"') + self.append_config('IMAGE_INSTALL_append += " aktualizr-shared-prov"') + self.qemu, self.s = qemu_launch(machine='qemux86-64', uboot_enable='no') + + class ManualControlTests(OESelftestTestCase): def setUpLocal(self): -- cgit v1.2.3-54-g00ecf From 8fbdc85ae0152fd0fab48b749980d0f834752b38 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Tue, 18 Feb 2020 09:56:21 +0100 Subject: image_types_ostree: update doc link. Most of the README content has been moved to the docs portal, so provide the direct link. Signed-off-by: Patrick Vacek --- classes/image_types_ostree.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 7e4a367..533d338 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -238,10 +238,10 @@ IMAGE_CMD_garagesign () { target_version=${ostree_target_hash} if [ -n "${GARAGE_TARGET_VERSION}" ]; then target_version=${GARAGE_TARGET_VERSION} - bbwarn "Target version is overriden with GARAGE_TARGET_VERSION variable. It is a dangerous operation, make sure you've read the respective secion in meta-updater/README.adoc" + bbwarn "Target version is overriden with GARAGE_TARGET_VERSION variable. This is a dangerous operation! See https://docs.ota.here.com/ota-client/latest/build-configuration.html#_overriding_target_version" elif [ -e "${STAGING_DATADIR_NATIVE}/target_version" ]; then target_version=$(cat "${STAGING_DATADIR_NATIVE}/target_version") - bbwarn "Target version is overriden with target_version file. It is a dangerous operation, make sure you've read the respective secion in meta-updater/README.adoc" + bbwarn "Target version is overriden with target_version file. This is a dangerous operation! See https://docs.ota.here.com/ota-client/latest/build-configuration.html#_overriding_target_version" fi # Push may fail due to race condition when multiple build machines try to push simultaneously -- cgit v1.2.3-54-g00ecf From c85de2c20418a98b2a34ca9c3831188ca295a96e Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Tue, 18 Feb 2020 16:51:51 +0100 Subject: Update aktualizr recipe to use new .so names Aktualizr and garage-sign are also bumped in the process. Signed-off-by: Laurent Bonnans --- recipes-sota/aktualizr/aktualizr_git.bb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 0aa5702..504080a 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -15,7 +15,7 @@ RDEPENDS_${PN}-ptest += "bash cmake curl net-tools python3-core python3-misc pyt PV = "1.0+git${SRCPV}" PR = "7" -GARAGE_SIGN_PV = "0.7.0-64-gc7c279f" +GARAGE_SIGN_PV = "0.7.0-68-g13c41f1" SRC_URI = " \ gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ @@ -27,10 +27,10 @@ SRC_URI = " \ ${@ d.expand("https://ats-tuf-cli-releases.s3-eu-central-1.amazonaws.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''} \ " -SRC_URI[garagesign.md5sum] = "36dedbf79f71cb697a18251ea121bcc6" -SRC_URI[garagesign.sha256sum] = "f0a8e4bb258fd65a6f1fe561132d5ab3fe25b76aec0f1873993dc65bf2167608" +SRC_URI[garagesign.md5sum] = "c7c43904f39a6e4d91f1ddd196dcca3a" +SRC_URI[garagesign.sha256sum] = "946a7401782ee326b458e0e7c668174d628dbf1354fc747a97d46e03f92663aa" -SRCREV = "56ac8dafb552b1d15638162ca14e0b818ed5e65f" +SRCREV = "be85b3a1454d79d926bcf066549a5ec530e67778" BRANCH ?= "master" S = "${WORKDIR}/git" @@ -151,7 +151,7 @@ FILES_${PN} = " \ " FILES_${PN}-lib = " \ - ${libdir}/libaktualizr_lib.so \ + ${libdir}/libaktualizr.so \ " FILES_${PN}-resource-control = " \ @@ -170,11 +170,11 @@ FILES_${PN}-secondary = " \ " FILES_${PN}-secondary-lib = " \ - ${libdir}/libaktualizr_secondary_lib.so \ + ${libdir}/libaktualizr_secondary.so \ " FILES_${PN}-sotatools-lib = " \ - ${libdir}/libsota_tools_lib.so \ + ${libdir}/libsota_tools.so \ " FILES_${PN}-dev = "" -- cgit v1.2.3-54-g00ecf From fd7e7365f005e258cc316b18242061ac2ce6846b Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 27 Feb 2020 12:03:22 +0100 Subject: sota_bleeding: Also set aktualizr-native to the latest. I'm a bit surprised we never noticed this was missing! Signed-off-by: Patrick Vacek --- classes/sota_bleeding.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/sota_bleeding.inc b/classes/sota_bleeding.inc index fc5947d..77d004b 100644 --- a/classes/sota_bleeding.inc +++ b/classes/sota_bleeding.inc @@ -1 +1,2 @@ SRCREV_pn-aktualizr ?= "${AUTOREV}" +SRCREV_pn-aktualizr-native ?= "${AUTOREV}" -- cgit v1.2.3-54-g00ecf From 2362dfcc06f9a729adc1798359cac6b4b03584ac Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 27 Feb 2020 12:26:03 +0100 Subject: oe-selftest.sh: This also now requires setting git identity. Not sure why this only started cropping up now. Signed-off-by: Patrick Vacek --- scripts/ci/oe-selftest.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ci/oe-selftest.sh b/scripts/ci/oe-selftest.sh index 178e7c1..d441d02 100755 --- a/scripts/ci/oe-selftest.sh +++ b/scripts/ci/oe-selftest.sh @@ -22,5 +22,9 @@ set -x # see https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d3a94e5b9b3c107cf54d5639071cc6609c002f67 mkdir -p "tmp/log" +# This is apparently required here now as well. +git config --global user.email "meta-updater-ci@example.org" +git config --global user.name "meta-updater-ci" + oe-selftest -r "$@" ) -- cgit v1.2.3-54-g00ecf From 2a6dd6abc48c30e25c92c50d6b8233e4d8f76b25 Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Fri, 28 Feb 2020 13:58:34 +0100 Subject: Remove CI files not used outside of master. Signed-off-by: Patrick Vacek --- scripts/ci/Dockerfile.checkout | 13 ------- scripts/ci/checkout-oe.sh | 78 ------------------------------------------ scripts/ci/docker/setup_kvm.sh | 14 -------- scripts/ci/gitlab/checkout.yml | 16 --------- scripts/ci/gitlab/docker.yml | 37 -------------------- scripts/ci/gitlab/tests.yml | 35 ------------------- 6 files changed, 193 deletions(-) delete mode 100644 scripts/ci/Dockerfile.checkout delete mode 100755 scripts/ci/checkout-oe.sh delete mode 100755 scripts/ci/docker/setup_kvm.sh delete mode 100644 scripts/ci/gitlab/checkout.yml delete mode 100644 scripts/ci/gitlab/docker.yml delete mode 100644 scripts/ci/gitlab/tests.yml diff --git a/scripts/ci/Dockerfile.checkout b/scripts/ci/Dockerfile.checkout deleted file mode 100644 index 5210c6b..0000000 --- a/scripts/ci/Dockerfile.checkout +++ /dev/null @@ -1,13 +0,0 @@ -FROM debian:stretch-slim -LABEL Description="Image for checking out updater-repo" - -RUN sed -i 's#deb http://deb.debian.org/debian stretch main#deb http://deb.debian.org/debian stretch main contrib#g' /etc/apt/sources.list -RUN sed -i 's#deb http://deb.debian.org/debian stretch-updates main#deb http://deb.debian.org/debian stretch-updates main contrib#g' /etc/apt/sources.list -RUN apt-get update -q && apt-get install -qy \ - git \ - repo \ - xmlstarlet - -# checkout script -RUN mkdir /scripts -COPY checkout-oe.sh /scripts/ diff --git a/scripts/ci/checkout-oe.sh b/scripts/ci/checkout-oe.sh deleted file mode 100755 index e8a2473..0000000 --- a/scripts/ci/checkout-oe.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -set -x - -REMOTE_SOURCE=${REMOTE_SOURCE:-https://github.com/advancedtelematic} -MANIFEST=${MANIFEST:-master} -CURRENT_PROJECT=${CURRENT_PROJECT:-} - -# list of projects to pin to one version in the format: -# "project:rev;project2:rev2..." -PIN_LIST=${PIN_LIST:-} - -#CURRENT_REV=$(git rev-parse HEAD) -LOCAL_REPO=$PWD - -mkdir -p updater-repo - -cd updater-repo - -if [ -d .repo/manifests ]; then - git -C .repo/manifests reset --hard -fi - -repo init -m "${MANIFEST}.xml" -u "$REMOTE_SOURCE/updater-repo" - -# patch manifest: -# - add a new "ats" remote that points to "$REMOTE_SOURCE" -# - change projects that contain "advancedtelematic" to use the ats remote -MANIFEST_FILE=".repo/manifests/${MANIFEST}.xml" -xmlstarlet ed --omit-decl -L \ - -s "/manifest" -t elem -n "remote" -v "" \ - -i "/manifest/remote[last()]" -t attr -n "name" -v "ats" \ - -i "/manifest/remote[last()]" -t attr -n "fetch" -v "$REMOTE_SOURCE" \ - -d "/manifest/project[contains(@name, 'advancedtelematic')]/@remote" \ - -i "/manifest/project[contains(@name, 'advancedtelematic')]" -t attr -n "remote" -v "ats" \ - "$MANIFEST_FILE" - -# hack: sed on `advancedtelematic/` names, to remove this unwanted prefix -sed -i 's#name="advancedtelematic/#name="#g' "$MANIFEST_FILE" - -# pin projects from the list -( -IFS=";" -for pin in $PIN_LIST; do - IFS=":" - read -r project rev <<< "$pin" - xmlstarlet ed --omit-decl -L \ - -d "/manifest/project[@name=\"$project\"]/@revision" \ - -i "/manifest/project[@name=\"$project\"]/@revision" -t attr -n "revision" -v "$rev" \ - -i "/manifest/project[@name=\"$project\"]" -t attr -n "revision" -v "$rev" \ - "$MANIFEST_FILE" - IFS=";" -done -) - -# Remove the current project from the manifest if we have it checked out -if [ -n "$CURRENT_PROJECT" ]; then - xmlstarlet ed --omit-decl -L \ - -d "/manifest/project[@name=\"$CURRENT_PROJECT\"]" \ - "$MANIFEST_FILE" -fi - -repo manifest - -# Try to clean up the repos in case they are messed up, but this returns an -# error code if the repos don't exist, which the subsequent repo sync will fix. -repo forall -c 'git reset --hard ; git clean -fdx' || true - -repo sync -d --force-sync - -if [ -n "$CURRENT_PROJECT" ]; then - rm -f "$CURRENT_PROJECT" - ln -s "$LOCAL_REPO" "$CURRENT_PROJECT" -fi - -repo manifest -r diff --git a/scripts/ci/docker/setup_kvm.sh b/scripts/ci/docker/setup_kvm.sh deleted file mode 100755 index 1ffbbf5..0000000 --- a/scripts/ci/docker/setup_kvm.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -# This script makes the gid of the 'kvm' group to match the group -# owner of '/dev/kvm' -# -# These two are not guaranteed to match when a docker image starts -# with access to '/dev/kvm' that comes from the host - -set -euo pipefail - -kvm_gid=$(stat -c "%g" /dev/kvm) -groupmod -g "$kvm_gid" kvm -usermod -a -G kvm bitbake -ln -s /bin/true /usr/bin/kvm-ok diff --git a/scripts/ci/gitlab/checkout.yml b/scripts/ci/gitlab/checkout.yml deleted file mode 100644 index 28c9177..0000000 --- a/scripts/ci/gitlab/checkout.yml +++ /dev/null @@ -1,16 +0,0 @@ -.bb_checkout: - # parameters: - # - MANIFEST - # - REMOTE_SOURCE - # - CURRENT_PROJECT (will be symlinked instead of pulled) - - image: $BITBAKE_CHECKOUT_IMAGE - cache: - paths: - - updater-repo - artifacts: - expire_in: "1 day" - paths: - - updater-repo - script: - - /scripts/checkout-oe.sh diff --git a/scripts/ci/gitlab/docker.yml b/scripts/ci/gitlab/docker.yml deleted file mode 100644 index ba488c6..0000000 --- a/scripts/ci/gitlab/docker.yml +++ /dev/null @@ -1,37 +0,0 @@ -.bb_docker_local: - # intended to be run on meta-updater's master branch which contains the - # reference docker files - # parameters: - # - BITBAKE_IMAGE - # - BITBAKE_CHECKOUT_IMAGE - # - BITBKAE_IMAGE_MASTER - # - BITBAKE_CHECKOUT_IMAGE_MASTER - image: docker:18 - stage: docker - services: - - docker:18-dind - script: - - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" - - - docker pull "$BITBAKE_IMAGE" || docker pull "$BITBKAE_IMAGE_MASTER" || true - - docker build --pull --cache-from "$BITBKAE_IMAGE_MASTER" --cache-from "$BITBAKE_IMAGE" -f ./scripts/ci/Dockerfile.bitbake -t "$BITBAKE_IMAGE" ./scripts/ci - - docker push "$BITBAKE_IMAGE" - - - docker pull "$BITBAKE_CHECKOUT_IMAGE" || docker pull "$BITBAKE_CHECKOUT_IMAGE_MASTER" || true - - docker build --pull --cache-from "$BITBAKE_CHECKOUT_IMAGE_MASTER" --cache-from "$BITBAKE_CHECKOUT_IMAGE" -f ./scripts/ci/Dockerfile.checkout -t "$BITBAKE_CHECKOUT_IMAGE" ./scripts/ci - - docker push "$BITBAKE_CHECKOUT_IMAGE" - -.bb_docker_remote: - # intended to be run on other branches and repos: just pulls the last master image - # parameters: - # - BITBAKE_IMAGE - # - BITBAKE_CHECKOUT_IMAGE - image: docker:18 - stage: docker - services: - - docker:18-dind - script: - - docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY" - - - docker pull "$BITBAKE_IMAGE" - - docker pull "$BITBAKE_CHECKOUT_IMAGE" diff --git a/scripts/ci/gitlab/tests.yml b/scripts/ci/gitlab/tests.yml deleted file mode 100644 index 4175412..0000000 --- a/scripts/ci/gitlab/tests.yml +++ /dev/null @@ -1,35 +0,0 @@ -.bitbake: - # parameters: - # - TEST_BUILD_DIR - # - TEST_MACHINE (defaults to qemux86-64) - # - BITBAKE_TARGETS - image: $BITBAKE_IMAGE - dependencies: - - Checkout - tags: - - bitbake - script: - - /scripts/configure.sh - - /scripts/build.sh $BITBAKE_TARGETS - -.oe-selftest: - # parameters: - # - TEST_BUILD_DIR - # - TEST_MACHINE (defaults to qemux86-64) - # - OE_SELFTESTS - image: $BITBAKE_IMAGE - dependencies: - - Checkout - tags: - - bitbake - variables: - TEST_AKTUALIZR_CREDENTIALS: $CI_PROJECT_DIR/credentials.zip - script: - - aws s3 cp s3://ota-gitlab-ci/hereotaconnect_prod.zip credentials.zip - - sudo /usr/local/bin/setup_kvm.sh - - | - # sg is needed after adding bitbake to the kvm group (see setup_kvm.sh) - sg kvm << EOS - /scripts/configure.sh - /scripts/oe-selftest.sh $OE_SELFTESTS - EOS -- cgit v1.2.3-54-g00ecf From 5f28db6a803ebb8082f92e96de95fbe130d4670e Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Fri, 28 Feb 2020 12:15:22 +0100 Subject: aktualizr: Update to 2020.3 release. Update garage-sign to the latest as well. Signed-off-by: Patrick Vacek --- 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 504080a..804f2c2 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb @@ -15,7 +15,7 @@ RDEPENDS_${PN}-ptest += "bash cmake curl net-tools python3-core python3-misc pyt PV = "1.0+git${SRCPV}" PR = "7" -GARAGE_SIGN_PV = "0.7.0-68-g13c41f1" +GARAGE_SIGN_PV = "0.7.0-70-g3adf982" SRC_URI = " \ gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ @@ -27,10 +27,10 @@ SRC_URI = " \ ${@ d.expand("https://ats-tuf-cli-releases.s3-eu-central-1.amazonaws.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if d.getVar('GARAGE_SIGN_AUTOVERSION') != '1' else ''} \ " -SRC_URI[garagesign.md5sum] = "c7c43904f39a6e4d91f1ddd196dcca3a" -SRC_URI[garagesign.sha256sum] = "946a7401782ee326b458e0e7c668174d628dbf1354fc747a97d46e03f92663aa" +SRC_URI[garagesign.md5sum] = "7c4cbeacefd97eae69104d29cf5ff37a" +SRC_URI[garagesign.sha256sum] = "e9a9b68eaa1ce4104eb2ab7f1f59d99742d50805e93216fb5b21d1f212aa3d82" -SRCREV = "be85b3a1454d79d926bcf066549a5ec530e67778" +SRCREV = "9f2cc5d7b026eb1a1404f0c77ef6cb9377245423" BRANCH ?= "master" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf