GNU bug report logs - #73795
[PATCH] Add support for the bzip3 compression tool to automake.

Previous Next

Package: automake-patches;

Reported by: Kamila Szewczyk <kspalaiologos <at> gmail.com>

Date: Sun, 13 Oct 2024 16:24:02 UTC

Severity: normal

Tags: patch

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73795 in the body.
You can then email your comments to 73795 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Sun, 13 Oct 2024 16:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kamila Szewczyk <kspalaiologos <at> gmail.com>:
New bug report received and forwarded. Copy sent to automake-patches <at> gnu.org. (Sun, 13 Oct 2024 16:24:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kamila Szewczyk <kspalaiologos <at> gmail.com>
To: automake-patches <at> gnu.org
Subject: [PATCH] Add support for the bzip3 compression tool to automake.
Date: Sun, 13 Oct 2024 16:44:09 +0200
bzip3 (https://github.com/kspalaiologos/bzip3) is a free and open-source LGPLv3-licensed data
compression utility that excels at compressing text and source code.

Compression ratio tests for the automake distribution tarball:
% wc -c *tar*
1885428 automake-1.17.0.91.tar.bz2
1500817 automake-1.17.0.91.tar.bz3
2456935 automake-1.17.0.91.tar.gz
1641112 automake-1.17.0.91.tar.xz

---
 bin/automake.in         | 3 ++-
 lib/Automake/Options.pm | 1 +
 lib/am/distdir.am       | 9 +++++++++
 t/dist-formats.tap      | 1 +
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/bin/automake.in b/bin/automake.in
index a17f45236..30d82bb96 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -3856,7 +3856,7 @@ sub handle_dist ()
     {
       my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
       $archive_defined ||=
-	grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip xz zstd);
+	grep { option "dist-$_" } qw(shar zip tarZ bzip2 bzip3 lzip xz zstd);
       error (option 'no-dist-gzip',
 	     "no-dist-gzip specified but no dist-* specified,\n"
 	     . "at least one archive format must be enabled")
@@ -6898,6 +6898,7 @@ sub preprocess_file
 		 'XZ'          => !! option 'dist-xz',
 		 'LZIP'        => !! option 'dist-lzip',
 		 'BZIP2'       => !! option 'dist-bzip2',
+		 'BZIP3'       => !! option 'dist-bzip3',
 		 'COMPRESS'    => !! option 'dist-tarZ',
 		 'GZIP'        =>  ! option 'no-dist-gzip',
 		 'SHAR'        => !! option 'dist-shar',
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 2dc7899f8..d08af3ef1 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -275,6 +275,7 @@ sub _is_valid_easy_option ($)
     color-tests
     dejagnu
     dist-bzip2
+    dist-bzip3
     dist-lzip
     dist-xz
     dist-zip
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index c85f6a325..4a7534f98 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -343,6 +343,12 @@ dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
 	$(am__post_remove_distdir)

+?BZIP3?DIST_ARCHIVES += $(distdir).tar.bz3
+.PHONY: dist-bzip3
+dist-bzip3: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip3 -c >$(distdir).tar.bz3
+	$(am__post_remove_distdir)
+
 ?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
 .PHONY: dist-lzip
 dist-lzip: distdir
@@ -390,6 +396,7 @@ dist-zip: distdir
 ?XZ?DIST_TARGETS += dist-xz
 ?SHAR?DIST_TARGETS += dist-shar
 ?BZIP2?DIST_TARGETS += dist-bzip2
+?BZIP3?DIST_TARGETS += dist-bzip3
 ?GZIP?DIST_TARGETS += dist-gzip
 ?ZIP?DIST_TARGETS += dist-zip
 ?ZSTD?DIST_TARGETS += dist-zstd
@@ -443,6 +450,8 @@ distcheck: dist
 	  eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
 	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.bz3*) \
+	  bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\
 	*.tar.lz*) \
 	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
 	*.tar.xz*) \
diff --git a/t/dist-formats.tap b/t/dist-formats.tap
index 34d88b67c..13250327c 100644
--- a/t/dist-formats.tap
+++ b/t/dist-formats.tap
@@ -59,6 +59,7 @@ setup_vars_for_compression_format ()
     lzip) suffix=tar.lz  compressor=lzip     ;;
       xz) suffix=tar.xz  compressor=xz       ;;
    bzip2) suffix=tar.bz2 compressor=bzip2    ;;
