Commit graph

58 commits

Author SHA1 Message Date
Martin Matuska b9128a37fa libarchive: merge from vendor branch
Libarchive 3.7.3

New features:
  #1941 uudecode filter: support file name and file mode in raw mode
  #1943 7-zip reader: translate Windows permissions into UNIX
        permissions
  #1962 zstd filter now supports the "long" write option
  #2012 add trailing letter b to bsdtar(1) substitute pattern
  #2031 PCRE2 support
  #2054 add support for long options "--group" and "--owner" to tar(1)

Security fixes:
  #2101 Fix possible vulnerability in tar error reporting introduced
        in f27c173

Important bugfixes:
  #1974 ISO9660: preserve the natural order of links
  #2105 rar5: fix infinite loop if during rar5 decompression the last
        block produced no data
  #2027 xz filter: fix incorrect eof at the end of an lzip member
  #2043 zip: fix end-of-data marker processing when decompressing zip
        archives

PR:		278315 (exp-run)
MFC after:	1 week
2024-04-16 23:39:31 +02:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Martin Matuska b5a3a89c50 unzip: swtich to bsdunzip from libarchive
Unzip from FreeBSD has been ported to libarchive.
Change usr.bin/unzip to use bsdunzip from libarchive.

Differential Revision:	https://reviews.freebsd.org/D41239
PR:			272845 (exp-run)
MFC after:		1 month
2023-08-04 12:45:41 +02:00
Warner Losh a1db51dbdb unzip(1): Comma after e.g.
Add comma after e.g. to make igor happy (oh, and I suppose to conform to
normal English grammar rules).

Sponsored by:		Netflix
2023-06-27 10:58:40 -06:00
Mingye Wang a227908571 unzip: add -O/-I encoding support
These are for compatibility with the info-zip version of unzip.

PR: 271657
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/752
2023-06-27 10:55:26 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
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
2023-05-12 10:44:03 -06:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Yoshihiro Takahashi a1f28ec729 unzip: Document optional member list
Submitted by:	Pat Maddox (man page)
PR:		267426
MFC after:	2 weeks
2023-01-02 13:17:27 +09:00
Yoshihiro Takahashi 2c614481fd unzip: Fix segmentation fault if a zip file contains buggy filename.
PR:             259011
Reported by:    Robert Morris
Submitted by:   ak
MFC after::     1 week
2021-10-10 20:49:19 +09:00
Yoshihiro Takahashi a4724ff481 unzip: sync with NetBSD upstream to add passphrase support
- Add support for password protected zip archives.
  We use memset_s() rather than explicit_bzero() for more portable
  (See PR).
- Use success/failure macro in exit()
- Mention ZIPX format in unzip(1)

Submitted by:	Mingye Wang and Alex Kozlov (ak@)
PR:		244181
Reviewed by:	mizhka
Obtained from:	NetBSD
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28892
2021-09-26 01:32:42 +09:00
Yoshihiro Takahashi 0cdfa49564 unzip: Sync with NetBSD upstream.
- Ignore malformed directory entries as created by Dropbox ("/").
  (rev 1.24)
- Use libarchive 3.x interface: check result for archive_read_free()
  and don't call archive_read_close manually. (rev 1.23)
- Always overwrite symlinks on extraction, ever if they're newer than
  entries in archive.
- Use getline() rather than getdelim().

PR:		231827
Submitted by:	ak
Reviewed by:	mm
Obtained from:	NetBSD
MFC after:	2 weeks
2021-01-02 10:50:08 +09:00
Xin LI 941791759c Don't explicitly specify c99 or gnu99 as the default is now gnu99.
MFC after:	2 weeks
2020-08-17 05:57:02 +00:00
Pedro F. Giffuni 1de7b4b805 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.
2017-11-27 15:37:16 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Baptiste Daroussin 686e56957e Add missing section after .Xr reference
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:37:48 +00:00
Alex Kozlov b5acc1891f - Match directory extraction message with Infozip [1]
- Add comment explaining masks in check_binary()

