>From 2c5e2dc1882bd48241713149daecc73081c60cce Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 30 Dec 2023 15:42:37 +0100 Subject: [PATCH] Fix "make check" failures on Alpine Linux, where gzip is from BusyBox. * lib/am/distdir.am (GZIP_ENV): Set to -9, not --best. (distcheck): Don't use GZIP_ENV when invoking gzip for decompression. * doc/automake.texi (The Types of Distributions): Document the change. --- doc/automake.texi | 2 +- lib/am/distdir.am | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/automake.texi b/doc/automake.texi index 4de175bd7..f2824b511 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -9242,7 +9242,7 @@ distributions in various formats. Their targets are: @vindex GZIP_ENV Generate a @samp{gzip} tar archive of the distribution. This is the only format enabled by default. By default, this rule makes -@command{gzip} use a compression option of @option{--best}. To make +@command{gzip} use a compression option of @option{-9}. To make it use a different one, set the @env{GZIP_ENV} environment variable. For example, @samp{make dist-gzip GZIP_ENV=-7}. diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 0dd3a2e3f..7206bbb84 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -331,7 +331,7 @@ endif %?TOPDIR_P% if %?TOPDIR_P% ?GZIP?DIST_ARCHIVES += $(distdir).tar.gz -GZIP_ENV = --best +GZIP_ENV = -9 .PHONY: dist-gzip dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz @@ -440,7 +440,7 @@ AM_DISTCHECK_DVI_TARGET = dvi distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -450,7 +450,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ -- 2.34.1