X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=build%2Flbuild-sles11;h=3fc997d5cdfed6d43612264c735f77b053aabfac;hb=45c495867c903379ec9e9acf01d3d49caffa36e4;hp=2e4185cf524b845e0b86683be4c2950a550cf3b6;hpb=a355ff8db0909b83fbc2d29c3884ca8a9a3afc4b;p=fs%2Flustre-release.git diff --git a/build/lbuild-sles11 b/build/lbuild-sles11 index 2e4185c..3fc997d 100644 --- a/build/lbuild-sles11 +++ b/build/lbuild-sles11 @@ -3,7 +3,8 @@ # 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 @@ -15,7 +16,7 @@ edit_specs() { # 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\ @@ -24,7 +25,8 @@ cp %_sourcedir/linux-2.6.27-lustre.patch %_builddir/%{name}-%{version}/lustre.p -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 @@ -42,7 +44,8 @@ Provides: kernel-$spec = %{version}-%{release} -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 @@ -52,8 +55,9 @@ curl ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17 -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 } @@ -79,25 +83,3 @@ unpack_linux_devel_rpm-sles11() { 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 -}