History log of /freebsd-10.3-release/usr.bin/gzip/gzip.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 290569 09-Nov-2015 delphij

MFC r290024,290073:

In gunzip(1), treat trailing garbage as a warning and not an error. This
allows scripts to distinguish it between real fatal errors, for instance a
CRC mismatch.

Update manual page for the behavior change.

PR: bin/203873
Submitted by: Eugene Grosbein <eugen grosbein net>


# 282052 27-Apr-2015 delphij

MFC r281500,281540,281626:

Sync with NetBSD:
- Mention xz(1) in gzip(1).
- Strip away path from header name when decompressing.


# 274262 08-Nov-2014 delphij

MFC r273507: Sync with NetBSD.


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 226184 10-Oct-2011 delphij

Incorporate recent changes from NetBSD. Most notable change is the addition
of support of decompressing xz files.

Obtained from: NetBSD


# 222287 25-May-2011 delphij

Fix a regression introduced with previous changeset: if output is stdout,
do not check for symbolic link.


# 222211 23-May-2011 delphij

Match symbolic link handling behavior with GNU gzip, bzip2 and xz:

When we are operating on a symbolic link pointing to an existing
file, bail out by default, but go ahead if -f is specified.

Submitted by: arundel
MFC after: 2 weeks


# 222210 23-May-2011 delphij

Diff reduction against NetBSD. The most notable change is to zdiff(1) to
handle more file formats including bzip2 and xz.

MFC after: 2 weeks


# 213927 16-Oct-2010 bcr

Correct some typos in comments, no functional changes.


# 213044 23-Sep-2010 delphij

In the past gunzip(1) write()'s after each inflate return. This is
not optimal from a performance standpoint since the write buffer is
not necessarily be filled up when the inflate rountine reached the
end of input buffer and it's not the end of file.

This problem gets uncovered by trying to pipe gunzip -c output to
a GEOM device directly, which enforces the writes be multiple of
sector size.

Sponsored by: iXsystems, Inc.
Reported by: jpaetzel
MFC after: 2 weeks


# 209017 10-Jun-2010 delphij

Several style fixes as prompted by bde@.

While I'm there, loosen the st_nlink check and fix grammar for 1 extra
links.


# 208889 07-Jun-2010 delphij

Follow up revision 208888 with purely ident changes.

MFC after: 1 week


# 208888 07-Jun-2010 delphij

Correct a bug in gzip(1): make sure that initialize isb with fstat() on
input file before using it.

PR: bin/147275
Submitted by: thomas
MFC after: 1 week


# 207284 27-Apr-2010 delphij

Use _exit(2) system call directly instead of using exit(3) in signal
handler, as the latter is not guaranteed to be signal safe, and we
do not really care about flushing the stream during SIGINT.

Suggested by: Maxim Konovalov <maxim.konovalov gmail com>
MFC after: 13 days


# 207247 26-Apr-2010 delphij

Add a signal handler for SIGINT which removes output file when necessary.

While I'm there, move unlink_input() slightly down to after closing the
output file, in uncompression path.

MFC after: 2 weeks


# 206387 07-Apr-2010 delphij

Diff reduction against NetBSD and add myself to AUTHORS section of the
manual page as I wrote the unpack functionality. No actual executable
code change verified with md5(1).


# 205793 28-Mar-2010 ed

Change all our own code to use st_*tim instead of st_*timespec.

Also remove some local patches to diff(1) which are now unneeded.


# 195988 31-Jul-2009 delphij

Correct a stack underflow in gzip:

- Limit suffix to be no more than 30 bytes long. This matches GNU
behavior.
- Correct usage of memcpy().

Note that this commit only corrects the stack underflow issue, we
still need some other fixes to cover other edges. [1]

Reported by: Ron Jude <ronj wytheville org>
Discussed with: Matthew Green (original NetBSD gzip author),
Eygene Ryabinkin <rea-fbsd codelabs ru> [1]
Approved by: re (kib)


# 194916 24-Jun-2009 delphij

Sync with NetBSD:
- gzip -n does not store timestamp; [1]
- Reduce diff against NetBSD by moving some casts in our local
versions.

PR: bin/134955
Obtained from: NetBSD
MFC after: 1 month


# 194579 21-Jun-2009 delphij

Add support for uncompressing pack(1)'ed files. Pack(1) is a program found
in some commercial Unix systems, which utilizes Huffman minimum redundancy
code tree to compress files. This implementation supports the "new" pack
format only, just like GNU gzip did.

Thanks for oliver@'s archive set which I can test against, and Mingyan Guo
for providing helpful review of my code.

PR: bin/109567
MFC after: 1 month


# 194508 19-Jun-2009 delphij

Two fixes for SMALL case when compiling with WARNS=6:

- Reduce scope where return value can be referenced.
- Add a dummy access to timestamp to silence warning.

Submitted by: Mingyan Guo <guomingyan gmail com>


# 181283 04-Aug-2008 cperciva

Mark functions as __dead2 in order to help the LLVM static checker
understand which code paths aren't possible.

Reported by: edwin


# 180727 23-Jul-2008 delphij

Sync with NetBSD's license changes.


# 176980 09-Mar-2008 rwatson

Teach gunzip that .tbz and .tbz2 uncompress to .tar, in a manner similar to
its existing understanding that .tgz uncompresses to .tar.

MFC after: 3 days
PR: 121519
Submitted by: Ighighi <ighighi at gmail.com>


# 176970 09-Mar-2008 rwatson

When gzipping to a target file, only set the source file flags on the
target file after the timestamp has been set; otherwise setting the
timestamp will fail if the flags don't permit it (i.e., uchg).

MFC after: 1 week
PR: 120208
Submitted by: Ighighi <ighighi at gmail.com>


# 171389 12-Jul-2007 delphij

- Simulate GNU gzip(1) behavior where full filename is
being output in verbose mode when doing recursive[1].
- Use better representation of S:

PR: bin/114470
Submitted by: Ighighi <ighighi gmail com> [1]
Approved by: re (hrs)


# 170053 28-May-2007 delphij

Add a '-k' flag which is similar with its bzip2(1) counterpart,
meaning that the user wants the input file to be left intact.

Feature request: Ighighi <ighighi gmail.com>
PR: bin/103006
MFC after: 1 month


# 166363 31-Jan-2007 delphij

Fix typo.

Obtained from: DragonFly


# 166255 26-Jan-2007 delphij

Replace the GNU gzip with a slightly modified NetBSD gzip. The
NetBSD version is a feature-to-feature re-implementation of GNU
gzip using the freely-redistributable zlib and this version is
expected to be mostly bug-to-bug compatible with the GNU
implementation.

- Because this is a piece of mature code and we want to make
changes so it is added directly rather than importing to
src/contrib.
- Connect newly added code to src/usr.bin/ and rescue/rescue
build.
- Disconnect the GNU gzip code from build for now, they will
be eventually removed completely.
- Provide two new src.conf(5) knobs, WITHOUT_BZIP2_SUPPORT and
WITHOUT_BZIP2.

Tested by: kris (full exp-7 pointyhat build)
Approved by: core (importing a 4-clause BSD licensed file)
Approved by: re (adding new utility during -HEAD code slush)