From c561d316de5593564ce2b00078015de91a553a1e Mon Sep 17 00:00:00 2001 From: nazunalika Date: Wed, 10 Nov 2021 12:26:09 -0700 Subject: [PATCH] minor changes --- sync/minor-release-sync-to-staging.sh | 46 +++++++++++++++++---------- sync/stage-live-images.sh | 27 ++++++++++++++++ 2 files changed, 57 insertions(+), 16 deletions(-) create mode 100644 sync/stage-live-images.sh diff --git a/sync/minor-release-sync-to-staging.sh b/sync/minor-release-sync-to-staging.sh index 66c5f39..0571245 100644 --- a/sync/minor-release-sync-to-staging.sh +++ b/sync/minor-release-sync-to-staging.sh @@ -10,6 +10,7 @@ MAJ=${RLVER} # sync all pieces of a release, including extras, nfv, etc for COMPOSE in Rocky "${NONMODS_REPOS[@]}"; do + echo "${COMPOSE}: Syncing" cd "/mnt/compose/${MAJ}/latest-${COMPOSE}-${MAJ}/compose" || { echo "${COMPOSE}: Failed to change directory"; break; } TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" @@ -22,27 +23,36 @@ for COMPOSE in Rocky "${NONMODS_REPOS[@]}"; do 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 +# Disabled as we will have a different method for sig content and sig content +# is available upstream. +#for SIG in "${!SIG_COMPOSE[@]}"; do +# echo "${SIG}: Syncing" +# 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 + # who knows if EL10 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}" + echo "${x} ${ARCH}: Copying ISO images" + # Hardcoding this for now + SOURCE="/mnt/compose/${MAJ}/latest-Rocky-${MAJ}/compose/${x}/${ARCH}/iso" + TARGET_ARCH="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/${x}/${ARCH}/iso" + mkdir -p "${SOURCE}" "${TARGET}" "${TARGET_ARCH}" + # Copy the ISO and manifests into their target architecture + cp "${SOURCE}/*.iso*" "${TARGET_ARCH}/" + cp "${SOURCE}/CHECKSUM" "${TARGET_ARCH}/" + # Copy the ISO and manifests into the main isos target + cp "${SOURCE}/*.iso*" "${TARGET}/" cat "${SOURCE}/CHECKSUM" >> "${TARGET}/CHECKSUM" done done @@ -52,16 +62,19 @@ for ARCH in "${ARCHES[@]}"; do for REPO in "${MODS_REPOS[@]}"; do SOURCE="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/${REPO}/${ARCH}/os" TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/${REPO}/${ARCH}/kickstart" + echo "Making golden kickstart directory" cp -na "${SOURCE}" "${TARGET}" done done # fix treeinfo for ARCH in "${ARCHES[@]}"; do + echo "Ensuring treeinfo is correct" treeinfoModder "${ARCH}" done # sign all repos +echo "Signing all repositories" test -f $(dirname "$0")/sign-repos-only.sh ret_val=$? @@ -70,5 +83,6 @@ if [ "$ret_val" -eq 0 ]; then fi # Change Symlink if required +echo "Setting symlink to ${REV}" /bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/latest-8" ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" latest-8 diff --git a/sync/stage-live-images.sh b/sync/stage-live-images.sh new file mode 100644 index 0000000..bab5a9c --- /dev/null +++ b/sync/stage-live-images.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Source common variables +# shellcheck disable=SC2046,1091,1090 +source "$(dirname "$0")/common" + +if [[ $# -eq 0 ]]; then + echo "You must specify a short name." + exit 1 +fi + +# Major Version (eg, 8) +MAJ=${RLVER} +# For now, only architecture that we support live is x86_64 +TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/Live/x86_64" +mkdir -p "${TARGET}" + +cat > "${TARGET}/README" <