+   bzip3) suffix=tar.bz3 compressor=bzip3    ;;
      zip) suffix=zip     compressor=zip      ;;
     zstd) suffix=tar.zst compressor=zstd     ;;
        *) fatal_ "invalid compression format '$1'";;
-- 
2.45.2




Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Sun, 13 Oct 2024 22:05:01 GMT) Full text and rfc822 format available.

Message #8 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: kspalaiologos <at> gmail.com
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
Date: Sun, 13 Oct 2024 16:03:41 -0600
Hi Kamila - thanks much for the patch.

    % wc -c *tar*
    1885428 automake-1.17.0.91.tar.bz2
    1500817 automake-1.17.0.91.tar.bz3
    2456935 automake-1.17.0.91.tar.gz
    1641112 automake-1.17.0.91.tar.xz

That is an impressive compression ratio.

    LGPLv3-licensed

I searched for bzip3 on pkgs.org and it said the license was 
LGPL-3.0-or-later AND BSD-2-Clause. Which is good, if true, because
LGPLv3 is not compatible with GPLv2-only.
https://rhel.pkgs.org/9/epel-x86_64/bzip3-1.3.1-1.el9.x86_64.rpm.html

But main.c only says LGPLv3, so I'm not sure what to make of that.
Can you clarify? Not that it's a stopper.

Also not a stopper, but I just wonder, what is the relationship to
bzip3? It seems there is, basically, none.  I presume you are not Julian
Seward by another name :).  I don't understand the "spiritual"
connection, sorry. But it's surely too late to rename it anyway, so it
doesn't matter.

Thanks again,
Karl




Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Sun, 13 Oct 2024 22:18:02 GMT) Full text and rfc822 format available.

Message #11 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Kamila Szewczyk <kspalaiologos <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
Date: Mon, 14 Oct 2024 00:10:22 +0200
Hi Karl,

Thank *you* for the quick response. The AND implies that the package contains both LGPLv3.0 and
BSD-licensed code (in particular e.g. Rich Felker's getopt shim) - it is not dual-licensed. However,
for all intents and purposes I hereby grant the GNU Project permission to use it in any GPLv2
licensed package.

The "spiritual" connection primarily lies in the algorithmic matters: bzip3 is actually more similar
to bzip than bzip2 - the former being abandoned due to patent issues on arithmetic coding, which are
not a problem nowadays. Both codecs are statistical and make use of the Burrows-Wheeler transform.
Hence, bzip3 really stands for Burrows-wheeler ZIP, but versions one and two were taken.

To my knowledge, Julian does not have a trademark on the bzip series, which itself doesn't seem to
infringe the IP of Katz' original PKZIP.

--
Yours,
Kamila Szewczyk

On 10/14/24 12:03 AM, Karl Berry wrote:
> Hi Kamila - thanks much for the patch.
> 
>     % wc -c *tar*
>     1885428 automake-1.17.0.91.tar.bz2
>     1500817 automake-1.17.0.91.tar.bz3
>     2456935 automake-1.17.0.91.tar.gz
>     1641112 automake-1.17.0.91.tar.xz
> 
> That is an impressive compression ratio.
> 
>     LGPLv3-licensed
> 
> I searched for bzip3 on pkgs.org and it said the license was 
> LGPL-3.0-or-later AND BSD-2-Clause. Which is good, if true, because
> LGPLv3 is not compatible with GPLv2-only.
> https://rhel.pkgs.org/9/epel-x86_64/bzip3-1.3.1-1.el9.x86_64.rpm.html
> 
> But main.c only says LGPLv3, so I'm not sure what to make of that.
> Can you clarify? Not that it's a stopper.
> 
> Also not a stopper, but I just wonder, what is the relationship to
> bzip3? It seems there is, basically, none.  I presume you are not Julian
> Seward by another name :).  I don't understand the "spiritual"
> connection, sorry. But it's surely too late to rename it anyway, so it
> doesn't matter.
> 
> Thanks again,
> Karl





Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Fri, 21 Feb 2025 17:44:03 GMT) Full text and rfc822 format available.

Message #14 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: kspalaiologos <at> gmail.com
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
Date: Fri, 21 Feb 2025 10:43:03 -0700
Hi Kamila,

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

