On 27/09/2025 17:11, Pádraig Brady wrote:
I'm considering applying the attached to only distribute xz tarballs.

We didn't release .tar.gz sources since coreutils-8.14 (2011),
but then re-enabled .tar.gz since coreutils-8.32 (2020).
That was to support Guix bootstrapping 100% from sources:
https://lists.gnu.org/r/coreutils/2020-02/msg00042.html

Since then I understand Guix' bootar got xz support.

Also I noticed in all the plethora of (older) systems I tested
coreutils 9.8 on, that xz was supported on them all.

Also it's another 5 years down the line.


p.s. I did a quick test with zstd (supported since automake 1.16.2 (2020)),
but the file size was about the same (a little bigger),
so I don't think we get enough benefits from enabling that.

Another year down the line, I'm going with the attached,
which replaces tar.gz tarballs with tar.zst.
These are less than half the size so are a fine fallback format.

cheers,
Padraig
From 9b4546d1e8a8699004e5711446d399bd7d3e43f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
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         | 3 +++
 configure.ac   | 3 ++-
 5 files changed, 13 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    <https://www.gnu.org/software/gettext/>
 - Git        <https://git-scm.com/>
 - Gperf      <https://www.gnu.org/software/gperf/>
-- Gzip       <https://www.gnu.org/software/gzip/>
 - Help2man   <https://www.gnu.org/software/help2man/>
 - M4         <https://www.gnu.org/software/m4/>
 - Make       <https://www.gnu.org/software/make/>
@@ -18,6 +17,7 @@ as well as by 'make'.  They include:
 - Texinfo    <https://www.gnu.org/software/texinfo/>
 - Wget       <https://www.gnu.org/software/wget/>
 - XZ Utils   <https://tukaani.org/xz/>
+- Zstandard  <https://github.com/facebook/zstd>
 
 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..5748934eb 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -50,6 +50,9 @@ export VERBOSE = yes
 # 4923016 8e
 # 4914152 9e
 export XZ_OPT = -8e
+# -T0 uses all CPUs,
+# -18 output is only 2% larger but compresses twice as fast as -19
+export ZSTD_OPT = -T0 -18
 
 old_NEWS_hash = 078ebe66312fe06ceac192cd5a8423ec
 
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
-- 
2.55.0

Reply via email to