# increment this if you have made a change that should force a new kernel
# to build built
#BUILD_GEN=1
-BUILD_GEN=2 # bz19952: remove -lustre tag from kernel RPM names
+#BUILD_GEN=2 # bz19952: remove -lustre tag from kernel RPM names
+BUILD_GEN=3 # bz19975 enable the building of src.rpms by default
source ${0%/*}/lbuild-sles
# edit the SPECs with our changes
local spec
for spec in $RPMSMPTYPE source; do
- #cp $TOPDIR/SPECS/kernel-$spec.spec{,.orig}
+ #cp $TOPDIR/SOURCES/kernel-$spec.spec{,.orig}
sed -i -e "s/^Release:.*/&_${buildid}/" \
-e "s/^ExclusiveArch:.*/& ppc ppc64/" \
-e '/^# Apply the patches needed for this architecture\./a\
! grep -q lustre.patch %_sourcedir/series.conf && echo -e "\\n\\tlustre.patch" >> %_sourcedir/series.conf' \
-e "/flavor=\${config/a\
[ \"\$flavor\" == \"$RPMSMPTYPE\" ] || continue" \
- SPECS/kernel-${spec}.spec
+ SOURCES/kernel-${spec}.spec || fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
if $KERNEL_LUSTRE_NAMING; then
# these are all of the changes needed because we change the package names
" \
-e 's/\(.*\)\([^#].*\)fookernel-source/\1\2kernel-lustre-source/g' \
-e '/^%build/,/^%changelog/s/kernel-\({*\)source/kernel-\1lustre-source/g' \
- SPECS/kernel-${spec}.spec
+ SOURCES/kernel-${spec}.spec || fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
fi
# XXX - a building-on-Ubuntu hack
-e 's/^\(BuildRequires: .*\)$/#NOU \1/g' \
-e 's/%(\(chmod .*\))$/%(bash -c "\1")/' \
-e 's/ -a 109//' \
- SPECS/kernel-${spec}.spec
+ SOURCES/kernel-${spec}.spec || fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
fi
done
}