aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/cpio/cpio.c
Commit message (Collapse)AuthorAgeFilesLines
* When compiled for the release crunches, be a bitTim Kientzle2009-04-191-9/+32
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=191262
* Merge from libarchive.googlecode.com:Tim Kientzle2009-04-171-21/+135
| | | | | | | | | | | * 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 Notes: svn path=/head/; revision=191192
* Custom command line parser for cpio; this is a little moreTim Kientzle2008-12-061-16/+9
| | | | | | | | code but should be a lot fewer cross-platform compatibility headaches. Notes: svn path=/head/; revision=185685
* Format the output of -itv for real. In particular:Tim Kientzle2008-11-291-12/+219
| | | | | | | | | | | | | | | | | | * 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. Notes: svn path=/head/; revision=185452
* Don't destroy the archive until after you finish pulling usefulTim Kientzle2008-09-041-1/+1
| | | | | | | information out of it. As reported by Giorgos Keramidas. Notes: svn path=/head/; revision=182746
* Update the total archive byte counters when writing entries to disk usingTim Kientzle2008-08-241-0/+9
| | | | | | | | | archive_write_disk. Update cpio to use this to emit block counts in -p mode. Update cpio tests to verify these block counts. Notes: svn path=/head/; revision=182102
* cpio should restore file flags and ACLs when they're availableTim Kientzle2008-08-201-0/+2
| | | | Notes: svn path=/head/; revision=181929
* MfP4: Preserve permissions by default.Tim 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 Notes: svn path=/head/; revision=180987
* Add --no-preserve-owner, which seems to be required by some ports.Tim Kientzle2008-07-291-0/+3
| | | | | | | Thanks to: Erwin Lansing Notes: svn path=/head/; revision=180962
* Preserve ownership if cpio is run as root.Tim Kientzle2008-07-061-1/+2
| | | | Notes: svn path=/head/; revision=180328
* In -pl mode, only hardlink regular files. I need to testTim Kientzle2008-07-051-6/+8
| | | | | | | | other implementations, but it's clear that dirs and symlinks, at least, shouldn't be hardlinked. Notes: svn path=/head/; revision=180279
* Don't try to hardlink directories. While I'm here, expand someTim Kientzle2008-07-011-3/+10
| | | | | | | comments to make this section of code a little clearer. Notes: svn path=/head/; revision=180138
* As reported by Alexey Shuvaev, -dumpl overwrote files afterTim Kientzle2008-06-261-0/+2
| | | | | | | linking them, with predictably bad results. Notes: svn path=/head/; revision=180033
* In -p mode, don't gaurd against '..' in paths. We continue toTim Kientzle2008-06-241-0/+1
| | | | | | | | | check in -i mode unless --insecure is specified. PR: bin/124924 Notes: svn path=/head/; revision=179972
* If we're using -l and can't hardlink the file because of a cross-deviceTim Kientzle2008-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. Notes: svn path=/head/; revision=179913
* Rework line-processing framework to add support for --null andTim Kientzle2008-06-211-57/+111
| | | | | | | to eliminate a callback. Notes: svn path=/head/; revision=179906
* Initial commit of bsdcpio 0.9.11b.Tim Kientzle2008-05-261-0/+946
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. Notes: svn path=/head/; revision=179323