|
1 | 1 | #!/bin/bash |
2 | 2 | # Performs a full on sync of a minor release, directories and all. It calls the |
3 | 3 | # other scripts in this directory to assist where necessary. |
4 | | -# Note that this is EL8 specific |
| 4 | +# Note that this is EL8, EL10+ only |
5 | 5 | # |
6 | 6 | # Source common variables |
7 | 7 | # shellcheck disable=SC2046,1091,1090 |
@@ -41,10 +41,16 @@ for COMPOSE in "${NONSIG_COMPOSE[@]}"; do |
41 | 41 | test -d "${x}/${ARCH}/iso" && rmdir "${x}/${ARCH}/iso" |
42 | 42 | done |
43 | 43 | pushd "isos/${ARCH}" || { echo "${ARCH}: Failed to change directory"; break; } |
| 44 | + |
44 | 45 | echo "Symlinking to 'latest' if ISO exists" |
45 | 46 | test -f "Rocky-${REVISION}-${ARCH}-boot.iso" && ln -s "Rocky-${REVISION}-${ARCH}-boot.iso" "Rocky-${MAJ}-latest-${ARCH}-boot.iso" |
46 | 47 | test -f "Rocky-${REVISION}-${ARCH}-dvd1.iso" && ln -s "Rocky-${REVISION}-${ARCH}-dvd1.iso" "Rocky-${MAJ}-latest-${ARCH}-dvd.iso" |
47 | 48 | test -f "Rocky-${REVISION}-${ARCH}-minimal.iso" && ln -s "Rocky-${REVISION}-${ARCH}-minimal.iso" "Rocky-${MAJ}-latest-${ARCH}-minimal.iso" |
| 49 | + echo "(Re)generating manifests" |
| 50 | + for file in *.iso; do |
| 51 | + xorriso -dev "${file}" --find | tail -n+2 | tr -d "'" | cut -c2- | sort > "${file}.manifest" |
| 52 | + done |
| 53 | + |
48 | 54 | for file in *.iso; do |
49 | 55 | printf "# %s: %s bytes\n%s\n" \ |
50 | 56 | "${file}" \ |
@@ -76,6 +82,16 @@ for COMPOSE in "${NONSIG_COMPOSE[@]}"; do |
76 | 82 | popd || { echo "${COMPOSE}: Failed to change directory"; break; } |
77 | 83 | done |
78 | 84 |
|
| 85 | +# Sync images, they are NOT part of the normal compose at the moment. |
| 86 | +# mv everything from iso/* and images/* to base, rmdir |
| 87 | +# if vagrant is in the name, rename them to drop the ending |
| 88 | +# for x in $(ls) ; do if [[ "${x}" =~ "vagrant" ]]; then mv ${x} $(echo ${x} | sed 's/\.vagrant\..*\(\.box\)/\1/g') ; fi ; done |
| 89 | +# create symlinks for live sed -E "s/${MAJOR}\.${MINOR}/${MAJOR}/g ; s/[0-9]+\.[0-9]+/latest/g" |
| 90 | +# create symlinks for images for x in * ; do ln -s ${x} $(echo $x | sed -E 's/-10.0-[0-9]+\.[0-9]+/.latest/g ; s/\.oci//g') ; done |
| 91 | +# remove original CHECKSUM file and then checksum everything |
| 92 | +# cat all checksums into single files, sign it |
| 93 | +# we need a separate script that can do this same stuff and not kill everything |
| 94 | + |
79 | 95 | # Create symlinks for repos that were once separate from the main compose |
80 | 96 | for LINK in "${!LINK_REPOS[@]}"; do |
81 | 97 | ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/${LINK}" \ |
|
0 commit comments