X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=contrib%2Flbuild%2Flbuild-rhel7;h=721d56b4169281a3b02dcba206ebceb537c85e7c;hb=4a4794364eb05f7f6cb4600af986951353d034f4;hp=6045984aa4cd6c271009be85d1dce47443d572f4;hpb=bebfcbf008e6b1bc566c3abebf46fefbe6c8b5e8;p=fs%2Flustre-release.git diff --git a/contrib/lbuild/lbuild-rhel7 b/contrib/lbuild/lbuild-rhel7 index 6045984..721d56b 100644 --- a/contrib/lbuild/lbuild-rhel7 +++ b/contrib/lbuild/lbuild-rhel7 @@ -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,21 +109,17 @@ kernel_srpm_location() { } +kernel_debuginfo_location() { + + echo "http://debuginfo.centos.org/7/x86_64/" + +} + cleanup_rpmmacros() { sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC } apply_kmod_requires_conflicts() { - # until we have achieved full kABI compatibility we need to - # restrict the kernel range that can be used to the kernel - # version from the RHEL minor release - # this is supposed to be done for kmods automatically but - # RHBZ#1467319 seems to be getting in the way - local kver=$(find_linux_release) - local linuxversion=${kver%%-*} - local linuxrelease=${kver##*-} - local kabiminor=${linuxrelease%%.*} - echo "Requires: kernel < $linuxversion-$((kabiminor+1)), kernel >= $linuxversion-$((kabiminor))" >> rpm/kmp-lustre.preamble if $PATCHLESS; then # don't allow the patched kernel to be considered as a valid kernel # for the patchless client