X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=contrib%2Flbuild%2Flbuild-rhel7;h=b424d3a45ce191e62102cd05e854dbfa03324b13;hb=c2e5181fe1faec6f375ea7512f60edd802e33946;hp=ea339a027c0535e948d717245c19df7107363ae1;hpb=3b7d27ea22faf1c6d0a37afa724fd9b5c3240322;p=fs%2Flustre-release.git diff --git a/contrib/lbuild/lbuild-rhel7 b/contrib/lbuild/lbuild-rhel7 index ea339a0..b424d3a 100644 --- a/contrib/lbuild/lbuild-rhel7 +++ b/contrib/lbuild/lbuild-rhel7 @@ -8,14 +8,14 @@ BUILD_GEN+=".0" SPEC_NAME="kernel.spec" DEVEL_PATH_ARCH_DELIMETER="." -USE_KABI=true +USE_KABI=false # force local definition of %dist into ~/.rpmmacros # to avoid verbose extended strings like ".el7.centos" # in kernel version and rpm names # RMAC=$HOME/.rpmmacros -grep '%dist' $RMAC &> /dev/null || echo '%dist .el7' >> $RMAC +grep '^%dist' $RMAC &> /dev/null || echo '%dist .el7' >> $RMAC # We modify the RHEL7 kmodtool script, because it expects # the kernel source to be in the correct packaged RHEL location. @@ -25,11 +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. -sed -e "s|REPLACE_ME|$LBUILD_KMODTOOL|" \ +# We need to cleanout the previous entry +sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC +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 @@ -82,7 +88,7 @@ get_rpmbuildopts() { if $KERNEL_LUSTRE_NAMING; then echo -e "--define \"variant -lustre\" \c" fi - echo "--with firmware" + echo "--with firmware --with baseonly" return 0 @@ -102,3 +108,21 @@ kernel_srpm_location() { echo "http://vault.centos.org/centos/7/updates/Source/SPackages/" } + +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 +}