]> granicus.if.org Git - apache/commitdiff
Don't use GNU tar.
authorWilfredo Sanchez <wsanchez@apache.org>
Mon, 25 Nov 2002 04:17:11 +0000 (04:17 +0000)
committerWilfredo Sanchez <wsanchez@apache.org>
Mon, 25 Nov 2002 04:17:11 +0000 (04:17 +0000)
Problem here is that GNU tar creates tar archives which are not POSIX-compliant and cannot be unpacked using a POSIX tar program.
Typical oopsie is a developer uses binbuild to pack up an httpd release on a system which does not include gtar in the standard distro, but it's there on the developer's computer.  User downloads it and find that it won't unpack with standard tar, even though it claims to be a tar archive.  Blah.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97635 13f79535-47bb-0310-9956-ffa450edef68

build/binbuild.sh

index 2e1b669f0b04a9e7656265588536eddcc857e0ab..dd712e2952371bcf51220606141895d2c46a5213 100755 (executable)
@@ -15,7 +15,6 @@ APFULLDIR=`pwd`
 CONFIGPARAM="--enable-layout=Apache --prefix=$BUILD_DIR --enable-mods-shared=most --with-expat=$APFULLDIR/srclib/apr-util/xml/expat --enable-static-support"
 VER=`echo $APDIR |sed s/httpd-//`
 TAR="`srclib/apr/build/PrintPath tar`"
-GTAR="`srclib/apr/build/PrintPath gtar`"
 GZIP="`srclib/apr/build/PrintPath gzip`"
 
 if [ x$1 != x ]; then
@@ -149,26 +148,25 @@ then
   echo "ERROR: Failed to build Apache. See \"build.log\" for details."
   exit 1;
 else
-  if [ "x$GTAR" != "x" ]
+  if [ "x$TAR" != "x" ]
   then
-    $GTAR -zcf ../httpd-$VER-$OS.tar.gz -C .. httpd-$VER
-  else
-    if [ "x$TAR" != "x" ]
+    case "x$OS" in
+      x*os390*) $TAR -cfU ../httpd-$VER-$OS.tar -C .. httpd-$VER;;
+      *) (cd .. && $TAR -cf httpd-$VER-$OS.tar httpd-$VER);;
+    esac
+    if [ "x$GZIP" != "x" ]
     then
-      case "x$OS" in
-        x*os390*) $TAR -cfU ../httpd-$VER-$OS.tar -C .. httpd-$VER;;
-           *) (cd .. && $TAR -cf httpd-$VER-$OS.tar httpd-$VER);;
-      esac
-      if [ "x$GZIP" != "x" ]
-      then
-        $GZIP ../httpd-$VER-$OS.tar
-      fi
+      $GZIP -9 ../httpd-$VER-$OS.tar
     else
-      echo "ERROR: Could not find a 'tar' program!"
-      echo "       Please execute the following commands manually:"
-      echo "         tar -cf ../httpd-$VER-$OS.tar ."
-      echo "         gzip ../httpd-$VER-$OS.tar"
+      echo "WARNING: Could not find a 'gzip' program!"
+      echo "       Please execute the following command manually:"
+      echo "         gzip -9 ../httpd-$VER-$OS.tar"
     fi
+  else
+    echo "ERROR: Could not find a 'tar' program!"
+    echo "       Please execute the following commands manually:"
+    echo "         tar -cf ../httpd-$VER-$OS.tar ."
+    echo "         gzip -9 ../httpd-$VER-$OS.tar"
   fi
 
   if [ -f ../httpd-$VER-$OS.tar.gz ] && [ -f ../httpd-$VER-$OS.README ]