Debian Bug report logs - #314342
gzip: zgrep broken in dash

version graph

Package: gzip; Maintainer for gzip is Bdale Garbee <bdale@gag.com>; Source for gzip is src:gzip.

Reported by: Peter Samuelson <peter@p12n.org>

Date: Wed, 15 Jun 2005 20:18:03 UTC

Severity: normal

Tags: patch

Found in version 1.3.5-10

Fixed in version gzip/1.3.5-11

Done: Bdale Garbee <bdale@gag.com>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Bdale Garbee <bdale@gag.com>:
Bug#314342; Package gzip. Full text and rfc822 format available.

Acknowledgement sent to Peter Samuelson <peter@p12n.org>:
New Bug report received and forwarded. Copy sent to Bdale Garbee <bdale@gag.com>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Peter Samuelson <peter@p12n.org>
To: submit@bugs.debian.org
Subject: gzip: zgrep broken in dash
Date: Wed, 15 Jun 2005 15:06:52 -0500
[Message part 1 (text/plain, inline)]
Package: gzip
Version: 1.3.5-10
Tags: patch

    $ zgrep foo bar
    /bin/zgrep: 103: Syntax error: Bad substitution

This is with dash, which doesn't support ${foo//a/b} syntax.
The following patch was tested with bash, ksh, ksh93, dash, posh.

Peter

--- zgrep~	2005-05-21 00:01:45.000000000 -0500
+++ zgrep	2005-06-15 14:56:44.000000000 -0500
@@ -100,9 +100,7 @@
     elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then
       $grep $opt "$pat"
     else
-      i=${i//\\/\\\\}
-      i=${i//|/\\|}
-      i=${i//&/\\&}
+      i=$(echo "$i" | sed -e 's/[\\|&]/\\&/g')
       if test $with_filename -eq 1; then
 	sed_script="s|^[^:]*:|${i}:|"
       else
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Bdale Garbee <bdale@gag.com>:
Bug#314342; Package gzip. Full text and rfc822 format available.

Acknowledgement sent to bdale@gag.com (Bdale Garbee):
Extra info received and forwarded to list. Copy sent to Bdale Garbee <bdale@gag.com>. Full text and rfc822 format available.

Message #10 received at 314342@bugs.debian.org (full text, mbox):

From: bdale@gag.com (Bdale Garbee)
To: 314342@bugs.debian.org, control@bugs.debian.org
Subject: thanks!
Date: Wed, 15 Jun 2005 14:36:04 -0600 (MDT)
tag 314342 +pending
thanks

Patch applied in my CVS for the next upload.  Thanks!

Bdale



Tags added: pending Request was from bdale@gag.com (Bdale Garbee) to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Bdale Garbee <bdale@gag.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Peter Samuelson <peter@p12n.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #17 received at 314342-close@bugs.debian.org (full text, mbox):

From: Bdale Garbee <bdale@gag.com>
To: 314342-close@bugs.debian.org
Subject: Bug#314342: fixed in gzip 1.3.5-11
Date: Wed, 15 Jun 2005 17:02:37 -0400
Source: gzip
Source-Version: 1.3.5-11

We believe that the bug you reported is fixed in the latest version of
gzip, which is due to be installed in the Debian FTP archive:

gzip_1.3.5-11.diff.gz
  to pool/main/g/gzip/gzip_1.3.5-11.diff.gz
gzip_1.3.5-11.dsc
  to pool/main/g/gzip/gzip_1.3.5-11.dsc
gzip_1.3.5-11_i386.deb
  to pool/main/g/gzip/gzip_1.3.5-11_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 314342@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bdale Garbee <bdale@gag.com> (supplier of updated gzip package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 15 Jun 2005 14:39:11 -0600
Source: gzip
Binary: gzip
Architecture: source i386
Version: 1.3.5-11
Distribution: unstable
Urgency: low
Maintainer: Bdale Garbee <bdale@gag.com>
Changed-By: Bdale Garbee <bdale@gag.com>
Description: 
 gzip       - The GNU compression utility
Closes: 310329 312380 314211 314342
Changes: 
 gzip (1.3.5-11) unstable; urgency=low
 .
   * patch from Peter Samuelson for bashism in zgrep,
     closes: #314342, #314211, #312380, #310329
Files: 
 41960bfd907cb9ffd8cf1d73b71e8f1b 554 base required gzip_1.3.5-11.dsc
 fda9a1409ddf82980fbfa411d6e9019c 56374 base required gzip_1.3.5-11.diff.gz
 95cc8111f1df35965be81948aecb03a1 70802 base required gzip_1.3.5-11_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCsJKPZKfAp/LPAagRAnLdAJ96LvsPvfMe1OgKA7aGV9RDkX5ACwCdFM4X
zhUzsRrA+KdVt6jewwQXPqo=
=e8xq
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 06:45:24 2014; Machine Name: buxtehude.debian.org

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