automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.13.1b-1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.13.1b-192-gdc4eaab
Date: Tue, 30 Apr 2013 15:24:27 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=dc4eaab21b45b6b1fe4348db603380dd9681d5c3

The branch, master has been updated
       via  dc4eaab21b45b6b1fe4348db603380dd9681d5c3 (commit)
       via  96b1303de222614b325b6744e61addf15d4f80cf (commit)
       via  2a40fa7174961a0eb0ca08280ab638ed1998ead4 (commit)
       via  f6338e8c4c818235aa333d8670023dd4d61ee04a (commit)
       via  ba7b59bf48ff262be97445ee4f4f94e85de4cb60 (commit)
       via  edfd3bc4c1057be0b5553b5789a44f1b77bb2b45 (commit)
       via  f0d1288f3a2033577ee4e374d203bcb5d8477a9d (commit)
       via  3fd147d8cf435e337bc9c6270da23633993967cf (commit)
       via  526df875677f9e67b86c89ad1c611a77cb924662 (commit)
       via  13ca4c137dd5b33778861b82dfd1738fd601fb4f (commit)
       via  ad5816114582e329cfaf6df84ebfd6ddba190e34 (commit)
       via  fa55c5d8b1f37114c7c908957e9165b5accdd655 (commit)
       via  d23c55c2ef93c4678c5ded559663aa70699ff1d6 (commit)
       via  cfe0abc7fcedfac86c8928a7dce41aeb41f461a9 (commit)
       via  df375ef1c7f57bea5140b446ddd8ffb255913480 (commit)
       via  334a2e0b46c3d17ffb24f415cbec2e13e48b6c94 (commit)
       via  3de27839c88bda6c755f00c7142620080b725be0 (commit)
       via  2d47361d9b5a8f313408c940ed23a24592db88f7 (commit)
       via  40f949c71a05c411989746e74e661323b62ce083 (commit)
      from  820d90935c4ee1a32723ffa51b54646c7ed90514 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dc4eaab21b45b6b1fe4348db603380dd9681d5c3
