mirror of
https://github.com/containers/podman.git
synced 2025-11-28 09:09:44 +08:00
Packit: Disable testing-farm dnf repo
This will fetch latest dependencies from podman-next while using podman from the packit copr builds. 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 <lsm5@redhat.com>
This commit is contained in:
7
contrib/packit-tmt/dnf-repo-setup.sh
Normal file
7
contrib/packit-tmt/dnf-repo-setup.sh
Normal file
@@ -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*
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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*
|
||||
@@ -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
|
||||
|
||||
@@ -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+:
|
||||
|
||||
Reference in New Issue
Block a user