X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=contrib%2Flbuild%2Flbuild-rhel7;fp=contrib%2Flbuild%2Flbuild-rhel7;h=ea339a027c0535e948d717245c19df7107363ae1;hb=3b7d27ea22faf1c6d0a37afa724fd9b5c3240322;hp=2e66e4cd6d51b032a609ba18f037a511f03eb707;hpb=a84250b902515e7f5c9c4cd44885ca98b738b392;p=fs%2Flustre-release.git diff --git a/contrib/lbuild/lbuild-rhel7 b/contrib/lbuild/lbuild-rhel7 index 2e66e4c..ea339a0 100644 --- a/contrib/lbuild/lbuild-rhel7 +++ b/contrib/lbuild/lbuild-rhel7 @@ -17,6 +17,22 @@ USE_KABI=true RMAC=$HOME/.rpmmacros 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. +# lbuild does not put the source in correct packaged RHEL location. +RHEL_KMODTOOL=/usr/lib/rpm/redhat/kmodtool +LBUILD_KMODTOOL="${LBUILD_DIR}/rhel7/kmodtool" +cp $RHEL_KMODTOOL $LBUILD_KMODTOOL +pushd ${LBUILD_DIR}/rhel7 +patch -p1 < kmodtool.patch +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|" \ + ${LBUILD_DIR}/rhel7/rpmmacros.template > ${LBUILD_DIR}/rhel7/rpmmacros +cat ${LBUILD_DIR}/rhel7/rpmmacros >> $RMAC + patch_spec() { local buildid="$1"