From 9c64eaaa5d90b0e7bcd6c3ebb9863204607334ce Mon Sep 17 00:00:00 2001 From: Stephen Herbein Date: Tue, 16 Jun 2020 21:06:40 -0700 Subject: [PATCH] configure: use newer tar format to support longer filenames Problem: when running `make distcheck`, the creation of a tarball fails due to filenames that are too long. This is because autotools defaults to the oldest, most compatible tar format (v7) which limits filename length to 99 characters. Solution: switch to a newer tar format (which is honestly still quite old - defined in the 1988 POSIX Standard) called `ustar` that supports filenames up to 256 characters in length. If this becomes a problem in the future, we can switch to `pax` which has no limits. Additionally, set the filename-length-max option so that the entire build fails rather than the tar silently failing to be created. Further Reading: - https://www.gnu.org/software/tar/manual/html_section/tar_67.html - https://www.gnu.org/software/automake/manual/html_node/List-of-Automake-options.html - https://noiselabs.io/tar-file-name-is-too-long-max-99/ --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 29da84521..face2a3ff 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([config]) AC_CONFIG_SRCDIR([NEWS]) -AM_INIT_AUTOMAKE([subdir-objects]) +AM_INIT_AUTOMAKE([subdir-objects tar-ustar filename-length-max=256]) AM_SILENT_RULES([yes]) AM_CONFIG_HEADER([config.h]) AM_MAINTAINER_MODE([enable])