# this is a dir to try reuse old kernel RPMs in (although, it seems to be
# unused in any real manner
REUSERPM=
+# this is the dir that should be used to store reuse products
REUSEBUILD=
# should cached products be used or force rebuilding?
USE_BUILD_CACHE=true
}
-# XXX - this rhel/sles goop needs abstracting out into the
-# lbuild-{rhel5,sles10} method files
-find_linux_devel_paths() {
- local path="$1"
-
- local RC=0
-
- pushd $path
- # RHEL-style and SLES-style rpms
- # XXX - until bug 19336 cleans this up, we need to extricate the
- # ${lnxmin}- from the $lnxrel
- local paths="kernels/${lnxmaj}${lnxmin}${delimiter}${lnxrel}-${TARGET_ARCH} linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}"
-
- local path
- for path in $paths; do
- local src='usr/src'
-
- if [ -d "$src/$path/" ]; then
- LINUX="$(pwd)/$src/$path"
- fi
- # SLES has a separate -obj tree
- if [ -d "$src/${path}-obj" ]; then
- local src="$src/${path}-obj"
- local objects="$TARGET_ARCH/$RPMSMPTYPE"
-
- # Novell, are you *TRYING* to make life hard for me?
- if [ -d "$src/powerpc" ]; then
- objects="powerpc/$TARGET_ARCH"
- elif [ $TARGET_ARCH == 'i686' ]; then
- objects="i386/$RPMSMPTYPE"
- fi
-
- LINUXOBJ="$(pwd)/$src/$objects"
- fi
- done
- if [ -z "$LINUX" ]; then
- RC=255
- else
- # dig out the release version
- LINUXRELEASE=$(find_linux_release ${LINUXOBJ:-$LINUX})
- if [ -z "$LINUXRELEASE" ]; then
- echo "Failed to find linux release in ${LINUXOBJ:-$LINUX}"
- RC=255
- fi
- fi
- popd
- return $RC
-}
-
build_kernel_ib() {
local linux="$1"
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\
+ sed -i -e 's/^\(Name:.*kernel-\)\(.*\)/\1lustre-\2/' \
+ -e "/^Provides: *kernel = /a\
Provides: kernel-$spec = %{version}-%{release}
" \
- -e 's/^\([ ][ ]*-i %_builddir\/kernel-\)\(source-2.6.27.21\/\$patch; then\)/\1lustre-\2/' \
- -e '/^%build/,/^%changelog/s/\(kernel-\)\(source\.files\)/\1lustre-\2/g' \
- -e '/--no-backup-if-mismatch/,/fi/s/kernel-source-/kernel-lustre-source-/g' \
- -e "s/^\(%package -n kernel-\)\(.*\)/\1lustre-\2/" \
- -e "s/^\(%description -n kernel-\)\(.*\)/\1lustre-\2/" \
- -e "s/^\(%files -n kernel-\)\(.*\)/\1lustre-\2/" \
- -e "s/^\(Provides:.*kernel-\)\(.*\)/\1lustre-\2/" \
- -e "s/^\(Requires:.*kernel-\)\(.*\)/\1lustre-\2/" \
- -e "s/^\(Supplements:.*kernel-\)\(.*\)/\1lustre-\2/" \
- SOURCES/kernel-${spec}.spec || \
- fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
+ -e 's/^\([ ][ ]*-i %_builddir\/kernel-\)\(source-2.6.27.21\/\$patch; then\)/\1lustre-\2/' \
+ -e '/^%build/,/^%changelog/s/\(kernel-\)\(source\.files\)/\1lustre-\2/g' \
+ -e '/--no-backup-if-mismatch/,/fi/s/kernel-source-/kernel-lustre-source-/g' \
+ -e "s/^\(%package -n kernel-\)\(.*\)/\1lustre-\2/" \
+ -e "s/^\(%description -n kernel-\)\(.*\)/\1lustre-\2/" \
+ -e "s/^\(%files -n kernel-\)\(.*\)/\1lustre-\2/" \
+ -e "s/^\(Provides:.*kernel-\)\(.*\)/\1lustre-\2/" \
+ -e "s/^\(Requires:.*kernel-\)\(.*\)/\1lustre-\2/" \
+ -e "s/^\(Supplements:.*kernel-\)\(.*\)/\1lustre-\2/" \
+ SOURCES/kernel-${spec}.spec || \
+ fatal 1 "Error while editing SOURCES/kernel-${spec}.spec"
fi
- # XXX - a building-on-Ubuntu hack
+ # XXX - a building-on-Ubuntu hack
if grep -q "Ubuntu" /etc/issue; then
sed -i -e '/^%_sourcedir\/install-configs %_sourcedir .*/i\
curl ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm1/broken-out/i386-use-c-code-for-current_thread_info.patch | patch -p1' \
local kernelrpm
local wanted_kernel="${lnxmaj}${lnxmin}-${lnxrel}"
- if $PATCHLESS; then
-# this $PATCHLESS block should go away when bug 19336 lands.
- wanted_kernel="${lnxmaj}${lnxmin}-${lnxrel}"
- fi
+
# this is a hack that should go away when the modified lustre kernel
# Provides kernel-default-base vvvvvvvvv
if ! kernelrpm=$(find_rpm "$rpmdir" provides "^kernel-(lustre-)?default-base = $wanted_kernel"); then
lnxmaj="2.6.16"
lnxmin=".60"
-# when we fix up this lnxmaj/lnxmin/lnxrel business...
-#lnxrel="0.37_f594963d"
-# and note that this means we get rid of the EXTRA_VERSION_DELIMITER crap!!
lnxrel="0.42.8"
-
-# this is the delimeter that goes between $lnxmaj and $lnxrel
-# defaults to "-"
-EXTRA_VERSION_DELIMITER="."
+# use this when there is an "RPM fix" which means that the name of the
+# (source) RPM has been updated but the version of the kernel inside the
+# RPM is not also updated
+rpmfix=""
# this is the delimeter that goes before the "smp" at the end of the version
# defaults to empty
FLAVOR_DELIMITER="-"
-KERNEL_SRPM=kernel-source-${lnxmaj}${lnxmin}-${lnxrel}.src.rpm
+KERNEL_SRPM=kernel-source-${lnxmaj}${lnxmin}-${lnxrel}${rpmfix}.src.rpm
SERIES=2.6-sles10.series
VERSION=$lnxmaj
EXTRA_VERSION="${lnxmin#.}-${lnxrel}_lustre.@VERSION@"