|
Packit Service |
1d0348 |
LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
NAME
|
|
Packit Service |
1d0348 |
libarchive_changes — changes in libarchive interface
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
CHANGES IN LIBARCHIVE 3
|
|
Packit Service |
1d0348 |
This page describes user-visible changes in libarchive3, and lists public
|
|
Packit Service |
1d0348 |
functions and other symbols changed, deprecated or removed in
|
|
Packit Service |
1d0348 |
libarchive3, along with their replacements if any.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Multiple Filters
|
|
Packit Service |
1d0348 |
Libarchive2 permitted a single (input or output) filter active on an ar‐
|
|
Packit Service |
1d0348 |
chive. Libarchive3 extends this into a variable-length stack. Where
|
|
Packit Service |
1d0348 |
archive_write_set_compression_XXX() would replace any existing filter,
|
|
Packit Service |
1d0348 |
archive_write_add_filter_XXX() extends the write pipeline with another
|
|
Packit Service |
1d0348 |
filter.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Character Set Handling
|
|
Packit Service |
1d0348 |
Libarchive2 assumed that the local platform uses Unicode as the native
|
|
Packit Service |
1d0348 |
wchar_t encoding, which is true on Windows, modern Linux, and a few other
|
|
Packit Service |
1d0348 |
systems, but is certainly not universal. As a result, pax format ar‐
|
|
Packit Service |
1d0348 |
chives were written incorrectly on some systems, since pax format
|
|
Packit Service |
1d0348 |
requires UTF-8 and libarchive 2 incorrectly assumed that wchar_t strings
|
|
Packit Service |
1d0348 |
can be easily converted to UTF-8.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Libarchive3 uses the standard iconv library to convert between character
|
|
Packit Service |
1d0348 |
sets and is introducing the notion of a “default character set for the
|
|
Packit Service |
1d0348 |
archive”. To support this, archive_entry objects can now be bound to a
|
|
Packit Service |
1d0348 |
particular archive when they are created. The automatic character set
|
|
Packit Service |
1d0348 |
conversions performed by archive_entry objects when reading and writing
|
|
Packit Service |
1d0348 |
filenames, usernames, and other strings will now use an appropriate
|
|
Packit Service |
1d0348 |
default character set:
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
If the archive_entry object is bound to an archive, it will use the
|
|
Packit Service |
1d0348 |
default character set for that archive.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
The platform default character encoding (as returned by
|
|
Packit Service |
1d0348 |
nl_langinfo(CHARSET)) will be used if nothing else is specified.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Libarchive3 also introduces charset options to many of the archive read‐
|
|
Packit Service |
1d0348 |
ers and writers to control the character set that will be used for file‐
|
|
Packit Service |
1d0348 |
names written in those archives. When possible, this will be set auto‐
|
|
Packit Service |
1d0348 |
matically based on information in the archive itself. Combining this
|
|
Packit Service |
1d0348 |
with the notion of a default character set for the archive should allow
|
|
Packit Service |
1d0348 |
you to configure libarchive to read archives from other platforms and
|
|
Packit Service |
1d0348 |
have the filenames and other information transparently converted to the
|
|
Packit Service |
1d0348 |
character encoding suitable for your application.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Prototype Changes
|
|
Packit Service |
1d0348 |
These changes break binary compatibility; libarchive3 has a new shared
|
|
Packit Service |
1d0348 |
library version to reflect these changes. The library now uses portable
|
|
Packit Service |
1d0348 |
wide types such as int64_t instead of less-portable types such as off_t,
|
|
Packit Service |
1d0348 |
gid_t, uid_t, and ino_t.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
There are a few cases where these changes will affect your source code:
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
· In some cases, libarchive's wider types will introduce the possibil‐
|
|
Packit Service |
1d0348 |
ity of truncation: for example, on a system with a 16-bit uid_t, you
|
|
Packit Service |
1d0348 |
risk having uid 65536 be truncated to uid 0, which can cause serious
|
|
Packit Service |
1d0348 |
security problems.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
· Typedef function pointer types will be incompatible. For example,
|
|
Packit Service |
1d0348 |
if you define custom skip callbacks, you may have to use code simi‐
|
|
Packit Service |
1d0348 |
lar to the following if you want to support building against
|
|
Packit Service |
1d0348 |
libarchive2 and libarchive3:
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
#if ARCHIVE_VERSION_NUMBER < 3000000
|
|
Packit Service |
1d0348 |
typedef off_t myoff_t;
|
|
Packit Service |
1d0348 |
#else
|
|
Packit Service |
1d0348 |
typedef int64_t myoff_t;
|
|
Packit Service |
1d0348 |
#endif
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
myoff_t
|
|
Packit Service |
1d0348 |
my_skip_function(struct archive *a, void *v, myoff_t o)
|
|
Packit Service |
1d0348 |
{
|
|
Packit Service |
1d0348 |
... implementation ...
|
|
Packit Service |
1d0348 |
}
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Affected functions:
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
· archive_entry_gid(), archive_entry_set_gid()
|
|
Packit Service |
1d0348 |
· archive_entry_uid(), archive_entry_set_uid()
|
|
Packit Service |
1d0348 |
· archive_entry_ino(), archive_entry_set_ino()
|
|
Packit Service |
1d0348 |
· archive_read_data_block(), archive_write_data_block()
|
|
Packit Service |
1d0348 |
· archive_read_disk_gname(), archive_read_disk_uname()
|
|
Packit Service |
1d0348 |
· archive_read_disk_set_gname_lookup(),
|
|
Packit Service |
1d0348 |
archive_read_disk_set_group_lookup(),
|
|
Packit Service |
1d0348 |
archive_read_disk_set_uname_lookup(),
|
|
Packit Service |
1d0348 |
archive_read_disk_set_user_lookup()
|
|
Packit Service |
1d0348 |
· archive_skip_callback()
|
|
Packit Service |
1d0348 |
· archive_read_extract_set_skip_file(),
|
|
Packit Service |
1d0348 |
archive_write_disk_set_skip_file(), archive_write_set_skip_file()
|
|
Packit Service |
1d0348 |
· archive_write_disk_set_group_lookup(),
|
|
Packit Service |
1d0348 |
archive_write_disk_set_user_lookup()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Where these functions or their arguments took or returned gid_t, ino_t,
|
|
Packit Service |
1d0348 |
off_t, or uid_t they now take or return int64_t or equivalent.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Deprecated Symbols
|
|
Packit Service |
1d0348 |
Symbols deprecated in libarchive3 will be removed in libarchive4. These
|
|
Packit Service |
1d0348 |
symbols, along with their replacements if any, are listed below:
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_position_compressed(), archive_position_uncompressed()
|
|
Packit Service |
1d0348 |
archive_filter_bytes()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_compression()
|
|
Packit Service |
1d0348 |
archive_filter_code()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_compression_name()
|
|
Packit Service |
1d0348 |
archive_filter_name()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_finish(), archive_write_finish()
|
|
Packit Service |
1d0348 |
archive_read_free(), archive_write_free()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_open_file(), archive_write_open_file()
|
|
Packit Service |
1d0348 |
archive_read_open_filename(), archive_write_open_filename()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_all()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_all()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_bzip2()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_bzip2()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_compress()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_compress()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_gzip()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_gzip()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_lzip()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_lzip()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_lzma()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_lzma()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_none()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_none()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_program()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_program()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_program_signature()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_program_signature()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_rpm()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_rpm()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_uu()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_uu()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_support_compression_xz()
|
|
Packit Service |
1d0348 |
archive_read_support_filter_xz()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_compression_bzip2()
|
|
Packit Service |
1d0348 |
archive_write_add_filter_bzip2()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_compression_compress()
|
|
Packit Service |
1d0348 |
archive_write_add_filter_compress()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_compression_gzip()
|
|
Packit Service |
1d0348 |
archive_write_add_filter_gzip()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_compression_lzip()
|
|
Packit Service |
1d0348 |
archive_write_add_filter_lzip()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_compression_lzma()
|
|
Packit Service |
1d0348 |
archive_write_add_filter_lzma()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_compression_none()
|
|
Packit Service |
1d0348 |
archive_write_add_filter_none()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_compression_program()
|
|
Packit Service |
1d0348 |
archive_write_add_filter_program()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_compression_filter()
|
|
Packit Service |
1d0348 |
archive_write_add_filter_filter()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
Removed Symbols
|
|
Packit Service |
1d0348 |
These symbols, listed below along with their replacements if any, were
|
|
Packit Service |
1d0348 |
deprecated in libarchive2, and are not part of libarchive3.
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_api_feature()
|
|
Packit Service |
1d0348 |
archive_version_number()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_api_version()
|
|
Packit Service |
1d0348 |
archive_version_number()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_version()
|
|
Packit Service |
1d0348 |
archive_version_string()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_version_stamp()
|
|
Packit Service |
1d0348 |
archive_version_number()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_set_filter_options()
|
|
Packit Service |
1d0348 |
archive_read_set_options() or archive_read_set_filter_option()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_read_set_format_options()
|
|
Packit Service |
1d0348 |
archive_read_set_options() or archive_read_set_format_option()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_filter_options()
|
|
Packit Service |
1d0348 |
archive_write_set_options() or archive_write_set_filter_option()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
archive_write_set_format_options()
|
|
Packit Service |
1d0348 |
archive_write_set_options() or archive_write_set_format_option()
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_API_FEATURE
|
|
Packit Service |
1d0348 |
ARCHIVE_VERSION_NUMBER
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_API_VERSION
|
|
Packit Service |
1d0348 |
ARCHIVE_VERSION_NUMBER
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_VERSION_STAMP
|
|
Packit Service |
1d0348 |
ARCHIVE_VERSION_NUMBER
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_LIBRARY_VERSION
|
|
Packit Service |
1d0348 |
ARCHIVE_VERSION_STRING
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_NONE
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_NONE
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_GZIP
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_GZIP
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_BZIP2
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_BZIP2
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_COMPRESS
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_COMPRESS
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_PROGRAM
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_PROGRAM
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_LZMA
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_LZMA
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_XZ
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_XZ
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_UU
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_UU
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_RPM
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_RPM
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_COMPRESSION_LZIP
|
|
Packit Service |
1d0348 |
ARCHIVE_FILTER_LZIP
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_BYTES_PER_RECORD
|
|
Packit Service |
1d0348 |
512
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
ARCHIVE_DEFAULT_BYTES_PER_BLOCK
|
|
Packit Service |
1d0348 |
10240
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
SEE ALSO
|
|
Packit Service |
1d0348 |
libarchive(3), archive_read(3), archive_read_filter(3),
|
|
Packit Service |
1d0348 |
archive_read_format(3), archive_read_set_options(3), archive_write(3),
|
|
Packit Service |
1d0348 |
archive_write_filter(3), archive_write_format(3),
|
|
Packit Service |
1d0348 |
archive_write_set_options(3), archive_util(3)
|
|
Packit Service |
1d0348 |
|
|
Packit Service |
1d0348 |
BSD December 23, 2011 BSD
|