forked from sig_core/toolkit
dnf4 is required for reposync
This commit is contained in:
parent
1470e590d3
commit
96f8877d1b
@ -9,6 +9,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/bin/dnf4 ]; then
|
||||||
|
SAFEDNF=/usr/bin/dnf4
|
||||||
|
else
|
||||||
|
SAFEDNF=/usr/bin/dnf
|
||||||
|
fi
|
||||||
|
|
||||||
export RLVER=$MAJOR
|
export RLVER=$MAJOR
|
||||||
source common
|
source common
|
||||||
|
|
||||||
@ -20,7 +26,7 @@ eln_repo_url="${ELN_KOJI_REPO}/${tag_template}/latest"
|
|||||||
|
|
||||||
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
||||||
for y in "${ARCH[@]}"; do
|
for y in "${ARCH[@]}"; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${tag_template},${eln_repo_url}/${y} --download-metadata --repoid=${tag_template} -p ${tag_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${tag_template},${eln_repo_url}/${y} --download-metadata --repoid=${tag_template} -p ${tag_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${tag_template}/${y}/repodata"
|
mkdir -p "${tag_template}/${y}/repodata"
|
||||||
pushd "${tag_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${tag_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
@ -9,6 +9,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/bin/dnf4 ]; then
|
||||||
|
SAFEDNF=/usr/bin/dnf4
|
||||||
|
else
|
||||||
|
SAFEDNF=/usr/bin/dnf
|
||||||
|
fi
|
||||||
|
|
||||||
export RLVER=$MAJOR
|
export RLVER=$MAJOR
|
||||||
source common
|
source common
|
||||||
|
|
||||||
@ -20,7 +26,7 @@ stream_repo_url="${STREAM_KOJI_REPO}/${tag_template}/latest"
|
|||||||
|
|
||||||
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
||||||
for y in "${ARCH[@]}"; do
|
for y in "${ARCH[@]}"; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${tag_template},${stream_repo_url}/${y} --download-metadata --repoid=${tag_template} -p ${tag_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${tag_template},${stream_repo_url}/${y} --download-metadata --repoid=${tag_template} -p ${tag_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${tag_template}/${y}/repodata"
|
mkdir -p "${tag_template}/${y}/repodata"
|
||||||
pushd "${tag_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${tag_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
@ -10,6 +10,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/bin/dnf4 ]; then
|
||||||
|
SAFEDNF=/usr/bin/dnf4
|
||||||
|
else
|
||||||
|
SAFEDNF=/usr/bin/dnf
|
||||||
|
fi
|
||||||
|
|
||||||
# Verify the date format
|
# Verify the date format
|
||||||
echo "${DATE}" | grep -Eq '[0-9]+\.[0-9]'
|
echo "${DATE}" | grep -Eq '[0-9]+\.[0-9]'
|
||||||
grep_val=$?
|
grep_val=$?
|
||||||
|
@ -9,6 +9,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/bin/dnf4 ]; then
|
||||||
|
SAFEDNF=/usr/bin/dnf4
|
||||||
|
else
|
||||||
|
SAFEDNF=/usr/bin/dnf
|
||||||
|
fi
|
||||||
|
|
||||||
export RLVER=$MAJOR
|
export RLVER=$MAJOR
|
||||||
source common
|
source common
|
||||||
|
|
||||||
|
@ -9,6 +9,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/bin/dnf4 ]; then
|
||||||
|
SAFEDNF=/usr/bin/dnf4
|
||||||
|
else
|
||||||
|
SAFEDNF=/usr/bin/dnf
|
||||||
|
fi
|
||||||
|
|
||||||
export RLVER=$MAJOR
|
export RLVER=$MAJOR
|
||||||
source common
|
source common
|
||||||
|
|
||||||
@ -21,7 +27,7 @@ stream_repo_url="https://kojidev.rockylinux.org/kojifiles/repos/${tag_template}/
|
|||||||
|
|
||||||
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
||||||
for y in x86_64 aarch64 i386; do
|
for y in x86_64 aarch64 i386; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${str_template},${stream_repo_url}/${y} --download-metadata --repoid=${str_template} -p ${str_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${str_template},${stream_repo_url}/${y} --download-metadata --repoid=${str_template} -p ${str_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${str_template}/${y}/repodata"
|
mkdir -p "${str_template}/${y}/repodata"
|
||||||
pushd "${str_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${str_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
@ -10,6 +10,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/bin/dnf4 ]; then
|
||||||
|
SAFEDNF=/usr/bin/dnf4
|
||||||
|
else
|
||||||
|
SAFEDNF=/usr/bin/dnf
|
||||||
|
fi
|
||||||
|
|
||||||
# Verify the date format
|
# Verify the date format
|
||||||
echo "${DATE}" | grep -Eq '[0-9]+\.[0-9]'
|
echo "${DATE}" | grep -Eq '[0-9]+\.[0-9]'
|
||||||
grep_val=$?
|
grep_val=$?
|
||||||
@ -31,7 +37,7 @@ pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
|||||||
for x in "${REPO[@]}"; do
|
for x in "${REPO[@]}"; do
|
||||||
echo "Working on ${x}"
|
echo "Working on ${x}"
|
||||||
for y in "${ARCH[@]}"; do
|
for y in "${ARCH[@]}"; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${x},${stream_compose_url}/${x}/${y}/os --download-metadata --repoid=${x} -p ${x}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${x},${stream_compose_url}/${x}/${y}/os --download-metadata --repoid=${x} -p ${x}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${x}/${y}/repodata"
|
mkdir -p "${x}/${y}/repodata"
|
||||||
pushd "${x}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${x}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
@ -10,6 +10,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /usr/bin/dnf4 ]; then
|
||||||
|
SAFEDNF=/usr/bin/dnf4
|
||||||
|
else
|
||||||
|
SAFEDNF=/usr/bin/dnf
|
||||||
|
fi
|
||||||
|
|
||||||
# Verify the date format
|
# Verify the date format
|
||||||
echo "${DATE}" | grep -Eq '[0-9]+\.[0-9]'
|
echo "${DATE}" | grep -Eq '[0-9]+\.[0-9]'
|
||||||
grep_val=$?
|
grep_val=$?
|
||||||
@ -27,11 +33,17 @@ current=$(pwd)
|
|||||||
tmpdir=$(mktemp -d)
|
tmpdir=$(mktemp -d)
|
||||||
stream_compose_url="https://composes.stream.centos.org/stream-${MAJOR}/production/CentOS-Stream-${MAJOR}-${DATE}/compose"
|
stream_compose_url="https://composes.stream.centos.org/stream-${MAJOR}/production/CentOS-Stream-${MAJOR}-${DATE}/compose"
|
||||||
|
|
||||||
|
if [ -f /usr/bin/dnf4 ]; then
|
||||||
|
SAFEDNF=/usr/bin/dnf4
|
||||||
|
else
|
||||||
|
SAFEDNF=/usr/bin/dnf
|
||||||
|
fi
|
||||||
|
|
||||||
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
||||||
for x in "${REPO[@]}"; do
|
for x in "${REPO[@]}"; do
|
||||||
echo "Working on ${x}"
|
echo "Working on ${x}"
|
||||||
for y in "${ARCH[@]}"; do
|
for y in "${ARCH[@]}"; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${x},${stream_compose_url}/${x}/${y}/os --download-metadata --repoid=${x} -p ${x}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${x},${stream_compose_url}/${x}/${y}/os --download-metadata --repoid=${x} -p ${x}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${x}/${y}/repodata"
|
mkdir -p "${x}/${y}/repodata"
|
||||||
pushd "${x}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${x}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
@ -20,7 +20,7 @@ stream_repo_url="${STREAM_KOJI_REPO}/${tag_template}/latest"
|
|||||||
|
|
||||||
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
||||||
for y in "${ARCH[@]}"; do
|
for y in "${ARCH[@]}"; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${tag_template},${stream_repo_url}/${y} --download-metadata --repoid=${tag_template} -p ${tag_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${tag_template},${stream_repo_url}/${y} --download-metadata --repoid=${tag_template} -p ${tag_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${tag_template}/${y}/repodata"
|
mkdir -p "${tag_template}/${y}/repodata"
|
||||||
pushd "${tag_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${tag_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
@ -24,7 +24,7 @@ peridot_repo_url="${PERIDOT_REPO}/${PERIDOT_PROJECT_ID}/repo/${tag_template}"
|
|||||||
|
|
||||||
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
||||||
for y in "${ARCH[@]}"; do
|
for y in "${ARCH[@]}"; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${tag_template},${peridot_repo_url}/${y} --download-metadata --repoid=${tag_template} -p ${tag_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${tag_template},${peridot_repo_url}/${y} --download-metadata --repoid=${tag_template} -p ${tag_template}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${tag_template}/${y}/repodata"
|
mkdir -p "${tag_template}/${y}/repodata"
|
||||||
pushd "${tag_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${tag_template}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
@ -30,7 +30,7 @@ pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
|||||||
for x in "${REPO[@]}"; do
|
for x in "${REPO[@]}"; do
|
||||||
echo "Working on ${x}"
|
echo "Working on ${x}"
|
||||||
for y in "${ARCH[@]}"; do
|
for y in "${ARCH[@]}"; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${x},${stream_compose_url}/${x}/${y}/os --download-metadata --repoid=${x} -p ${x}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${x},${stream_compose_url}/${x}/${y}/os --download-metadata --repoid=${x} -p ${x}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${x}/${y}/repodata"
|
mkdir -p "${x}/${y}/repodata"
|
||||||
pushd "${x}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${x}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
@ -31,7 +31,7 @@ pushd "${tmpdir}" || { echo "Could not change directory"; exit 1; }
|
|||||||
for x in "${REPO[@]}"; do
|
for x in "${REPO[@]}"; do
|
||||||
echo "Working on ${x}"
|
echo "Working on ${x}"
|
||||||
for y in "${ARCH[@]}"; do
|
for y in "${ARCH[@]}"; do
|
||||||
repodatas=( $(dnf reposync --repofrompath ${x},${stream_compose_url}/${x}/${y}/os --download-metadata --repoid=${x} -p ${x}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
repodatas=( $($SAFEDNF reposync --repofrompath ${x},${stream_compose_url}/${x}/${y}/os --download-metadata --repoid=${x} -p ${x}/${y} --forcearch ${y} --norepopath --remote-time --assumeyes -u | grep repodata) )
|
||||||
mkdir -p "${x}/${y}/repodata"
|
mkdir -p "${x}/${y}/repodata"
|
||||||
pushd "${x}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
pushd "${x}/${y}/repodata" || { echo "Could not change directory"; exit 1; }
|
||||||
for z in "${repodatas[@]}"; do
|
for z in "${repodatas[@]}"; do
|
||||||
|
Loading…
Reference in New Issue
Block a user