Whamcloud - gitweb
LU-9222 build: workaround for sles11sp4 MOFED 45/26045/2
authorMinh Diep <minh.diep@intel.com>
Thu, 16 Mar 2017 20:26:17 +0000 (13:26 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 30 Mar 2017 03:54:56 +0000 (03:54 +0000)
MOFED assume that kernel-source is in the
standard place /usr/src but lbuild is using
different directory

Change-Id: I236659baf344cb3b3dcb62840c576c55febc1523
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/26045
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
contrib/lbuild/lbuild-sles

index 3419fb6..9968ce1 100644 (file)
@@ -2,7 +2,7 @@
 
 # increment this if you have made a change that should force a new kernel
 # to build built
 
 # increment this if you have made a change that should force a new kernel
 # to build built
-BUILD_GEN+=".1" #LU-3337 add missing build files for sles11sp2 server
+BUILD_GEN+=".2" #LU-3337 add missing build files for sles11sp2 server
 
 DEVEL_KERNEL_TYPE="default-devel"
 RPM_HELPERS_DIR="/usr/lib/rpm"
 
 DEVEL_KERNEL_TYPE="default-devel"
 RPM_HELPERS_DIR="/usr/lib/rpm"
@@ -125,7 +125,11 @@ find_linux_devel_paths() {
 
        # symlink the linux-obj to linux-version-obj
        ln -s $linuxobjpath $LINUXOBJ
 
        # symlink the linux-obj to linux-version-obj
        ln -s $linuxobjpath $LINUXOBJ
-
+       # We need to copy the headers from the source to the object tree for
+       # MOFED to be able to compile (a bug in ofed?)
+       if [ -e ${LINUX}/include ] && [ -e ${LINUXOBJ}/include ]; then
+               cp -rf ${LINUX}/include ${LINUXOBJ}
+       fi
        # We modify %kernel_module_package macro to use the linux obj
        # that lbuild install, not the OS installed /usr/src
        sed -i -e "/^%kernel_module_package/,/^)}$/d" \
        # We modify %kernel_module_package macro to use the linux obj
        # that lbuild install, not the OS installed /usr/src
        sed -i -e "/^%kernel_module_package/,/^)}$/d" \