2021-07-06 19:24:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Performs a full on sync of a minor release, directories and all. It calls the
|
2021-07-12 06:58:08 +00:00
|
|
|
# other scripts in this directory to assist where necessary.
|
2021-07-06 19:24:29 +00:00
|
|
|
# Source common variables
|
2021-07-06 20:33:22 +00:00
|
|
|
# shellcheck disable=SC2046,1091,1090
|
2021-07-06 21:34:26 +00:00
|
|
|
source $(dirname "$0")/common
|
2021-07-06 19:24:29 +00:00
|
|
|
|
2021-07-12 06:58:08 +00:00
|
|
|
# Major Version (eg, 8)
|
|
|
|
MAJ=${RLVER}
|
|
|
|
|
2021-07-06 19:24:29 +00:00
|
|
|
# sync all pieces of a release, including extras, nfv, etc
|
2021-07-12 06:58:08 +00:00
|
|
|
for COMPOSE in Rocky "${NONMODS_REPOS[@]}"; do
|
|
|
|
cd "/mnt/compose/${MAJ}/latest-${COMPOSE}-${MAJ}/compose" || { echo "${COMPOSE}: Failed to change directory"; break; }
|
|
|
|
|
|
|
|
TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}"
|
|
|
|
mkdir -p "${TARGET}"
|
|
|
|
# disabling because none of our files should be starting with dashes. If they
|
|
|
|
# are something is *seriously* wrong here.
|
|
|
|
# shellcheck disable=SC2035
|
|
|
|
sudo -l && find **/* -maxdepth 0 -type d | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable \
|
|
|
|
{} "${TARGET}"
|
|
|
|
done
|
|
|
|
|
|
|
|
# sync all sig stuff
|
|
|
|
for SIG in "${!SIG_COMPOSE[@]}"; do
|
|
|
|
cd "/mnt/compose/${MAJ}/latest-${SIG}-${MAJ}/compose" || { echo "${COMPOSE}: Failed to change directory"; break; }
|
|
|
|
|
|
|
|
TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/${SIG_COMPOSE[$SIG]}"
|
|
|
|
mkdir -p "${TARGET}"
|
|
|
|
# disabling because none of our files should be starting with dashes. If they
|
|
|
|
# are something is *seriously* wrong here.
|
|
|
|
# shellcheck disable=SC2035
|
|
|
|
sudo -l && find **/* -maxdepth 0 -type d | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable \
|
|
|
|
{} "${TARGET}"
|
|
|
|
done
|
|
|
|
|
|
|
|
# copy around the ISOs a bit, make things comfortable
|
|
|
|
for ARCH in "${ARCHES[@]}"; do
|
|
|
|
TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/isos/${ARCH}"
|
|
|
|
# who knows if EL9 will change the name of baseos
|
|
|
|
for x in BaseOS Minimal; do
|
|
|
|
SOURCE="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/${x}/${ARCH}/iso"
|
|
|
|
mkdir -p "${TARGET}"
|
|
|
|
cp "${SOURCE}/*.iso" "${TARGET}"
|
|
|
|
cp "${SOURCE}/*.iso.manifest" "${TARGET}"
|
|
|
|
cat "${SOURCE}/CHECKSUM" >> "${TARGET}/CHECKSUM"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
# sign all repos
|
|
|
|
test -f $(dirname "$0")/sign-repos-only.sh
|
|
|
|
ret_val=$?
|
2021-07-06 19:24:29 +00:00
|
|
|
|
2021-07-12 06:58:08 +00:00
|
|
|
if [ "$ret_val" -eq 0 ]; then
|
|
|
|
$(dirname "$0")/sign-repos-only.sh
|
|
|
|
fi
|