Trying to build a vanilla kernel with:
rpmbuild -ba --with vanilla kernel.spec
fails like so:
+ ApplyPatch linux-2.6-build-nonintconfig.patch
+ local patch=linux-2.6-build-nonintconfig.patch
+ shift
+ '[' '!' -f
/home/cra/rpmbuild/SOURCES/linux-2.6-build-nonintconfig.patch ']'
ERROR: Patch linux-2.6-build-nonintconfig.patch not listed as a
source patch in specfile
error: Bad exit status from /var/tmp/rpm-tmp.8pegaB (%prep)
this is due to the following code in ApplyPatch():
if ! egrep "^Patch[0-9]+: $patch\$" %{_specdir}/%{name}.spec ; then
if [ "${patch:0:10}" != "patch-2.6." ] ; then
echo "ERROR: Patch $patch not listed as a source patch in specfile"
exit 1
fi
fi 2>/dev/null
Why is it checking for "patch-2.6.*" in the patch file name? I
removed that entire block of code and --with vanilla now works. What
is the expected behavior of that block of code?