From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7243694205603676160 X-Received: by 2002:a05:622a:412:b0:3f8:6aef:18a6 with SMTP id n18-20020a05622a041200b003f86aef18a6mr14699980qtx.44.1687241149809; Mon, 19 Jun 2023 23:05:49 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac8:4904:0:b0:3f5:1122:2976 with SMTP id e4-20020ac84904000000b003f511222976ls1366894qtq.1.-pod-prod-02-us; Mon, 19 Jun 2023 23:05:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7qfcqaGLu9Fe6NfhyIou3d4+qhvCqGuUHtfr9307A18b1EUQbekD9ge63wo8C2xBsWBrok X-Received: by 2002:a05:622a:290:b0:3ff:1fba:2820 with SMTP id z16-20020a05622a029000b003ff1fba2820mr6236569qtw.58.1687241148997; Mon, 19 Jun 2023 23:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687241148; cv=none; d=google.com; s=arc-20160816; b=ujPM07o7fWs9II7hi9M/dz2JmDXjbFx3Xxxj6zbLKM134losPV2rLd0s4e/uctzMaI uwhnFBuHS0UqANPxD8z8UMgHTxsPmevpwflkBLE7o2TjhZ6TZ1mwV9y2v7CjA2XcD6OO pYRWWRal1upvc38e3dTpYgnXKbtuU8JbMGSmf7O7i7DuZiL/MUqZihm3QXlkfDl+KyGb GCNqu0pjadV45FwbrHfVlLRnEa6E+EJtIZ0HIvnWDWPpFUaMNhDEXBp9j6RbAAJ4L1Lo 6y/zdOtiaWWwOzGZNwNHM87Kd4Uu2Rh2XCElwK8L4A3EmDmlekkC/sUBFnwOcmCPpHjA P0zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=CsGtPsEckw2aj1uXLYSWgBs3UEVtQyghr7stj0bF0yo=; b=aAprTXbCLeLKAqeDGZ2WFqZXi9PRyBWtH2yE+4QciRBtwZ/iy+WxQiOqNOzhyKk+H+ WkvKpejI+iStRWfluo39MRpIa08i/HPC6gGWeXVm0h1YlR8d34RwMHAy0ptp0Wswoj0J v9tH5Gh4ND/OidigydIOFEVnGysSoAVYhMKwzsA/rhG2/s7g0vu57nfG6btmJxPQaeUq jYbHZMf4gawrA2Cv+HV28bPO4gbkoGXGuuT/L5xgQgcfDKqO1PmA1Vk6NPPmhPRR3fd4 9Yiv8wxhh65TZcA3M7gwsdQIZw7ITfkoDOZsOBiYEOjvKDUkWI3Mdg1NrVILsREcNRAB HEpA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id ch14-20020a05622a40ce00b003fde92c5ad3si183297qtb.2.2023.06.19.23.05.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Jun 2023 23:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from baighyz.m.ilbers.de (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 35K65iXu027569 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 20 Jun 2023 08:05:45 +0200 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: [PATCH v4 01/12] CI: Introduce meta-test layer Date: Tue, 20 Jun 2023 08:05:33 +0200 Message-Id: <20230620060544.19745-2-ubely@ilbers.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230620060544.19745-1-ubely@ilbers.de> References: <20230620060544.19745-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: FLn13BjliBKE From: Anton Mikanovich This layer will be used for internal testing only and handle all the customizations needed for testsuite. - Move `isar-image-ci recipe` to this layer. - Copy local.conf.sample from `meta-isar` layer to be able to remove test-specific settings from `meta-isar` later. Don't kee unused options in the copy - leave only original file in `meta-isar` self-documented. Signed-off-by: Anton Mikanovich Signed-off-by: Uladzimir Bely --- RECIPE-API-CHANGELOG.md | 5 + meta-test/conf/bblayers.conf.sample | 18 ++++ meta-test/conf/conf-notes.txt | 3 + meta-test/conf/layer.conf | 20 ++++ meta-test/conf/local.conf.sample | 91 +++++++++++++++++++ .../recipes-ci/images/isar-image-ci.bb | 5 + .../isar-ci-ssh-setup/files/postinst | 0 .../isar-ci-ssh-setup_0.1.bb | 0 testsuite/cibuilder.py | 1 + 9 files changed, 143 insertions(+) create mode 100644 meta-test/conf/bblayers.conf.sample create mode 100644 meta-test/conf/conf-notes.txt create mode 100644 meta-test/conf/layer.conf create mode 100644 meta-test/conf/local.conf.sample rename {meta-isar => meta-test}/recipes-ci/images/isar-image-ci.bb (52%) rename {meta-isar => meta-test}/recipes-ci/isar-ci-ssh-setup/files/postinst (100%) rename {meta-isar => meta-test}/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb (100%) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 7a16b5c2..bc892f53 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -492,3 +492,8 @@ Recipes inheriting dpkg-base now automatically have a bitbake target exists for the current `DISTRO_ARCH`. In that case the compat package can be built by adding `-compat` to `DEPENDS` or `IMAGE_INSTALL`. + +### Introduce meta-test layer + +Some CI-related recipes and images moves to meta-test from meta-isar, so if +a downstream used them, they should update their layers.conf accordingly. diff --git a/meta-test/conf/bblayers.conf.sample b/meta-test/conf/bblayers.conf.sample new file mode 100644 index 00000000..dcec6cf6 --- /dev/null +++ b/meta-test/conf/bblayers.conf.sample @@ -0,0 +1,18 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ##ISARROOT##/meta \ + ##ISARROOT##/meta-isar \ + ##ISARROOT##/meta-test \ + " +BBLAYERS_NON_REMOVABLE ?= " \ + ##ISARROOT##/meta \ + " diff --git a/meta-test/conf/conf-notes.txt b/meta-test/conf/conf-notes.txt new file mode 100644 index 00000000..7da291af --- /dev/null +++ b/meta-test/conf/conf-notes.txt @@ -0,0 +1,3 @@ +Common CI targets are: + mc:qemuamd64-bookworm:isar-image-ci + mc:qemuarm-bullseye:isar-image-ci diff --git a/meta-test/conf/layer.conf b/meta-test/conf/layer.conf new file mode 100644 index 00000000..07b5c77d --- /dev/null +++ b/meta-test/conf/layer.conf @@ -0,0 +1,20 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb" + +BBFILE_COLLECTIONS += "test" +BBFILE_PATTERN_test = "^${LAYERDIR}/" +BBFILE_PRIORITY_test = "10" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_test = "1" +LAYERSERIES_COMPAT_test = "v0.6" + +LAYERDIR_test = "${LAYERDIR}" +LAYERDIR_test[vardepvalue] = "meta-test" diff --git a/meta-test/conf/local.conf.sample b/meta-test/conf/local.conf.sample new file mode 100644 index 00000000..ed569c5c --- /dev/null +++ b/meta-test/conf/local.conf.sample @@ -0,0 +1,91 @@ +# This software is a part of ISAR. +# Copyright (C) 2023 ilbers GmbH + +# Machine and distro selection +MACHINE ??= "qemuarm" +DISTRO ??= "debian-bullseye" +DISTRO_ARCH ??= "armhf" + +# The list of known multiple configurations +BBMULTICONFIG = " \ + qemuarm-buster \ + qemuarm-bullseye \ + qemuarm-bookworm \ + qemuarm64-buster \ + qemuarm64-bullseye \ + qemuarm64-bookworm \ + qemui386-buster \ + qemui386-bullseye \ + qemui386-bookworm \ + qemuamd64-buster \ + qemuamd64-bullseye \ + qemuamd64-sb-bullseye \ + qemuamd64-bookworm \ + container-amd64-buster \ + container-amd64-bullseye \ + container-amd64-bookworm \ + qemumipsel-buster \ + qemumipsel-bullseye \ + qemumipsel-bookworm \ + qemuriscv64-sid-ports \ + bananapi-buster \ + bananapi-bullseye \ + de0-nano-soc-buster \ + de0-nano-soc-bullseye \ + hikey-bullseye \ + hikey-bookworm \ + imx6-sabrelite-buster \ + imx6-sabrelite-bullseye \ + phyboard-mira-bullseye \ + nanopi-neo-buster \ + nanopi-neo-bullseye \ + stm32mp15x-buster \ + stm32mp15x-bullseye \ + virtualbox-bullseye \ + rpi-arm-bullseye \ + rpi-arm-v7-bullseye \ + rpi-arm-v7l-bullseye \ + rpi-arm64-v8-bullseye \ + sifive-fu540-sid-ports \ + starfive-visionfive2-sid-ports \ + qemuarm64-focal \ + qemuarm64-jammy \ + qemuamd64-focal \ + qemuamd64-jammy \ +" + +# Disable interactive patch resolution +PATCHRESOLVE = "noop" + +# Disk Space Monitoring settings +BB_DISKMON_DIRS = "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + HALT,${TMPDIR},100M,1K \ + HALT,${DL_DIR},100M,1K \ + HALT,${SSTATE_DIR},100M,1K \ + HALT,/tmp,10M,1K" + +# Isar and external MIRRORS in case of service unavailable +MIRRORS ?= "git?://salsa\.debian\.org/debian/.* git://github.com/ilbers/BASENAME" +MIRRORS += "https?://cdn\.kernel\.org/.* https://mirrors.edge.kernel.org/PATH" + +# The default list of extra packages +IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar-disable-apt-cache cowsay example-prebuilt" + +# Users and groups +USERS += "root" +USER_root[password] ??= "$6$rounds=10000$RXeWrnFmkY$DtuS/OmsAS2cCEDo0BF5qQsizIrq6jPgXnwv3PHqREJeKd1sXdHX/ayQtuQWVDHe0KIO0/sVH8dvQm1KthF0d/" + +GROUPS += "isar" +GROUP_isar[flags] = "system" + +USERS += "isar" +USER_isar[gid] = "isar" +USER_isar[home] = "/var/lib/isar" +USER_isar[comment] = "My isar user" +USER_isar[flags] = "system create-home" +USER_isar[password] = "isar" +USER_isar[flags] += "clear-text-password" diff --git a/meta-isar/recipes-ci/images/isar-image-ci.bb b/meta-test/recipes-ci/images/isar-image-ci.bb similarity index 52% rename from meta-isar/recipes-ci/images/isar-image-ci.bb rename to meta-test/recipes-ci/images/isar-image-ci.bb index 77b1ef6e..93c7065b 100644 --- a/meta-isar/recipes-ci/images/isar-image-ci.bb +++ b/meta-test/recipes-ci/images/isar-image-ci.bb @@ -5,5 +5,10 @@ require recipes-core/images/isar-image-base.bb +FILESEXTRAPATHS:append = ":${LAYERDIR_isar}/recipes-core/images:" + +# Avoid ISAR_RELEASE_CMD warning in image.bbclass +ISAR_RELEASE_CMD = "git -C ${LAYERDIR_test} describe --tags --dirty --match 'v[0-9].[0-9]*'" + # Setup SSH server on board IMAGE_INSTALL += "isar-ci-ssh-setup" diff --git a/meta-isar/recipes-ci/isar-ci-ssh-setup/files/postinst b/meta-test/recipes-ci/isar-ci-ssh-setup/files/postinst similarity index 100% rename from meta-isar/recipes-ci/isar-ci-ssh-setup/files/postinst rename to meta-test/recipes-ci/isar-ci-ssh-setup/files/postinst diff --git a/meta-isar/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb b/meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb similarity index 100% rename from meta-isar/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb rename to meta-test/recipes-ci/isar-ci-ssh-setup/isar-ci-ssh-setup_0.1.bb diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py index a0c5711f..a03ff050 100755 --- a/testsuite/cibuilder.py +++ b/testsuite/cibuilder.py @@ -44,6 +44,7 @@ class CIBuilder(Test): self.error("Broken test implementation: init() called multiple times.") self.build_dir = os.path.join(isar_root, build_dir) os.chdir(isar_root) + os.environ["TEMPLATECONF"] = "meta-test/conf" path.usable_rw_dir(self.build_dir) output = process.getoutput('/bin/bash -c "source isar-init-build-env \ %s 2>&1 >/dev/null; env"' % self.build_dir) -- 2.20.1