Merge: 820d909 96b1303
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 30 16:24:41 2013 +0200

    Merge branch 'maint'
    
    * maint:
      sync: update files from upstream with "make fetch"
      maintcheck: remove outdated whitelisting
      tar: format 'ustar' cannot support UID/GID longer than 21 bits
      docs: issues with configure substitutions in TESTS
      tests: avoid possible autotools caching issues (automake bug#13832)
      tests: rename some with more descriptive names
      docs: add myself and Ralf Wildenhues as authors
      authors: add myself
      dry-run: don't get confused by '-I' option
      tests: avoid a spurious failure with the Korn Shell
      dry-run: with GNU make, prefer $(MFLAGS) over $(MAKEFLAGS)
      header vars: can determine whether we are running under GNU make
      NEWS: improve wording for automake bug#13514 fix
      NEWS: document fix for automake bug#13514

-----------------------------------------------------------------------

Summary of changes:
 AUTHORS                                 |    6 +
 NEWS                                    |   29 +++++-
 THANKS                                  |    3 +
 doc/automake.texi                       |    8 ++
 lib/am/header-vars.am                   |   57 ++++++++---
 lib/config.guess                        |   14 +++-
 lib/config.sub                          |    6 +-
 m4/tar.m4                               |  160 +++++++++++++++++++------------
 maintainer/syntax-checks.mk             |   10 +--
 t/ar-lib4.sh                            |    2 +
 t/lisp-flags.sh                         |    2 +-
 t/list-of-tests.mk                      |   10 +-
 t/make-dryrun.tap                       |    4 +-
 t/{objext-pr10128.sh => make-is-gnu.sh} |   68 +++++++------
 t/{tar3.sh => tar-opts-errors.sh}       |   10 +-
 t/tar-override.sh                       |   17 ++--
 t/{tar2.sh => tar-pax.sh}               |   11 ++-
 t/tar-ustar-id-too-high.sh              |   88 +++++++++++++++++
 t/{tar.sh => tar-ustar.sh}              |   11 ++-
 19 files changed, 363 insertions(+), 153 deletions(-)
 copy t/{objext-pr10128.sh => make-is-gnu.sh} (52%)
 rename t/{tar3.sh => tar-opts-errors.sh} (87%)
 rename t/{tar2.sh => tar-pax.sh} (85%)
 create mode 100755 t/tar-ustar-id-too-high.sh
 rename t/{tar.sh => tar-ustar.sh} (85%)

diff --git a/AUTHORS b/AUTHORS
index e63f8b7..a3c5c01 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -19,3 +19,9 @@ Alexandre Duret-Lutz
 Ralf Wildenhues
   Random breakage.
   Maintenance since 2006.
+
+Stefano Lattarini
+  Testsuite overhaul.
+  TAP support and custom testsuite drivers.
+  Random breakage.
+  De-facto maintenance since 2012.
diff --git a/NEWS b/NEWS
index fb70eee..1bbb0fb 100644
--- a/NEWS
+++ b/NEWS
@@ -246,6 +246,12 @@ New in 1.13.2:
 
 * Bugs fixed:
 
+  - When the 'ustar' option is used, the generated configure script no
+    longer risks hanging during the tests for the availability of the
+    'pax' utility, even if the user running configure has a UID or GID
+    that requires more than 21 bits to be represented.
+    See automake bug#8343 and bug#13588.
+
   - The obsolete macros AM_CONFIG_HEADER or AM_PROG_CC_STDC work once
     again, as they did in Automake 1.12.x (albeit printing runtime
     warnings in the 'obsolete' category).  Removing them has turned
@@ -254,12 +260,23 @@ New in 1.13.2:
     Automake 1.13, has turned out to be a similarly very bad idea,
     for exactly the same reason.
 
-  - Aclocal no longer error out if the first local m4 directory (as
-    specified by the '-I' option or the 'AC_CONFIG_MACRO_DIRS' or
-    'AC_CONFIG_MACRO_DIR' macros) doesn't exist; it merely report a
-    warning in the 'unsupported' category.  This is done to support
-    some pre-existing real-world usages; refer to automake bug#13514
-    for more details.
+  - aclocal will no longer error out if the first local m4 directory
+    (as specified by the '-I' option or the 'AC_CONFIG_MACRO_DIRS' or
+    'AC_CONFIG_MACRO_DIR' macros) doesn't exist; it will merely report
+    a warning in the 'unsupported' category.  This is done to support
+    some pre-existing real-world usages.  See automake bug#13514.
+
+  - aclocal will no longer consider directories for extra m4 files more
+    than once, even if they are specified multiple times.  This ensures
+    packages that specify both
+
+        AC_CONFIG_MACRO_DIR([m4])       in configure.ac
+        ACLOCAL_AMFLAGS = -I m4         in Makefile.am
+
+    will work correctly, even when the 'm4' directory contains no
+    package-specific files, but is used only to install third-party
+    m4 files (as can happen with e.g., "libtoolize --install").
+    See automake bug#13514.
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/THANKS b/THANKS
index cf46972..6f82e93 100644
--- a/THANKS
+++ b/THANKS
@@ -226,6 +226,7 @@ Luo Yi                          address@hidden
 Maciej Stachowiak               address@hidden
 Maciej W. Rozycki               address@hidden
 Manu Rouat                      address@hidden
+Marc Herbert                    address@hidden
 Marcus Brinkmann                address@hidden
 Marcus G. Daniels               address@hidden
 Marius Vollmer                  address@hidden
@@ -314,6 +315,7 @@ Peter Muir                      address@hidden
 Peter O'Gorman                  address@hidden
 Peter Rosin                     address@hidden
 Peter Seiderer                  address@hidden
+Petr Hracek                     address@hidden
 Petter Reinholdtsen             address@hidden
 Petteri Räty                    address@hidden
 Phil Edwards                    address@hidden
@@ -394,6 +396,7 @@ Tim Rice                        address@hidden
 Tim Van Holder                  address@hidden
 Toshio Kuratomi                 address@hidden
 Tom Epperly                     address@hidden
+Tom Rini                        address@hidden
 Ulrich Drepper                  address@hidden
 Ulrich Eckhardt                 address@hidden
 Václav Haisman                  address@hidden
diff --git a/doc/automake.texi b/doc/automake.texi
index ec17160..9c46b5c 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -53,6 +53,8 @@ section entitled ``GNU Free Documentation License.''
 @author David MacKenzie
 @author Tom Tromey
 @author Alexandre Duret-Lutz
address@hidden Ralf Wildenhues
address@hidden Stefano Lattarini
 @page
 @vskip 0pt plus 1filll
 @insertcopying
@@ -9086,6 +9088,12 @@ followed by any number of alphabetic characters.
 For example, @samp{.sh}, @samp{.T} and @samp{.t1} are valid extensions,
 while @samp{.x-y}, @samp{.6c} and @samp{.t.1} are not.
 
address@hidden Configure substitutions in @code{TESTS}
+It is important to note that, due to current limitations (unlikely to be
+lifted), configure substitutions in the definition of @code{TESTS} can
+only work if they will expand to a list of tests that have a suffix listed
+in @code{TEST_EXTENSIONS}.
+
 @vindex _LOG_COMPILE
 @vindex _LOG_COMPILER
 @vindex _LOG_FLAGS
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 9fda37c..d2f0984 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -26,32 +26,57 @@ VPATH = @srcdir@
 ## a vendor make.
 ## DESTDIR =
 
+## Shell code that determines whether we are running under GNU make.
+## This is somewhat of an hack, and might be improved, but is good
+## enough for now.
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+
 ## Shell code that determines whether make is running in "dry mode"
 ## ("make -n") or not.  Useful in rules that invoke make recursively,
 ## and are thus executed also with "make -n" -- either because they
 ## are declared as dependencies to '.MAKE' (NetBSD make), or because
 ## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
-
 am__make_dryrun = \
   { \
     am__dry=no; \
-    case $$MAKEFLAGS in \
-## If we run "make TESTS='snooze nap'", GNU make will export MAKEFLAGS
-## to "TESTS=foo\ nap", so that the simpler loop below (on word-splitted
+    if $(am__is_gnu_make); then \
+## GNU make: $(MAKEFLAGS) is quite tricky there, and the older
+## $(MFLAGS) variable behaves much better.
+      for am__flg in $$MFLAGS; do \
+        case $$am__flg in \
+          *=*|--*) ;; \
+          -*n*) am__dry=yes; break;; \
+        esac; \
+      done; \
+    else \
+## Non-GNU make: we must rely on $(MAKEFLAGS).  This is tricky and brittle,
+## but is the best we can do.
+      case $$MAKEFLAGS in \
+## If we run "make TESTS='snooze nap'", FreeBSD make will export MAKEFLAGS
+## to " TESTS=foo\ nap", so that the simpler loop below (on word-splitted
 ## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
 ## misinterpret that as and indication that make is running in dry mode.
