X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=build%2Flbuild-sles10;h=5da0032bc6b3778bde40684b2cac270c88e82220;hp=d2296e0db64d55c4f8a7b389ce5bf5f3e9b0f0b3;hb=eea0b5248b5c08acb1a20f47f40bc5672db62dd4;hpb=90937a348cf0f98860b5cedcb25fded9f83d357b diff --git a/build/lbuild-sles10 b/build/lbuild-sles10 index d2296e0..5da0032 100644 --- a/build/lbuild-sles10 +++ b/build/lbuild-sles10 @@ -2,7 +2,9 @@ # increment this if you have made a change that should force a new kernel # to build built -BUILD_GEN=1 +#BUILD_GEN=1 +#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 @@ -11,21 +13,27 @@ edit_specs() { # edit the SPECs with our changes local spec for spec in $RPMSMPTYPE source; do - #cp $TOPDIR/SPECS/kernel-$spec.spec{,.orig} - sed -i -e 's/^\(Name:.*kernel-\)\(.*\)/\1lustre-\2/' \ - -e "s/^Release:.*/&_${buildid}/" \ - -e "/^Provides: *kernel = /a\ -Provides: kernel-$spec = %{version}-%{release} -" \ + #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\ cp %_sourcedir/linux-2.6.16-lustre.patch %_builddir/%{name}-%{version}/lustre.patch\ ! grep -q lustre.patch %_sourcedir/series.conf && echo -e "\\n\\tlustre.patch" >> %_sourcedir/series.conf' \ -e "/flavor=\${config/a\ [ \"\$flavor\" == \"$RPMSMPTYPE\" ] || continue" \ - -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 + + if $KERNEL_LUSTRE_NAMING; then + # these are all of the changes needed because we change the package names + # to kernel-lustre-*. these should all go away when we stop this insanity + sed -i -e 's/^\(Name:.*kernel-\)\(.*\)/\1lustre-\2/' \ + -e "/^Provides: *kernel = /a\ +Provides: kernel-$spec = %{version}-%{release} +" \ + -e 's/\(.*\)\([^#].*\)fookernel-source/\1\2kernel-lustre-source/g' \ + -e '/^%build/,/^%changelog/s/kernel-\({*\)source/kernel-\1lustre-source/g' \ + SOURCES/kernel-${spec}.spec + fi # XXX - a building-on-Ubuntu hack if grep -q "Ubuntu" /etc/issue; then @@ -34,7 +42,7 @@ 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 + SOURCES/kernel-${spec}.spec fi done }