From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Sat, 14 Mar 2015 02:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: 20104@debbugs.gnu.org X-Debbugs-Original-To: gzip bugs Received: via spool by submit@debbugs.gnu.org id=B.142629962525077 (code B ref -1); Sat, 14 Mar 2015 02:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Mar 2015 02:20:25 +0000 Received: from localhost ([127.0.0.1]:45600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YWbgd-0006WO-DO for submit@debbugs.gnu.org; Fri, 13 Mar 2015 22:20:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40279) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YWbga-0006WE-V4 for submit@debbugs.gnu.org; Fri, 13 Mar 2015 22:20:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWbgZ-0002Mt-1E for submit@debbugs.gnu.org; Fri, 13 Mar 2015 22:20:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWbgY-0002Mm-UN for submit@debbugs.gnu.org; Fri, 13 Mar 2015 22:20:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWbgX-0001pg-4G for bug-gzip@gnu.org; Fri, 13 Mar 2015 22:20:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWbgT-0002JT-QL for bug-gzip@gnu.org; Fri, 13 Mar 2015 22:20:16 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:39281) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWbgT-0002JP-FE for bug-gzip@gnu.org; Fri, 13 Mar 2015 22:20:13 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 699EF39E80BC for ; Fri, 13 Mar 2015 19:20:12 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sdZE4eA1e7fJ for ; Fri, 13 Mar 2015 19:20:12 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id E21E439E801F for ; Fri, 13 Mar 2015 19:20:11 -0700 (PDT) Message-ID: <55039ADB.1080700@cs.ucla.edu> Date: Fri, 13 Mar 2015 19:20:11 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040407000104090609010806" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) This is a multi-part message in MIME format. --------------040407000104090609010806 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Attached is a proposed patch to make the GZIP environment variable obsolescent, for the same reason we're making GREP_OPTIONS obsolescent: it's too much opportunity for trouble. For example, with a suitably crafted GZIP environment variable I can cause 'gzip' to remove files. --------------040407000104090609010806 Content-Type: text/x-patch; name="0001-gzip-make-the-GZIP-env-var-obsolescent.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gzip-make-the-GZIP-env-var-obsolescent.patch" >From 89eefaa9f9a47c98ef9ab4f0956221a8c21bb61f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 13 Mar 2015 19:15:56 -0700 Subject: [PATCH] gzip: make the GZIP env var obsolescent * NEWS, gzip.1: * doc/gzip.texi (Environment, Tapes): Document it. * gzip.c (main): Implement it. --- NEWS | 5 +++++ doc/gzip.texi | 40 +++++++++++++++++----------------------- gzip.1 | 42 +++++++++++++++++++++++++----------------- gzip.c | 6 ++++++ 4 files changed, 53 insertions(+), 40 deletions(-) diff --git a/NEWS b/NEWS index 4203f56..493df89 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,11 @@ GNU gzip NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] +** Changes in behavior + + The GZIP environment variable is now obsolescent, and gzip now warns + if it is used. Please use an alias or script instead. + ** Bug fixes gzip -k -v no longer reports that files are replaced. diff --git a/doc/gzip.texi b/doc/gzip.texi index 2f4f1ab..eeb64ab 100644 --- a/doc/gzip.texi +++ b/doc/gzip.texi @@ -469,18 +469,25 @@ complement to @command{tar}, not as a replacement. @chapter Environment @cindex Environment -The environment variable @env{GZIP} can hold a set of default options for -@command{gzip}. These options are interpreted first and can be overwritten by -explicit command line parameters. For example: +The obsolescent environment variable @env{GZIP} can hold a set of +default options for @command{gzip}. These options are interpreted +first and can be overwritten by explicit command line parameters. As +this can cause problems when using scripts, this feature will be +removed in a future release of @command{gzip}, and @command{gzip} +warns if it is used. Please use an alias or script instead. For +example, if @command{gzip} is in the directory @samp{/usr/bin} you can +prepend @file{$HOME/bin} to your @env{PATH} and create an executable +script @file{$HOME/bin/gzip} containing the following: @example -for sh: GZIP="-8v --name"; export GZIP -for csh: setenv GZIP "-8v --name" -for MSDOS: set GZIP=-8v --name +#! /bin/sh +export PATH=/usr/bin +exec gzip -v "$@@" @end example -On @abbr{VMS}, the name of the environment variable is @env{GZIP_OPT}, to -avoid a conflict with the symbol set for invocation of the program. +On @abbr{VMS}, the name of the obsolescent environment variable is +@env{GZIP_OPT}, to avoid a conflict with the symbol set for invocation +of the program. @node Tapes @chapter Using @command{gzip} on tapes @@ -491,21 +498,8 @@ the output with zeroes up to a block boundary. When the data is read and the whole block is passed to @command{gunzip} for decompression, @command{gunzip} detects that there is extra trailing garbage after the compressed data and emits a warning by default if the garbage contains -nonzero bytes. You have to use the -@option{--quiet} option to suppress the warning. This option can be set in the -@env{GZIP} environment variable, as in: - -@example -for sh: GZIP="-q" tar -xfz --block-compress /dev/rst0 -for csh: (setenv GZIP "-q"; tar -xfz --block-compress /dev/rst0) -@end example - -In the above example, @command{gzip} is invoked implicitly by the @option{-z} -option of @acronym{GNU} @command{tar}. Make sure that the same block -size (@option{-b} -option of @command{tar}) is used for reading and writing compressed data on -tapes. (This example assumes you are using the @acronym{GNU} version of -@command{tar}.) +nonzero bytes. You can use the @option{--quiet} option to suppress +the warning. @node Problems @chapter Reporting Bugs diff --git a/gzip.1 b/gzip.1 index d81c45a..3aebae8 100644 --- a/gzip.1 +++ b/gzip.1 @@ -364,17 +364,34 @@ such as tar or zip. GNU tar supports the -z option to invoke gzip transparently. gzip is designed as a complement to tar, not as a replacement. .SH "ENVIRONMENT" -The environment variable +The obsolescent environment variable .B GZIP can hold a set of default options for .IR gzip . These options are interpreted first and can be overwritten by -explicit command line parameters. For example: - for sh: GZIP="-8v --name"; export GZIP - for csh: setenv GZIP "-8v --name" - for MSDOS: set GZIP=-8v --name +explicit command line parameters. As this can cause problems when +using scripts, this feature will be removed in a future release of +.IR gzip , +and +.I gzip +warns if it is used. Please use an alias or script instead. For +example, if +.I gzip +is in the directory +.B /usr/bin +you can prepend +.B $HOME/bin +to your +.B PATH +and create an executable script +.B $HOME/bin/gzip +containing the following: -On Vax/VMS, the name of the environment variable is GZIP_OPT, to + #! /bin/sh + export PATH=/usr/bin + exec gzip \-v "$@" + +On VMS, the name of the obsolescent environment variable is GZIP_OPT, to avoid a conflict with the symbol set for invocation of the program. .SH "SEE ALSO" znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1) @@ -454,17 +471,8 @@ read and the whole block is passed to for decompression, .I gunzip detects that there is extra trailing garbage after the compressed data -and emits a warning by default. You have to use the --quiet option to -suppress the warning. This option can be set in the -.B GZIP -environment variable as in: - for sh: GZIP="-q" tar -xfz --block-compress /dev/rst0 - for csh: (setenv GZIP -q; tar -xfz --block-compr /dev/rst0 - -In the above example, gzip is invoked implicitly by the -z option of -GNU tar. Make sure that the same block size (-b option of tar) is used -for reading and writing compressed data on tapes. (This example -assumes you are using the GNU version of tar.) +and emits a warning by default. You can use the --quiet option to +suppress the warning. .SH BUGS The gzip format represents the input size modulo 2^32, so the --list option reports incorrect uncompressed sizes and compression diff --git a/gzip.c b/gzip.c index e69c3e0..5536d6d 100644 --- a/gzip.c +++ b/gzip.c @@ -531,6 +531,12 @@ int main (int argc, char **argv) file_count = argc - optind; + if (args) + WARN ((stderr, + ("%s: warning: "OPTIONS_VAR" environ var is deprecated; " + "please use an alias or script\n"), + program_name)); + #if O_BINARY #else if (ascii && !quiet) { -- 2.1.0 --------------040407000104090609010806-- From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Sun, 15 Mar 2015 16:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 20104@debbugs.gnu.org Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.142643550410856 (code B ref 20104); Sun, 15 Mar 2015 16:06:02 +0000 Received: (at 20104) by debbugs.gnu.org; 15 Mar 2015 16:05:04 +0000 Received: from localhost ([127.0.0.1]:47322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXB2F-0002p2-N9 for submit@debbugs.gnu.org; Sun, 15 Mar 2015 12:05:04 -0400 Received: from mail-ig0-f173.google.com ([209.85.213.173]:37613) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXB2D-0002oY-38 for 20104@debbugs.gnu.org; Sun, 15 Mar 2015 12:05:01 -0400 Received: by igcqo1 with SMTP id qo1so22178769igc.0 for <20104@debbugs.gnu.org>; Sun, 15 Mar 2015 09:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=7u1SrD6SI3tE02xiXra28qBU82/U/NqpWmitnA0ts4E=; b=yIpe8wE9ZG+mw5wBs2MKdEEk25jHCf4HTChHFa+eThXgLZZKT/3hX8Cyqh03chDwJJ 640Qntv2GiPf43j67CwHwum5ziDnBrn8vOQeRE0H2nrIWna69oesOPZpS3rGRdlWvnRj c2Ywh5qNflB+zDL2xsLuEu9RI72wB35BnTvBdP9amnhMAAi17LhwUuU89veRRPw0f57z dfo/glq4IGHQcKPT5cGxTJNwpV8NNgcHX5yURFFuR9Kp4FtSdU/rE3oK5lLrBG4VaAjB kem4xMNQBj4hV5QpmCgsIhsZ69oyP9pbyJHAx8fbXc6fam5hIJWC2tLt4fdnfT/DccQL W73Q== X-Received: by 10.42.240.4 with SMTP id ky4mr20122442icb.70.1426435500426; Sun, 15 Mar 2015 09:05:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.171.101 with HTTP; Sun, 15 Mar 2015 09:04:40 -0700 (PDT) In-Reply-To: <55039ADB.1080700@cs.ucla.edu> References: <55039ADB.1080700@cs.ucla.edu> From: Jim Meyering Date: Sun, 15 Mar 2015 09:04:40 -0700 X-Google-Sender-Auth: _HbwSJpMRjcomyXeyCLI4Mr2iyk Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Fri, Mar 13, 2015 at 7:20 PM, Paul Eggert wrote: > Attached is a proposed patch to make the GZIP environment variable > obsolescent, for the same reason we're making GREP_OPTIONS obsolescent: it's > too much opportunity for trouble. For example, with a suitably crafted GZIP > environment variable I can cause 'gzip' to remove files. Hi Paul, Thanks for getting the ball rolling. That patch makes it so use of the GZIP envvar makes gzip fail with exit status 2: $ echo |./gzip > k $ echo |GZIP=-1 ./gzip > k gzip: warning: GZIP environ var is deprecated; please use an alias or script [Exit 2] Making that clear feels like sufficient justification for adding a test. If making GZIP use provoke failure is deliberate, the NEWS should say that, for those who don't recall that a gzip warning implies nonzero exit status. Also, you may want to spell out "environment variable" in that diagnostic. Finally, for something prescriptive like that, I would drop the "please". From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Mark Adler Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Sun, 15 Mar 2015 17:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 20104@debbugs.gnu.org Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.142644231624130 (code B ref 20104); Sun, 15 Mar 2015 17:59:01 +0000 Received: (at 20104) by debbugs.gnu.org; 15 Mar 2015 17:58:36 +0000 Received: from localhost ([127.0.0.1]:47351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXCo7-0006H7-Re for submit@debbugs.gnu.org; Sun, 15 Mar 2015 13:58:36 -0400 Received: from mail.alumni.caltech.edu ([131.215.239.119]:32127) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXBa1-0003sJ-V6 for 20104@debbugs.gnu.org; Sun, 15 Mar 2015 12:39:58 -0400 Received: from [10.0.1.13] (unknown [138.229.211.204]) (Authenticated sender: madler) by mail.alumni.caltech.edu (Postfix) with ESMTPSA id BDE80148C70; Sun, 15 Mar 2015 09:39:35 -0700 (PDT) X-DKIM: Sendmail DKIM Filter v2.8.3 mail.alumni.caltech.edu BDE80148C70 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alumni.caltech.edu; s=enforce; t=1426437576; bh=FzxTO33ObOTWeWgav92Cii/Gk7pFitfelueIJKyUa4c=; h=Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc: Content-Transfer-Encoding:Message-Id:References:To; b=qa/n/0Zd10lKTIZmqIyT1u5PJCGYhgmuj6JmVK4KJ3AO93YCPUEWG5jV8GTh0J4EK QfjgXmaD4Mb60nI9GNsacAnCJrFgsouUu/tzQbipJAmpJ+L7OkGMZdlF2a3mRvX6Mh oWG6Mssq8a+IaUf6GANP01lZxpvpwo/z6Kb22xGI= Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=us-ascii From: Mark Adler In-Reply-To: <55039ADB.1080700@cs.ucla.edu> Date: Sun, 15 Mar 2015 09:39:34 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> References: <55039ADB.1080700@cs.ucla.edu> X-Mailer: Apple Mail (2.1878.6) X-MailScanner-Information-Alumni: X-Alumni-MailScanner-ID: BDE80148C70.AFEA9 X-MailScanner-Alumni: No Virii found X-Spam-Status-Alumni: not spam, SpamAssassin (not cached, score=-1.1, required 5, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10) X-MailScanner-From: madler@alumni.caltech.edu X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Sun, 15 Mar 2015 13:58:34 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) All, Might it be better to protect against the vulnerability, instead of = deep-sixing the entire capability out of fear? You could allow only = compression level options in the environment variable, which I think was = its main intent in the first place. Mark On Mar 13, 2015, at 7:20 PM, Paul Eggert wrote: > Attached is a proposed patch to make the GZIP environment variable = obsolescent, for the same reason we're making GREP_OPTIONS obsolescent: = it's too much opportunity for trouble. For example, with a suitably = crafted GZIP environment variable I can cause 'gzip' to remove files. > <0001-gzip-make-the-GZIP-env-var-obsolescent.patch> From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Mon, 16 Mar 2015 00:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Mark Adler Cc: 20104@debbugs.gnu.org Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.14264672685892 (code B ref 20104); Mon, 16 Mar 2015 00:55:02 +0000 Received: (at 20104) by debbugs.gnu.org; 16 Mar 2015 00:54:28 +0000 Received: from localhost ([127.0.0.1]:47788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXJIZ-0001Wy-VZ for submit@debbugs.gnu.org; Sun, 15 Mar 2015 20:54:28 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:40138) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXJIX-0001Wp-TD for 20104@debbugs.gnu.org; Sun, 15 Mar 2015 20:54:26 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id B8EDC39E8017; Sun, 15 Mar 2015 17:54:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6bjLi8e8YwCv; Sun, 15 Mar 2015 17:54:24 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 7390239E8015; Sun, 15 Mar 2015 17:54:24 -0700 (PDT) Message-ID: <550629C0.5020603@cs.ucla.edu> Date: Sun, 15 Mar 2015 17:54:24 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 References: <55039ADB.1080700@cs.ucla.edu> <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> In-Reply-To: <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Mark Adler wrote: > You could allow only compression level options in the environment variable, which I think was its main intent in the first place. The documentation currently suggests using GZIP to specify -q, -v, and --name (-N), so it appears that this intent was lost long ago. Allowing "harmless" options in GZIP raises the question: where does one draw the line between "harmless" and "harmful"? Clearly options like -d and -t are typically harmful. In contrast, -q, -v, -n, -N, and -1 through -9 might be harmless in many cases, though they could still cause problems in some. Any rule that says that GZIP is OK for some options but not others would add some complexity to the spec, and would be confusing in the long run for users. I'm inclined to implement your suggestion immediately (i.e., for the next release of gzip), while documenting that the GZIP environment variable is obsolescent and that we plan to remove it entirely later. Following Jim's suggestion, gzip should exit with status 0 rather than status 2 when it warns about the nontrivial use of the GZIP environment variable. From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Mon, 16 Mar 2015 03:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 20104@debbugs.gnu.org, Mark Adler Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.142647725021611 (code B ref 20104); Mon, 16 Mar 2015 03:41:02 +0000 Received: (at 20104) by debbugs.gnu.org; 16 Mar 2015 03:40:50 +0000 Received: from localhost ([127.0.0.1]:47834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXLtZ-0005cT-P6 for submit@debbugs.gnu.org; Sun, 15 Mar 2015 23:40:50 -0400 Received: from mail-ie0-f176.google.com ([209.85.223.176]:36255) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXLtX-0005cL-OY for 20104@debbugs.gnu.org; Sun, 15 Mar 2015 23:40:48 -0400 Received: by iegc3 with SMTP id c3so163939474ieg.3 for <20104@debbugs.gnu.org>; Sun, 15 Mar 2015 20:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=vsSRINRDgYnLnC4QvCYH1h4e56hXQwbrfQs06v+yELE=; b=mVaCTv+x9uUmqfyqTqt2Ijxta+BMzjf9OYv2LHRWJOBk9uern/bU6aV8s1mz7WKSMX tHexrAM7fF9FosGl6+cNTmRpUMMzipFG0T8BZzbwWz8dNY9bdFkrx+cVBU+MJ412JlQE vbIFHvOOzqzvZrYpZxOgyAhd9/Hf7r6I3jFmTZaAoHnZoPuXDNcC9SASRRp/0/4bQHij XtN2Qloax35IYgLSurLefeH9aXbG2PUs/TFbc4K507FBv3HHkcxSoBwfCX58Fk5wssQW KdrhV8+s62Yo2mQnq+doTBsZx+NyVC6ILBFOB3ljGr7/SPj1mrXHJ872TNGEchaOEbES +UHQ== X-Received: by 10.50.147.99 with SMTP id tj3mr104522591igb.41.1426477247235; Sun, 15 Mar 2015 20:40:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.171.101 with HTTP; Sun, 15 Mar 2015 20:40:27 -0700 (PDT) In-Reply-To: <550629C0.5020603@cs.ucla.edu> References: <55039ADB.1080700@cs.ucla.edu> <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> <550629C0.5020603@cs.ucla.edu> From: Jim Meyering Date: Sun, 15 Mar 2015 20:40:27 -0700 X-Google-Sender-Auth: mjADLthR96ue5-Gf_kUwj0tCcHM Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Sun, Mar 15, 2015 at 5:54 PM, Paul Eggert wrote: > Mark Adler wrote: >> >> You could allow only compression level options in the environment >> variable, which I think was its main intent in the first place. > > > The documentation currently suggests using GZIP to specify -q, -v, and > --name (-N), so it appears that this intent was lost long ago. > > Allowing "harmless" options in GZIP raises the question: where does one draw > the line between "harmless" and "harmful"? Clearly options like -d and -t > are typically harmful. In contrast, -q, -v, -n, -N, and -1 through -9 might > be harmless in many cases, though they could still cause problems in some. > > Any rule that says that GZIP is OK for some options but not others would add > some complexity to the spec, and would be confusing in the long run for > users. > > I'm inclined to implement your suggestion immediately (i.e., for the next > release of gzip), while documenting that the GZIP environment variable is > obsolescent and that we plan to remove it entirely later. Sounds good. I too prefer to deprecate, and then (a release or two later) to remove entirely. There is just too much room for "surprise", otherwise. From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Mon, 16 Mar 2015 21:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Jim Meyering Cc: 20104@debbugs.gnu.org, Mark Adler Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.142654208612880 (code B ref 20104); Mon, 16 Mar 2015 21:42:01 +0000 Received: (at 20104) by debbugs.gnu.org; 16 Mar 2015 21:41:26 +0000 Received: from localhost ([127.0.0.1]:49004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXclI-0003Lf-KY for submit@debbugs.gnu.org; Mon, 16 Mar 2015 17:41:25 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:57495) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXclF-0003LU-2Z for 20104@debbugs.gnu.org; Mon, 16 Mar 2015 17:41:23 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id E2049A60013; Mon, 16 Mar 2015 14:41:19 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2J7tMShO9sJy; Mon, 16 Mar 2015 14:41:18 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 706A7A60008; Mon, 16 Mar 2015 14:41:18 -0700 (PDT) Message-ID: <55074DFE.70902@cs.ucla.edu> Date: Mon, 16 Mar 2015 14:41:18 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 References: <55039ADB.1080700@cs.ucla.edu> <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> <550629C0.5020603@cs.ucla.edu> In-Reply-To: Content-Type: multipart/mixed; boundary="------------040201050901080609080904" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------040201050901080609080904 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 03/15/2015 08:40 PM, Jim Meyering wrote: > Sounds good. > I too prefer to deprecate, and then (a release or two later) to remove entirely. OK, thanks, here's a draft patch to do that. --------------040201050901080609080904 Content-Type: text/x-patch; name="0001-gzip-make-the-GZIP-env-var-obsolescent.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-gzip-make-the-GZIP-env-var-obsolescent.patch" >From 9876b9c6694ffaf12cad355484fa1f5fe482f0ce Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 16 Mar 2015 14:25:17 -0700 Subject: [PATCH] gzip: make the GZIP env var obsolescent * NEWS, gzip.1: * doc/gzip.texi (Environment, Tapes): Document this. * gzip.c (args): Remove static var; no longer needed now that 'main' frees it. All uses removed. (ENV_OPTION, shortopts): New constants. (main): Warn about nontrivial uses of GZIP. Reject dangerous uses. * tests/gzip-env: New test case. * tests/Makefile.am (TESTS): Add it. * util.c (add_envopt): Create new vector instead of adding to old one. Only use changed. --- NEWS | 6 ++++ doc/gzip.texi | 43 ++++++++++++-------------- gzip.1 | 46 +++++++++++++++++----------- gzip.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++------ tests/Makefile.am | 1 + tests/gzip-env | 43 ++++++++++++++++++++++++++ util.c | 23 +++++++------- 7 files changed, 190 insertions(+), 63 deletions(-) create mode 100755 tests/gzip-env diff --git a/NEWS b/NEWS index 4203f56..120fb93 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,12 @@ GNU gzip NEWS -*- outline -*- * Noteworthy changes in release ?.? (????-??-??) [?] +** Changes in behavior + + The GZIP environment variable is now obsolescent; gzip now warns if + it is used, and rejects attempts to use dangerous options or operands. + You can use an alias or script instead. + ** Bug fixes gzip -k -v no longer reports that files are replaced. diff --git a/doc/gzip.texi b/doc/gzip.texi index 2f4f1ab..5754aae 100644 --- a/doc/gzip.texi +++ b/doc/gzip.texi @@ -469,18 +469,28 @@ complement to @command{tar}, not as a replacement. @chapter Environment @cindex Environment -The environment variable @env{GZIP} can hold a set of default options for -@command{gzip}. These options are interpreted first and can be overwritten by -explicit command line parameters. For example: +The obsolescent environment variable @env{GZIP} can hold a set of +default options for @command{gzip}. These options are interpreted +first and can be overwritten by explicit command line parameters. As +this can cause problems when using scripts, this feature is supported +only for options that are reasonably likely to not cause too much +harm, and @command{gzip} warns if it is used. This feature will be +removed in a future release of @command{gzip}. + +You can use an alias or script instead. For example, if +@command{gzip} is in the directory @samp{/usr/bin} you can prepend +@file{$HOME/bin} to your @env{PATH} and create an executable script +@file{$HOME/bin/gzip} containing the following: @example -for sh: GZIP="-8v --name"; export GZIP -for csh: setenv GZIP "-8v --name" -for MSDOS: set GZIP=-8v --name +#! /bin/sh +export PATH=/usr/bin +exec gzip -9 "$@@" @end example -On @abbr{VMS}, the name of the environment variable is @env{GZIP_OPT}, to -avoid a conflict with the symbol set for invocation of the program. +On @abbr{VMS}, the name of the obsolescent environment variable is +@env{GZIP_OPT}, to avoid a conflict with the symbol set for invocation +of the program. @node Tapes @chapter Using @command{gzip} on tapes @@ -491,21 +501,8 @@ the output with zeroes up to a block boundary. When the data is read and the whole block is passed to @command{gunzip} for decompression, @command{gunzip} detects that there is extra trailing garbage after the compressed data and emits a warning by default if the garbage contains -nonzero bytes. You have to use the -@option{--quiet} option to suppress the warning. This option can be set in the -@env{GZIP} environment variable, as in: - -@example -for sh: GZIP="-q" tar -xfz --block-compress /dev/rst0 -for csh: (setenv GZIP "-q"; tar -xfz --block-compress /dev/rst0) -@end example - -In the above example, @command{gzip} is invoked implicitly by the @option{-z} -option of @acronym{GNU} @command{tar}. Make sure that the same block -size (@option{-b} -option of @command{tar}) is used for reading and writing compressed data on -tapes. (This example assumes you are using the @acronym{GNU} version of -@command{tar}.) +nonzero bytes. You can use the @option{--quiet} option to suppress +the warning. @node Problems @chapter Reporting Bugs diff --git a/gzip.1 b/gzip.1 index d81c45a..23987e2 100644 --- a/gzip.1 +++ b/gzip.1 @@ -364,17 +364,36 @@ such as tar or zip. GNU tar supports the -z option to invoke gzip transparently. gzip is designed as a complement to tar, not as a replacement. .SH "ENVIRONMENT" -The environment variable +The obsolescent environment variable .B GZIP can hold a set of default options for .IR gzip . -These options are interpreted first and can be overwritten by -explicit command line parameters. For example: - for sh: GZIP="-8v --name"; export GZIP - for csh: setenv GZIP "-8v --name" - for MSDOS: set GZIP=-8v --name +These options are interpreted first and can be overwritten by explicit +command line parameters. As this can cause problems when using +scripts, this feature is supported only for options that are +reasonably likely to not cause too much harm, and +.I gzip +warns if it is used. +This feature will be removed in a future release of +.IR gzip . +.PP +You can use an alias or script instead. For example, if +.I gzip +is in the directory +.B /usr/bin +you can prepend +.B $HOME/bin +to your +.B PATH +and create an executable script +.B $HOME/bin/gzip +containing the following: -On Vax/VMS, the name of the environment variable is GZIP_OPT, to + #! /bin/sh + export PATH=/usr/bin + exec gzip \-9 "$@" + +On VMS, the name of the obsolescent environment variable is GZIP_OPT, to avoid a conflict with the symbol set for invocation of the program. .SH "SEE ALSO" znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1), unzip(1), compress(1) @@ -454,17 +473,8 @@ read and the whole block is passed to for decompression, .I gunzip detects that there is extra trailing garbage after the compressed data -and emits a warning by default. You have to use the --quiet option to -suppress the warning. This option can be set in the -.B GZIP -environment variable as in: - for sh: GZIP="-q" tar -xfz --block-compress /dev/rst0 - for csh: (setenv GZIP -q; tar -xfz --block-compr /dev/rst0 - -In the above example, gzip is invoked implicitly by the -z option of -GNU tar. Make sure that the same block size (-b option of tar) is used -for reading and writing compressed data on tapes. (This example -assumes you are using the GNU version of tar.) +and emits a warning by default. You can use the --quiet option to +suppress the warning. .SH BUGS The gzip format represents the input size modulo 2^32, so the --list option reports incorrect uncompressed sizes and compression diff --git a/gzip.c b/gzip.c index e69c3e0..19ea909 100644 --- a/gzip.c +++ b/gzip.c @@ -188,7 +188,6 @@ static int part_nb; /* number of parts in .gz file */ struct timespec time_stamp; /* original time stamp (modification time) */ off_t ifile_size; /* input file size, -1 for devices (debug only) */ static char *env; /* contents of GZIP env variable */ -static char **args = NULL; /* argv pointer if GZIP env variable defined */ static char const *z_suffix; /* default suffix (can be set with --suffix) */ static size_t z_len; /* strlen(z_suffix) */ @@ -242,9 +241,15 @@ static int handled_sig[] = non-character as a pseudo short option, starting with CHAR_MAX + 1. */ enum { - PRESUME_INPUT_TTY_OPTION = CHAR_MAX + 1 + PRESUME_INPUT_TTY_OPTION = CHAR_MAX + 1, + + /* A value greater than all valid long options, used as a flag to + distinguish options derived from the GZIP environment variable. */ + ENV_OPTION }; +static char const shortopts[] = "ab:cdfhH?klLmMnNqrS:tvVZ123456789"; + static const struct option longopts[] = { /* { name has_arg *flag val } */ @@ -401,7 +406,9 @@ int main (int argc, char **argv) { int file_count; /* number of files to process */ size_t proglen; /* length of program_name */ - int optc; /* current option */ + char **argv_copy; + int env_argc; + char **env_argv; EXPAND(argc, argv); /* wild card expansion if necessary */ @@ -415,8 +422,9 @@ int main (int argc, char **argv) program_name[proglen - 4] = '\0'; /* Add options in GZIP environment variable if there is one */ - env = add_envopt(&argc, &argv, OPTIONS_VAR); - if (env != NULL) args = argv; + argv_copy = argv; + env = add_envopt (&env_argc, &argv_copy, OPTIONS_VAR); + env_argv = env ? argv_copy : NULL; #ifndef GNU_STANDARD # define GNU_STANDARD 1 @@ -440,8 +448,53 @@ int main (int argc, char **argv) z_suffix = Z_SUFFIX; z_len = strlen(z_suffix); - while ((optc = getopt_long (argc, argv, "ab:cdfhH?klLmMnNqrS:tvVZ123456789", - longopts, (int *)0)) != -1) { + while (true) { + int optc; + int longind = -1; + + if (env_argv) + { + if (env_argv[optind] && strequ (env_argv[optind], "--")) + optc = ENV_OPTION + '-'; + else + { + optc = getopt_long (env_argc, env_argv, shortopts, longopts, + &longind); + if (0 <= optc) + optc += ENV_OPTION; + else + { + if (optind != env_argc) + { + fprintf (stderr, + ("%s: %s: non-option in "OPTIONS_VAR + " environment variable\n"), + program_name, env_argv[optind]); + try_help (); + } + + /* Wait until here before warning, so that GZIP='-q' + doesn't warn. */ + if (env_argc != 1 && !quiet) + fprintf (stderr, + ("%s: warning: "OPTIONS_VAR" environment variable" + " is deprecated; use an alias or script\n"), + program_name); + + /* Start processing ARGC and ARGV instead. */ + free (env_argv); + env_argv = NULL; + optind = 1; + longind = -1; + } + } + } + + if (!env_argv) + optc = getopt_long (argc, argv, shortopts, longopts, &longind); + if (optc < 0) + break; + switch (optc) { case 'a': ascii = 1; break; @@ -474,12 +527,15 @@ int main (int argc, char **argv) case 'M': /* undocumented, may change later */ no_time = 0; break; case 'n': + case 'n' + ENV_OPTION: no_name = no_time = 1; break; case 'N': + case 'N' + ENV_OPTION: no_name = no_time = 0; break; case PRESUME_INPUT_TTY_OPTION: presume_input_tty = true; break; case 'q': + case 'q' + ENV_OPTION: quiet = 1; verbose = 0; break; case 'r': #if NO_DIR @@ -501,6 +557,7 @@ int main (int argc, char **argv) test = decompress = to_stdout = 1; break; case 'v': + case 'v' + ENV_OPTION: verbose++; quiet = 0; break; case 'V': version(); do_exit(OK); break; @@ -513,12 +570,28 @@ int main (int argc, char **argv) try_help (); break; #endif + case '1' + ENV_OPTION: case '2' + ENV_OPTION: case '3' + ENV_OPTION: + case '4' + ENV_OPTION: case '5' + ENV_OPTION: case '6' + ENV_OPTION: + case '7' + ENV_OPTION: case '8' + ENV_OPTION: case '9' + ENV_OPTION: + optc -= ENV_OPTION; + /* Fall through. */ case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': level = optc - '0'; break; + default: - /* Error message already emitted by getopt_long. */ + if (ENV_OPTION <= optc && optc != ENV_OPTION + '?') + { + /* Output a diagnostic, since getopt_long didn't. */ + fprintf (stderr, "%s: ", program_name); + if (0 <= longind) + fprintf (stderr, "--%s: ", longopts[longind].name); + else + fprintf (stderr, "-%c: ", optc - ENV_OPTION); + fprintf (stderr, ("option not valid in "OPTIONS_VAR + " environment variable\n")); + } try_help (); } } /* loop on all arguments */ @@ -1902,8 +1975,6 @@ local void do_exit(exitcode) in_exit = 1; free(env); env = NULL; - free(args); - args = NULL; FREE(inbuf); FREE(outbuf); FREE(d_buf); diff --git a/tests/Makefile.am b/tests/Makefile.am index 8dd6436..8252670 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,6 +15,7 @@ # along with this program. If not, see . TESTS = \ + gzip-env \ helin-segv \ help-version \ hufts \ diff --git a/tests/gzip-env b/tests/gzip-env new file mode 100755 index 0000000..90ceab3 --- /dev/null +++ b/tests/gzip-env @@ -0,0 +1,43 @@ +#!/bin/sh +# Test the obsolescent GZIP environment variable. + +# Copyright 2015 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 3 of the License, 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 . +# limit so don't run it by default. + +. "${srcdir=.}/init.sh"; path_prepend_ .. + +echo a >exp || framework_failure_ +gzip in || framework_failure_ + +fail=0 +GZIP=-qv gzip -d out 2>err || fail=1 +compare exp out || fail=1 + +for badopt in -- -c --stdout -d --decompress -f --force -h --help -k --keep \ + -l --list -L --license -r --recursive -Sxxx --suffix=xxx '--suffix xxx' \ + -t --test -V --version +do + GZIP=$badopt gzip -d out 2>err && fail=1 +done + +for goodopt in -n --no-name -N --name -q --quiet -v --verbose \ + -1 --fast -2 -3 -4 -5 -6 -7 -8 -9 --best +do + GZIP=$goodopt gzip -d out 2>err || fail=1 + compare exp out || fail=1 +done + +Exit $fail diff --git a/util.c b/util.c index 881c6ee..f84dfc9 100644 --- a/util.c +++ b/util.c @@ -361,11 +361,15 @@ void make_simple_name(name) } while (p != name); } -/* ======================================================================== - * Add an environment variable (if any) before argv, and update argc. - * Return the expanded environment variable to be freed later, or NULL - * if no options were added to argv. - */ +/* Convert the value of the environment variable ENVVAR_NAME + to a newly allocated argument vector, and set *ARGCP and *ARGVP + to the number of arguments and to the vector, respectively. + Make the new vector's zeroth element equal to the old **ARGVP. + Return a pointer to the newly allocated string storage. + + If the vector would be empty, do not allocate storage, + do not set *ARGCP and *ARGVP, and return NULL. */ + #define SEPARATOR " \t" /* separators in env variable */ char *add_envopt( @@ -376,7 +380,6 @@ char *add_envopt( char *p; /* running pointer through env variable */ char **oargv; /* runs through old argv array */ char **nargv; /* runs through new argv array */ - int oargc = *argcp; /* old argc */ int nargc = 0; /* number of arguments in env variable */ char *env_val; @@ -396,7 +399,7 @@ char *add_envopt( free(env_val); return NULL; } - *argcp += nargc; + *argcp = nargc + 1; /* Allocate the new argv array, with an extra element just in case * the original arg list did not end with a NULL. */ @@ -405,9 +408,7 @@ char *add_envopt( *argvp = nargv; /* Copy the program name first */ - if (oargc-- < 0) - gzip_error ("argc<=0"); - *(nargv++) = *(oargv++); + *nargv++ = *oargv; /* Then copy the environment args */ for (p = env_val; nargc > 0; nargc--) { @@ -416,8 +417,6 @@ char *add_envopt( while (*p++) ; /* skip over word */ } - /* Finally copy the old args and add a NULL (usual convention) */ - while (oargc--) *(nargv++) = *(oargv++); *nargv = NULL; return env_val; } -- 2.1.0 --------------040201050901080609080904-- From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Tue, 17 Mar 2015 14:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 20104@debbugs.gnu.org, Mark Adler Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.142660403324933 (code B ref 20104); Tue, 17 Mar 2015 14:54:02 +0000 Received: (at 20104) by debbugs.gnu.org; 17 Mar 2015 14:53:53 +0000 Received: from localhost ([127.0.0.1]:50201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXssT-0006U4-Is for submit@debbugs.gnu.org; Tue, 17 Mar 2015 10:53:53 -0400 Received: from mail-ig0-f181.google.com ([209.85.213.181]:37987) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXssS-0006Tu-48 for 20104@debbugs.gnu.org; Tue, 17 Mar 2015 10:53:52 -0400 Received: by igbue6 with SMTP id ue6so14057215igb.1 for <20104@debbugs.gnu.org>; Tue, 17 Mar 2015 07:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ke6l7iVgGrxerW2YVRvZmDJihNu59guoRO4P5HkKjSc=; b=SUOzpEygRZCZVSgZ9D9yJxPaJuBE8KCwF4T6QmSKsSlr3xh6mCoMBmsuH97syxuPjE UTEFL9Lz0WTeFrPPLfpUlN1/kkyp+gTxzlh64dTULo20ZxZe7AWzoC/KOMI7qEk9XH/9 q4KVlbmdVWf9mK1KZauFq0QR+c0Ja63ocYwFcJlO03sNiLUK7gt0jrdZpwdTivbiZ8iz ldw3y7Lr/v7tyVr327SHkj77gmxyugMuwR38KRMJaxdWN7RvamH6ehbaaNkmjoWsi2LS N5JxsjVX/9/dFQU0677LHxn/EbKeckrGgEVwiV3J1CmuefmG0MmUmAyZBXBKUXVJSuSM b3EQ== X-Received: by 10.43.66.131 with SMTP id xq3mr2822490icb.9.1426604031350; Tue, 17 Mar 2015 07:53:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.171.101 with HTTP; Tue, 17 Mar 2015 07:53:31 -0700 (PDT) In-Reply-To: <55074DFE.70902@cs.ucla.edu> References: <55039ADB.1080700@cs.ucla.edu> <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> <550629C0.5020603@cs.ucla.edu> <55074DFE.70902@cs.ucla.edu> From: Jim Meyering Date: Tue, 17 Mar 2015 07:53:31 -0700 X-Google-Sender-Auth: PnYOX3nmHqr2aQ2F7UjmJ38jcb8 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Mar 16, 2015 at 2:41 PM, Paul Eggert wrote: > On 03/15/2015 08:40 PM, Jim Meyering wrote: >> >> Sounds good. >> I too prefer to deprecate, and then (a release or two later) to remove >> entirely. > > OK, thanks, here's a draft patch to do that. Very nice. I found not even a nit to pick. Thank you! From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Tue, 17 Mar 2015 18:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Jim Meyering Cc: 20104@debbugs.gnu.org, Mark Adler Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.142661638317332 (code B ref 20104); Tue, 17 Mar 2015 18:20:02 +0000 Received: (at 20104) by debbugs.gnu.org; 17 Mar 2015 18:19:43 +0000 Received: from localhost ([127.0.0.1]:50311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXw5f-0004VU-IU for submit@debbugs.gnu.org; Tue, 17 Mar 2015 14:19:43 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:45044) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YXw5d-0004VL-JZ for 20104@debbugs.gnu.org; Tue, 17 Mar 2015 14:19:42 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 693B2A60038; Tue, 17 Mar 2015 11:19:40 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k9kmsMzj6ylB; Tue, 17 Mar 2015 11:19:39 -0700 (PDT) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id B2A03A6002A; Tue, 17 Mar 2015 11:19:39 -0700 (PDT) Message-ID: <55087037.7040001@cs.ucla.edu> Date: Tue, 17 Mar 2015 11:19:35 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 References: <55039ADB.1080700@cs.ucla.edu> <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> <550629C0.5020603@cs.ucla.edu> <55074DFE.70902@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) On 03/17/2015 07:53 AM, Jim Meyering wrote: > Very nice. Thanks for checking it. I changed one minor nit (an if-then-else which was a tiny bit clearer with the if-condition negated and the then- and else- parts swapped) and installed the result. Hmm, after doing that, though, I discovered that Automake generates a dist-gzip rule that by default sets GZIP='--best' in the environment. I think this is partly to work around the problem that GZIP in the environment can mess up how 'gzip' works, and partly to generate more-compressed output. So this behavior by Automake is *both* a workaround for the longstanding gzip misfeature, *and* a use of the misfeature. What a mess. I suppose we could fix Automake to supply --best in a more-portable way. Or perhaps we could unbend a bit and allow GZIP to supply -1 through -9, --fast, --best. From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Wed, 18 Mar 2015 04:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 20104@debbugs.gnu.org, Mark Adler Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.142665330028565 (code B ref 20104); Wed, 18 Mar 2015 04:35:02 +0000 Received: (at 20104) by debbugs.gnu.org; 18 Mar 2015 04:35:00 +0000 Received: from localhost ([127.0.0.1]:50869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YY5h5-0007Qe-Hs for submit@debbugs.gnu.org; Wed, 18 Mar 2015 00:34:59 -0400 Received: from mail-ig0-f178.google.com ([209.85.213.178]:36245) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YY5h2-0007QT-D5 for 20104@debbugs.gnu.org; Wed, 18 Mar 2015 00:34:57 -0400 Received: by igbue6 with SMTP id ue6so90557114igb.1 for <20104@debbugs.gnu.org>; Tue, 17 Mar 2015 21:34:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-type; bh=flB4Wgb7PekEQVMv8513Et9hlkoSUHxdtRfIoMsVbB8=; b=TtH2S13eaBOEx/WpNo31U2TKoewdOkhFpJkSCXI4mizJU0PFMEXbz6aR8iqVD4kH2z eHqpMDL7ExzLgxMfuW026UuKmQMMMbzDSGIYa34sj2qwBhAKkdz8y5VNkGMOr34F2+P5 wmX6EvOaxJu7AtFGk+ge6xqofYyjFDDorZ4N6nlOPkL/jqP0BbUVGQqnXkget0pejy50 oBagKhioIWhWlvWabE2r09MiF9Eglpaqz4xpN4aFaQsAirQ0W10bQXn9iZRAfu+liYqR fd4tZbWnyH4KUHrH+jymiySoxRChWEBN6FEB3n61n98yuz/7ftr54dDmnbBALMIHeBgC CM2w== X-Received: by 10.50.36.65 with SMTP id o1mr3443056igj.32.1426653295641; Tue, 17 Mar 2015 21:34:55 -0700 (PDT) MIME-Version: 1.0 References: <55039ADB.1080700@cs.ucla.edu> <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> <550629C0.5020603@cs.ucla.edu> <55074DFE.70902@cs.ucla.edu> <55087037.7040001@cs.ucla.edu> In-Reply-To: <55087037.7040001@cs.ucla.edu> From: Jim Meyering Date: Wed, 18 Mar 2015 04:34:55 +0000 Message-ID: Content-Type: multipart/alternative; boundary=089e01160750e78cfe0511889a51 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --089e01160750e78cfe0511889a51 Content-Type: text/plain; charset=ISO-8859-1 Glad you caught that. That reminds me: I added the following to the GNUmakefile we find in projects like coreutils, grep, diff, etc. (it comes from gnulib/top/GNUmakefile), and once/if GNU tar deprecates that envvar, we'll have to adjust that, too: # Make tar archive easier to reproduce. export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner The intent was to work (albeit degraded) even with non-GNU tar. Now that I think about it, I dislike the idea of supporting inferior tools when running commands to create a release tarball. That process should be as repeatable as possible. Perhaps we should try harder to find a tar-creating program that has options to do the above, and simply abort when it is not found. On Tue, Mar 17, 2015 at 11:20 AM Paul Eggert wrote: > On 03/17/2015 07:53 AM, Jim Meyering wrote: > > Very nice. > > Thanks for checking it. I changed one minor nit (an if-then-else which > was a tiny bit clearer with the if-condition negated and the then- and > else- parts swapped) and installed the result. > > Hmm, after doing that, though, I discovered that Automake generates a > dist-gzip rule that by default sets GZIP='--best' in the environment. I > think this is partly to work around the problem that GZIP in the > environment can mess up how 'gzip' works, and partly to generate > more-compressed output. So this behavior by Automake is *both* a > workaround for the longstanding gzip misfeature, *and* a use of the > misfeature. What a mess. > > I suppose we could fix Automake to supply --best in a more-portable > way. Or perhaps we could unbend a bit and allow GZIP to supply -1 > through -9, --fast, --best. > > --089e01160750e78cfe0511889a51 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Glad you caught that.

