Build in a fully versioned directory

Switch to building in linux-%{KVERREL} so we have a fully versioned directory.
This also helps (but doesn't solve) rhbz 751195.
This commit is contained in:
Josh Boyer 2012-02-22 18:54:17 -05:00
parent 530700bbaa
commit 83337ce813
1 changed files with 10 additions and 10 deletions

View File

@ -54,7 +54,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
%global baserelease 1
%global baserelease 2
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -1208,7 +1208,7 @@ if [ ! -d kernel-%{kversion}%{?dist}/vanilla-%{vanillaversion} ]; then
cp -rl $sharedir/vanilla-%{kversion} .
else
%setup -q -n kernel-%{kversion}%{?dist} -c
mv linux-%{kversion} vanilla-%{kversion}
mv linux-%{KVERREL} vanilla-%{kversion}
fi
fi
@ -1258,17 +1258,17 @@ else
fi
# Now build the fedora kernel tree.
if [ -d linux-%{kversion}.%{_target_cpu} ]; then
if [ -d linux-%{KVERREL} ]; then
# Just in case we ctrl-c'd a prep already
rm -rf deleteme.%{_target_cpu}
# Move away the stale away, and delete in background.
mv linux-%{kversion}.%{_target_cpu} deleteme.%{_target_cpu}
mv linux-%{KVERREL} deleteme.%{_target_cpu}
rm -rf deleteme.%{_target_cpu} &
fi
cp -rl vanilla-%{vanillaversion} linux-%{kversion}.%{_target_cpu}
cp -rl vanilla-%{vanillaversion} linux-%{KVERREL}
cd linux-%{kversion}.%{_target_cpu}
cd linux-%{KVERREL}
# released_kernel with possible stable updates
%if 0%{?stable_base}
@ -1860,7 +1860,7 @@ BuildKernel() {
$RPM_BUILD_ROOT/boot/config.mk-compat-wireless-%{cwversion}-$KernelVer
make -s ARCH=$Arch V=1 %{?_smp_mflags} \
KLIB_BUILD=../linux-%{kversion}.%{_target_cpu} \
KLIB_BUILD=../linux-%{KVERREL} \
KMODPATH_ARG="INSTALL_MOD_PATH=$RPM_BUILD_ROOT" \
KMODDIR="backports" install-modules %{?sparse_mflags}
@ -1889,7 +1889,7 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/boot
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
cd linux-%{kversion}.%{_target_cpu}
cd linux-%{KVERREL}
%if %{with_debug}
BuildKernel %make_target %kernel_image debug
@ -2000,7 +2000,7 @@ find Documentation -type d | xargs chmod u+w
%install
cd linux-%{kversion}.%{_target_cpu}
cd linux-%{KVERREL}
%if %{with_doc}
docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}
@ -2250,7 +2250,7 @@ fi
%dir %{_libexecdir}/perf-core
%{_libexecdir}/perf-core/*
%{_mandir}/man[1-8]/perf*
%doc linux-%{kversion}.%{_target_cpu}/tools/perf/Documentation/examples.txt
%doc linux-%{KVERREL}/tools/perf/Documentation/examples.txt
%files -n python-perf
%defattr(-,root,root)