Whamcloud - gitweb
b=19975
authorbrian <brian>
Fri, 17 Jul 2009 17:39:23 +0000 (17:39 +0000)
committerbrian <brian>
Fri, 17 Jul 2009 17:39:23 +0000 (17:39 +0000)
i=yangsheng
i=wangyb

Because we now build RHEL5 and SLES10&11 kernels from their own spec files,
we don't produce a kernel-source for RHEL5.  RH's story to people who want
source is to unpack and patch the kernel SRPM.  So we should provide the
SRPM for people who want kernel source.

SLES just comes along for the ride (actually, as do RHEL4 and SLES9 but we
don't support them for server on 1.8, so no need to distribute any kernel
[S]RPMs for them whatsoever.

build/lbuild
build/lbuild-rhel5
build/lbuild-sles
build/lbuild-sles10
build/lbuild-sles11

index 407d17f..d4409dc 100755 (executable)
@@ -16,7 +16,7 @@ RELEASE=false
 #       search through this file (and lbuild.old_school -- but that will
 #       be going away soon) for "-bb" and see how many places
 #       simply don't account for this option
-DO_SRC=false
+DO_SRC=true
 DOWNLOAD=true
 TAG=
 CANONICAL_TARGET=
index 4238182..b359583 100644 (file)
@@ -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
 
 DEVEL_KERNEL_TYPE="devel"
 
index 31fd5d6..e1ede26 100644 (file)
@@ -5,9 +5,10 @@ DEVEL_KERNEL_TYPE="source"
 prepare_and_build_srpm() {
 
     pushd $TOPDIR >/dev/null
-    # seems there is a bug (on Ubuntu at least) where all of the .specs
-    # are not put into SPECS
-    mv SOURCES/*.spec SPECS/
+    # all of the specs but one are put into SOURCES, so let's just move
+    # the one lone one in SPECS into SOURCES and just reference them from
+    # there
+    mv SPECS/*.spec SOURCES/
 
     # generate our buildid
     local buildid="lustre${EXTRA_VERSION##*_lustre}"
@@ -44,7 +45,7 @@ prepare_and_build_srpm() {
     # now build it
     if ! $RPMBUILD $rpmbuildopt $targets \
                    --define "_topdir $TOPDIR" \
-                   $TOPDIR/SPECS/kernel-$RPMSMPTYPE.spec >&2; then
+                   $TOPDIR/SOURCES/kernel-$RPMSMPTYPE.spec >&2; then
         fatal 1 "Failed to build kernel RPM"
     fi
 #fi
@@ -52,7 +53,7 @@ prepare_and_build_srpm() {
     # for SLES, we also need to build the kernel-source rpm
     if ! $RPMBUILD $rpmbuildopt $targets \
                    --define "_topdir $TOPDIR" \
-                   $TOPDIR/SPECS/kernel-source.spec >&2; then
+                   $TOPDIR/SOURCES/kernel-source.spec >&2; then
         fatal 1 "Failed to build kernel source RPM"
     fi
 
index a35607d..5da0032 100644 (file)
@@ -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
 
@@ -12,7 +13,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:.*/&_${buildid}/" \
                -e "s/^ExclusiveArch:.*/& ppc ppc64/" \
                -e '/^# Apply the patches needed for this architecture\./a\
@@ -20,7 +21,7 @@ cp  %_sourcedir/linux-2.6.16-lustre.patch %_builddir/%{name}-%{version}/lustre.p
 ! 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
 
         if $KERNEL_LUSTRE_NAMING; then
             # these are all of the changes needed because we change the package names
@@ -31,7 +32,7 @@ Provides:       kernel-$spec = %{version}-%{release}
 " \
                    -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
         fi
 
     # XXX - a building-on-Ubuntu hack
@@ -41,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
 }
index 2e4185c..5ed4279 100644 (file)
@@ -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,7 @@ 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
 
         if $KERNEL_LUSTRE_NAMING; then
             # these are all of the changes needed because we change the package names
@@ -42,7 +43,7 @@ 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
         fi
 
     # XXX - a building-on-Ubuntu hack
@@ -52,7 +53,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
 }