From 64cde5bb9f43a7c5d1c5b3b579a7c488814b11b2 Mon Sep 17 00:00:00 2001 From: Wilfredo Sanchez Date: Mon, 25 Nov 2002 04:17:11 +0000 Subject: [PATCH] Don't use GNU tar. 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 | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/build/binbuild.sh b/build/binbuild.sh index 2e1b669f0b..dd712e2952 100755 --- a/build/binbuild.sh +++ b/build/binbuild.sh @@ -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 ] -- 2.40.0