Whamcloud - gitweb
LU-5332 hsm: Release XATTR lock on exiting
[fs/lustre-release.git] / contrib / lbuild / lbuild-sles
index e61b27f..8b8e1b3 100644 (file)
@@ -2,18 +2,14 @@
 
 # increment this if you have made a change that should force a new kernel
 # to build built
-BUILD_GEN+=".0"        # TT-107: don't cache the BUILD dir (reset major to 5)
+BUILD_GEN+=".1" #LU-3337 add missing build files for sles11sp2 server
 
-DEVEL_KERNEL_TYPE="source"
+DEVEL_KERNEL_TYPE="default-devel"
 RPM_HELPERS_DIR="/usr/lib/rpm"
 
 prepare_and_build_srpm() {
 
     pushd $TOPDIR >/dev/null
-    # all of the specs but one are put into SOURCES, so let's just move
-    # the one lone one in SPECS into SOURCES and just reference them from
-    # there
-    mv SPECS/*.spec SOURCES/
 
     # generate our buildid
     local buildid="lustre${EXTRA_VERSION##*_lustre}"
@@ -116,13 +112,6 @@ find_linux_devel_paths() {
 
     LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}
     LINUXOBJ=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$(resolve_arch $TARGET_ARCH $PATCHLESS)/$RPMSMPTYPE
-    # XXX this has been commented out in th rhel5 build file for a while
-    # as it says there, it's probably not needed anymore and can be deleted
-    #LINUXRELEASE=$(find_linux_release "$LINUXOBJ")
-    #if [ -z "$LINUXRELEASE" ]; then
-    #    echo "Failed to find linux release in $LINUXOBJ"
-    #    return 255
-    #fi
 
     return 0
 }
@@ -132,3 +121,15 @@ mcpu_rpmbuild_opt() {
     echo "--define \'jobs $(/usr/bin/getconf _NPROCESSORS_ONLN)\'"
     return 0
 }
+
+# This function digs out the linux release from a linux-obj tree
+find_linux_release() {
+    _find_linux_release $LINUXOBJ
+}
+
+kernel_srpm_location() {
+
+    local PLEV=$(sed -n -e 's/^PATCHLEVEL = //p' /etc/SuSE-release)
+    echo "https://nu.novell.com/repo/\$RCE/SLES11-SP${PLEV}-Updates/sle-11-$(resolve_arch $TARGET_ARCH)/rpm/src/"
+
+}