-## This has already happened in practice.  So we need this hack.
-      *\\[\ \  ]*) \
-        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
-      *) \
-        for am__flg in $$MAKEFLAGS; do \
-          case $$am__flg in \
-            *=*|--*) ;; \
-            *n*) am__dry=yes; break;; \
-          esac; \
-        done;; \
-    esac; \
+## This has already happened in practice.  So we need this unpleasant hack.
+         *\\[\ \       ]*) \
+           echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+             | grep '^AM OK$$' >/dev/null || am__dry=yes ;; \
+         *) \
+          am__skip_next=no; \
+           for am__flg in $$MAKEFLAGS; do \
+            if test $$am__skip_next = yes; then \
+              am__skip_next=no; \
+              continue; \
+            fi; \
+             case $$am__flg in \
+               *=*|--*) ;; \
+## Quite ugly special-casing.  We might need other similar, but let's
+## wait until the need arises.
+              -I) am__skip_next=yes;; \
+               *n*) am__dry=yes; break;; \
+             esac; \
+           done ;;\
+       esac; \
+    fi; \
     test $$am__dry = yes; \
   }
 
diff --git a/lib/config.guess b/lib/config.guess
index f475ceb..2055429 100755
--- a/lib/config.guess
+++ b/lib/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2013-02-12'
+timestamp='2013-04-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -883,6 +883,9 @@ EOF
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
        exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     arm*:Linux:*:*)
        eval $set_cc_for_build
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -921,6 +924,11 @@ EOF
        #ifdef __dietlibc__
        LIBC=dietlibc
        #endif
