Commit Graph

126 Commits

Author SHA1 Message Date
Justin Hibbits
dc9b124d66 Create a new MACHINE_ARCH for Freescale PowerPC e500v2
Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU.  The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive.  Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement.  setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used.  However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI.  Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By:	bdrewery, imp
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5683
2016-10-22 01:57:15 +00:00
Martin Matuska
cdf63a700c MFV r299425:
Update libarchive to 3.2.0

New features:
- new bsdcat command-line utility
- LZ4 compression (in src only via external utility from ports)
- Warc format support
- 'Raw' format writer
- Zip: Support archives >4GB, entries >4GB
- Zip: Support encrypting and decrypting entries
- Zip: Support experimental streaming extension
- Identify encrypted entries in several formats
- New --clear-nochange-flags option to bsdtar tries to remove noschg and
  similar flags before deleting files
- New --ignore-zeros option to bsdtar to handle concatenated tar archives
- Use multi-threaded LZMA decompression if liblzma supports it
- Expose version info for libraries used by libarchive

Patched files (fixed compiler warnings):

contrib/libarchive/cat/bsdcat.c (vendor PR #702)
contrib/libarchive/cat/bsdcat.h (vendor PR #702)
contrib/libarchive/libarchive/archive_read_support_format_mtree.c (PR #701)
contrib/libarchive/libarchive_fe/err.c (vendor PR #703)

MFC after:	1 month
Relnotes:	yes
2016-05-12 10:16:16 +00:00
Glen Barber
a70cba9582 First pass through library packaging.
Sponsored by:	The FreeBSD Foundation
2016-02-04 21:16:35 +00:00
Bryan Drewery
62f38e94ec Don't override LIB*DIR variables from src.libnames.mk.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-12-01 22:04:59 +00:00
Enji Cooper
59e2ff550c Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite

functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.

A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)

As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-12 18:31:21 +00:00
Baptiste Daroussin
dbfbf7ae92 Drop libarchive.pc
We want to ensure we always use libarchive from ports in the ports tree.
It simplifies ports maintainance and anyway libarchive.pc was not reflecting the
different way libarchive can be built in base
2015-07-19 21:31:52 +00:00
Tijl Coosemans
1243a98e38 Remove the const qualifier from iconv(3) to comply with POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html

Adjust all code that calls iconv.

PR:		199099
Exp-run by:	antoine
MFC after:	2 weeks
2015-04-15 09:09:20 +00:00
Baptiste Daroussin
6b129086dc Convert libraries to use LIBADD
While here reduce a bit overlinking
2014-11-25 11:07:26 +00:00
Martin Matuska
0ac327af11 Add pkg-config file for libarchive
Requested by:	bapt
MFC after:	1 week
2014-11-02 09:37:45 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Xin LI
e4dedeefae Temporarily disable iconv for non-shared library builds. The dynamic
loading of conversation table is not yet compatible with static builds.

Approved by:	re (gjb)
2013-09-26 17:55:36 +00:00
Martin Matuska
acc60b03c1 MFV r248590,248594:
Update libarchive to 3.1.2

Some of new features:
  - support for lrzip and grzip compression
  - support for writing tar v7 format
  - b64encode and uuencode filters
  - support for __MACOSX directory in Zip archives
  - support for lzop compresion (external utility)
2013-03-22 13:36:03 +00:00
Brooks Davis
20ca407e2f Remove several MLINKS that were listed twice. 2013-01-23 23:53:26 +00:00
Martin Matuska
10ed66fdf8 Backport NFSv4 ACL fix from libarchive master branch.
Source:
https://github.com/libarchive/libarchive/commit/f67370d5

Obtained from:	libarchive (master branch)
2012-07-30 14:47:35 +00:00
Martin Matuska
fd082e96c4 Update libarchive to 3.0.4 2012-07-28 06:38:44 +00:00
Dimitry Andric
6c11edf6e8 Silence alignment warnings from clang in libarchive's ppmd code (which
is actually third-party code).  Clang even warns about alignment issues
on x86, and the warnings are not needed there.
2012-03-23 11:18:07 +00:00
Martin Matuska
6c95142e79 Update libarchive to 3.0.3
Some of new features:
  - New readers: RAR, LHA/LZH, CAB reader, 7-Zip
  - New writers: ISO9660, XAR
  - Improvements to many formats, especially including ISO9660 and Zip
  - Stackable write filters to write, e.g., tar.gz.uu in a single pass
  - Exploit seekable input; new "seekable" Zip reader can exploit the Zip
    Central Directory when it's available; the old "streamable" Zip reader
    is still fully supported for cases where seeking is not possible.

Full release notes available at:
	https://github.com/libarchive/libarchive/wiki/ReleaseNotes
2012-02-25 10:58:02 +00:00
Martin Matuska
45d3b226a6 Use contrib sources for building libarchive, tar and cpio.
Make "make test" fully operational.

MFC after:	2 weeks
2011-12-22 08:42:07 +00:00
Martin Matuska
38abb26b5a - Update libarchive to 2.8.4
- Add support for extracting xar and rpm archives
- Add libarchive_fe subdir (common code for tar and cpio)

Approved by:	kientzle
MFC after:	2 weeks
2011-07-17 21:27:38 +00:00
David E. O'Brien
9980697a44 libarchive is mixing libmd and libcrypto -- correct to use one or the other.
[mixing the two can be quite bad -- they define the same context structures,
 but with differing structure members (and sizes)]

Update the hash function support comments, and update config_freebsd.h
to match.

Approved by:	kientzle
2011-05-05 01:16:06 +00:00
Xin LI
c8203b8a17 Fix build. 2010-05-17 07:06:54 +00:00
Tim Kientzle
fd4cf0607f Reorganize slightly in preparation for making lzma and bz2 support conditional. 2010-05-16 20:43:17 +00:00
Martin Matuska
7fbeb03eb7 Enable liblzma support in libarchive
Adjust dependencies for programs using libarchive
Add xz and linkage against liblzma to rescue system

Approved by:	kientzle, delphij (mentor)
MFC after:	2 weeks
2010-05-10 15:28:44 +00:00
Ed Schouten
daaf575910 Build lib/ with WARNS=6 by default.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.
2010-01-02 09:58:07 +00:00
Tim Kientzle
8088bef24c UU decoder. Now that libarchive can recursively taste input streams,
you can do things like this:  tar xvf archive.tar.gz.uu
2009-12-30 06:12:03 +00:00
Tim Kientzle
b1657eb07c Zip write support for libarchive.
The initial implementation was developed by Anselm Strauss as part of
Google Summer of Code 2008, then completed by Joerg Sonnenberger.
2009-12-29 06:15:32 +00:00
Tim Kientzle
9adedf9679 New archive_file_count() utility. 2009-12-28 02:58:14 +00:00
Tim Kientzle
65d5426feb Various portability fixes, plus:
* New "ino64" field.
 * New UTF8 interfaces for hardlink/symlink updates
2009-12-28 02:41:27 +00:00
Ken Smith
3ca3047aee Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
2009-07-19 17:25:24 +00:00
Tim Kientzle
0b3daf486d Include libmd and libcrypto in DPADD 2009-05-30 17:26:55 +00:00
Tim Kientzle
65b45c166f Link libarchive against -lmd and -lcrypto.
Thanks to Ed Schouten for the clue.
2009-05-30 07:08:16 +00:00
Tim Kientzle
04e8ac36ab Document the liblzma support.
Unfortunately, liblzma itself is GPLed, so unlikely to become part of
the FreeBSD base system.
However, the core lzma compression/decompression code is public
domain, so it should be feasible for someone to create a compatible
library without the GPL strings.
2009-04-27 22:39:43 +00:00
Tim Kientzle
59c7a951b5 Symlink some additional man page entries. 2009-04-27 20:23:22 +00:00
Tim Kientzle
690f5ebdc0 Merge r990,r1044 from libarchive.googlecode.com:
read_support_format_raw() allows people to exploit libarchive's
automatic decompression support by simply stubbing out the
archive format handler.
The raw handler is not enabled by support_format_all(), of course.
It bids 1 on any non-empty input and always returns a single
entry named "data" with no properties set.
2009-04-27 20:09:05 +00:00
Tim Kientzle
f4f5e3f5b9 Rely on OpenSSL bits only if we're building a system with OpenSSL.
Also, adjust the MD5 calls to rely on libmd instead of libcrypto,
so we keep MD5 support even in the !OpenSSL case.
2009-04-18 06:06:47 +00:00
Tim Kientzle
c9f05bc8a1 Merge new xz/lzma support from libarchive.googlecode.com.
Since FreeBSD doesn't have liblzma in the base system, the
read side will always fall back to the unxz/unlzma commands for now.
(Which will in turn fail if those commands are not currently
installed.)  The write side does not yet have a fallback, so
that will just fail.
2009-04-17 00:54:35 +00:00
Tim Kientzle
e1089c1e0c Merge from libarchive.googlecode.com r756,r761:
Document the new archive_read_disk API.
2009-04-12 05:04:02 +00:00
Tim Kientzle
43a8e5f098 Merge r399,401,402,405,415,430,440,452,453,458,506,533,536,538,544,590
from libarchive.googlecode.com:  Add a new "archive_read_disk" API
that provides the important service of reading metadata from the
disk.  In particular, this will make it possible to remove all
knowledge of extended attributes, ACLs, etc, from clients such
as bsdtar and bsdcpio.

Closely related, this API also provides pluggable uid->uname
and gid->gname lookup and caching services similar to
the uname->uid and gname->gid services provided by archive_write_disk.
Remember this is also required for correct ACL management.

Documentation is still pending...
2009-03-06 04:35:31 +00:00
Tim Kientzle
9ea6421090 New mtree writer, thanks to Joerg Sonnenberger.
Obtained from:	Joerg Sonnenberger
2008-08-31 07:21:46 +00:00
Tim Kientzle
a705ee2bcd Remove the stillborn attempt to cleanup tests as well as the build dir. 2008-08-24 05:54:28 +00:00
Tim Kientzle
b9364a48e5 Fail copying path/.. only if SECURE_NODOTDOT was specified.
Since we already warn for any '..' elements in that case,
the extra "lastdotdot" tracking turns out to be unnecessary.

PR:		bin/124924
2008-08-24 05:42:22 +00:00
Tim Kientzle
f9fe0a0abb archive.h is no longer constructed from archive.h.in,
so we can rename it and drop some no-longer-necessary
build magic from the Makefile.
2008-06-15 05:05:53 +00:00
Tim Kientzle
fa07de5eeb MFp4: libarchive 2.5.4b. (Still 'b' until I get a bit more
feedback, but the 2.5 branch is shaping up nicely.)

In addition to many small bug fixes and code improvements:
 * Another iteration of versioning; I think I've got it right now.
 * Portability:  A lot of progress on Windows support (though I'm
   not committing all of the Windows support files to FreeBSD CVS)
 * Explicit tracking of MBS, WCS, and UTF-8 versions of strings
   in archive_entry; the archive_entry routines now correctly return
   NULL only when something is unset, setting NULL properly clears
   string values.  Most charset conversions have been pushed down to
   archive_string.
 * Better handling of charset conversion failure when writing or
   reading UTF-8 headers in pax archives
 * archive_entry_linkify() provides multiple strategies for
   hardlink matching to suit different format expectations
 * More accurate bzip2 format detection
 * Joerg Sonnenberger's extensive improvements to mtree support
 * Rough support for self-extracting ZIP archives.  Not an ideal
   approach, but it works for the archives I've tried.
 * New "sparsify" option in archive_write_disk converts blocks of nulls
   into seeks.
 * Better default behavior for the test harness; it now reports
   all failures by default instead of coredumping at the first one.
2008-05-26 17:00:24 +00:00
Kai Wang
7a36fb79f9 Add MLINK for archive_write_close.
Approved by:	jkoshy(mentor), kientzle
2008-03-21 11:10:20 +00:00
Tim Kientzle
8e4bc81237 New public functions archive_entry_copy_link() and archive_entry_copy_link_w()
override the currently set link value, whether that's a hardlink
or a symlink.  Plus documentation update and tests.
2008-03-14 23:00:53 +00:00
Tim Kientzle
7c5b1173a5 Support for writing 'compress' format, thanks to Joerg Sonnenberger. 2008-03-14 20:35:38 +00:00
Tim Kientzle
9695c83ff5 Track version # from the portable release. 2008-01-23 05:48:07 +00:00
Tim Kientzle
db267e0b5d The mtree.5 file has been moved to src/usr.sbin/mtree. 2008-01-01 06:17:05 +00:00
Tim Kientzle
9dd49f960f Update libarchive to 2.4.10. This includes a number of improvements
that I've been working on but put off committing until after the
RELENG_7 branch, including:

* New manpages: cpio.5 mtree.5
* New archive_entry_strmode()
* New archive_entry_link_resolver()
* New read support: mtree format
* Internal API change:  read format auction only runs once
* Running the auction only once allowed simplifying a lot of bid logic.
* Cpio robustness:  search for next header after a sync error
* Support device nodes on ISO9660 images
* Eliminate a lot of unnecessary copies for uncompressed archives
* Corrected handling of new GNU --sparse --posix formats
* Correctly handle a zero-byte write to a compressed archive
* Fixed memory leaks

Many of these improvements were motivated by the upcoming bsdcpio
front-end.

There have also been extensive improvements to the libarchive_test
test harness, which I'll commit separately.
2007-12-30 04:58:22 +00:00