X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=build%2Flbuild-rhel;h=efb5c816452869ed91af079de4e46478c4fde303;hb=d25892863a30a385cdae2b1991ab0a9ca76fcd7d;hp=235debdcc7fc862bdf84f6b25d7fce15a9dbb54e;hpb=c66d8316766c3b35032d6bee7113a74cd690105c;p=fs%2Flustre-release.git diff --git a/build/lbuild-rhel b/build/lbuild-rhel index 235debd..efb5c81 100644 --- a/build/lbuild-rhel +++ b/build/lbuild-rhel @@ -21,8 +21,7 @@ get_rpmbuildopts() { # patching common to all releases patch_spec_common() { - sed -i -e 's/^\(%define signmodules \).*/\10/' \ - -e '/find $RPM_BUILD_ROOT\/lib\/modules\/$KernelVer/a\ + sed -i -e '/find $RPM_BUILD_ROOT\/lib\/modules\/$KernelVer/a\ cp -a fs/ext3/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/fs/ext3 \ cp -a fs/ext4/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/fs/ext4' \ SPECS/$SPEC_NAME 2>&1 || \ @@ -114,7 +113,11 @@ prepare_and_build_srpm() { # for informative purposes, display a diff between the .config that # was actually built and what we proposed as a .config echo "Diffs between $(basename $CONFIG_FILE) and the built kernel's .config:" - diff -u $CONFIG_FILE $TOPDIR/BUILD/kernel-${lnxmaj}-${lnxrel}/linux-${lnxmaj}-${lnxrel}.${BUILD_ARCHS# }/.config + local rpmname="$TOPDIR/RPMS/${BUILD_ARCHS# }/kernel-${lnxmaj}-${lnxrel}${buildid}.${BUILD_ARCHS# }.rpm" + rpmcfg=$(rpm -qpl $rpmname | grep '/boot/config-') + rpm2cpio $rpmname | cpio -id .$rpmcfg + diff -u $CONFIG_FILE .$rpmcfg + rm -rf .$rpmcfg return 0 @@ -192,7 +195,9 @@ find_linux_rpm-rhel() { if [ "$(lsb_release -s -i)" = "RedHatEnterpriseServer" ]; then sudo="sudo" fi - $sudo yumdownloader --destdir "$tmpdir" kernel-devel-"$wanted_kernel" > /dev/null + if ! $sudo yumdownloader --destdir "$tmpdir" kernel-devel-"$wanted_kernel" > /dev/null; then + fatal 1 "failed to fetch kernel-devel-$wanted_kernel with yumdownloader." + fi local rpm=$(cd $tmpdir; echo *) mv "$tmpdir/$rpm" "$pathtorpms" rmdir $tmpdir