+       #else
+       #include <features.h>
+       #ifdef __UCLIBC__
+       LIBC=uclibc
+       #endif
 EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
        echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
@@ -998,7 +1006,9 @@ EOF
        echo ${UNAME_MACHINE}-dec-linux-gnu
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       LIBC=gnu
+       test -r /lib/libc.so && od -An -S13 /lib/libc.so | grep -q 
__uClibc_main && LIBC=uclibc
+       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     xtensa*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
diff --git a/lib/config.sub b/lib/config.sub
index 872199a..8b612ab 100755
--- a/lib/config.sub
+++ b/lib/config.sub
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2013-02-12'
+timestamp='2013-04-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -252,7 +252,7 @@ case $basic_machine in
        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | 
alpha64pca5[67] \
        | am33_2.0 \
-       | arc \
+       | arc | arceb \
        | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
        | avr | avr32 \
        | be32 | be64 \
@@ -366,7 +366,7 @@ case $basic_machine in
        | aarch64-* | aarch64_be-* \
        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+       | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | be32-* | be64-* \
diff --git a/m4/tar.m4 b/m4/tar.m4
index ec8c83e..aac6d8f 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -19,76 +19,114 @@
 # Substitute a variable $(am__untar) that extract such
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
+#
 AC_DEFUN([_AM_PROG_TAR],
 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
-     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-     [m4_case([$1], [ustar],, [pax],,
-              [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
-  case $_am_tool in
-  gnutar)
-    for _am_tar in tar gnutar gtar;
-    do
-      AM_RUN_LOG([$_am_tar --version]) && break
-    done
-    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - 
"'"$$tardir"'
-    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - 
"'"$tardir"'
-    am__untar="$_am_tar -xf -"
-    ;;
-  plaintar)
-    # Must skip GNU tar: if it does not support --format= it doesn't create
-    # ustar tarball either.
-    (tar --version) >/dev/null 2>&1 && continue
-    am__tar='tar chf - "$$tardir"'
-    am__tar_='tar chf - "$tardir"'
-    am__untar='tar xf -'
-    ;;
-  pax)
-    am__tar='pax -L -x $1 -w "$$tardir"'
-    am__tar_='pax -L -x $1 -w "$tardir"'
-    am__untar='pax -r'
-    ;;
-  cpio)
-    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-    am__untar='cpio -i -H $1 -d'
-    ;;
-  none)
-    am__tar=false
-    am__tar_=false
-    am__untar=false
-    ;;
-  esac
 
-  # If the value was cached, stop now.  We just wanted to have am__tar
-  # and am__untar set.
-  test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
 
