DragonFly-2.3.2.132.g00e7 master usr.bin/gzip Makefile gzexe gzexe.1 gzip.1 gzip.c unbzip2.c zdiff.1 zgrep zgrep.1 zmore zmore.1 znew zuncompress.c

Peter Avalos pavalos at crater.dragonflybsd.org
Sat Jul 18 17:02:15 PDT 2009


commit 00e71414e08d7af9e370d8c97f6dbd57ac5a42a3
Author: Peter Avalos <pavalos at theshell.com>
Date:   Sat Jul 18 13:35:46 2009 -1000

    Update gzip.
    
    - gzexe: Ensure we do not compress files we need for decompressing by
    also checking hard links. From Andrew Dalgleish. (from OpenBSD)
    - note that -n also stops the timestamp from being output.
    - Don't abort decompression if there are no bytes in the output buffer
    when the end of compressed block (ie the crc) is reached.
    (ie when decompressing concatenated zipped files).
    - If stdin is the input stream, fstat it and check if it's
    file. If so, use it's mtime for the mtime in the header. Otherwise use
    time(2)'s result instead. Lines up with GNU gzip and RFC 1952 now as
    well.
    - Fix parsing of $GZIP so that not to overrun the end of string.
    - handle partial reads.
    - avoid an infinite loop while decompressing invalid gzip files.
    - in file_compress() always stat() the input file.  this patch avoids
    reading from uninitialised space.
    - Fix a few issues:
     gzip -vt just prints the contents of a .Z file
     gzip -vt will print OK even if the .gz file is corrupt
     gzip -vt prints nothing with a .bz2 file
     gzip can loop endlessly with a corrupt .bz2 file
    - Don't warn about >4GB files not having their size correctly stored.
    - Remove unhandled H option from getopt() argument. Describe -l in usage.
    - properly check the return value of read() & pread().
    - Delete impossible code.
    - Abort decompression with an error when EOF is reached on input. The
    test output will then be 'NOT OK'.
    - End a decompression when trailing garbage is found. It emits a warning
    message and causes a non-zero exit status (similar to GNU gzip).
    - properly detect when the output fails (eg, full filesystem) and do not
    delete the input file.
    
    Dragonfly-bug: http://bugs.dragonflybsd.org/issue1026

Summary of changes:
 usr.bin/gzip/Makefile      |    6 +-
 usr.bin/gzip/gzexe         |   36 ++++-
 usr.bin/gzip/gzexe.1       |    8 +-
 usr.bin/gzip/gzip.1        |   12 +-
 usr.bin/gzip/gzip.c        |  398 ++++++++++++++++++++++++++++----------------
 usr.bin/gzip/unbzip2.c     |   40 ++++-
 usr.bin/gzip/zdiff.1       |    2 +-
 usr.bin/gzip/zgrep         |   48 ++++--
 usr.bin/gzip/zgrep.1       |    4 +-
 usr.bin/gzip/zmore         |   10 +-
 usr.bin/gzip/zmore.1       |   28 +++-
 usr.bin/gzip/znew          |    6 +-
 usr.bin/gzip/zuncompress.c |    4 +-
 13 files changed, 409 insertions(+), 193 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/00e71414e08d7af9e370d8c97f6dbd57ac5a42a3


-- 
DragonFly BSD source repository





More information about the Commits mailing list