That reminds me:=A0= I added the following to the GNUmakefile
we find in projects like= coreutils, grep, diff, etc. (it comes from
gnulib/top/GNUmakefile), and= once/if GNU tar deprecates
that envvar, we'll have to adjust that, = too:

=A0 # Make tar archive easier to reproduce.
=A0 export TAR_OPTIONS =3D --owner=3D0 --group=3D0 --numeric-owner
<= br>
The intent was to work (albeit degraded) even with non-GNU ta= r.
Now that I think about it, I dislike the idea of supportin= g inferior
tools when running commands to create a release tarball. That=
process should be as repeatable as possible. Perhaps we should
try h= arder to find a tar-creating program that has options to do the
above, a= nd simply abort when it is not found.

On Tue, Mar 17, 2015 at 11:20 AM Paul Eggert <eggert@cs.ucla.edu> wrote:
On 03/17/2015 07:53 AM, Jim Meyering wrote:
> Very nice.

Thanks for checking it.=A0 I changed one minor nit (an if-then-else which was a tiny bit clearer with the if-condition negated and the then- and
else- parts swapped) and installed the result.

Hmm, after doing that, though, I discovered that Automake generates a
dist-gzip rule that by default sets GZIP=3D'--best' in the environm= ent.=A0 I
think this is partly to work around the problem that GZIP in the
environment can mess up how 'gzip' works, and partly to generate more-compressed output.=A0 So this behavior by Automake is *both* a
workaround for the longstanding gzip misfeature, *and* a use of the
misfeature.=A0 What a mess.

