diff --git a/contrib/packit-tmt/dnf-repo-setup.sh b/contrib/packit-tmt/dnf-repo-setup.sh new file mode 100644 index 0000000000..2165f71809 --- /dev/null +++ b/contrib/packit-tmt/dnf-repo-setup.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -exo pipefail + +# Farm tag repo is set at higher priority, conflicting with podman-next +sed -i '/^priority/d' /etc/yum.repos.d/tag-repository.repo + +# This should work even when podman-next isn't installed. It'll fetch the +# highest versions available across all repos. +dnf -y upgrade --allowerasing --exclude=podman* diff --git a/contrib/packit-tmt/packit-copr-rpm.sh b/contrib/packit-tmt/packit-copr-rpm.sh index ace24b916a..ba209836a1 100644 --- a/contrib/packit-tmt/packit-copr-rpm.sh +++ b/contrib/packit-tmt/packit-copr-rpm.sh @@ -6,9 +6,9 @@ set -exo pipefail -TOP_GIT_DIR=$(git rev-parse --show-toplevel) +GIT_TOPDIR=$(git rev-parse --show-toplevel) -. "$TOP_GIT_DIR"/contrib/packit-tmt/packit-rpm-git-commit.sh +. "$GIT_TOPDIR"/contrib/packit-tmt/packit-rpm-git-commit.sh # Get Version from HEAD VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2) @@ -18,7 +18,7 @@ VERSION=$(grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2) RPM_VERSION=$(echo "$VERSION" | sed -e 's/-/~/') # Generate source tarball from HEAD -git-archive-all -C "$TOP_GIT_DIR" --prefix="$PACKAGE-$VERSION/" "$TOP_GIT_DIR/rpm/$PACKAGE-$VERSION.tar.gz" +git-archive-all -C "$GIT_TOPDIR" --prefix="$PACKAGE-$VERSION/" "$GIT_TOPDIR/rpm/$PACKAGE-$VERSION.tar.gz" # RPM Spec modifications diff --git a/plans/cockpit-podman.fmf b/plans/cockpit-podman.fmf index 15f5a54897..6b752a50f8 100644 --- a/plans/cockpit-podman.fmf +++ b/plans/cockpit-podman.fmf @@ -18,7 +18,7 @@ execute: prepare: when: initiator == packit how: shell - script: bash $TMT_TREE/contrib/packit-tmt/podman-next-setup.sh + script: bash $TMT_TREE/contrib/packit-tmt/dnf-repo-setup.sh order: 20 # not relevant for testing podman diff --git a/plans/system.fmf b/plans/system.fmf index 63d9ad81b4..24f774d5d3 100644 --- a/plans/system.fmf +++ b/plans/system.fmf @@ -16,7 +16,7 @@ prepare: order: 10 - when: initiator == packit how: shell - script: bash $TMT_TREE/contrib/packit-tmt/podman-next-setup.sh + script: bash $TMT_TREE/contrib/packit-tmt/dnf-repo-setup.sh order: 20 adjust+: