CentOS Stream only uses a major version number, no minor version.

This prevents the packages from being created as foo.el.arch.rpm
since we were assuming that the version number was two digits.
This commit is contained in:
Todd C. Miller
2022-05-24 15:58:39 -06:00
parent d6be44db00
commit deef5e57fb
3 changed files with 12 additions and 0 deletions

View File

@@ -163,6 +163,10 @@ still allow people to get their work done."
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,2\}\).*/\1/'`
case "$pp_rpm_distro" in
centos*|rhel*|f[0-9]*)
# CentOS Stream has a single-digit version
if test $osrelease -lt 10; then
osrelease="${osrelease}0"
fi
pp_rpm_release="$pp_rpm_release.el${osrelease%%[0-9]}"
;;
sles*)