-  # tar/untar a dummy directory, and stop if the command works
-  rm -rf conftest.dir
-  mkdir conftest.dir
-  echo GrepMe > conftest.dir/file
-  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - 
"'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - 
"'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
+
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      AM_RUN_LOG([$am__untar <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
   rm -rf conftest.dir
-  if test -s conftest.tar; then
-    AM_RUN_LOG([$am__untar <conftest.tar])
-    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-  fi
-done
-rm -rf conftest.dir
 
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+  
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk
index 1f72085..6614820 100644
--- a/maintainer/syntax-checks.mk
+++ b/maintainer/syntax-checks.mk
@@ -375,13 +375,7 @@ sc_tests_overriding_macros_on_cmdline:
 # The first s/// tries to account for usages like "$MAKE || st=$?".
 # 'DISTCHECK_CONFIGURE_FLAGS' and 'exp' are allowed to contain whitespace in
 # their definitions, hence the more complex last three substitutions below.
-# Also, the 'make-dryrun.sh' is whitelisted, since there we need to
-# override variables from the command line in order to cover the expected
-# code paths.
-       @tests=`for t in $(xtests); do \
-                 case $$t in */make-dryrun.sh);; *) echo $$t;; esac; \
-               done`; \
-       if sed -e 's/ || .*//' -e 's/ && .*//' \
+       @if sed -e 's/ || .*//' -e 's/ && .*//' \
                -e 's/ DESTDIR=[^ ]*/ /' -e 's/ SHELL=[^ ]*/ /' \
                -e 's/ V=[^ ]*/ /' -e 's/ DISABLE_HARD_ERRORS=[^ ]*/ /' \
                -e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
@@ -390,7 +384,7 @@ sc_tests_overriding_macros_on_cmdline:
                -e "s/ exp='[^']*'/ /" \
                -e 's/ exp="[^"]*"/ /' \
                -e 's/ exp=[^ ]/ /' \
-             $$tests | grep '\$$MAKE .*='; then \
+             $(xtests) | grep '\$$MAKE .*='; then \
          echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above 
lines,' 1>&2; \
          echo 'it is more portable.' 1>&2; \
          exit 1; \
diff --git a/t/ar-lib4.sh b/t/ar-lib4.sh
index 68615e8..4d3c40a 100755
--- a/t/ar-lib4.sh
+++ b/t/ar-lib4.sh
@@ -39,6 +39,8 @@ AUTOMAKE_fails
 
 grep 'requires.*AM_PROG_AR' stderr
 
+rm -rf autom4te*.cache
+
 cp X configure.ac
 
 cat >> configure.ac << 'END'
diff --git a/t/lisp-flags.sh b/t/lisp-flags.sh
index a31bcfd..1ea5b8e 100755
--- a/t/lisp-flags.sh
+++ b/t/lisp-flags.sh
@@ -20,7 +20,7 @@
 
 # Don't get fooled when running as an Emacs subprocess.  This is
 # for the benefit of the "make -e" invocation below.
-unset EMACS
+EMACS=; unset EMACS
 
 cat > Makefile.am << 'EOF'
 lisp_LISP = foo.el
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 1c069ef..5a35b7f 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -667,8 +667,9 @@ t/makej.sh \
 t/makej2.sh \
 t/maken.sh \
 t/maken3.sh \
-t/make-dryrun.tap \
 t/makevars.sh \
+t/make-dryrun.tap \
+t/make-is-gnu.sh \
 t/man.sh \
 t/man2.sh \
 t/man3.sh \
@@ -1155,9 +1156,10 @@ t/tags.sh \
 t/tags2.sh \
 t/tagsub.sh \
 t/tags-pr12372.sh \
-t/tar.sh \
-t/tar2.sh \
-t/tar3.sh \
+t/tar-ustar.sh \
+t/tar-pax.sh \
+t/tar-opts-errors.sh \
+t/tar-ustar-id-too-high.sh \
 t/tar-override.sh \
 t/target-cflags.sh \
 t/targetclash.sh \
diff --git a/t/make-dryrun.tap b/t/make-dryrun.tap
index 1459a9f..208b421 100755
--- a/t/make-dryrun.tap
+++ b/t/make-dryrun.tap
@@ -112,10 +112,10 @@ check_make --dry -C using_gmake "\$MAKE is not GNU make" 
--dry-run -k
 
 pr='bug#13760'
 
-check_make --run -X -C make_supports_option_I "-I make option unsupported" \
+check_make --run -C make_supports_option_I "-I make option unsupported" \
                  -M "$pr" -I none
 
-check_make --run -X -C using_gmake "\$MAKE is not GNU make" \
+check_make --run -C using_gmake "\$MAKE is not GNU make" \
                  -M "$pr" -I none --include dry-run 
 
 check_make --dry -C make_supports_option_I "-I make option unsupported" \
diff --git a/t/objext-pr10128.sh b/t/make-is-gnu.sh
similarity index 52%
copy from t/objext-pr10128.sh
copy to t/make-is-gnu.sh
index 6fb64ab..c37cc17 100755
--- a/t/objext-pr10128.sh
+++ b/t/make-is-gnu.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2012-2013 Free Software Foundation, Inc.
+# Copyright (C) 2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,45 +14,53 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for automake bug#10128: $(OBJEXT) redefinition causes
-# $(foo_OBJECTS) to be defined as empty.
+# Check that $(am__is_gnu_make) can be used to correctly determine if
+# we are running under GNU make.
 
 . test-init.sh
 
+if using_gmake; then
+ as_expected () { test $1 -eq 0 && test -f ok && test ! -e ko; }
+else
+ as_expected () { test $1 -gt 0 && test -f ko && test ! -e ok; }
+fi
+
 echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am <<'END'
-LINK = echo >$@ Linked $@ from
-OBJEXT = fasl
-EXEEXT =
-
-noinst_PROGRAMS = foo zardoz
-foo_SOURCES = foo.lisp
-zardoz_SOURCES = mu1.lisp mu2.lisp
-
-## Un-commenting this is enough to make the test pass.  Weird!
-##.lisp.o:
-
-.lisp.fasl:
-       touch $@
-
-.PHONY: test
-test:
-       is $(foo_OBJECTS) == foo.fasl
-       is $(zardoz_OBJECTS) == mu1.fasl mu2.fasl
+all: file
+       $(am__is_gnu_make)
+file:
+       if $(am__is_gnu_make); then : > ok; else : > ko; fi 
 END
 
 $ACLOCAL
-$AUTOMAKE
 $AUTOCONF
-
+$AUTOMAKE
 ./configure
-$MAKE test
-touch foo.lisp mu1.lisp mu2.lisp
-$MAKE all
-cat foo
-cat zardoz
-test "$(cat foo)"    = "Linked foo from foo.fasl"
-test "$(cat zardoz)" = "Linked zardoz from mu1.fasl mu2.fasl"
+
+st=0; $MAKE || st=$?
+if using_gmake; then
+ test $st -eq 0
+ test -f ok
+ test ! -e ko
+else
+ test $st -gt 0
+ test -f ko
+ test ! -e ok
+fi
+
+rm -f ok ko
+
+$MAKE -s file >output 2>&1
+cat output
+if using_gmake; then
+ test -f ok
+ test ! -e ko
+else
+ test -f ko
+ test ! -e ok
+fi
+test ! -s output
 
 :
diff --git a/t/tar3.sh b/t/tar-opts-errors.sh
similarity index 87%
rename from t/tar3.sh
rename to t/tar-opts-errors.sh
index 040d7b4..befc23f 100755
--- a/t/tar3.sh
+++ b/t/tar-opts-errors.sh
@@ -18,8 +18,8 @@
 
 . test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-pax tar-v7])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -37,8 +37,8 @@ grep "'tar-v7'"  tar-err
 
 rm -rf autom4te.cache
 
