diff --git a/contrib/packit-tmt/dnf-repo-setup.sh b/contrib/packit-tmt/dnf-repo-setup.sh new file mode 100644 index 0000000000..dc2d14dc95 --- /dev/null +++ b/contrib/packit-tmt/dnf-repo-setup.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -exo pipefail + +# This should work even when podman-next isn't installed. It'll fetch the +# highest versions available across all repos. +dnf -y upgrade --allowerasing --disable-repo=testing-farm-tag-repository --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/contrib/packit-tmt/podman-next-setup.sh b/contrib/packit-tmt/podman-next-setup.sh deleted file mode 100644 index ccfe8bf089..0000000000 --- a/contrib/packit-tmt/podman-next-setup.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/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 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+: