Merge "centos-mirror-update: handle non-x86 architectures"
This commit is contained in:
commit
8b98aff89c
@ -24,28 +24,50 @@ fi
|
|||||||
|
|
||||||
BASE="/afs/.openstack.org/mirror/centos"
|
BASE="/afs/.openstack.org/mirror/centos"
|
||||||
MIRROR="rsync://mirror.lstn.net"
|
MIRROR="rsync://mirror.lstn.net"
|
||||||
|
MIRROR_ALTARCH="rsync://mirror.freethought-internet.co.uk/centos-altarch/"
|
||||||
K5START="k5start -t -f /etc/centos.keytab service/centos-mirror -- $TIMEOUT"
|
K5START="k5start -t -f /etc/centos.keytab service/centos-mirror -- $TIMEOUT"
|
||||||
|
|
||||||
REPO=7
|
REPOS="7 altarch/7"
|
||||||
if ! [ -f $BASE/$REPO ]; then
|
ALTARCHS="aarch64 ppc64le"
|
||||||
$K5START mkdir -p $BASE/$REPO
|
ALTARCHS_IGNORED="armhfp i386 power9 ppc64 x86_64" # altarch/kernel/ has x86_64 dir we do not want
|
||||||
fi
|
|
||||||
|
|
||||||
date --iso-8601=ns
|
for REPO in $REPOS; do
|
||||||
echo "Running rsync..."
|
if ! [ -f $BASE/$REPO ]; then
|
||||||
$K5START rsync -rlptDvz \
|
$K5START mkdir -p $BASE/$REPO
|
||||||
|
fi
|
||||||
|
|
||||||
|
MIRROR_PATH=$MIRROR/$REPO/
|
||||||
|
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
|
||||||
|
echo "Running rsync..."
|
||||||
|
$K5START rsync -rptDvz \
|
||||||
--delete \
|
--delete \
|
||||||
--delete-excluded \
|
--delete-excluded \
|
||||||
--exclude="atomic" \
|
--exclude="atomic" \
|
||||||
--exclude="centosplus" \
|
--exclude="centosplus" \
|
||||||
|
--exclude="experimental" \
|
||||||
--exclude="fasttrack" \
|
--exclude="fasttrack" \
|
||||||
--exclude="isos" \
|
--exclude="isos" \
|
||||||
--exclude="paas" \
|
--exclude="paas" \
|
||||||
--exclude="sclo" \
|
--exclude="sclo" \
|
||||||
--exclude="x86_64/drpms" \
|
--exclude="*/drpms" \
|
||||||
$MIRROR/centos/$REPO/ $BASE/$REPO/
|
$EXTRA_OPTS \
|
||||||
|
$MIRROR_PATH $BASE/$REPO/
|
||||||
|
|
||||||
# TODO(pabelanger): Validate rsync process
|
# TODO(pabelanger): Validate rsync process
|
||||||
|
done
|
||||||
|
|
||||||
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
|
date --iso-8601=ns | $K5START tee $BASE/timestamp.txt
|
||||||
echo "rsync completed successfully, running vos release."
|
echo "rsync completed successfully, running vos release."
|
||||||
|
Loading…
Reference in New Issue
Block a user