]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
dist: change tar format default to ustar.
authorKarl Berry <karl@freefriends.org>
Mon, 24 Feb 2025 22:41:48 +0000 (14:41 -0800)
committerKarl Berry <karl@freefriends.org>
Mon, 24 Feb 2025 22:41:48 +0000 (14:41 -0800)
Suggested in https://bugs.gnu.org74847.

* m4/init.m4 (tar-ustar): make ustar the default instead of tar-v7.
* doc/automake.texi (tar-formats): document this.
* NEWS: mention this.
* t/tar-override.sh: force tar-v7 for purposes of this test.

NEWS
doc/automake.texi
m4/init.m4
t/tar-override.sh

diff --git a/NEWS b/NEWS
index da6b5e4937b3c920b83c59d5cf17cf246d57f82a..d06de78fd16eaff58e190351115d91eca20c6797 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,13 +6,17 @@ New in 1.x:
 
 * New features added
 
+  - Default tar format is now ustar, mainly to support longer filenames;
+    the tar-v7 and other explicit options to force a particular tar
+    format are unchanged and still override the default. (bug#74847)
+
+  - New option dist-bzip3 for bzip3 compression of distributions. (bug#73795)
+
   - New option --stderr-prefix for tap-driver.sh, to prefix each line of
     stderr from a test script with a given string. (bug#72536)
 
   - Support for Algol 68 added, based on the GNU Algol 68 compiler. (bug#75807)
 
-  - New option dist-bzip3 for bzip3 compression of distributions. (bug#73795)
-
 * Bugs fixed
 
   - Do not make Perl warnings fatal, per Perl's recommendation.
index 6dcd948264959dd2cbb5e79e67698da4a6c1b784..51190ea50ed70303a80abe2221d3f0e8161eab41 100644 (file)
@@ -11373,7 +11373,7 @@ These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
 Automake will complain if it sees such options in an
 @code{AUTOMAKE_OPTIONS} variable.
 
-@option{tar-v7} selects the old V7 tar format.  This is the historical
+@option{tar-v7} selects the old V7 tar format.  This was the historical
 default.  This antiquated format is understood by all tar
 implementations and supports file names with up to 99 characters.  When
 given longer file names some tar implementations will diagnose the
@@ -11383,7 +11383,8 @@ directories.  When using this format, consider using the
 @option{filename-length-max=99} option to catch file names too long.
 
 @option{tar-ustar} selects the ustar format defined by POSIX
-1003.1-1988.  This format is old enough to be portable:
+1003.1-1988.  This format became the default in Automake version 1.18
+(released in 2025).
 As of 2018, it is supported by the native @code{tar} command on
 GNU, FreeBSD, NetBSD, OpenBSD, AIX, HP-UX, and Solaris, at least.
 It fully supports empty directories.  It can store file names with up
index 5da8f9e13f72efdefee94fd302bc25b90eb7413c..ed10dabcf771d915634601e5f077a9141f17ec36 100644 (file)
@@ -100,8 +100,9 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-             [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-                            [_AM_PROG_TAR([v7])])])
+  [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+    [_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])],
+      [_AM_PROG_TAR([ustar])])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
                  [_AM_DEPENDENCIES([CC])],
index 941a599dabbed8b27fb1391d158b5a7bda50d044..e02c255cabc1cfc44319eaf1829c072c67f2b046 100644 (file)
 
 # Check that the user can override the tar program used by "make dist"
 # at runtime, by redefining the 'TAR' environment variable.
-# NOTE: currently this works only when the tar format used is 'v7'
-#       (which is the default one).
+# 
+# Currently this works only when the tar format used is 'v7';
+# as of 2025 (automake-1.18), this is no longer the default,
+# so force that format in our test setup.
 
 . test-init.sh
 
 cwd=$(pwd) || fatal_ "getting current working directory"
 
-echo AC_OUTPUT >> configure.ac
+cat > configure.ac << 'END'
+AC_INIT([tar-override], [1.0])
+AM_INIT_AUTOMAKE([tar-v7])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
 
 cat > am--tar <<'END'
 #!/bin/sh