-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -47,6 +47,6 @@ END
 echo 'AUTOMAKE_OPTIONS = tar-pax' > Makefile.am
 
 AUTOMAKE_fails
-grep '^Makefile\.am:1:.*tar-pax.*AM_INIT_AUTOMAKE' stderr
+grep "^Makefile\.am:1:.*'tar-pax'.*AM_INIT_AUTOMAKE" stderr
 
 :
diff --git a/t/tar-override.sh b/t/tar-override.sh
index 863b9ab..bbf3fbb 100755
--- a/t/tar-override.sh
+++ b/t/tar-override.sh
@@ -16,8 +16,8 @@
 
 # Check that the user can override the tar program used by "make dist"
 # at runtime, by redefining the 'TAR' environment variable.
-# FIXME: currently this works only when the tar format used is 'v7'
-# FIXME: (which is the default one).
+# NOTE: currently this works only when the tar format used is 'v7'
+#       (which is the default one).
 
 . test-init.sh
 
@@ -35,6 +35,7 @@ chmod a+x am--tar
 
 cat > Makefile.am <<'END'
 check-local: dist
+       ls -l ;: For debugging.
        test -f am--tar-has-run
 CLEANFILES = am--tar-has-run
 END
@@ -44,22 +45,24 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
+clean_temp () { rm -f *.tar.* *has-run*; }
+
 $MAKE dist
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 ls | grep has-run && exit 1
 
-rm -f *.tar.* *has-run*
+clean_temp
 
 TAR="$cwd/am--tar foo" $MAKE distcheck
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 test "$(cat am--tar-has-run)" = foo
 
