From a44ad7646d729964369df9a0ca79d687f251618d Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 13 May 2009 11:13:15 +0000 Subject: [PATCH] b=19163 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 | 2 +- build/lbuild-rhel5 | 7 +++++++ build/lbuild-sles10 | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/build/lbuild b/build/lbuild index eae69b3..88e650c 100755 --- a/build/lbuild +++ b/build/lbuild @@ -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 - 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" diff --git a/build/lbuild-rhel5 b/build/lbuild-rhel5 index 525a665..111733a 100644 --- a/build/lbuild-rhel5 +++ b/build/lbuild-rhel5 @@ -1,5 +1,9 @@ # 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() { @@ -51,6 +55,9 @@ Patch99995: linux-%{kversion}-lustre.patch' \ -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} ' \ diff --git a/build/lbuild-sles10 b/build/lbuild-sles10 index fa02b48..ca1ca796 100644 --- a/build/lbuild-sles10 +++ b/build/lbuild-sles10 @@ -1,5 +1,9 @@ # 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() { @@ -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}/" \ + -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\ -- 1.8.3.1