Cleanup CentOS mirroring
We don't have CentOS 7 arm64 test instances so we remove the aarch64 packages for CentOS 7. Additionally we remove unneeded source and alternative arch packages from Epel for CentOS 7 and 8. Change-Id: I8b5c6906c2ce698a02b794e635e8f8ba613c0fef
This commit is contained in:
parent
795a509138
commit
43ab1db9cc
@ -37,7 +37,7 @@ K5START="k5start -t -f /etc/centos.keytab service/centos-mirror -- $TIMEOUT"
|
|||||||
|
|
||||||
if [[ ${DRY_RUN:-0} -ne 1 ]]; then
|
if [[ ${DRY_RUN:-0} -ne 1 ]]; then
|
||||||
# Cleanup old repos
|
# Cleanup old repos
|
||||||
for REPO in 8 ; do
|
for REPO in 8 altarch ; do
|
||||||
if [ -d $BASE/$REPO/ ]; then
|
if [ -d $BASE/$REPO/ ]; then
|
||||||
$K5START rm -rf $BASE/$REPO/
|
$K5START rm -rf $BASE/$REPO/
|
||||||
fi
|
fi
|
||||||
@ -68,10 +68,7 @@ $K5START ${RSYNC} \
|
|||||||
#
|
#
|
||||||
|
|
||||||
MIRROR="rsync://mirrors.kernel.org/centos"
|
MIRROR="rsync://mirrors.kernel.org/centos"
|
||||||
MIRROR_ALTARCH="rsync://mirror.dal.nexril.net/centos-altarch/"
|
REPOS="7"
|
||||||
REPOS="7 altarch/7"
|
|
||||||
ALTARCHS="aarch64"
|
|
||||||
ALTARCHS_IGNORED="armhfp i386 power9 ppc64 ppc64le x86_64" # altarch/kernel/ has x86_64 dir we do not want
|
|
||||||
|
|
||||||
for REPO in $REPOS; do
|
for REPO in $REPOS; do
|
||||||
if ! [ -f $BASE/$REPO ]; then
|
if ! [ -f $BASE/$REPO ]; then
|
||||||
@ -80,17 +77,6 @@ for REPO in $REPOS; do
|
|||||||
|
|
||||||
MIRROR_PATH=$MIRROR/$REPO/
|
MIRROR_PATH=$MIRROR/$REPO/
|
||||||
EXTRA_OPTS="--links" # -l
|
EXTRA_OPTS="--links" # -l
|
||||||
if [[ $REPO == "altarch"* ]]; then
|
|
||||||
MIRROR_PATH=$MIRROR_ALTARCH/7/
|
|
||||||
EXTRA_OPTS="--copy-links" # copy because altarch has symlinks to ../7.6.1810/
|
|
||||||
|
|
||||||
for arch in $ALTARCHS_IGNORED; do
|
|
||||||
EXTRA_OPTS="$EXTRA_OPTS --exclude=$arch"
|
|
||||||
done
|
|
||||||
for arch in $ALTARCHS; do
|
|
||||||
EXTRA_OPTS="$EXTRA_OPTS --include *.${arch}.rpm"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
date --iso-8601=ns
|
date --iso-8601=ns
|
||||||
echo "Running rsync..."
|
echo "Running rsync..."
|
||||||
|
@ -46,8 +46,10 @@ $K5START rsync -rltvz \
|
|||||||
--delete \
|
--delete \
|
||||||
--delete-excluded \
|
--delete-excluded \
|
||||||
--exclude="SRPMS" \
|
--exclude="SRPMS" \
|
||||||
|
--exclude="source" \
|
||||||
--exclude="ppc64" \
|
--exclude="ppc64" \
|
||||||
--exclude="ppc64le" \
|
--exclude="ppc64le" \
|
||||||
|
--exclude="aarch64" \
|
||||||
--exclude="x86_64/debug" \
|
--exclude="x86_64/debug" \
|
||||||
--exclude="x86_64/repoview" \
|
--exclude="x86_64/repoview" \
|
||||||
$MIRROR/$REPO/ $BASE/$REPO/
|
$MIRROR/$REPO/ $BASE/$REPO/
|
||||||
@ -79,6 +81,10 @@ $K5START rsync -rltvz --no-perms \
|
|||||||
--exclude="Everything/source" \
|
--exclude="Everything/source" \
|
||||||
--exclude="Everything/ppc64le" \
|
--exclude="Everything/ppc64le" \
|
||||||
--exclude="Everything/s390x" \
|
--exclude="Everything/s390x" \
|
||||||
|
--exclude="Modular/SRPMS" \
|
||||||
|
--exclude="Modular/source" \
|
||||||
|
--exclude="Modular/ppc64le" \
|
||||||
|
--exclude="Modular/s390x" \
|
||||||
--exclude="Everything/*/debug" \
|
--exclude="Everything/*/debug" \
|
||||||
$MIRROR/$REPO/ $BASE/$REPO/
|
$MIRROR/$REPO/ $BASE/$REPO/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user