I suppose we could fix Automake to supply --best in a more-portable
way.=A0 Or perhaps we could unbend a bit and allow GZIP to supply -1
through -9, --fast, --best.

--089e01160750e78cfe0511889a51-- From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Wed, 18 Mar 2015 05:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Jim Meyering Cc: 20104@debbugs.gnu.org, Mark Adler Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.14266571212395 (code B ref 20104); Wed, 18 Mar 2015 05:39:02 +0000 Received: (at 20104) by debbugs.gnu.org; 18 Mar 2015 05:38:41 +0000 Received: from localhost ([127.0.0.1]:50889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YY6gj-0000cZ-4R for submit@debbugs.gnu.org; Wed, 18 Mar 2015 01:38:41 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:41793) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YY6gg-0000cQ-DJ for 20104@debbugs.gnu.org; Wed, 18 Mar 2015 01:38:39 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 533D8A60005; Tue, 17 Mar 2015 22:38:36 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IlzrkCJ8IUd2; Tue, 17 Mar 2015 22:38:34 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 6D61CA60002; Tue, 17 Mar 2015 22:38:34 -0700 (PDT) Message-ID: <55090F5A.80006@cs.ucla.edu> Date: Tue, 17 Mar 2015 22:38:34 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 References: <55039ADB.1080700@cs.ucla.edu> <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> <550629C0.5020603@cs.ucla.edu> <55074DFE.70902@cs.ucla.edu> <55087037.7040001@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Jim Meyering wrote: > Perhaps we should > try harder to find a tar-creating program that has options to do the > above, and simply abort when it is not found. For creating tarballs, I think it'd be enough to simply specify the options on the command line. Traditional 'tar' will reject them (with "tar: =: unknown function modifier") and will fail. By and large, only developers want to create tarballs, and it's OK to ask them to use development-quality tools. I did propose an Automake patch, here: http://bugs.gnu.org/20132 This patch misspells "automake" as "autoconf"; I'll fix that before it goes in. It's just a quality-of-implementation issue, as unpatched Automake will work OK with bleeding-edge gzip. The main upside of the patch is that even with bleeding-edge gzip Automake would by default generate .gz tarballs no larger than the tarballs generated by unpatched Automake with older gzip. From unknown Mon Aug 18 00:06:19 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20104: [PATCH] gzip: make the GZIP env var obsolescent Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-gzip@gnu.org Resent-Date: Wed, 18 Mar 2015 21:41:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20104 X-GNU-PR-Package: gzip X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 20104@debbugs.gnu.org, Mark Adler Received: via spool by 20104-submit@debbugs.gnu.org id=B20104.142671485421606 (code B ref 20104); Wed, 18 Mar 2015 21:41:04 +0000 Received: (at 20104) by debbugs.gnu.org; 18 Mar 2015 21:40:54 +0000 Received: from localhost ([127.0.0.1]:52042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYLhs-0005cO-PW for submit@debbugs.gnu.org; Wed, 18 Mar 2015 17:40:53 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]:35456) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YYLhq-0005cF-5C for 20104@debbugs.gnu.org; Wed, 18 Mar 2015 17:40:50 -0400 Received: by ieclw3 with SMTP id lw3so50527452iec.2 for <20104@debbugs.gnu.org>; Wed, 18 Mar 2015 14:40:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=x2r3pMJDmlQyCm/1p3gf2+UoY12zNUoGCcPW5LBFT3c=; b=yLHWZKUgHYSh9H6AZyTjMzfeRbHFAWz3aKqQI+8R5SQCNOKPMicvRR0yVseczvnBx9 xURdN70DgteTVmiuPimImcPsO4JY71PW2k7r/BPGq+wvG/3X4seezF0O8+5Y/S1xWObi NvJrNLWLHArgbOG++zLqUCnfetpthqHV7KVIr0xKJdu7N/Z+r2obyOT7nZ7bwv5jd4Vw zfner1N9z6YfrdJMJHvBIOf1QuCDWiLW4DYd8Yz/dNIrbWnDYkuXbz0rKat4MRinrDQO Cr8xyPUQGFEBD12HzHghhKLaszkKnGZadVsNSAmDdTVi7fuma1dM6h1fo5Ak9xH4E083 /K7w== X-Received: by 10.43.32.19 with SMTP id si19mr98005705icb.93.1426714849676; Wed, 18 Mar 2015 14:40:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.171.101 with HTTP; Wed, 18 Mar 2015 14:40:29 -0700 (PDT) In-Reply-To: <55090F5A.80006@cs.ucla.edu> References: <55039ADB.1080700@cs.ucla.edu> <4820870A-F083-4638-81B0-95242C70BC68@alumni.caltech.edu> <550629C0.5020603@cs.ucla.edu> <55074DFE.70902@cs.ucla.edu> <55087037.7040001@cs.ucla.edu> <55090F5A.80006@cs.ucla.edu> From: Jim Meyering Date: Wed, 18 Mar 2015 14:40:29 -0700 X-Google-Sender-Auth: 0ugYMXjPQTVjVr4lukpAlrsFbiM Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Tue, Mar 17, 2015 at 10:38 PM, Paul Eggert wrote: > Jim Meyering wrote: >> >> Perhaps we should >> try harder to find a tar-creating program that has options to do the >> above, and simply abort when it is not found. > > > For creating tarballs, I think it'd be enough to simply specify the options > on the command line. Traditional 'tar' will reject them (with "tar: =: > unknown function modifier") and will fail. By and large, only developers > want to create tarballs, and it's OK to ask them to use development-quality > tools. > > I did propose an Automake patch, here: > > http://bugs.gnu.org/20132 Glanced through, but didn't have time for a thorough review. > This patch misspells "automake" as "autoconf"; I'll fix that before it goes > in. > > It's just a quality-of-implementation issue, as unpatched Automake will work > OK with bleeding-edge gzip. The main upside of the patch is that even with > bleeding-edge gzip Automake would by default generate .gz tarballs no larger > than the tarballs generated by unpatched Automake with older gzip. That works for me. Thanks for dealing with all of this. From debbugs-submit-bounces@debbugs.gnu.org Wed May 11 19:34:06 2016 Received: (at control) by debbugs.gnu.org; 11 May 2016 23:34:06 +0000 Received: from localhost ([127.0.0.1]:47810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0ddm-0001sT-ID for submit@debbugs.gnu.org; Wed, 11 May 2016 19:34:06 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0ddk-0001rz-Vv for control@debbugs.gnu.org; Wed, 11 May 2016 19:34:05 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id F0D0F1611B2 for ; Wed, 11 May 2016 16:33:58 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zO5hIoRv-IwZ for ; Wed, 11 May 2016 16:33:58 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5C9641612B4 for ; Wed, 11 May 2016 16:33:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fmwQz5N9IFOQ for ; Wed, 11 May 2016 16:33:58 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 45CBC1611B2 for ; Wed, 11 May 2016 16:33:58 -0700 (PDT) To: control@debbugs.gnu.org From: Paul Eggert Subject: gzip bugs that have been fixed Organization: UCLA Computer Science Department Message-ID: <592baef8-55b2-ce22-e7fb-43214f5c5f22@cs.ucla.edu> Date: Wed, 11 May 2016 16:33:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) close 23025 close 23022 close 20104 close 21161 close 21335 close 21079