From 07e4b253c6605ece55c565af9096494ef6769c18 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Wed, 12 Nov 2025 09:19:48 -0500 Subject: [PATCH] Packit: Bump podman-next repo priority for cockpit tests TMT_TREE envvar is ok to use in this case as it will only be used on upstream packit tests. Signed-off-by: Lokesh Mandvekar --- contrib/packit-tmt/podman-next-setup.sh | 14 ++++++++++++++ plans/cockpit-podman.fmf | 6 ++++++ plans/system.fmf | 7 +------ 3 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 contrib/packit-tmt/podman-next-setup.sh diff --git a/contrib/packit-tmt/podman-next-setup.sh b/contrib/packit-tmt/podman-next-setup.sh new file mode 100644 index 0000000000..ccfe8bf089 --- /dev/null +++ b/contrib/packit-tmt/podman-next-setup.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -exo pipefail + +COPR_REPO_FILE="/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:rhcontainerbot:podman-next.repo" +if compgen -G "$COPR_REPO_FILE" > /dev/null; then + # We want the priority bump appended to the file, we're not looking + # to use a variable. + # shellcheck disable=SC2016 + sed -i -n '/^priority=/!p;$apriority=1' "$COPR_REPO_FILE" +fi +# We want all dependencies from podman-next except podman as podman will be fetched +# from the packit copr. +dnf -y upgrade --allowerasing --exclude=podman* diff --git a/plans/cockpit-podman.fmf b/plans/cockpit-podman.fmf index 94854701c5..15f5a54897 100644 --- a/plans/cockpit-podman.fmf +++ b/plans/cockpit-podman.fmf @@ -15,6 +15,12 @@ discover: execute: how: tmt +prepare: + when: initiator == packit + how: shell + script: bash $TMT_TREE/contrib/packit-tmt/podman-next-setup.sh + order: 20 + # not relevant for testing podman environment: TEST_AUDIT_NO_SELINUX: 1 diff --git a/plans/system.fmf b/plans/system.fmf index 6401ff757a..63d9ad81b4 100644 --- a/plans/system.fmf +++ b/plans/system.fmf @@ -16,12 +16,7 @@ prepare: order: 10 - when: initiator == packit how: shell - script: | - COPR_REPO_FILE="/etc/yum.repos.d/*podman-next*.repo" - if compgen -G $COPR_REPO_FILE > /dev/null; then - sed -i -n '/^priority=/!p;$apriority=1' $COPR_REPO_FILE - fi - dnf -y upgrade --allowerasing --exclude=podman* + script: bash $TMT_TREE/contrib/packit-tmt/podman-next-setup.sh order: 20 adjust+: