aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/gzip
Commit message (Collapse)AuthorAgeFilesLines
* man: Misc syntax fixesGraham Percival2024-11-141-1/+1
| | | | | | | | | | | | - loader.efi.8: use proper way of printing a backslash. - usr.bin/gzip/gzip.1: contained a non-breaking space (in utf-8, 0xC2A0). - lib/libpmc/pmc.*.3: remove two duplicate .Xr lines Signed-off-by: Graham Percival <gperciva@tarsnap.com> Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com> MFC after: 3 days Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1523
* manuals: Fix "unusual .Xr" warnings with a scriptGraham Percival2024-10-151-1/+1
| | | | | | | | | | | | | These were reported by `mandoc -T lint ...` as warnings: - unusual Xr order - unusual Xr punctuation Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts Signed-off-by: Graham Percival <gperciva@tarsnap.com> Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com> Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1464
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Remove copyright strings ifdef'd outWarner Losh2023-11-271-6/+0
| | | | | | | | | | | 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
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-166-12/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1610-10/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-162-3/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-161-1/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-163-6/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSDWarner Losh2023-05-123-3/+3
| | | | | | | | | 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
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-122-2/+2
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD 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
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+0
|
* gzip: Add support for decompressing zstd files.Dag-Erling Smørgrav2022-11-045-15/+143
| | | | | Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37236
* zdiff: avoid non-conformant featuresKyle Evans2022-05-314-22/+154
| | | | | | | | | | | | | `setvar` is a non-conformant feature that looks slightly neater but is not portable to other /bin/sh implementations. Making the script portable is straightforward, so let's do it. Tests are added to make sure that I didn't break anything major in the process. Reviewed by: bapt (previous version), jilles Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35275
* gzip: fix error handling in unxzEric van Gyzen2022-02-251-2/+1
| | | | | | | | | The result of fstat() was not checked. Furthermore, there was a redundant check of st.st_size. Fix both. Reported by: Coverity MFC after: 1 week Sponsored by: Dell EMC Isilon
* Remove SMALL conditionals from gzipTom Jones2022-01-271-136/+0
| | | | | | | | | | | | | | | 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
* Fix test output when gzip is run with -tlvTom Jones2022-01-271-6/+11
| | | | | | | | | 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
* fts_read: Handle error from a NULL return better.Bryan Drewery2020-12-081-1/+3
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=368467
* Remove unneeded checks for prelen.Xin LI2020-03-143-22/+17
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=358988
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-2/+0
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* Add Makefile.depend.optionsSimon J. Gerraty2019-12-111-0/+8
| | | | | | | | | | | | | | | | | | | | Leaf directories that have dependencies impacted by options need a Makefile.depend.options file to avoid churn in Makefile.depend DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc can be set in local.dirdeps-options.mk which can add to those set in Makefile.depend.options See share/mk/dirdeps-options.mk Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22469 Notes: svn path=/head/; revision=355616
* Correct documentation year.Xin LI2019-01-071-1/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=342846
* Port NetBSD improvements:Xin LI2019-01-074-9/+1021
| | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=342845
* Use endian.h le32dec() instead of rolling our own.Xin LI2018-07-101-17/+6
| | | | | | | | | | Suggested by: phk Reviewed by: imp, pfg MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16192 Notes: svn path=/head/; revision=336156
* gzip(1): Don't shadow global 'err'Conrad Meyer2018-07-091-4/+4
| | | | | | | | | Unbreak work build on ppc due to -Werror=shadow. Introduced in r336121. X-MFC-With: r336121 Notes: svn path=/head/; revision=336127
* Don't delete outfile unconditionally.Xin LI2018-07-091-4/+12
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=336121
* gzip: fix for undefined behavior.Pedro F. Giffuni2018-07-081-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=336113
* Remove "All rights reserved" from my files.Xin LI2018-05-101-1/+0
| | | | | | | | | See r333391 for the rationale. MFC after: 1 week Notes: svn path=/head/; revision=333449
* Close the correct file descriptor.Xin LI2017-12-121-1/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=326791
* gzip(1): Remove duplicate close()Conrad Meyer2017-12-121-1/+0
| | | | | | | | | CID: 1383560 Reported by: Coverity Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=326786
* Create links for xzdiff.Xin LI2017-12-051-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=326560
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-274-0/+8
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=326276
* Set errno to EFTYPE instead of EINVAL to be more consistent with theXin LI2017-11-251-1/+1
| | | | | | | | | rest of code. MFC after: 1 month Notes: svn path=/head/; revision=326185
* Support SIGINFO.Xin LI2017-11-215-95/+263
| | | | | | | | Obtained from: NetBSD MFC after: 2 weeks Notes: svn path=/head/; revision=326052
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. 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. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add HAS_TESTS to all Makefiles that are currently using theEnji Cooper2017-08-021-0/+1
| | | | | | | | | `SUBDIR.${MK_TESTS}+= tests` idiom. This is a follow up to r321912. Notes: svn path=/projects/make-check-sandbox/; revision=321914
* Convert traditional ${MK_TESTS} conditional idiom for including testEnji Cooper2017-08-021-3/+1
| | | | | | | | | | | | | | directories to SUBDIR.${MK_TESTS} idiom This is being done to pave the way for future work (and homogenity) in ^/projects/make-check-sandbox . No functional change intended. MFC after: 1 weeks Notes: svn path=/head/; revision=321912
* Reflect actual NetBSD revision we already have.Xin LI2017-02-061-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=313327
* Use type-independent formats for printing nlink_t and ino_t.Konstantin Belousov2017-01-061-4/+4
| | | | | | | | | | Extracted from: ino64 work by gleb, mckusick Discussed with: mckusick Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=311522
* style(9) indent changes, no actual code change.Xin LI2016-11-261-22/+21
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=309184
* Use printable ASCII instead of octal representation.Xin LI2016-08-271-1/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=304875
* Use nitems() from sys/param.h.Marcelo Araujo2016-07-301-1/+1
| | | | | | | | MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) Notes: svn path=/head/; revision=303542
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary of changes: - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed - Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously. - Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk. - Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup) Document the proposed changes in share/examples/tests/tests/... via examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* MFHGlen Barber2016-03-101-0/+11
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-091-0/+11
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | First pass to fix the 'tests' packages.Glen Barber2016-02-021-0/+4
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Update NetBSD RCS IDs to reflect the changes being upstreamed.Xin LI2015-10-272-2/+2
| | | | | | | | MFC after: 13 days X-MFC-With: r290024 Notes: svn path=/head/; revision=290073
* In gunzip(1), treat trailing garbage as a warning and not an error. ThisXin LI2015-10-262-3/+10
| | | | | | | | | | | | | | 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> MFC after: 2 weeks Notes: svn path=/head/; revision=290024