mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
Fedora: Handle new kernel variant paths
With Fedora 20, Fedora now separates the variant from the rest of the kernel version with a plus (+) instead of a period (.) . This results in directories called e.g. 3.12.5-302.fc20.i686+PAE, where right now we look for 3.12.5-302.fc20.i686.PAE. Use this new directory scheme for Fedora 20 builds, so we can build against non-default kernel variants on Fedora 20 and beyond. Change-Id: I309272f4f4f740058c48e92530e40a1c64d63668 Reviewed-on: http://gerrit.openafs.org/10620 Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
This commit is contained in:
parent
cddc732ec5
commit
837ec9dd41
@ -83,7 +83,9 @@ get_rpmtemplate ()
|
||||
case "$verrel" in
|
||||
*.el[6-9]*)
|
||||
kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
|
||||
*.fc[1-9][0-9]*)
|
||||
*.fc[2-9][0-9]*)
|
||||
kname="${verrel}.%{_target_cpu}${variant:++${variant}}" ;;
|
||||
*.fc1[0-9]*)
|
||||
kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
|
||||
*.fc9*) kname="${verrel}.%{_target_cpu}${variant:+.${variant}}" ;;
|
||||
*) kname="${verrel}${variant}" ;;
|
||||
|
@ -848,6 +848,8 @@ ksrc=""
|
||||
if [ -z "${kvariant}" -o -z "$ksrc" ] ; then
|
||||
if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
|
||||
ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
|
||||
elif [ -d %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant} ] ; then
|
||||
ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant}
|
||||
else
|
||||
ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
|
||||
fi
|
||||
@ -892,8 +894,16 @@ make only_libafs_tree || exit 1
|
||||
%if %{fedorakmod} && %{build_modules}
|
||||
for kvariant in %{kvariants} ; do
|
||||
if [ -n "${kvariant}" ] ; then
|
||||
|
||||
if [ -d %{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} ] ; then
|
||||
ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
|
||||
|
||||
elif [ -d %{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant} ] ; then
|
||||
# Fedora 20 started putting kernel sources in e.g.
|
||||
# 3.12.5-302.fc20.i686+PAE, instead of:
|
||||
# 3.12.5-302.fc20.i686.PAE
|
||||
ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:++$kvariant}
|
||||
|
||||
else
|
||||
ksrc=%{_usrsrc}/kernels/%{kverrel}.%{_target_cpu}${kvariant:+.$kvariant}
|
||||
fi
|
||||
@ -1267,6 +1277,9 @@ do
|
||||
if [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP ] ; then
|
||||
srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
|
||||
dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
|
||||
elif [ -d _kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}+${kvariant}-SP ] ; then
|
||||
srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}+${kvariant}-SP
|
||||
dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}+${kvariant}/extra/openafs
|
||||
else
|
||||
srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}.%{_target_cpu}.${kvariant}-SP
|
||||
dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}.%{_target_cpu}.${kvariant}/extra/openafs
|
||||
|
Loading…
Reference in New Issue
Block a user