Whamcloud - gitweb
Revert "b=21489 fix several write+utimes race conditions"
[fs/lustre-release.git] / build / lbuild.old_school
index 3b77c8e..362da9f 100644 (file)
@@ -25,7 +25,7 @@ build_tarball() {
         mkdir $RPMTOPDIR/BUILD/
         rpm -ivh $KERNELDIR/$SRPM --define "_topdir $RPMTOPDIR" || \
             { rm -rf $RPMTOPDIR; fatal 1 "Error installing kernel SRPM."; }
-        $RPMBUILD -bp --nodeps --target i686 $RPMTOPDIR/SPECS/$SPEC --define "_topdir $RPMTOPDIR"
+        $RPMBUILD -bp --nodeps --target i686 $RPMTOPDIR/SPECS/$SPEC --define "_topdir $RPMTOPDIR" 2>&1
         pushd $RPMTOPDIR/BUILD/kernel-${lnxmaj}/linux-${lnxmaj} && {
             make mrproper
             cp configs/kernel-${lnxmaj}-i686-smp.config .config
@@ -90,8 +90,8 @@ patch_linux() {
 pack_linux() {
     TARBALL="$(readlink linux)-$EXTRA_VERSION.tar.gz"
     echo "Creating patched linux tarball $TARBALL..."
-    tar zcf "$TARBALL" "$(readlink linux)" \
-        --exclude "CVS" --exclude ".cvsignore" || \
+    tar -zcf "$TARBALL" "$(readlink linux)" \
+        --exclude "CVS" --exclude ".cvsignore" \
         --exclude "*.orig" --exclude "*~" --exclude "*.rej" || \
         fatal 1 "Error creating patched Linux tarball."
 }
@@ -175,13 +175,13 @@ build_kernel() {
 
     $RPMBUILD $targets $rpmbuildopt lustre-kernel-2.4.spec \
         --define "_tmppath $TMPDIR" \
-        --define "_topdir $TOPDIR" || \
+        --define "_topdir $TOPDIR" 2>&1 || \
         fatal 1 "Error building rpms for $BUILD_ARCHS."
 
     if $DO_SRC; then
         $RPMBUILD -bs lustre-kernel-2.4.spec \
             --define "_tmppath $TMPDIR" \
-            --define "_topdir $TOPDIR" || \
+            --define "_topdir $TOPDIR" 2>&1 || \
             fatal 1 "Error building .src.rpm."
     fi
 
@@ -203,19 +203,17 @@ build_kernel() {
     < $ldiskfs_spec \
     > ../lustre-ldiskfs.spec
 
-    $RPMBUILD $targets $rpmbuildopt ../lustre-ldiskfs.spec \
-        --define "_tmppath /var/tmp" \
-        --define "_topdir $TOPDIR"
-    if [ "$?" != "0" ] ; then
+    if ! $RPMBUILD $targets $rpmbuildopt ../lustre-ldiskfs.spec \
+                   --define "_tmppath /var/tmp" \
+                   --define "_topdir $TOPDIR" 2>&1; then
         popd
         return 255
     fi
 
     if $DO_SRC; then
-            $RPMBUILD -bs ../lustre-ldiskfs.spec \
-            --define "_tmppath /var/tmp" \
-            --define "_topdir $TOPDIR"
-        if [ "$?" != "0" ] ; then
+            if ! $RPMBUILD -bs ../lustre-ldiskfs.spec \
+                           --define "_tmppath /var/tmp" \
+                           --define "_topdir $TOPDIR" 2>&1; then
             popd
             return 255
         fi
@@ -519,7 +517,7 @@ patchless_build_sequence() {
     # default to source type -source and special case below
     local type=-source
     case "$DISTRO" in
-        rhel* | fc*)
+        rhel*)
             type=-devel
             ;;
     esac
@@ -546,7 +544,7 @@ patchless_build_sequence() {
     if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then
         $rpmfound && build_kernel_ib
     fi
-    ( $rpmfound ) && build_lustre "$LINUX" && buildsuccess=true && find_linux_source_rpm
+    ( $rpmfound ) && build_lustre && buildsuccess=true && find_linux_source_rpm
     fi
 
     if $buildsuccess; then