Commit Graph

46 Commits

Author SHA1 Message Date
pfg
7551d83c35 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
bdrewery
a598c4b809 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
bapt
145631372b Add missing section after .Xr reference
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:37:48 +00:00
ak
4a483c2c39 - 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
ak
75fde03a59 - 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
ak
c0cb813711 - Properly set mode and atime/ctime for symlinks
Approved by:	des
2015-12-13 21:31:45 +00:00
ak
0833a3345c - 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
ak
9273cedf75 - Remove stray whitespaces
Approved by:	des
2015-12-11 23:46:33 +00:00
sjg
008d7c831f 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
sjg
75a137820d dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
sjg
65145fa4c8 Merge sync of head 2015-05-27 01:19:58 +00:00
jilles
08ae96abfd 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
bapt
8d6c7a49a6 Convert to usr.bin/ to LIBADD
Reduce overlinking
2014-11-25 14:29:10 +00:00
sjg
d7cd1d425c Merge head from 7/28 2014-08-19 06:50:54 +00:00
bapt
1f77f137dc 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
sjg
5860f0d106 Updated dependencies 2014-05-16 14:09:51 +00:00
sjg
292ec5d301 Updated dependencies 2013-10-13 00:24:00 +00:00
sjg
97d8b94956 sync from head 2013-04-12 20:48:55 +00:00
mm
af89cb16bf Replace deprecated (or remove obsolete) libarchive 2.8 functions
with libarchive 3.0 counterparts
2013-03-22 10:17:42 +00:00
sjg
6d37b86f2b Updated dependencies 2013-03-11 17:21:52 +00:00
sjg
0ee5295509 Updated dependencies 2013-02-16 01:23:54 +00:00
sjg
778e93c51a Sync from head 2012-11-04 02:52:03 +00:00
joel
182cb719bb Remove contractions. 2012-10-07 20:01:41 +00:00
marcel
9dd41e3647 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
des
fdd7d585a8 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
gjb
56245e656e 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
des
cdae534284 Correct my name in the copyright statement. 2012-04-15 13:39:39 +00:00
kevlo
f4af41a297 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
1d7fe3f6fd Remove superfluous paragraph macro. 2012-03-25 09:19:25 +00:00
kevlo
96dbfe4e2d fgets(3) returns a pointer, so compare against NULL, not integer 0. 2012-01-13 06:51:15 +00:00
uqs
f4753a04d4 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
uqs
eb3a891009 Fix broken mdoc.
Found by:	manlint
Approved by:	re (kib)
2011-08-01 22:21:18 +00:00
glebius
c8bc24032d Fix typo in last commit.
Submitted by:	bcr
2010-10-21 20:22:00 +00:00
glebius
6c04e2faf4 Document possibility to read from stdin. 2010-10-21 17:23:09 +00:00
glebius
0806ef3ea2 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
delphij
c0c0ff241b 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
ru
7cea019b6c Fixed static linkage. 2010-02-26 09:41:16 +00:00
gavin
c88e244dff Bump .Dd for r203977
MFC after:	1 month
2010-02-16 22:55:38 +00:00
gavin
3191fb252e Implement the rename query, for when a file with the same name as the one
about to be extracted already exists.  The question, and interpretation
of the response is deliberately compatible with Info-Zip.

This change was originally obtained from NetBSD, but has three changes:
 - better compatibility with Info-Zip in the handling of ^D
 - Use getdelim() rather than getline()
 - bug fix: != changed to == in the "file rename" code

I suspect the latter is also a bug in NetBSD, but I can't easily confirm
this.

PR:		bin/143307
Reviewed by:	rdivacky (change to unzip.c only)
Obtained from:	NetBSD src/usr.bin/unzip/unzip.c 1.8
MFC after:	1 month
2010-02-16 22:53:18 +00:00
kientzle
c2cd581d53 When restoring files, use the mode for the mode.
Thanks to: Jun Kuriyama for pointing this out
2010-01-06 06:35:10 +00:00
ed
9b380e30d4 Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
jh
93c61e374a Don't print the archive name with -p and -q options.
PR:		bin/141280
Approved by:	des, trasz (mentor)
2009-12-22 15:13:16 +00:00
rdivacky
c96da7a997 Add C/c/f/p/v switches plus a bunch of minor fixes and cleanups.
Obtained from:	NetBSD
Approved by:	des (maintainer)
Approved by:	ed (mentor, implicit)
2009-09-08 15:55:13 +00:00
des
6b3068d936 Update man page for -t. 2008-06-30 17:16:05 +00:00
des
7b75291050 Quick shot at implementing -t (test).
Requested by:	ache
MFC after:	2 weeks
2008-06-30 17:11:27 +00:00
des
2f455753ea Welcome unzip(1), a pure BSD drop-in replacement for ports/unzip. In its
current state, it can handle all but four of the 991 zip files (including
jar files) I was able to identify in the ports tree.  The remaining four
are two self-extracting archives and two which have garbage preceding the
first local header.  This limitation is a feature of libarchive(3) which
I am currently working to resolve.

The code is unnecessarily large due to the need to emulate the exact
command-line syntax and behaviour of ports/unzip.  My initial incompatible
implementation was one quarter the size of the one I am committing here.
2008-01-08 08:00:06 +00:00