From ac8e871d781fae211feb88ff7e95aabb6ae48e68 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Fri, 6 Aug 2010 21:59:04 +0400 Subject: [PATCH] b=22612 dig out Module.symvers for sles10 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 | 4 +++- build/lbuild-sles10 | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/build/lbuild b/build/lbuild index cb4906a..15b78be 100755 --- a/build/lbuild +++ b/build/lbuild @@ -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 diff --git a/build/lbuild-sles10 b/build/lbuild-sles10 index 61dc630e..4c72777 100644 --- a/build/lbuild-sles10 +++ b/build/lbuild-sles10 @@ -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 + +} -- 1.8.3.1