History log of /freebsd-src/usr.bin/gzip/gzip.c (Results 1 – 25 of 86)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.1.0, release/13.3.0
# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals.

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix

show more ...


Revision tags: release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# b61a5730 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BS

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0
# f9349d42 02-Nov-2022 Dag-Erling Smørgrav <des@FreeBSD.org>

gzip: Add support for decompressing zstd files.

Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D37236


Revision tags: release/13.1.0
# 4669f23e 27-Jan-2022 Tom Jones <thj@FreeBSD.org>

Remove SMALL conditionals from gzip

gzip has SMALL conditionals which enable building a reduced size version
of the binary. These exist as part of the introduction of BSD licensed
gzip in 2004 in Ne

Remove SMALL conditionals from gzip

gzip has SMALL conditionals which enable building a reduced size version
of the binary. These exist as part of the introduction of BSD licensed
gzip in 2004 in NetBSD and appear to have been required to reach a size
for inclusion in their install media. For more information see commits
to gzip in the NetBSD tree on the 28th of March 2004.

SMALL doesn't appear to be hooked up to our build system and
complicates gzip quite a bit.

Reviewed by: kevans, imp
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34047

show more ...


# 21c966a6 27-Jan-2022 Tom Jones <thj@FreeBSD.org>

Fix test output when gzip is run with -tlv

When run with test, verbose and list we need to parse the file otherwise
the test output is "NOT OK" even for the file is valid.

Reviewed by: kevans, alla

Fix test output when gzip is run with -tlv

When run with test, verbose and list we need to parse the file otherwise
the test output is "NOT OK" even for the file is valid.

Reviewed by: kevans, allanjude, imp
Sponsored by: Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34046

show more ...


Revision tags: release/12.3.0, release/13.0.0
# 2dfa4b66 08-Dec-2020 Bryan Drewery <bdrewery@FreeBSD.org>

fts_read: Handle error from a NULL return better.

This is addressing cases such as fts_read(3) encountering an [EIO]
from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be
seen as a su

fts_read: Handle error from a NULL return better.

This is addressing cases such as fts_read(3) encountering an [EIO]
from fchdir(2) when FTS_NOCHDIR is not set. That would otherwise be
seen as a successful traversal in some of these cases while silently
discarding expected work.

As noted in r264201, fts_read() does not set errno to 0 on a successful
EOF so it needs to be set before calling it. Otherwise we might see
a random error from one of the iterations.

gzip is ignoring most errors and could be improved separately.

Reviewed by: vangyzen
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D27184

show more ...


Revision tags: release/12.2.0, release/11.4.0
# a0eb385c 14-Mar-2020 Xin LI <delphij@FreeBSD.org>

Remove unneeded checks for prelen.

In order to determine the type of a compressed file, we have to read
in the first four bytes which may also be important for decompression
purposes, to do that we

Remove unneeded checks for prelen.

In order to determine the type of a compressed file, we have to read
in the first four bytes which may also be important for decompression
purposes, to do that we would pass the buffer that we have already
read in, along with the size of it.

Rename header1 to fourbytes to make that explicit, and remove all
checks for prelen.

Reported by: cem
Reviewed by: cem
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24034

show more ...


Revision tags: release/12.1.0, release/11.3.0
# 5c4b64e6 07-Jan-2019 Xin LI <delphij@FreeBSD.org>

Port NetBSD improvements:

- Add -l support for xz files
- Add lzip support to gzip based on the example lzip decoder.

Obtained from: NetBSD
MFC after: 2 weeks
Relnotes: yes


Revision tags: release/12.0.0
# 34e314e7 10-Jul-2018 Xin LI <delphij@FreeBSD.org>

Use endian.h le32dec() instead of rolling our own.

Suggested by: phk
Reviewed by: imp, pfg
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16192


# e76247cd 09-Jul-2018 Conrad Meyer <cem@FreeBSD.org>

gzip(1): Don't shadow global 'err'

Unbreak work build on ppc due to -Werror=shadow. Introduced in r336121.

X-MFC-With: r336121


# b393a8ac 09-Jul-2018 Xin LI <delphij@FreeBSD.org>

Don't delete outfile unconditionally.

MFC after: 1 month


# 3fcbc83d 08-Jul-2018 Pedro F. Giffuni <pfg@FreeBSD.org>

gzip: fix for undefined behavior.

Unportable left shift reported with MKSANITIZER=yes
USE_SANITIZER=undefined:

# progress -zf ./games.tgz tar -xp -C "./" -f -
/public/src.git/usr.bin/gzip/gzip.c:2

gzip: fix for undefined behavior.

Unportable left shift reported with MKSANITIZER=yes
USE_SANITIZER=undefined:

# progress -zf ./games.tgz tar -xp -C "./" -f -
/public/src.git/usr.bin/gzip/gzip.c:2126:33: runtime error: left shift of
251 by 24 places cannot be represented in type 'int'
100%
|****************************************************************************************************************|
44500 KiB 119.69 MiB/s 00:00 ETA

Refactor the following code into something that is more clear
and fix signed integer shift, by casting all buf[] elements to
(unsigned int):

unsigned char buf[8];
uint32_t usize;
[...]
else {
usize = buf[4] | buf[5] << 8 |
buf[6] << 16 | buf[7] << 24;
[...]

New version:

usize = buf[4];
usize |= (unsigned int)buf[5] << 8;
usize |= (unsigned int)buf[6] << 16;
usize |= (unsigned int)buf[7] << 24;

Only the "<< 24" part needs explicit cast, but for consistency make the
integer promotion explicit and clear to a code reader.

Sponsored by <The NetBSD Foundation>

Obtained from: NetBSD (CVS rev. 1.113)
MFC after: 1 week

show more ...


Revision tags: release/11.2.0
# f5e46072 12-Dec-2017 Xin LI <delphij@FreeBSD.org>

Close the correct file descriptor.

MFC after: 2 weeks


# 611ecc62 12-Dec-2017 Conrad Meyer <cem@FreeBSD.org>

gzip(1): Remove duplicate close()

CID: 1383560
Reported by: Coverity
Sponsored by: Dell EMC Isilon


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.

show more ...


# 82725ba9 23-Nov-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r325999 through r326131.


# 90f528e8 21-Nov-2017 Xin LI <delphij@FreeBSD.org>

Support SIGINFO.

Obtained from: NetBSD
MFC after: 2 weeks


Revision tags: release/10.4.0, release/11.1.0
# 7fa59e67 06-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r311460 through r311545.


# 1c324569 06-Jan-2017 Konstantin Belousov <kib@FreeBSD.org>

Use type-independent formats for printing nlink_t and ino_t.

Extracted from: ino64 work by gleb, mckusick
Discussed with: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week


Revision tags: release/11.0.1, release/11.0.0
# 2f52412d 29-Aug-2016 Enji Cooper <ngie@FreeBSD.org>

MFhead @ r305013


# 491cdc1b 27-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r304700 through r304884.


# 64093e14 27-Aug-2016 Xin LI <delphij@FreeBSD.org>

Use printable ASCII instead of octal representation.

MFC after: 2 weeks


# 27067774 16-Aug-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r303250 through r304235.


# d61c7fc0 30-Jul-2016 Marcelo Araujo <araujo@FreeBSD.org>

Use nitems() from sys/param.h.

MFC after: 2 weeks.
Sponsored by: gandi.net (BSD Day Taiwan)


1234