Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils: fix reposync script #730

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions utils/reposync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ sync_repo() {
local repo_link="${1:?}"
local repo_id="${2:?}"
local local_repo_id="${3:?}"
local release_ver="${4:?}"
local arches gpg_key_url gpg_key_name

IFS=" " read -ra arches <<<"${4:?}"
IFS=" " read -ra arches <<<"${5:?}"

rm -f repo-config.repo
curl -s -o repo-config.repo "$repo_link"
Expand All @@ -36,8 +37,9 @@ sync_repo() {
for arch in "${arches[@]}"; do
# Make a local copy of the original repository packages
dnf reposync --norepopath --newest-only --download-metadata \
--arch "${arch},noarch" --forcearch "$arch" \
--arch="${arch},noarch" --forcearch="$arch" \
--config="repo-config.repo" --repoid="$repo_id" \
--releasever="$release_ver" \
--download-path="$DOWNLOAD_LOCATION/$local_repo_id/$arch"
done

Expand All @@ -63,17 +65,17 @@ EOF
ORIGINAL_REPO="https://copr.fedorainfracloud.org/coprs/mrc0mmand/systemd-centos-ci-centos8/repo/centos-stream-8/mrc0mmand-systemd-centos-ci-centos8-centos-stream-8.repo"
ORIGINAL_REPO_ID="copr:copr.fedorainfracloud.org:mrc0mmand:systemd-centos-ci-centos8"
LOCAL_REPO_ID="mrc0mmand-systemd-centos-ci-centos8-stream8"
sync_repo "$ORIGINAL_REPO" "$ORIGINAL_REPO_ID" "$LOCAL_REPO_ID" "x86_64 aarch64 ppc64le"
sync_repo "$ORIGINAL_REPO" "$ORIGINAL_REPO_ID" "$LOCAL_REPO_ID" 8 "x86_64 aarch64 ppc64le"

# centos-9-stream
ORIGINAL_REPO="https://copr.fedorainfracloud.org/coprs/mrc0mmand/systemd-centos-ci-centos9/repo/centos-stream-9/mrc0mmand-systemd-centos-ci-centos9-centos-stream-9.repo"
ORIGINAL_REPO_ID="copr:copr.fedorainfracloud.org:mrc0mmand:systemd-centos-ci-centos9"
LOCAL_REPO_ID="mrc0mmand-systemd-centos-ci-centos9-stream9"
sync_repo "$ORIGINAL_REPO" "$ORIGINAL_REPO_ID" "$LOCAL_REPO_ID" "x86_64 aarch64 ppc64le s390x"
sync_repo "$ORIGINAL_REPO" "$ORIGINAL_REPO_ID" "$LOCAL_REPO_ID" 9 "x86_64 aarch64 ppc64le s390x"

# centos-9-stream patched kernel (temporary)
# FIXME: drop once https://issues.redhat.com/browse/RHEL-32384 is resolved
ORIGINAL_REPO="https://copr.fedorainfracloud.org/coprs/mrc0mmand/c9s-kernel-debug/repo/centos-stream-9/mrc0mmand-c9s-kernel-debug-centos-stream-9.repo"
ORIGINAL_REPO_ID="copr:copr.fedorainfracloud.org:mrc0mmand:c9s-kernel-debug"
LOCAL_REPO_ID="mrc0mmand-c9s-kernel-debug-stream9"
sync_repo "$ORIGINAL_REPO" "$ORIGINAL_REPO_ID" "$LOCAL_REPO_ID" "x86_64"
sync_repo "$ORIGINAL_REPO" "$ORIGINAL_REPO_ID" "$LOCAL_REPO_ID" 9 "x86_64"
Loading