Whamcloud - gitweb
b=22612 dig out Module.symvers for sles10
authorBrian J. Murrell <brian.murrell@oracle.com>
Fri, 6 Aug 2010 17:59:04 +0000 (21:59 +0400)
committerMikhail Pershin <tappro@sun.com>
Fri, 6 Aug 2010 19:20:06 +0000 (23:20 +0400)
When we build modules in lbuild for sles10 kernels, we point to the
contents of the kernel-source RPM.  That does not contain the
Module.symvers file though and thus we get a nice big warning that
the modules built (i.e. ldiskfs) will not contain versions.
This is because we need to unpack the /usr/src/linux-*obj/Module.symvers
file from the kernel-$flavour or kernel-syms RPM into the location pointed to
by --with-linux-obj.

Fix a bug in unpack_linux_devel_rpm-$DISTRO where we were not checking
for the success of the function.

i=mjmac
i=wangyb

build/lbuild
build/lbuild-sles10

index cb4906a..15b78be 100755 (executable)
@@ -1035,7 +1035,9 @@ unpack_linux_devel_rpm() {
 
     # call a distro specific hook, if available
     if type -p unpack_linux_devel_rpm-$DISTRO; then
-        unpack_linux_devel_rpm-$DISTRO "$kernelrpm"
+        if ! unpack_linux_devel_rpm-$DISTRO "$kernelrpm"; then
+            return 255
+        fi
     fi
 
     popd &>/dev/null
index 61dc630..4c72777 100644 (file)
@@ -46,3 +46,17 @@ curl ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17
      fi
     done
 }
+
+unpack_linux_devel_rpm-sles10() {
+    local callers_rpm="$1"
+
+    # get the Module.symvers out of the kenrel-flavor RPM
+    local kernelrpm=${callers_rpm/-source-/-$RPMSMPTYPE-}
+
+    if ! rpm2cpio < "$kernelrpm" | cpio -id ./usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$TARGET_ARCH/$RPMSMPTYPE/Module.symvers > /dev/null 2>&1; then
+        return 255
+    fi
+
+    return 0
+
+}