Whamcloud - gitweb
LU-15160 kernel: kernel update SLES12 SP5 [4.12.14-122.91.2]
[fs/lustre-release.git] / contrib / lbuild / lbuild-rhel7
index 68c2400..8226945 100644 (file)
@@ -25,13 +25,17 @@ LBUILD_KMODTOOL="${LBUILD_DIR}/rhel7/kmodtool"
 cp  $RHEL_KMODTOOL $LBUILD_KMODTOOL
 pushd ${LBUILD_DIR}/rhel7
 patch -p1 < kmodtool.patch
+# Replace the hardcoded /usr/src/kernels with our build path
+tmp="${TOPDIR}/reused/usr/src/kernels"
+tmp="${tmp//\//\\/}"
+sed -i "s/\/usr\/src\/kernels/${tmp}/g" ${LBUILD_DIR}/rhel7/kmodtool
 chmod 755 kmodtool
 popd
 # Next we replace %kernel_module_package with one that is nearly
 # identical, but calls lbuild's modified kmodtool script.
 # We need to cleanout the previous entry
 sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC
-sed -e "s|REPLACE_ME|$LBUILD_KMODTOOL|" \
+sed -e "s|REPLACE_ME|$LBUILD_KMODTOOL|" -e "s/\/usr\/src\/kernels/${tmp}/g" \
     ${LBUILD_DIR}/rhel7/rpmmacros.template > ${LBUILD_DIR}/rhel7/rpmmacros
 cat ${LBUILD_DIR}/rhel7/rpmmacros >> $RMAC
 
@@ -105,6 +109,20 @@ kernel_srpm_location() {
 
 }
 
+kernel_debuginfo_location() {
+
+       echo "http://mirror.facebook.net/centos-debuginfo/7/x86_64/"
+
+}
+
 cleanup_rpmmacros() {
        sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC
 }
+
+apply_kmod_requires_conflicts() {
+    if $PATCHLESS; then
+        # don't allow the patched kernel to be considered as a valid kernel
+        # for the patchless client
+        echo "Conflicts:      kernel-lustre" >> rpm/kmp-lustre.preamble
+    fi
+}