From a5052b771f57fafca5e335a0fe9a4ce692e9226a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sat, 27 Sep 2025 16:16:52 +0100 Subject: [PATCH] build: replace distributed gzipped sources with zstandard zstd compressed sources are less than half the size of gzip coompressed sources, so are a better secondary distribution format in addition to xz. * README-prereq: Remove gzip, Add zstd. * bootstrap.conf (buildreq): Likewise. Bump automake version check to 1.16.2 (released 2020). * configure.ac (AM_INIT_AUTOMAKE): Disable gz, add dist-zstd. Bump automake version requirement to 1.16.2. * cfg.mk: Use compression level 18, and multi-threading. * NEWS: Mention the change. --- NEWS | 5 +++++ README-prereq | 2 +- bootstrap.conf | 4 ++-- cfg.mk | 9 +++++++++ configure.ac | 3 ++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index e55e1a54c..ed4bbffdd 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,11 @@ GNU coreutils NEWS -*- outline -*- 'od' allocates half the memory when -v,--output-duplicates is specified. +** Build-related + + gzip-compressed tarballs are no longer distributed, + instead being replaced with zstandard-compressed tarballs. + * Noteworthy changes in release 9.12 (2026-09-14) [stable] diff --git a/README-prereq b/README-prereq index ed7584de1..ae21a1dd7 100644 --- a/README-prereq +++ b/README-prereq @@ -9,7 +9,6 @@ as well as by 'make'. They include: - Gettext - Git - Gperf -- Gzip - Help2man - M4 - Make @@ -18,6 +17,7 @@ as well as by 'make'. They include: - Texinfo - Wget - XZ Utils +- Zstandard It is generally better to use official packages for your system. If a package is not officially available you can build it from source diff --git a/bootstrap.conf b/bootstrap.conf index 56474edae..7fd4a9cf4 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -390,13 +390,12 @@ gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\ # Build prerequisites buildreq="\ autoconf 2.64 -automake 1.11.2 +automake 1.16.2 autopoint 0.19.2 bison - gettext 0.19.2 git 1.5.5 gperf - -gzip - m4 - makeinfo 6.1 texi2pdf 6.1 @@ -405,6 +404,7 @@ perl 5.5 tar - wget - xz - +zstd - " bootstrap_post_import_hook () diff --git a/cfg.mk b/cfg.mk index 45bef86c1..1c7be2463 100644 --- a/cfg.mk +++ b/cfg.mk @@ -51,6 +51,15 @@ export VERBOSE = yes # 4914152 9e export XZ_OPT = -8e +# -T0 uses all CPUs, +# -18 output is only 2% larger but compresses twice as fast as -19 +# Tested with: +# for t in '' '-T0'; do for l in $(seq 15 19); do +# echo == $t -$l ==; env time -f 'elapsed=%E CPU=%Us Mem=%MKB' \ +# zstd -c $t -$l < coreutils-9.12.tar | wc -c +# done; done +export ZSTD_OPT = -T0 -18 + old_NEWS_hash = 078ebe66312fe06ceac192cd5a8423ec # Add an exemption for sc_makefile_at_at_check. diff --git a/configure.ac b/configure.ac index 025c3edc6..aa3b71adb 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,8 @@ AC_CONFIG_SRCDIR([src/ls.c]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([lib/config.h:lib/config.hin]) -AM_INIT_AUTOMAKE([1.11.2 dist-xz color-tests parallel-tests subdir-objects]) +AM_INIT_AUTOMAKE([1.16.2 no-dist-gzip dist-xz dist-zstd color-tests + parallel-tests subdir-objects]) AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. dnl POSIXCHECK is worthwhile for maintainers, but adds several seconds