Skip to content

Commit

Permalink
no Fedora version; RedHat from CentOS; CentOS-10
Browse files Browse the repository at this point in the history
Don't require a particular version of Fedora - just ensure that
there is at least 1 Fedora distro file.

Since there is no more upstream RedHat testing, create the RedHat
files from the CentOS files.

Add support for CentOS-10
  • Loading branch information
richm committed Jan 10, 2024
1 parent a3668e0 commit f874437
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions check-logs-for-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,21 +373,35 @@ done
MIN_EL_VERSION="${MIN_EL_VERSION:-8}"
HAS_FEDORA="${HAS_FEDORA:-true}"
required_distro_major_ver=()
if [ "$HAS_FEDORA" = true ]; then
required_distro_major_ver+=(Fedora-38 Fedora-39)
fi
if [ "$MIN_EL_VERSION" -ge 8 ]; then
required_distro_major_ver+=(CentOS-8)
fi
if [ "$MIN_EL_VERSION" -ge 9 ]; then
required_distro_major_ver=(CentOS-9)
required_distro_major_ver+=(CentOS-9)
fi
if [ "$MIN_EL_VERSION" -ge 10 ]; then
required_distro_major_ver+=(CentOS-10)
fi
for distro_ver in "${required_distro_major_ver[@]}"; do
if [ -z "${distro_major_ver["$distro_ver"]:-}" ]; then
error Do not have results from "$distro_ver" - cannot continue
exit 1
fi
done
if [ "$HAS_FEDORA" = true ]; then
# must have at least 1 Fedora
found=0
for distro_ver in "${distro_major_ver[@]}"; do
if [[ "$distro_ver" =~ ^Fedora ]]; then
found=1
break
fi
done
if [ "$found" = 0 ]; then
error Do not have results from any Fedora - cannot continue
exit 1
fi
fi

debug roles "${roles[@]}"
debug pkg_types "${pkg_types[@]}"
Expand Down Expand Up @@ -457,6 +471,11 @@ if [ -n "${ROLE_PARENT_DIR:-}" ] && [ -d "$ROLE_PARENT_DIR" ]; then
firsttime=0
fi
cp "$file" "$destfile"
# create RedHat files corresponding to CentOS files
if [[ "$destfile" =~ CentOS ]]; then
rhdestfile="${destfile/CentOS/RedHat}"
cp "$file" "$rhdestfile"
fi
done
for file in "$log_dir/${role}-roles-runtime.txt" "$log_dir/${role}-roles-testing.txt"; do
destfile="$role_dir/.ostree/$(basename "${file/${role}-/}")"
Expand Down

0 comments on commit f874437

Please sign in to comment.