From 04b8dd76bddbedf0be321f11cd12d07a2c7bc358 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 21 Mar 2025 16:30:12 +0100 Subject: [PATCH 1/2] mkosi: update fedora commit reference * 2ecfbec1a4 Support specifying extra mkosi repositories to the test script * f5b47b1302 Use old setup sysusers files on Fedora < 43 * 2da5793357 Merge #196 `Migrate fmf metadata and test script from the upstream repository` * e346d9f33e Limit sdubby dependency to Fedora --- mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.conf b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.conf index 99554ab8e8..785a46d389 100644 --- a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.conf +++ b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.conf @@ -8,7 +8,7 @@ Distribution=|fedora Environment= GIT_URL=https://src.fedoraproject.org/rpms/systemd.git GIT_BRANCH=rawhide - GIT_COMMIT=38b41a729ea836133d7e53a4c0cc8e5fee7e2b8a + GIT_COMMIT=2ecfbec1a444a2ec9e3dab91d04565330cf809ea PKG_SUBDIR=fedora [Content] From 4d938fa865c52c9c327e1b2b45548031ae8e058c Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 21 Mar 2025 15:13:22 +0100 Subject: [PATCH 2/2] packit: Load fmf metadata from rpm spec repository Maintaining the fmf metadata and script upstream makes it painful to reuse downstream so let's move the metadata and testing script downstream and load it upstream instead. --- .packit.yml | 15 +++- test/fmf/.fmf/version | 1 - test/fmf/integration-tests/main.fmf | 13 ---- test/fmf/integration-tests/test.sh | 109 ---------------------------- test/fmf/plans/ci.fmf | 12 --- tools/fetch-distro.py | 16 +++- 6 files changed, 25 insertions(+), 141 deletions(-) delete mode 100644 test/fmf/.fmf/version delete mode 100644 test/fmf/integration-tests/main.fmf delete mode 100755 test/fmf/integration-tests/test.sh delete mode 100644 test/fmf/plans/ci.fmf diff --git a/.packit.yml b/.packit.yml index 9111c0e07a..8989fd4311 100644 --- a/.packit.yml +++ b/.packit.yml @@ -37,8 +37,17 @@ jobs: - job: tests trigger: pull_request - fmf_path: test/fmf - tmt_plan: ci - use_target_repo_for_fmf_url: true + fmf_url: https://src.fedoraproject.org/rpms/systemd + # This is automatically updated by tools/fetch-distro.py --update fedora + fmf_ref: 2ecfbec1a444a2ec9e3dab91d04565330cf809ea targets: - fedora-rawhide-x86_64 + # testing-farm in the Fedora repository is explicitly configured to use testing-farm bare metal runners as + # the volume of pull requests there is very low. Upstream the volume of pull requests is much higher and + # we'll bottleneck ourselves if we insist on bare metal runners, so explicitly do not request support for + # nested virtualization so we don't only consider bare metal runners. + tf_extra_params: + environments: + - hardware: + virtualization: + is-supported: false diff --git a/test/fmf/.fmf/version b/test/fmf/.fmf/version deleted file mode 100644 index d00491fd7e..0000000000 --- a/test/fmf/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test/fmf/integration-tests/main.fmf b/test/fmf/integration-tests/main.fmf deleted file mode 100644 index e7a38d3c00..0000000000 --- a/test/fmf/integration-tests/main.fmf +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later - -summary: Run the upstream integration test suite -test: ./test.sh -duration: 2h -require: - - coreutils - - distribution-gpg-keys - - dnf - - git-core - - koji - - centos-packager - - copr-cli diff --git a/test/fmf/integration-tests/test.sh b/test/fmf/integration-tests/test.sh deleted file mode 100755 index 447ab30bf9..0000000000 --- a/test/fmf/integration-tests/test.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1-or-later - -set -eux -set -o pipefail - -# Switch SELinux to permissive if possible, since the tests don't set proper contexts -setenforce 0 || true - -echo "CPU and Memory information:" -lscpu -lsmem - -echo "Clock source: $(cat /sys/devices/system/clocksource/clocksource0/current_clocksource)" - -# Bump inotify limits if we can so nspawn containers don't run out of inotify file descriptors. -sysctl fs.inotify.max_user_watches=65536 || true -sysctl fs.inotify.max_user_instances=1024 || true - -if [[ -n "${KOJI_TASK_ID:-}" ]]; then - koji download-task --noprogress --arch="src,noarch,$(rpm --eval '%{_arch}')" "$KOJI_TASK_ID" -elif [[ -n "${CBS_TASK_ID:-}" ]]; then - cbs download-task --noprogress --arch="src,noarch,$(rpm --eval '%{_arch}')" "$CBS_TASK_ID" -elif [[ -n "${PACKIT_SRPM_URL:-}" ]]; then - COPR_BUILD_ID="$(basename "$(dirname "$PACKIT_SRPM_URL")")" - COPR_CHROOT="$(basename "$(dirname "$(dirname "$PACKIT_BUILD_LOG_URL")")")" - copr download-build --rpms --chroot "$COPR_CHROOT" "$COPR_BUILD_ID" - mv "$COPR_CHROOT"/* . -else - echo "Not running within packit and no CBS/koji task ID provided" - exit 1 -fi - -mkdir systemd -rpm2cpio ./systemd-*.src.rpm | cpio --to-stdout --extract './systemd-*.tar.gz' | tar xz --strip-components=1 -C systemd -pushd systemd - -# Now prepare mkosi at the same version required by the systemd repo. -git clone https://github.com/systemd/mkosi -mkosi_hash="$(grep systemd/mkosi@ .github/workflows/mkosi.yml | sed "s|.*systemd/mkosi@||g")" -git -C mkosi checkout "$mkosi_hash" - -export PATH="$PWD/mkosi/bin:$PATH" - -# shellcheck source=/dev/null -. /etc/os-release || . /usr/lib/os-release - -tee mkosi.local.conf <