Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to automake.

From: Karl Berry <[email-masked]>
Date: Thu, 13 Mar 2025 15:42:35 -0600

I pushed the change below. Thanks.

Happy hacking,
Karl

P.S. I humbly suggest explicitly stating in the man page that no envvars
are read, since that is a departure from the other common compression
programs.

-----------------------------------------------------------------------------
dist: document bzip3 support.

More from https://bugs.gnu.org/73795 (automake-patches).

* doc/automake.texi (The Types of Distributions): add item for bzip3.
Analogous changes throughout.
* lib/am/distdir.am (dist-bzip3): bzip3 does not read any envvars;
don't set BZIP2.
diff --git a/doc/automake.texi b/doc/automake.texi
index 5cdf91f68..cd9e6c8ce 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -9443,6 +9443,14 @@ archives are usually smaller than gzipped archives.  By default, this
 rule makes @samp{bzip2} use a compression option of @option{-9}.  To
 make it use a different one, set the @env{BZIP2} environment variable.

+@item @code{dist-bzip3}
+@trindex dist-bzip3
+@cmindex bzip3
+@vindex BZIP3
+Generate a @samp{bzip3} tar archive of the distribution.  Unlike the
+other compression programs here, @command{bzip3} does not read any
+environment variables.
+
 @item @code{dist-lzip}
 @trindex dist-lzip
 @cmindex lzip
@@ -11125,6 +11133,12 @@ Cause @command{dejagnu}-specific rules to be generated.  @xref{DejaGnu Tests}.
 Hook @code{dist-bzip2} to @code{dist}.
 @trindex dist-bzip2

+@item @option{dist-bzip3}
+@cindex Option, @option{dist-bzip3}
+@opindex dist-bzip3
+Hook @code{dist-bzip3} to @code{dist}.
+@trindex dist-bzip3
+
 @item @option{dist-lzip}
 @cindex Option, @option{dist-lzip}
 @opindex dist-lzip
@@ -11365,7 +11379,7 @@ the source file.  For instance, if the source file is
 These three mutually exclusive options select the tar format to use
 when generating tarballs with @samp{make dist}.  (The tar file created
 is then compressed according to the set of @option{no-dist-gzip},
-@option{dist-bzip2}, @option{dist-lzip}, @option{dist-xz},
+@option{dist-bzip2}, @option{dist-bzip3}, @option{dist-lzip}, @option{dist-xz},
 @option{dist-zstd} and @option{dist-tarZ} options in use.)

 These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index b214ab2f2..e21c5a7cc 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -345,8 +345,9 @@ dist-bzip2: distdir

 ?BZIP3?DIST_ARCHIVES += $(distdir).tar.bz3
 .PHONY: dist-bzip3
+## bzip3 does not read any envvars.
 dist-bzip3: distdir
-	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip3 -c >$(distdir).tar.bz3
+	tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3
 	$(am__post_remove_distdir)

 ?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
Running command: git commit \-q \-F \.\/vc\-dwim\-log\-gej4c3 \-\-author\=Karl\ Berry\ \<karl\@freefriends\.org\> \-\- ChangeLog
+ set +x

compile finished at Thu Mar 13 14:39:59 2025