]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
15 years agoarchive_write_disk uses a series of chdir() operations to shorten path
Tim Kientzle [Thu, 25 Feb 2010 17:03:28 +0000 (12:03 -0500)] 
archive_write_disk uses a series of chdir() operations to shorten path
arguments to PATH_MAX.  If there is no PATH_MAX definition (as on
HURD), just skip this.

POSIX does provide a more complex way to deal with this concern using
fpathconf() to query the maximum relative pathname starting in any particular
directory.  Someday, this code should probably be augmented to use
that mechanism.

SVN-Revision: 1991

15 years agoUse st_size to size the buffer for reading a symbolic link value,
Tim Kientzle [Thu, 25 Feb 2010 17:00:28 +0000 (12:00 -0500)] 
Use st_size to size the buffer for reading a symbolic link value,
instead of using the arbitrary (and sometimes non-existent) PATH_MAX
variable.  This is part of a fix for building on HURD.

SVN-Revision: 1990

15 years agoSet archive_error_number to zero here. I'm a little uneasy about
Tim Kientzle [Thu, 25 Feb 2010 16:58:00 +0000 (11:58 -0500)] 
Set archive_error_number to zero here.  I'm a little uneasy about
this, as there are apparently libarchive uers that abuse archive_errno()
and this change is likely to mask bugs in such software.

SVN-Revision: 1989

15 years agoSort out the remaining format string vs argument types mismatches.
Joerg Sonnenberger [Thu, 25 Feb 2010 16:16:36 +0000 (11:16 -0500)] 
Sort out the remaining format string vs argument types mismatches.

SVN-Revision: 1988

15 years agoAdd __LA_PRINTF to enable format-string checks for GCC.
Joerg Sonnenberger [Thu, 25 Feb 2010 16:13:05 +0000 (11:13 -0500)] 
Add __LA_PRINTF to enable format-string checks for GCC.

SVN-Revision: 1987

15 years agoSupport z for (s)size_t.
Joerg Sonnenberger [Thu, 25 Feb 2010 15:54:03 +0000 (10:54 -0500)] 
Support z for (s)size_t.

SVN-Revision: 1986

15 years agoAdd missing argument for archive_set_error to match format string.
Joerg Sonnenberger [Thu, 25 Feb 2010 15:49:41 +0000 (10:49 -0500)] 
Add missing argument for archive_set_error to match format string.

SVN-Revision: 1985

15 years agoFix some types for printf-like functions.
Joerg Sonnenberger [Thu, 25 Feb 2010 15:48:06 +0000 (10:48 -0500)] 
Fix some types for printf-like functions.

SVN-Revision: 1984

15 years agoExplicit cast to intmax_t for uid and gid in archive_write_disk.c.
Michihiro NAKAJIMA [Thu, 25 Feb 2010 14:05:35 +0000 (09:05 -0500)] 
Explicit cast to intmax_t for uid and gid in archive_write_disk.c.

SVN-Revision: 1983

15 years agoIntroduce ISO writer.
Michihiro NAKAJIMA [Thu, 25 Feb 2010 12:52:17 +0000 (07:52 -0500)] 
Introduce ISO writer.
- Creates Rockridge and Joliet extensions by default.
- Supports creating "El Torito" bootable CD image.
- Supports creating zisofs, RRIP 'ZF' extension.

SVN-Revision: 1982

15 years agoSimplify the handling of the MSDOS style dates, which are out of range.
Michihiro NAKAJIMA [Thu, 25 Feb 2010 10:47:20 +0000 (05:47 -0500)] 
Simplify the handling of the MSDOS style dates, which are out of range.

SVN-Revision: 1981

15 years agoEliminate the cause of segfault at test_write_disk_perms on cygwin.
Michihiro NAKAJIMA [Thu, 25 Feb 2010 10:27:16 +0000 (05:27 -0500)] 
Eliminate the cause of segfault at test_write_disk_perms on cygwin.
uid and gid are int64_t.

SVN-Revision: 1980

15 years agoEliminate warnings, which are singed/unsigned mismatch, on Visual Studio.
Michihiro NAKAJIMA [Thu, 25 Feb 2010 09:47:21 +0000 (04:47 -0500)] 
Eliminate warnings, which are singed/unsigned mismatch, on Visual Studio.

SVN-Revision: 1979

15 years agoUnbreak build on mingw.
Michihiro NAKAJIMA [Wed, 24 Feb 2010 08:22:26 +0000 (03:22 -0500)] 
Unbreak build on mingw.

SVN-Revision: 1971

15 years agoMSDOS-style date/time can handle only dates between 1980-01-10 and 2107-12-31.
Michihiro NAKAJIMA [Wed, 24 Feb 2010 06:26:14 +0000 (01:26 -0500)] 
MSDOS-style date/time can handle only dates between 1980-01-10 and 2107-12-31.

SVN-Revision: 1970

15 years agoClarify that archive_errno() cannot be reliably used to determine when
Tim Kientzle [Wed, 24 Feb 2010 05:27:57 +0000 (00:27 -0500)] 
Clarify that archive_errno() cannot be reliably used to determine when
an error occurs.

SVN-Revision: 1969

15 years agosvn:ignore update
Tim Kientzle [Wed, 24 Feb 2010 05:25:07 +0000 (00:25 -0500)] 
svn:ignore update

SVN-Revision: 1968

15 years agosvn:ignore updates.
Tim Kientzle [Wed, 24 Feb 2010 05:24:00 +0000 (00:24 -0500)] 
svn:ignore updates.

SVN-Revision: 1967

15 years agoAvoid failing some libarchive_test on Windows and some platforms,
Michihiro NAKAJIMA [Tue, 23 Feb 2010 18:10:33 +0000 (13:10 -0500)] 
Avoid failing some libarchive_test on Windows and some platforms,
whose the size of off_t is four bytes.

SVN-Revision: 1966

15 years agoOops. Forgot to initialize the is_disk_like variable. While I'm
Tim Kientzle [Tue, 23 Feb 2010 16:18:00 +0000 (11:18 -0500)] 
Oops.  Forgot to initialize the is_disk_like variable.  While I'm
here, make the block size selection for disks be aware of the users
request.  Users should be able to ask for larger block sizes.

SVN-Revision: 1965

15 years agoBe consistent and complete and document all available options.
Joerg Sonnenberger [Mon, 22 Feb 2010 23:28:06 +0000 (18:28 -0500)] 
Be consistent and complete and document all available options.
Fix markup for long options.

SVN-Revision: 1964

15 years agoDocument the various long options and use consistent markup.
Joerg Sonnenberger [Mon, 22 Feb 2010 20:31:21 +0000 (15:31 -0500)] 
Document the various long options and use consistent markup.

SVN-Revision: 1963

15 years agoFix a typo. Annotate that archive_entry_mode is the equivalent of
Joerg Sonnenberger [Mon, 22 Feb 2010 17:54:43 +0000 (12:54 -0500)] 
Fix a typo. Annotate that archive_entry_mode is the equivalent of
st_mode.

SVN-Revision: 1962

15 years agoarchive_entry_set_XXX is an alias for archive_entry_copy_XXX.
Joerg Sonnenberger [Mon, 22 Feb 2010 14:08:05 +0000 (09:08 -0500)] 
archive_entry_set_XXX is an alias for archive_entry_copy_XXX.

SVN-Revision: 1961

15 years agoReduce to the basic creation/destroy functions and an overview over the
Joerg Sonnenberger [Mon, 22 Feb 2010 04:12:35 +0000 (23:12 -0500)] 
Reduce to the basic creation/destroy functions and an overview over the
accessor functions. Reference the man page groups for the details.

SVN-Revision: 1960

15 years agoAdd description of archive_entry_perm/archive_entry_set_perm and
Joerg Sonnenberger [Mon, 22 Feb 2010 04:11:58 +0000 (23:11 -0500)] 
Add description of archive_entry_perm/archive_entry_set_perm and
the interaction with archive_entry_set_mode. Move the description of
the latter to archive_entry_stat.3, where archive_entry_filetype and co
are.

SVN-Revision: 1959

15 years agoHook up the remaining man pages.
Joerg Sonnenberger [Mon, 22 Feb 2010 04:00:13 +0000 (23:00 -0500)] 
Hook up the remaining man pages.

SVN-Revision: 1958

15 years agoThe majority of the stat(2) like interface.
Joerg Sonnenberger [Mon, 22 Feb 2010 03:58:12 +0000 (22:58 -0500)] 
The majority of the stat(2) like interface.

SVN-Revision: 1957

15 years agoSimplify birthtime handling and ensure that it is unset if the platform
Joerg Sonnenberger [Mon, 22 Feb 2010 03:24:33 +0000 (22:24 -0500)] 
Simplify birthtime handling and ensure that it is unset if the platform
doesn't support it.

SVN-Revision: 1956

15 years agoAdd archive_entry_strmode. Spaces around em-dash.
Joerg Sonnenberger [Mon, 22 Feb 2010 01:55:42 +0000 (20:55 -0500)] 
Add archive_entry_strmode. Spaces around em-dash.

SVN-Revision: 1953

15 years agoSplit functions related to Unix permission model from archive_entry(3).
Joerg Sonnenberger [Mon, 22 Feb 2010 01:21:53 +0000 (20:21 -0500)] 
Split functions related to Unix permission model from archive_entry(3).

SVN-Revision: 1952

15 years agoRemove a stray comment.
Tim Kientzle [Mon, 22 Feb 2010 01:19:14 +0000 (20:19 -0500)] 
Remove a stray comment.

SVN-Revision: 1951

15 years agoMention difference between _set and _copy.
Joerg Sonnenberger [Mon, 22 Feb 2010 01:14:20 +0000 (20:14 -0500)] 
Mention difference between _set and _copy.

SVN-Revision: 1950

15 years agoFix libarchive tests to work correctly with the candidate 3.0 API.
Tim Kientzle [Mon, 22 Feb 2010 01:08:23 +0000 (20:08 -0500)] 
Fix libarchive tests to work correctly with the candidate 3.0 API.

SVN-Revision: 1949

15 years agoRework the file handling here to explicitly probe the type of input
Tim Kientzle [Mon, 22 Feb 2010 00:10:53 +0000 (19:10 -0500)] 
Rework the file handling here to explicitly probe the type of input
we're using and use that to determine an explicit I/O strategy.  This
was largely inspired by an email exchange with Duane Hesser, who
clarified some of the issues involved in doing high-quality tape
handling.  I think the approach here will make it much easier to
provide optimized I/O strategies for tape and sockets.

Because of these changes, reading the directory of an ISO image stored
on a raw device (via "tar tvf /dev/cd0", for example) is about 100x
faster due to a combination of better detection of "disk-like" devices
and a more suitable strategy for handling forward skip requests.
Extracting tar devices stored on one disk drive onto a physically
separate drive should also be significantly faster because we
now do block-size cheating on disk-like devices.

SVN-Revision: 1948

15 years agoFill in archive_entry_perm() as the read counterpart to
Tim Kientzle [Sun, 21 Feb 2010 23:52:52 +0000 (18:52 -0500)] 
Fill in archive_entry_perm() as the read counterpart to
archive_entry_set_perm().  In inadvertently used this
in the Mac copyfile() support without realizing that it
hadn't actually been implemented.

SVN-Revision: 1947

15 years agoMan page for the path name related functions.
Joerg Sonnenberger [Sun, 21 Feb 2010 23:21:12 +0000 (18:21 -0500)] 
Man page for the path name related functions.

SVN-Revision: 1946

15 years agoPrepare for the 3.0 ABI by switching a bunch of uses of off_t, dev_t,
Tim Kientzle [Sun, 21 Feb 2010 20:33:51 +0000 (15:33 -0500)] 
Prepare for the 3.0 ABI by switching a bunch of uses of off_t, dev_t,
ino_t, uid_t, and gid_t to use int64_t instead.  These are all
conditional on ARCHIVE_VERSION_NUMBER >= 3000000 so we still have the
option of cutting a 2.9 release with the old ABI.

SVN-Revision: 1945

15 years agoGCC on Mac OS is picky about pointer arithmetic.
Tim Kientzle [Sun, 21 Feb 2010 19:30:49 +0000 (14:30 -0500)] 
GCC on Mac OS is picky about pointer arithmetic.

SVN-Revision: 1944

15 years agoMacs don't have tape drives, but they do define _PATH_DEFTAPE?
Tim Kientzle [Sun, 21 Feb 2010 19:23:22 +0000 (14:23 -0500)] 
Macs don't have tape drives, but they do define _PATH_DEFTAPE?
I wonder if I should reconsider defaulting the tape drive to "-" on Mac OS.

SVN-Revision: 1943

15 years agoRemove an old debugging printf.
Tim Kientzle [Sun, 21 Feb 2010 19:22:06 +0000 (14:22 -0500)] 
Remove an old debugging printf.

SVN-Revision: 1942

15 years agoKill a trailing comma at the end of the .Nm list.
Joerg Sonnenberger [Sun, 21 Feb 2010 17:46:41 +0000 (12:46 -0500)] 
Kill a trailing comma at the end of the .Nm list.

SVN-Revision: 1941

15 years agoImprove detection of SHA2 functions in OpenSSL to deal with ancient
Joerg Sonnenberger [Sun, 21 Feb 2010 14:23:09 +0000 (09:23 -0500)] 
Improve detection of SHA2 functions in OpenSSL to deal with ancient
versions like in Mac OS X and FreeBSD 6.x. Fixes #65 and should fix #55.

SVN-Revision: 1940

15 years agoInstall archive_entry_acl.3 and archive_entry_time.3.
Joerg Sonnenberger [Sun, 21 Feb 2010 14:14:04 +0000 (09:14 -0500)] 
Install archive_entry_acl.3 and archive_entry_time.3.

SVN-Revision: 1939

15 years agoFix the description of ctime as noticed by Tim.
Joerg Sonnenberger [Sun, 21 Feb 2010 14:04:51 +0000 (09:04 -0500)] 
Fix the description of ctime as noticed by Tim.

SVN-Revision: 1938

15 years agoRemove calls to set_compression_none(), since it does nothing.
Tim Kientzle [Sun, 21 Feb 2010 08:27:43 +0000 (03:27 -0500)] 
Remove calls to set_compression_none(), since it does nothing.
(These weren't actually needed before.)

SVN-Revision: 1937

15 years agoThe only place blocking is really needed is just before calling
Tim Kientzle [Sun, 21 Feb 2010 08:25:42 +0000 (03:25 -0500)] 
The only place blocking is really needed is just before calling
the client write functions.  So I've moved all of the blocking
code (that used to be duplicated in every compression filter)
into archive_write.c in the code that wraps the client callbacks.
As a result, add_filter_none is a true no-op.

SVN-Revision: 1936

15 years agoUnbreak build on Visual Studio.
Michihiro NAKAJIMA [Sun, 21 Feb 2010 07:23:04 +0000 (02:23 -0500)] 
Unbreak build on Visual Studio.

SVN-Revision: 1935

15 years agomdoclint.
Joerg Sonnenberger [Sun, 21 Feb 2010 02:33:20 +0000 (21:33 -0500)] 
mdoclint.

SVN-Revision: 1934

15 years agoFirst draft of a man page for the ACL functions.
Joerg Sonnenberger [Sun, 21 Feb 2010 02:27:38 +0000 (21:27 -0500)] 
First draft of a man page for the ACL functions.

SVN-Revision: 1933

15 years agoKill some trailing whitespace.
Joerg Sonnenberger [Sat, 20 Feb 2010 23:34:54 +0000 (18:34 -0500)] 
Kill some trailing whitespace.

SVN-Revision: 1932

15 years agoSplit time field documentation into a separate man page.
Joerg Sonnenberger [Sat, 20 Feb 2010 23:32:40 +0000 (18:32 -0500)] 
Split time field documentation into a separate man page.

SVN-Revision: 1931

15 years agoSpell my own name :)
Joerg Sonnenberger [Sat, 20 Feb 2010 23:02:28 +0000 (18:02 -0500)] 
Spell my own name :)

SVN-Revision: 1930

15 years agoSimplify the line reader:
Joerg Sonnenberger [Sat, 20 Feb 2010 22:59:56 +0000 (17:59 -0500)] 
Simplify the line reader:
- Do not allocate a buffer in advance, it will be reallocated on the
first round anyway.
- Allocate one more byte to allow always terminating the buffer.
- Use strcpsn to compute the end of line. This slightly changes the
behavior for NUL in text lines as they are no longer truncated.

SVN-Revision: 1929

15 years agoAdd a basic man page for the linkresolver code.
Joerg Sonnenberger [Sat, 20 Feb 2010 22:53:26 +0000 (17:53 -0500)] 
Add a basic man page for the linkresolver code.

SVN-Revision: 1928

15 years agoRemove some debugging printfs
Tim Kientzle [Sat, 20 Feb 2010 21:47:11 +0000 (16:47 -0500)] 
Remove some debugging printfs

SVN-Revision: 1927

15 years agoProvide a sane default strategy for the various formats.
Joerg Sonnenberger [Sat, 20 Feb 2010 21:23:11 +0000 (16:23 -0500)] 
Provide a sane default strategy for the various formats.
zip and ar don't do hardlinks, so work like old-cpio.
shar is like tar.
Default to old-cpio as fallback as it is the least problematic of the
three options.

SVN-Revision: 1926

15 years agoMake sure that len is initialised even if no filters are present.
Joerg Sonnenberger [Sat, 20 Feb 2010 21:21:21 +0000 (16:21 -0500)] 
Make sure that len is initialised even if no filters are present.

SVN-Revision: 1925

15 years agoFix spacing
Joerg Sonnenberger [Sat, 20 Feb 2010 19:51:15 +0000 (14:51 -0500)] 
Fix spacing

SVN-Revision: 1924

15 years agoCorrect the spelling of 'hierarchy'
Tim Kientzle [Sat, 20 Feb 2010 18:25:58 +0000 (13:25 -0500)] 
Correct the spelling of 'hierarchy'

SVN-Revision: 1923

15 years agoThe second argument for lafe_line_reader has been changed to a boolean
Joerg Sonnenberger [Sat, 20 Feb 2010 17:06:36 +0000 (12:06 -0500)] 
The second argument for lafe_line_reader has been changed to a boolean
in revision 1385, catch up.

SVN-Revision: 1922

15 years agoImprove the detection of seekable devices so we can enable skip support
Tim Kientzle [Sat, 20 Feb 2010 06:45:01 +0000 (01:45 -0500)] 
Improve the detection of seekable devices so we can enable skip support
on many disk-like devices (such as ISO images burned onto CDs).

SVN-Revision: 1921

15 years agoStackable write filter support. This ended up touching an awful lot
Tim Kientzle [Sat, 20 Feb 2010 05:53:11 +0000 (00:53 -0500)] 
Stackable write filter support.  This ended up touching an awful lot
of files.  But, the old API is supported almost entirely unchanged, which
I wasn't certain would be possible.

Big changes:
  * You can add more than one write filter by using
    archive_write_add_filter_{bzip2,compress,gzip,lzma,xz}.
    This will be more interesting when we have uuencode, RPM, encryption.
  * The old archive_write_set_compression_XXXX are shorthands for
    "remove all the current filters and add this one."  They're
    deprecated and scheduled to be removed in libarchive 4.0.
  * The internal API and life cycle for write filters has been
    rationalized: create, set options, open, write, close, free.
  * New utility functions provide information about each filter
    when there's more than one:  code, name, and number of bytes processed
  * Old archive_bytes_compressed(), etc, are implemented in terms of
    the more generic new functions.
  * The read side was generalized to also support the new utility
    functions.

In particular, the write filters are much simpler since each
one doesn't have to deal with blocking.  In this version, there's
still a "write_add_filter_none" that handles blocking, but I
think I'll soon fold that down into the client wrapper and
add_filter_none will become a no-op.  I think this also gets
us a big step closer to multi-volume support on the write side.

SVN-Revision: 1920

15 years agoReturning ARCHIVE_WARN when someone tries to write past the declared
Tim Kientzle [Sat, 20 Feb 2010 05:32:24 +0000 (00:32 -0500)] 
Returning ARCHIVE_WARN when someone tries to write past the declared
file size seems entirely reasonable.  I had thought about changing
this in 3.0 but have decided against it.

SVN-Revision: 1919

15 years agoUse the non-deprecated archive_version_string()
Tim Kientzle [Sat, 20 Feb 2010 05:31:18 +0000 (00:31 -0500)] 
Use the non-deprecated archive_version_string()

SVN-Revision: 1918

15 years agoDo not leak setup_xattr into the global name space.
Joerg Sonnenberger [Sat, 20 Feb 2010 00:20:25 +0000 (19:20 -0500)] 
Do not leak setup_xattr into the global name space.

SVN-Revision: 1917

15 years agoRemove unused macros in archive_windows.h.
Michihiro NAKAJIMA [Wed, 17 Feb 2010 07:38:01 +0000 (02:38 -0500)] 
Remove unused macros in archive_windows.h.

SVN-Revision: 1913

15 years agoIn libarchive 3.0, archive_entry_ino() returns int64_t instead of ino_t.
Tim Kientzle [Wed, 17 Feb 2010 07:07:37 +0000 (02:07 -0500)] 
In libarchive 3.0, archive_entry_ino() returns int64_t instead of ino_t.

SVN-Revision: 1912

15 years agoStarting with libarchive 3.0, archive_entry_set_ino() takes an int64_t
Tim Kientzle [Wed, 17 Feb 2010 07:04:17 +0000 (02:04 -0500)] 
Starting with libarchive 3.0, archive_entry_set_ino() takes an int64_t
instead of ino_t.

SVN-Revision: 1911

15 years agoUse archive_version_string() instead of archive_version().
Tim Kientzle [Wed, 17 Feb 2010 07:03:24 +0000 (02:03 -0500)] 
Use archive_version_string() instead of archive_version().

SVN-Revision: 1910

15 years agoDon't use archive_version(), which is going away in libarchive 3.0.
Tim Kientzle [Wed, 17 Feb 2010 07:03:06 +0000 (02:03 -0500)] 
Don't use archive_version(), which is going away in libarchive 3.0.
Use archive_version_string() instead.

SVN-Revision: 1909

15 years agoModernize this test. Add additional assertions to verify that
Tim Kientzle [Wed, 17 Feb 2010 05:54:50 +0000 (00:54 -0500)] 
Modernize this test.  Add additional assertions to verify that
     archive_position_compressed()
     == archive_position_uncompressed()
     == number of bytes actually written
when we didn't overflow the buffer.  These may not match when
the buffer does overflow because some writes down the pipeline
will fail.

SVN-Revision: 1908

15 years agoVerify the correct formats are being reported when reading
Tim Kientzle [Wed, 17 Feb 2010 05:52:22 +0000 (00:52 -0500)] 
Verify the correct formats are being reported when reading
a tar.bzip2 file.

SVN-Revision: 1907

15 years agoBreak a long line.
Tim Kientzle [Wed, 17 Feb 2010 05:51:20 +0000 (00:51 -0500)] 
Break a long line.

SVN-Revision: 1906

15 years agoModernize this test a bit.
Tim Kientzle [Wed, 17 Feb 2010 05:50:43 +0000 (00:50 -0500)] 
Modernize this test a bit.

SVN-Revision: 1905

15 years agoIf file contents don't match, dump the expected value as well.
Tim Kientzle [Wed, 17 Feb 2010 05:50:02 +0000 (00:50 -0500)] 
If file contents don't match, dump the expected value as well.

SVN-Revision: 1904

15 years agoAdd a couple of assertions to verify archive_position_compressed()
Tim Kientzle [Wed, 17 Feb 2010 05:49:30 +0000 (00:49 -0500)] 
Add a couple of assertions to verify archive_position_compressed()
and archive_position_uncompressed().

SVN-Revision: 1903

15 years agoIf the returned blocksize is wrong, you won't get anything useful out
Tim Kientzle [Mon, 15 Feb 2010 04:51:41 +0000 (23:51 -0500)] 
If the returned blocksize is wrong, you won't get anything useful out
of the archive's error info.

SVN-Revision: 1902

15 years ago"none" is the default compression; there's no need to set it explicitly.
Tim Kientzle [Mon, 15 Feb 2010 03:35:17 +0000 (22:35 -0500)] 
"none" is the default compression; there's no need to set it explicitly.

SVN-Revision: 1901

15 years agoModernize this test.
Tim Kientzle [Mon, 15 Feb 2010 03:33:53 +0000 (22:33 -0500)] 
Modernize this test.

SVN-Revision: 1900

15 years agoModernize this test.
Tim Kientzle [Mon, 15 Feb 2010 03:31:39 +0000 (22:31 -0500)] 
Modernize this test.

SVN-Revision: 1899

15 years agoAdd a missing newline.
Tim Kientzle [Mon, 15 Feb 2010 03:28:19 +0000 (22:28 -0500)] 
Add a missing newline.

SVN-Revision: 1898

15 years agoEliminate build failure on msys. Do not use _wsopen_s().
Michihiro NAKAJIMA [Sat, 13 Feb 2010 06:05:32 +0000 (01:05 -0500)] 
Eliminate build failure on msys. Do not use _wsopen_s().

SVN-Revision: 1897

15 years agoMake a Windows version of __archive_mktemp() in archive_windows.c
Michihiro NAKAJIMA [Fri, 12 Feb 2010 08:33:08 +0000 (03:33 -0500)] 
Make a Windows version of __archive_mktemp() in archive_windows.c
and merge __la_mkstemp() and __archive_mktemp() because
__la_mkstemp() was only used by __archive_mktemp().

SVN-Revision: 1896

15 years agoIntroduce a function __archive_mktemp() to create a temporary file,
Michihiro NAKAJIMA [Thu, 11 Feb 2010 08:28:04 +0000 (03:28 -0500)] 
Introduce a function __archive_mktemp() to create a temporary file,
which will be used by ISO writer and xar writer.

SVN-Revision: 1895

15 years agoThe last sparse block info must reach the end of file.
Michihiro NAKAJIMA [Thu, 11 Feb 2010 05:50:35 +0000 (00:50 -0500)] 
The last sparse block info must reach the end of file.

SVN-Revision: 1894

15 years agoSanity check of adding sparse info.
Michihiro NAKAJIMA [Thu, 11 Feb 2010 04:52:45 +0000 (23:52 -0500)] 
Sanity check of adding sparse info.

SVN-Revision: 1893

15 years agoRename archive_read_finish to archive_read_free and
Tim Kientzle [Mon, 8 Feb 2010 07:18:22 +0000 (02:18 -0500)] 
Rename archive_read_finish to archive_read_free and
archive_write_finish to archive_write_free.  Update all clients,
tests, and documentation to use the new names exclusively.  (Though
I've not yet run a global search-and-replace against the Wiki.  I'll
do that shortly.)

I've preserved the old names as aliases, scheduled to be removed with
libarchive 4.x, so there is no immediate impact to existing code from
this change.

SVN-Revision: 1891

15 years agoRip out the rest of the legacy 1.x API.
Tim Kientzle [Mon, 8 Feb 2010 02:45:06 +0000 (21:45 -0500)] 
Rip out the rest of the legacy 1.x API.

SVN-Revision: 1890

15 years agosvn:ignore a bunch of constructed CMake files, to ease in-tree development.
Tim Kientzle [Mon, 8 Feb 2010 02:31:17 +0000 (21:31 -0500)] 
svn:ignore a bunch of constructed CMake files, to ease in-tree development.

SVN-Revision: 1889

15 years agoMore broad style cleanups of libarchive_test.
Tim Kientzle [Mon, 8 Feb 2010 02:20:50 +0000 (21:20 -0500)] 
More broad style cleanups of libarchive_test.

SVN-Revision: 1888

15 years agoStyle: Update a bunch of old assert() and assertA() calls.
Tim Kientzle [Sun, 7 Feb 2010 22:49:11 +0000 (17:49 -0500)] 
Style:  Update a bunch of old assert() and assertA() calls.

SVN-Revision: 1887

15 years agoRip out the remaining support for old libarchive 1.x APIs.
Tim Kientzle [Sun, 7 Feb 2010 22:25:59 +0000 (17:25 -0500)] 
Rip out the remaining support for old libarchive 1.x APIs.

SVN-Revision: 1886

15 years agoWhen trying to set LZMA compression, pay attention to the return value
Tim Kientzle [Sat, 6 Feb 2010 20:30:53 +0000 (15:30 -0500)] 
When trying to set LZMA compression, pay attention to the return value
from libarchive.

SVN-Revision: 1884

15 years agoWhen a sparse file is stored, use a special name in ustar header
Michihiro NAKAJIMA [Sat, 6 Feb 2010 05:32:55 +0000 (00:32 -0500)] 
When a sparse file is stored, use a special name in ustar header
according to GNU PAX Format 1.0.

SVN-Revision: 1883

15 years agoGuard against out-of-range nanosecond time values and make it easy for
Tim Kientzle [Sat, 6 Feb 2010 05:10:13 +0000 (00:10 -0500)] 
Guard against out-of-range nanosecond time values and make it easy for
people to make small time adjustments using code such as:
   archive_entry_set_ctime(entry,
      archive_entry_ctime(entry),
      archive_entry_ctime_nsec(entry) + 123456);

SVN-Revision: 1882

15 years agoUse ENOTTY instead of EINVAL to decide if linux kernel
Michihiro NAKAJIMA [Sat, 6 Feb 2010 03:58:47 +0000 (22:58 -0500)] 
Use ENOTTY instead of EINVAL to decide if linux kernel
supports FS_IOC_FIEMAP or not.

SVN-Revision: 1881

15 years agoAdd a test for writing sparse info to PAX header.
Michihiro NAKAJIMA [Sat, 6 Feb 2010 02:24:04 +0000 (21:24 -0500)] 
Add a test for writing sparse info to PAX header.

SVN-Revision: 1880

15 years agoDo not report a sparse block if its offset is zero and its length is
Michihiro NAKAJIMA [Sat, 6 Feb 2010 01:41:47 +0000 (20:41 -0500)] 
Do not report a sparse block if its offset is zero and its length is
the same as its file size. In this case, the file is not sparse.

SVN-Revision: 1879

15 years agoWrite a sparse info to PAX header, which respects GNU PAX Format 1.0
Michihiro NAKAJIMA [Sat, 6 Feb 2010 00:51:44 +0000 (19:51 -0500)] 
Write a sparse info to PAX header, which respects GNU PAX Format 1.0
for portability.

This remains some work:
- Rename a filename to <dir>/GNUSparseFile.<pid>/<filename>.
- Handle the non-ascii filename.

SVN-Revision: 1878