Whamcloud - gitweb
b=19336 post landing cleanups
authorBrian J. Murrell <brian@sun.com>
Thu, 10 Jun 2010 19:50:21 +0000 (15:50 -0400)
committerRobert Read <robert.read@oracle.com>
Thu, 10 Jun 2010 23:32:24 +0000 (16:32 -0700)
Remove generic find_linux_devel_paths()
- now that both the rhel5 and sles method files have their own particular
  version of this method, remove this hacky-trying-to-work-for-both versions
  from lbuild.
Remove a block of what is now redundant code.
Remove the comments from the target files describing what happened with
this bug.
Align the sles10 and sles11 target files:
- include the rpmfix specifier in the sles10 file
- remove the EXTRA_VERSION_DELIMETER from the sles10 file
- change the TARGET_DELIMETER to FLAVOR_DELIMETER in the sles11 file
Some whitespace cleanups.

i=wangyb
i=yangsheng

build/lbuild
build/lbuild-sles11
lustre/kernel_patches/targets/2.6-rhel5.target.in
lustre/kernel_patches/targets/2.6-sles10.target.in
lustre/kernel_patches/targets/2.6-sles11.target.in

index 7e59379..cb4906a 100755 (executable)
@@ -51,6 +51,7 @@ TIMESTAMP=
 # this is a dir to try reuse old kernel RPMs in (although, it seems to be
 # unused in any real manner
 REUSERPM=
 # 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
 REUSEBUILD=
 # should cached products be used or force rebuilding?
 USE_BUILD_CACHE=true
@@ -1045,55 +1046,6 @@ unpack_linux_devel_rpm() {
 
 }
 
 
 }
 
-# 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"
 
 build_kernel_ib() {
     local linux="$1"
 
index 6f00c5f..32f79b5 100644 (file)
@@ -28,24 +28,24 @@ cp  %_sourcedir/linux-2.6.27-lustre.patch %_builddir/%{name}-%{version}/lustre.p
         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
         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}
 " \
 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
 
         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' \
         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' \
@@ -65,10 +65,7 @@ unpack_linux_devel_rpm-sles11() {
 
     local kernelrpm
     local wanted_kernel="${lnxmaj}${lnxmin}-${lnxrel}"
 
     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
     # 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
index 646503d..265d827 100644 (file)
@@ -1,7 +1,7 @@
 lnxmaj="2.6.18"
 lnxrel="164.11.1.el5"
 
 lnxmaj="2.6.18"
 lnxrel="164.11.1.el5"
 
-KERNEL_SRPM=kernel-$lnxmaj-$lnxrel.src.rpm
+KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm
 SERIES=2.6-rhel5.series
 EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
 LUSTRE_VERSION=@VERSION@
 SERIES=2.6-rhel5.series
 EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
 LUSTRE_VERSION=@VERSION@
index 4794f8c..8854905 100644 (file)
@@ -1,19 +1,16 @@
 lnxmaj="2.6.16"
 lnxmin=".60"
 lnxmaj="2.6.16"
 lnxmin=".60"
-# when we fix up this lnxmaj/lnxmin/lnxrel business...
-#lnxrel="0.33"
-# and note that this means we get rid of the EXTRA_VERSION_DELIMITER crap!!
 lnxrel="0.42.8"
 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="-"
 
 
 # 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@"
 SERIES=2.6-sles10.series
 VERSION=$lnxmaj
 EXTRA_VERSION="${lnxmin#.}-${lnxrel}_lustre.@VERSION@"
index da6a427..a5a8c10 100644 (file)
@@ -8,7 +8,7 @@ lnxrel="0.1"
 
 # this is the delimeter that goes before the "smp" at the end of the version
 # defaults to empty
 
 # this is the delimeter that goes before the "smp" at the end of the version
 # defaults to empty
-TARGET_DELIMITER="-"
+FLAVOR_DELIMITER="-"
 
 KERNEL_SRPM=kernel-source-${lnxmaj}${lnxmin}-${lnxrel}${rpmfix}.src.rpm
 SERIES=2.6-sles11.series
 
 KERNEL_SRPM=kernel-source-${lnxmaj}${lnxmin}-${lnxrel}${rpmfix}.src.rpm
 SERIES=2.6-sles11.series