summaryrefslogtreecommitdiffstats
path: root/usr.bin/cpio
Commit message (Collapse)AuthorAgeFilesLines
* Enable liblzma support in libarchivemm2010-05-102-4/+4
| | | | | | | | Adjust dependencies for programs using libarchive Add xz and linkage against liblzma to rescue system Approved by: kientzle, delphij (mentor) MFC after: 2 weeks
* bsdcpio 2.8.3kientzle2010-05-0815-562/+675
|
* Remove GNU cpio after fix of CVE-2010-0624.delphij2010-03-261-2/+0
| | | | | | | | | | | | | Note that this is actually a no-op for most users, as this GNU cpio was broken on -HEAD and 8-STABLE since last March until the recent fix. FreeBSD 8.0+ uses BSD cpio by default and the code is being actively maintained. Blessed by: kientzle With hat: secteam MFC after: 3 days
* Fixed dependencies (make checkdpadd).ru2010-02-251-2/+3
|
* Fix common misspelling of hierarchyuqs2010-02-201-1/+1
| | | | | Pointed out by: bf1783 at gmail Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor)
* Support -V option to print a dot for each file processed.kientzle2010-01-303-3/+21
| | | | | | | | | Also, change the existing -vi behavior to send the filenames to stderr rather than stdout, as GNU cpio does. PR: bin/141175 Submitted by: Philip Kizer MFC after: 14 days
* Build usr.bin/ with WARNS=6 by default.ed2010-01-022-2/+0
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* This addresses some issues with my earlier -R fix thatkientzle2009-07-062-66/+74
| | | | | | | | | | | | | | were pointed out by Brooks Davis and Alexey Dokuchaev: * It now tries to lookup arguments as names first, then tries to parse them as numbers. In particular, this makes the behavior consistent with POSIX conventions when usernames consist entirely of digits. * It now uses strtoul() for the numeric parsing. Finally, I've included an update to the test harness to exercise the new numeric cases for -R. Approved by: re (kib)
* This fixes bsdcpio's -R option to accept numerickientzle2009-07-032-20/+50
| | | | | | | | | | | | | | | user or group Ids as well as user or group names. In particular, this fixes freesbie2, which uses -R 0:0 to copy a bunch of files so that the result will be owned by root. Also fixes a related bug that mixed-up the uid and gid specified by -R when in passthrough mode. Thanks to Dominique Goncalves for reporting this regression. Approved by: re (kib)
* When compiled for the release crunches, be a bitkientzle2009-04-192-9/+37
| | | | | | | | | more selective about what libarchive features we pull in: * No compression support * Only cpio and ustar writing * Only cpio and tar/pax readers This reduces a statically linked, stripped binary from 900k to 680k and completely eliminates the dependency on libcrypto.
* Make -lcrypto usage dependent on whether or not we're building with OpenSSL.kientzle2009-04-181-1/+4
|
* Merge from libarchive.googlecode.com:kientzle2009-04-1728-153/+788
| | | | | | | | * Lots of new tests. * New -n / --numeric-uid-gid option * More sanity-checking of arguments * Various Windows portability improvements * Sync up version number to 2.7.0
* Custom command line parser for cpio; this is a little morekientzle2008-12-065-119/+198
| | | | | code but should be a lot fewer cross-platform compatibility headaches.
* Make the GCC-specific __dead2 markers conditional on whetherkientzle2008-12-062-1/+9
| | | | we're compiling under GCC.
* Format the output of -itv for real. In particular:kientzle2008-11-293-13/+225
| | | | | | | | | | | | | | | * Lookup uname/gname if not provided by the archive (I copied the uname/gname lookup cache from bsdtar) * Format device number instead of size for device nodes * Format date. There's still a few improvements that I could copy from bsdtar, especially the locale-aware safe_fprintf() code and the locale-aware setup for day_first date formatting. (And, of course, I need to think through a clean way to push this stuff down into libarchive.) Thanks to Peter Wemm for reminding me of this overlooked TODO item.
* Don't destroy the archive until after you finish pulling usefulkientzle2008-09-041-1/+1
| | | | information out of it. As reported by Giorgos Keramidas.
* MfP4: Verify correct interaction with umask: Add anotherkientzle2008-08-251-6/+27
| | | | | | | file with different permissions and set a non-zero umask during the actual copy tests. The extra entry increases the size of the test archives of course, so adjust the expected sizes.
* Update the total archive byte counters when writing entries to disk usingkientzle2008-08-247-13/+19
| | | | | | archive_write_disk. Update cpio to use this to emit block counts in -p mode. Update cpio tests to verify these block counts.
* straighten out the "clean" targetkientzle2008-08-241-6/+2
|
* cpio -v emits a line for every item copied.kientzle2008-08-241-1/+1
|
* Update the passthrough_dotdot test to reproduce akientzle2008-08-241-0/+2
| | | | | | problem reported by Kris Kennaway. PR: bin/124924
* Test for proper handling of "cpio -p .."kientzle2008-08-242-0/+88
| | | | PR: bin/124924
* Test for a bug reported by Bernd Walter: In passthrough mode,kientzle2008-08-243-3/+107
| | | | | | | | | | copying "dir/file" and then copying "dir" results in "File on disk is not older; skipping" for the "dir" because it was implicitly created by "dir/file." Among other sins, this means that "dir" ends up with the wrong permissions and ownership. This is actually a libarchive bug; fix is forthcoming.
* Comment a couple of places where bsdcpio and gcpio 2.9 disagree.kientzle2008-08-223-2/+10
| | | | | | The number of blocks read from ustar archives is just an implementation difference. The failure of bsdcpio to emit a block count to stderr in -p mode is a real bug in bsdcpio.
* The newc-format verification is now a little smarter aboutkientzle2008-08-221-9/+24
| | | | | | following the archive structure. In particular, it no longer crashes if you run it against GNU cpio 2.9 (although it does still complain a lot more than it should).
* cpio should restore file flags and ACLs when they're availablekientzle2008-08-201-0/+2
|
* Mark functions as __dead2 in order to help the LLVM static checkercperciva2008-08-041-1/+1
| | | | | | | understand which code paths aren't possible. This commit eliminates 117 false positive bug reports of the form "allocate memory; error out if pointer is NULL; use pointer".
* MfP4: Preserve permissions by default.kientzle2008-07-301-0/+1
| | | | | | | | | | | | | | | | | | In particular, this fixes the oddity that -dumpl would apply umask to copied dirs (which are created in the target tree) but not to "copied" files (which are only linked). After this change: $ ls -ld a a/b a/b/c d--x-w-r-- 3 tim tim 512 Jul 29 20:08 a drwxr----x 3 tim tim 512 Jul 29 20:09 a/b dr----x-w- 2 tim tim 512 Jul 29 20:09 a/b/c $ (echo a; echo a/b; echo a/b/c) | cpio -dumpl o $ cd o $ ls -ld a a/b a/b/c d--x-w-r-- 3 tim tim 512 Jul 29 20:08 a drwxr----x 3 tim tim 512 Jul 29 20:09 a/b dr----x-w- 2 tim tim 512 Jul 29 20:09 a/b/c
* Add --no-preserve-owner, which seems to be required by some ports.kientzle2008-07-293-0/+5
| | | | Thanks to: Erwin Lansing
* Preserve ownership if cpio is run as root.kientzle2008-07-061-1/+2
|
* bsdcpio is now at version 1.0.0.kientzle2008-07-051-1/+1
|
* In -pl mode, only hardlink regular files. I need to testkientzle2008-07-051-6/+8
| | | | | other implementations, but it's clear that dirs and symlinks, at least, shouldn't be hardlinked.
* Remove an unused define.kientzle2008-07-051-1/+0
|
* Don't try to hardlink directories. While I'm here, expand somekientzle2008-07-011-3/+10
| | | | comments to make this section of code a little clearer.
* As reported by Alexey Shuvaev, -dumpl overwrote files afterkientzle2008-06-261-0/+2
| | | | linking them, with predictably bad results.
* In -p mode, don't gaurd against '..' in paths. We continue tokientzle2008-06-241-0/+1
| | | | | | check in -i mode unless --insecure is specified. PR: bin/124924
* If we're using -l and can't hardlink the file because of a cross-devicekientzle2008-06-211-3/+17
| | | | | | | link, just ignore the -l option and copy the file instead. In particular, this should fix the COPYTREE_* macros used in the ports infrastructure which use -l to preserve space but often get used for cross-device copies.
* Rework line-processing framework to add support for --null andkientzle2008-06-214-62/+130
| | | | to eliminate a callback.
* Various long options for GNU cpio compat.kientzle2008-06-211-0/+8
|
* MfP4: test improvements, mostly for portability.kientzle2008-06-212-20/+68
|
* Include bsd.own.mk to pick up the definition of MK_GNU_CPIOdougb2008-06-161-0/+2
|
* 1. Make the BSD version of cpio the default [1]dougb2008-06-161-1/+1
| | | | | | | | | | | | | | | | | a. The BSD version will be built and installed unless WITHOUT_BSD_CPIO is defined. b. The GNU version will not be built or installed unless WITH_GNU_CPIO is defined. If this is defined, the symlink in /usr/bin will be to the GNU version whether the BSD version is present or not. When these changes are MFCed the defaults should be flipped. 2. Add a knob to disable the building of GNU grep. This will make it easier for those that want to test the BSD version in the ports. Approved by: kientzle [1]
* bsdcpio is always installed as 'bsdcpio', symlink it to 'cpio'kientzle2008-05-261-1/+4
| | | | only if WITH_BSDCPIO is defined.
* Initial commit of bsdcpio 0.9.11b.kientzle2008-05-2644-0/+5986
A new implementation of cpio that uses libarchive as it's back-end archiving/dearchiving infrastructure. Includes test harness; "make check" in the bsdcpio directory to build and run the test harness.
OpenPOWER on IntegriCloud