# 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: *\).*$/\1${real_lnxrel}_${buildid}/" \
-e "s/^ExclusiveArch:.*/& ppc ppc64/" \
-e '/^%setup /a\
-e "/flavor=\${config/a\
[ \"\$flavor\" == \"$RPMSMPTYPE\" ] || continue" \
-e "s/^\(BuildRequires: kernel-dummy\)/# \1/" \
- 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/^\(Provides:.*kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(Requires:.*kernel-\)\(.*\)/\1lustre-\2/" \
-e "s/^\(Supplements:.*kernel-\)\(.*\)/\1lustre-\2/" \
- 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
- fi
+ SOURCES/kernel-${spec}.spec || \
+ fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
+ fi
done
}
local rpmdir="${callers_rpm%/*}"
local kernelrpm
- local wanted_kernel="${lnxmaj}.${lnxrel}"
+ local wanted_kernel="${lnxmaj}${lnxmin}${TARGET_DELIMITER}${lnxrel}"
+ if $PATCHLESS; then
+# this $PATCHLESS block should go away when bug 19336 lands.
+ wanted_kernel="${lnxmaj}${lnxmin}${TARGET_DELIMITER}${real_lnxrel}"
+ fi
# this is a hack that should go away when the modified lustre kernel
# Provides kernel-default-base vvvvvvvvv
if ! kernelrpm=$(find_rpm "$rpmdir" provides "^kernel-(lustre-)?default-base = $wanted_kernel"); then
fi
}
-
-# this is actually valid for sles10 and sles11 but let's test it on sles11 only, first
-find_linux_devel_paths() {
- local path="$1"
-
- LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}
-
- local objects=$TARGET_ARCH/$RPMSMPTYPE
- if [ -d $path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}-obj/powerpc ]; then
- objects="powerpc/$TARGET_ARCH"
- elif [ $TARGET_ARCH == 'i686' ]; then
- objects="i386/$RPMSMPTYPE"
- fi
-
- LINUXOBJ=$path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}-obj/$objects
-
- LINUXRELEASE=$(find_linux_release ${LINUXOBJ:-$LINUX})
- if [ -z "$LINUXRELEASE" ]; then
- echo "Failed to find linux release in ${LINUXOBJ:-$LINUX}"
- RC=255
- fi
-}