-rm -f *.tar.* *has-run*
+clean_temp
 
 TAR=; unset TAR
 # Creative use of eval to pacify maintainer checks.
 eval \$'MAKE dist "TAR=./am--tar mu"'
-test -f $me-1.0.tar.gz
+test -f $distdir.tar.gz
 test "$(cat am--tar-has-run)" = mu
 
 :
diff --git a/t/tar2.sh b/t/tar-pax.sh
similarity index 85%
rename from t/tar2.sh
rename to t/tar-pax.sh
index 5a9d4d7..758d89a 100755
--- a/t/tar2.sh
+++ b/t/tar-pax.sh
@@ -18,8 +18,8 @@
 
 . test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT([tar2], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-pax])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -32,9 +32,12 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-if grep 'am__tar.*false' Makefile; then
+grep 'am__tar' Makefile # For debugging.
+if grep '^am__tar = false' Makefile; then
   skip_ "cannot find proper archiver program"
 fi
 
 $MAKE distcheck
-test -f tar2-1.0.tar.gz
+test -f "$distdir.tar.gz"
+
+:
diff --git a/t/tar-ustar-id-too-high.sh b/t/tar-ustar-id-too-high.sh
new file mode 100755
index 0000000..79ae89d
--- /dev/null
+++ b/t/tar-ustar-id-too-high.sh
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2013 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that UID or GID too high for the ustar format are correctly
+# rwcognized and diagnosed by configure.  See bug#8343 and bug#13588.
+
+. test-init.sh
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([tar-ustar])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+run_configure()
+{
+  st=0; ./configure ${1+"$@"}  >stdout || st=$?
+  cat stdout || exit 1
+  test $st -eq 0 || exit 1
+}
+
+checked ()
+{
+  grep "^checking $1\.\.\. $2$" stdout
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+mkdir bin
+cat > bin/id <<'END'
+#!/bin/sh -e
+case "$*" in
+  -u) echo "${am_uid-1000}";;
+  -g) echo "${am_gid-1000}";;
+   *) echo "id: bad/unexpected usage" >&2; exit 1;;
+esac
+END
+chmod a+x bin/id
+
+PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
+
+# Problematic ID reported in
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=16777216; export am_uid
+am_gid=1000;     export am_gid
+run_configure
+checked "whether UID '$am_uid' is supported by ustar format" "no"
+checked "whether GID '1000' is supported by ustar format" "yes"
+checked "how to create a ustar tar archive" "none"
+
+# Another problematic ID reported in
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=1000;     export am_uid
+am_gid=17000000; export am_gid
+run_configure
+checked "whether UID '1000' is supported by ustar format" "yes"
+checked "whether GID '$am_gid' is supported by ustar format" "no"
+checked "how to create a ustar tar archive" "none"
+
+# The minimal ID that is too big.
+two_to_twentyone=$((32 * 32 * 32 * 32 * 2))
+# <https://bugzilla.redhat.com/show_bug.cgi?id=843376>.
+am_uid=$two_to_twentyone; export am_uid
+am_gid=$two_to_twentyone; export am_gid
+run_configure
+checked "whether UID '$two_to_twentyone' is supported by ustar format" "no"
+checked "whether GID '$two_to_twentyone' is supported by ustar format" "no"
+checked "how to create a ustar tar archive" "none"
+
+:
diff --git a/t/tar.sh b/t/tar-ustar.sh
similarity index 85%
rename from t/tar.sh
rename to t/tar-ustar.sh
index 58e52ea..c146ad9 100755
--- a/t/tar.sh
+++ b/t/tar-ustar.sh
@@ -18,8 +18,8 @@
 
 . test-init.sh
 
-cat > configure.ac << 'END'
-AC_INIT([tar], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([tar-ustar])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -32,9 +32,12 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-if grep 'am__tar.*false' Makefile; then
+grep 'am__tar' Makefile # For debugging.
+if grep '^am__tar = false' Makefile; then
   skip_ "cannot find proper archiver program"
 fi
 
 $MAKE distcheck
-test -f tar-1.0.tar.gz
+test -f "$distdir.tar.gz"
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]