Whamcloud - gitweb
b=19163
authorbrian <brian>
Wed, 13 May 2009 11:13:15 +0000 (11:13 +0000)
committerbrian <brian>
Wed, 13 May 2009 11:13:15 +0000 (11:13 +0000)
i=wangyb
i=rread

Because we rename our repackaging of the vendor kernel to include "lustre"
in the name, this changes the packages implicit Provides: attribute.  So we
make our repackaged RPMs provide the %name-%version-%release explictly so
that our kernel RPMs will satisfy the vendor's other RPMs' Requires:
attributes.

Introduce the "$BUILD_GEN" variable.  This allows the build software
engineers to force the reuse hash to be a new unique value when they update
the build software in a way that will change the resulting kernel RPMs.

build/lbuild
build/lbuild-rhel5
build/lbuild-sles10

index eae69b3..88e650c 100755 (executable)
@@ -1075,7 +1075,7 @@ build_kernel_with_srpm() {
     # get an md5sum of the kernel patch + config for reuse check
     # XXX really, there needs to be a signature and a CONFIG_FILE per arch
     #     in BUILD_ARCHS
     # get an md5sum of the kernel patch + config for reuse check
     # XXX really, there needs to be a signature and a CONFIG_FILE per arch
     #     in BUILD_ARCHS
-    local REUSE_SIGNATURE=$(cat $CONFIG_FILE $TARGET_FILE $FULL_PATCH | md5sum | cut -d" " -f1)
+    local REUSE_SIGNATURE=$((echo $BUILD_GEN; cat $CONFIG_FILE $TARGET_FILE $FULL_PATCH) | md5sum | cut -d" " -f1)
 
     # see if we can link to the reuse pool
     # XXX - hrm.  i'm not convinced this doesn't belong in the reuse "library"
 
     # see if we can link to the reuse pool
     # XXX - hrm.  i'm not convinced this doesn't belong in the reuse "library"
index 525a665..111733a 100644 (file)
@@ -1,5 +1,9 @@
 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
 
 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
 
+# increment this if you have made a change that should force a new kernel
+# to build built
+BUILD_GEN=1
+
 DEVEL_KERNEL_TYPE="devel"
 
 prepare_and_build_srpm() {
 DEVEL_KERNEL_TYPE="devel"
 
 prepare_and_build_srpm() {
@@ -51,6 +55,9 @@ Patch99995: linux-%{kversion}-lustre.patch' \
            -e '/^Provides: glibc-kernheaders = /a\
 Provides: kernel-headers = %{rpmversion}-%{release}
 ' \
            -e '/^Provides: glibc-kernheaders = /a\
 Provides: kernel-headers = %{rpmversion}-%{release}
 ' \
+           -e '/^Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}$/a\
+Provides: kernel = %{rpmversion}-%{release}
+' \
            -e '/^Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}$/a\
 Provides: kernel-devel = %{rpmversion}-%{release}
 ' \
            -e '/^Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}$/a\
 Provides: kernel-devel = %{rpmversion}-%{release}
 ' \
index fa02b48..ca1ca79 100644 (file)
@@ -1,5 +1,9 @@
 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
 
 # vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
 
+# increment this if you have made a change that should force a new kernel
+# to build built
+BUILD_GEN=1
+
 DEVEL_KERNEL_TYPE="source"
 
 prepare_and_build_srpm() {
 DEVEL_KERNEL_TYPE="source"
 
 prepare_and_build_srpm() {
@@ -18,6 +22,9 @@ prepare_and_build_srpm() {
         #cp $TOPDIR/SPECS/kernel-$spec.spec{,.orig}
         sed -i -e 's/^\(Name:.*kernel-\)\(.*\)/\1lustre-\2/' \
                -e "s/^Release:.*/&_${buildid}/" \
         #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}
+" \
                -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\
                -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\