From: Kamila Szewczyk Date: Fri, 21 Feb 2025 17:38:52 +0000 (-0800) Subject: dist: add bzip3 support. X-Git-Tag: v1.17.90~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=735a386e192bbeff5e931d92ee0cadb67784e670;p=thirdparty%2Fautomake.git dist: add bzip3 support. From https://bugs.gnu.org/73795 (automake-patches). * bin/automake.in (handle_dist): add bzip3 support. https://github.com/kspalaiologos/bzip3 * lib/Automake/Options.pm (_is_valid_easy_option): likewise. * lib/am/distdir.am (dist-bzip3): likewise. * t/dist-formats.tap: likewise. * t/dist-bzip3.sh: new test. * t/list-of-tests.mk (handwritten_TESTS): add it. * NEWS: mention this. * THANKS: add Kamila. --- diff --git a/NEWS b/NEWS index cb6c251da..504901a88 100644 --- a/NEWS +++ b/NEWS @@ -4,10 +4,12 @@ please see NEWS-future and start following the advice there now. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.x: -* New supported languages +* New features added: - Support for Algol 68 added, based on the GNU Algol 68 compiler. (bug#75807) + - New option dist-bzip3 for bzip3 compression of distributions. (bug#73795) + * Miscellaneous changes - Only require the presence of an ABOUT-NLS file at the 'gnits' diff --git a/THANKS b/THANKS index 50fbc18d5..634c77c9b 100644 --- a/THANKS +++ b/THANKS @@ -230,6 +230,7 @@ Juergen Keil jk@tools.de Juergen Leising juergen.leising@gmx.de Julien Sopena julien.sopena@lip6.fr Jürg Billeter j@bitron.ch +Kamila Szewczyk kspalaiologos@gmail.com Karl Berry kb@cs.umb.edu Karl Heuer kwzh@gnu.org Kelley Cook kcook@gcc.gnu.org diff --git a/bin/automake.in b/bin/automake.in index 79a8bc898..7e5a5f295 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -3872,7 +3872,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") @@ -6916,6 +6916,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 dd0f17a15..4ecf6f94c 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -272,6 +272,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 2aea45fd9..d7e4916b5 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-bzip3.sh b/t/dist-bzip3.sh new file mode 100644 index 000000000..996f6fd8e --- /dev/null +++ b/t/dist-bzip3.sh @@ -0,0 +1,39 @@ +#! /bin/sh +# Copyright (C) 2025 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check support for dist-bzip3, with no-dist-gzip. + +required='bzip3' +. test-init.sh + +echo AUTOMAKE_OPTIONS = dist-bzip3 > Makefile.am + +cat > configure.ac < Makefile.am + +$ACLOCAL +$AUTOCONF +$AUTOMAKE +./configure +$MAKE dist-bzip3 +test -s $distdir.tar.bz3 + +: diff --git a/t/dist-formats.tap b/t/dist-formats.tap index 33020db77..5c711cd89 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'";; diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 2c6c271ea..afa637822 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -405,6 +405,7 @@ t/deprecated-acinit.sh \ t/destdir.sh \ t/dir-named-obj-is-bad.sh \ t/discover.sh \ +t/dist-bzip3.sh \ t/dist-formats.tap \ t/dist-lzma.sh \ t/dist-tarZ.sh \