Obtained from:	NetBSD [1]
Approved by:	des
2016-01-15 23:04:36 +00:00
Alex Kozlov b2a265d3cd - Extract common code from extract()/extract_stdout() to extract2fd()
- Update information about central directory handling

Obtained from:	NetBSD
Approved by:	des
2016-01-15 22:58:23 +00:00
Alex Kozlov 46021e0128 - Properly set mode and atime/ctime for symlinks
Approved by:	des
2015-12-13 21:31:45 +00:00
Alex Kozlov 04e17b6a6d - Allow to extract symlinks
- Implement 4-digit year format listing (-y option)
- Improve detection of text files
- Use %ju for error_count as it is unsigned

Obtained from:	NetBSD
Approved by:	des
2015-12-11 23:52:08 +00:00
Alex Kozlov 2aa7d573a0 - Remove stray whitespaces
Approved by:	des
2015-12-11 23:46:33 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Jilles Tjoelker 7a970ca937 unzip: Don't subvert vfs.timestamp_precision when setting atime to now.
Also, preserve nanoseconds from libarchive, even though the zip file format
does not currently support nanoseconds in timestamps.
2015-03-15 21:29:20 +00:00
Baptiste Daroussin 3e11bd9e2a Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
Simon J. Gerraty ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Baptiste Daroussin 2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 34b33809b7 Updated dependencies 2013-10-13 00:24:00 +00:00
Simon J. Gerraty 69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Martin Matuska ebb8fc42be Replace deprecated (or remove obsolete) libarchive 2.8 functions
with libarchive 3.0 counterparts
2013-03-22 10:17:42 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty 23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Joel Dahl aee53c332e Remove contractions. 2012-10-07 20:01:41 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Dag-Erling Smørgrav 5fca4d10aa Pass a filename, rather than a file descriptor, to libarchive.
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua>
MFC after:	1 week
2012-05-29 09:11:19 +00:00
Glen Barber 22563741c0 Document the unzip(1) '-Z' option implemented in r234206.
Submitted by:	swills (via hacker lounge)
MFC after:	3 days
2012-05-11 00:19:06 +00:00
Dag-Erling Smørgrav 3664268885 Correct my name in the copyright statement. 2012-04-15 13:39:39 +00:00
Kevin Lo 308633f39e Partially implement zipinfo (-Z) support.
This fixes some test failures seen with perl 5.12 and 5.14.

PR:	bin/166895
Submitted by:	swills
MFC after:	3 days
2012-04-13 06:15:51 +00:00
Joel Dahl 126b754db4 Remove superfluous paragraph macro. 2012-03-25 09:19:25 +00:00
Kevin Lo a3a2bf4b67 fgets(3) returns a pointer, so compare against NULL, not integer 0. 2012-01-13 06:51:15 +00:00
Ulrich Spörlein fb2ad9d3a4 Reencode files from latin1 to UTF-8.
This makes a tiny percentage of entries in calendars ugly for latin1
users, but fixes them for UTF-8 users.

This badly needs a solution involving locale-dependent re-encoding.
2011-12-30 10:59:15 +00:00
Ulrich Spörlein f0720ed5f8 Fix broken mdoc.
Found by:	manlint
Approved by:	re (kib)
2011-08-01 22:21:18 +00:00
Gleb Smirnoff 283e21dd32 Fix typo in last commit.
Submitted by:	bcr
2010-10-21 20:22:00 +00:00
Gleb Smirnoff f3d45e1409 Document possibility to read from stdin. 2010-10-21 17:23:09 +00:00
Gleb Smirnoff 85080d2d68 Make it possible to read input from stdin.
Without this change I don't see a way to
unpack a multivolume archive without wasting
disk space for a temporary file.
2010-10-21 17:05:15 +00:00
Xin LI d994242647 Check return value from archive_read_new().
Found with:	Coverity Prevent(tm)
CID:		8462
Reviewed by:	des
MFC after:	1 week
2010-06-09 18:59:07 +00:00
Ruslan Ermilov c59ee18a21 Fixed static linkage. 2010-02-26 09:41:16 +00:00
Gavin Atkinson 7e66baa20b Bump .Dd for r203977
MFC after:	1 month
2010-02-16 22:55:38 +00:00