@@ -10,7 +10,7 @@ source $(dirname "$0")/common
1010# Major Version (eg, 8)
1111MAJ=${RLVER}
1212
13- if [ " ${MAJ} " == " 9" ]; then
13+ if [ " ${MAJ} " -eq " 9" ]; then
1414 echo " Does not work for Rocky Linux 9. Please use sync-to-staging"
1515 exit 32
1616fi
@@ -23,21 +23,22 @@ for COMPOSE in "${NONSIG_COMPOSE[@]}"; do
2323
2424 if [[ " ${COMPOSE} " == " Rocky" ]]; then
2525 # ISO Work before syncing
26- mkdir -p isos/{x86_64,aarch64}
26+ for ARCH in " ${ARCHES[@]} " ; do
27+ mkdir -p " isos/${ARCH} "
28+ done
2729
2830 # Sort the ISO's
2931 for ARCH in " ${ARCHES[@]} " ; do
30- for x in BaseOS Minimal; do
32+ for x in " ${ISO_TYPES[@]} " ; do
33+ # # Check if the ISO even exists, if not skip
34+ # # this is done using "continue" in a for loop
3135 echo " ${x} ${ARCH} : Moving ISO images"
3236 mv " ${x} /${ARCH} /iso/" * " isos/${ARCH} /"
37+ echo " ${x} ${ARCH} : Removing original ISO directory"
38+ rmdir " ${x} /${ARCH} /iso"
3339 done
3440 pushd " isos/${ARCH} " || { echo " ${ARCH} : Failed to change directory" ; break ; }
35- # old deprecated way
36- ln -s " Rocky-${REVISION} -${ARCH} -boot.iso" " Rocky-${ARCH} -boot.iso"
37- ln -s " Rocky-${REVISION} -${ARCH} -dvd1.iso" " Rocky-${ARCH} -dvd1.iso"
38- ln -s " Rocky-${REVISION} -${ARCH} -dvd1.iso" " Rocky-${ARCH} -dvd.iso"
39- ln -s " Rocky-${REVISION} -${ARCH} -minimal.iso" " Rocky-${ARCH} -minimal.iso"
40- # new way
41+ # # Should we also check for their existence before doing an ln?
4142 ln -s " Rocky-${REVISION} -${ARCH} -boot.iso" " Rocky-${MAJ} -latest-${ARCH} -boot.iso"
4243 ln -s " Rocky-${REVISION} -${ARCH} -dvd1.iso" " Rocky-${MAJ} -latest-${ARCH} -dvd.iso"
4344 ln -s " Rocky-${REVISION} -${ARCH} -minimal.iso" " Rocky-${MAJ} -latest-${ARCH} -minimal.iso"
@@ -48,13 +49,16 @@ for COMPOSE in "${NONSIG_COMPOSE[@]}"; do
4849 " $( sha256sum --tag ${file} ) " \
4950 | sudo tee -a " ${file} .CHECKSUM"
5051 done
51- cat * .CHECKSUM > CHECKSUM
52+ cat ./ * .CHECKSUM > CHECKSUM
5253 popd || { echo " Could not change directory" ; break ; }
5354 done
54- rm -rf Minimal
55- mkdir -p live/x86_64
56- ln -s live Live
55+ # Sort the cloud images here. Probably just a directory move, make some checksums (unless they're already there)
56+ # Live images should probably be fine. Check anyway what we want to do. Might be a simple move.
5757 fi
58+ # Delete the unnecessary dirs here.
59+ for EMPTYDIR in " ${NONREPO_DIRS[@]} " ; do
60+ rm -rf " ${EMPTYDIR} "
61+ done
5862 popd || { echo " ${COMPOSE} : Failed to change directory" ; break ; }
5963
6064 TARGET=" ${STAGING_ROOT} /${CATEGORY_STUB} /${REV} "
@@ -68,7 +72,6 @@ for COMPOSE in "${NONSIG_COMPOSE[@]}"; do
6872 popd || { echo " ${COMPOSE} : Failed to change directory" ; break ; }
6973done
7074
71-
7275# Create symlinks for repos that were once separate from the main compose
7376for LINK in " ${! LINK_REPOS[@]} " ; do
7477 ln -sr " ${STAGING_ROOT} /${CATEGORY_STUB} /${REV} /${LINK} " \
9598
9699# sign all repos
97100echo " Signing all repositories"
98- test -f $( dirname " $0 " ) /sign-repos-only.sh
99- ret_val=$?
100-
101- if [ " $ret_val " -eq 0 ]; then
102- $( dirname " $0 " ) /sign-repos-only.sh
103- fi
101+ for ARCH in " ${ARCHES[@]} " ; do
102+ for REPO in " ${MODS_REPOS[@]} " ; do
103+ OS_TARGET=" ${STAGING_ROOT} /${CATEGORY_STUB} /${REV} /${REPO} /${ARCH} /os/repodata/repomd.xml"
104+ GOLD_TARGET=" ${STAGING_ROOT} /${CATEGORY_STUB} /${REV} /${REPO} /${ARCH} /kickstart/repodata/repomd.xml"
105+ echo " Signing ${REPO} ${ARCH} "
106+ sign_data " ${OS_TARGET} " " ${MAJ} "
107+ sign_data " ${GOLD_TARGET} " " ${MAJ} "
108+ done
109+ done
104110
105111# Change Symlink if required
106112echo " Setting symlink to ${REV} "
0 commit comments