mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
RedHat: Munge future kernel versions
We currently look for "fc1?" (that is, fc10 through fc19) when trying to munge the kernel version in some ways. This broke on Fedora 20, since 20 obviously does not match "fc1?". Similarly, we look specifically for "el6" for RHEL6 versioning quirks, but these will break on RHEL7 and beyond. Change the version checks so that this will work all the way through Fedora 99 and RHEL 9. That won't work forever, but it will keep us working for a few versions if the versioning quirks do not change. Change-Id: I64dfd483eb2cfa57d67c97ae6db09be5bb020195 Reviewed-on: http://gerrit.openafs.org/10618 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
This commit is contained in:
parent
cb52cc6e44
commit
cddc732ec5
@ -40,10 +40,12 @@ get_verrel ()
|
||||
verrel=${1:-$(uname -r)}
|
||||
verrel=${verrel%%$knownvariants}
|
||||
case "$verrel" in
|
||||
*.el6.elrepo*) verrel="`echo ${verrel} | sed -e 's/^\(.*.el6.elrepo[^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
|
||||
*.el6*) verrel="`echo ${verrel} | sed -e 's/^\(.*.el6[^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
|
||||
*.el[6-9].elrepo*)
|
||||
verrel="`echo ${verrel} | sed -e 's/^\(.*.el[6-9].elrepo[^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
|
||||
*.el[6-9]*) verrel="`echo ${verrel} | sed -e 's/^\(.*.el[6-9][^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
|
||||
*.fc[1-9][0-9]*)
|
||||
verrel="`echo ${verrel} | sed -e 's/^\(.*.fc[1-9][0-9][^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
|
||||
*.fc9*) verrel="`echo ${verrel} | sed -e 's/^\(.*.fc9[^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
|
||||
*.fc1?*) verrel="`echo ${verrel} | sed -e 's/^\(.*.fc1[0-9][^\.]*\)\.[^\.]\+.\?$/\1/'`" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -73,14 +75,17 @@ get_rpmtemplate ()
|
||||
local variant="${1}"
|
||||
local dashvariant="${variant:+-${variant}}"
|
||||
case "$verrel" in
|
||||
*.el6*) kdep="kernel-%{_target_cpu} = ${verrel}${variant}" ;;
|
||||
*.el[6-9]*)
|
||||
kdep="kernel-%{_target_cpu} = ${verrel}${variant}" ;;
|
||||
*.EL*) kdep="kernel${dashvariant}-%{_target_cpu} = ${verrel}" ;;
|
||||
*) kdep="kernel-%{_target_cpu} = ${verrel}${variant}" ;;
|
||||
esac
|
||||
case "$verrel" in
|
||||
*.el6*) kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
|
||||
*.el[6-9]*)
|
||||
kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
|
||||
*.fc[1-9][0-9]*)
|
||||
kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
|
||||
*.fc9*) kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
|
||||
*.fc1?*) kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
|
||||
*) kname="${verrel}${variant}" ;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user