I just pushed this (plus a simple test) for the next automake release.
Thanks again. --best, karl.




Reply sent to Karl Berry <karl <at> freefriends.org>:
You have taken responsibility. (Fri, 21 Feb 2025 17:44:05 GMT) Full text and rfc822 format available.

Notification sent to Kamila Szewczyk <kspalaiologos <at> gmail.com>:
bug acknowledged by developer. (Fri, 21 Feb 2025 17:44:06 GMT) Full text and rfc822 format available.

Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Thu, 13 Mar 2025 14:13:02 GMT) Full text and rfc822 format available.

Message #22 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Kamila Szewczyk <kspalaiologos <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
Date: Thu, 13 Mar 2025 13:38:36 +0100
Hi Karl,

Thank you. Maybe it would be in order to also mention dist-bzip3 in the
docs?

--
With Valediction,
Kamila Szewczyk (https://palaiologos.rocks)

On 2/21/25 6:43 PM, Karl Berry wrote:
> Hi Kamila,
> 
>     Subject: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
> 
> I just pushed this (plus a simple test) for the next automake release.
> Thanks again. --best, karl.





Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Thu, 13 Mar 2025 20:15:01 GMT) Full text and rfc822 format available.

Message #25 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: kspalaiologos <at> gmail.com
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
Date: Thu, 13 Mar 2025 14:13:31 -0600
Hi Kamila,

    Thank you. Maybe it would be in order to also mention dist-bzip3 in the
    docs?

Of course. I just forgot to make that change.

But as I was adding items in the doc analogous to bzip2 ... does bzip3
really read the BZIP2 (not BZIP3) environment variable, as your original
patch indicated? I see nothing about envvars on the man page. Thanks. -k




Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Thu, 13 Mar 2025 20:42:01 GMT) Full text and rfc822 format available.

Message #28 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: kspalaiologos <at> gmail.com
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
Date: Thu, 13 Mar 2025 14:40:31 -0600
    Sorry. That was a mistake. bzip3 does not read the BZIP2 environment
    variable.

Ok, will adjust, no problem.

Does bzip3 read any envvar? I guess there are no "levels" of compression
with bzip3 (?), but it could still be useful ... --thanks, karl.




Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Thu, 13 Mar 2025 21:44:02 GMT) Full text and rfc822 format available.

Message #31 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: kspalaiologos <at> gmail.com
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
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




Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Fri, 14 Mar 2025 04:19:01 GMT) Full text and rfc822 format available.

Message #34 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Kamila Szewczyk <kspalaiologos <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
Date: Thu, 13 Mar 2025 21:30:45 +0100
Hi,

Sorry. That was a mistake. bzip3 does not read the BZIP2 environment
variable.

--
With Valediction,
Kamila Szewczyk (https://palaiologos.rocks)

On 3/13/25 9:13 PM, Karl Berry wrote:
> Hi Kamila,
> 
>     Thank you. Maybe it would be in order to also mention dist-bzip3 in the
>     docs?
> 
> Of course. I just forgot to make that change.
> 
> But as I was adding items in the doc analogous to bzip2 ... does bzip3
> really read the BZIP2 (not BZIP3) environment variable, as your original
> patch indicated? I see nothing about envvars on the man page. Thanks. -k





Information forwarded to automake-patches <at> gnu.org:
bug#73795; Package automake-patches. (Fri, 14 Mar 2025 04:19:02 GMT) Full text and rfc822 format available.

Message #37 received at 73795 <at> debbugs.gnu.org (full text, mbox):

From: Kamila Szewczyk <kspalaiologos <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>
Cc: 73795 <at> debbugs.gnu.org
Subject: Re: [bug#73795] [PATCH] Add support for the bzip3 compression tool to
 automake.
Date: Thu, 13 Mar 2025 21:46:20 +0100
No environment variables are explicitly read by the tool as stated by
its source code.

--
Yours,
Kamila Szewczyk (https://palaiologos.rocks)

On 3/13/25 9:40 PM, Karl Berry wrote:
>     Sorry. That was a mistake. bzip3 does not read the BZIP2 environment
>     variable.
> 
> Ok, will adjust, no problem.
> 
> Does bzip3 read any envvar? I guess there are no "levels" of compression
> with bzip3 (?), but it could still be useful ... --thanks, karl.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Apr 2025 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.