Skip to content

Commit

Permalink
configure: use newer tar format to support longer filenames
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
SteVwonder committed Jul 13, 2020
1 parent 18950bd commit 31be293
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 31be293

Please sign in to comment.