1 .TH LIBARCHIVE_CHANGES 3 "December 23, 2011" ""
4 \- changes in libarchive interface
5 .SH CHANGES IN LIBARCHIVE 3
7 This page describes user-visible changes in libarchive3, and lists
8 public functions and other symbols changed, deprecated or removed
9 in libarchive3, along with their replacements if any.
12 Libarchive2 permitted a single (input or output) filter active
14 Libarchive3 extends this into a variable-length stack.
16 \fB\%archive_write_set_compression_XXX\fP()
17 would replace any existing filter,
18 \fB\%archive_write_add_filter_XXX\fP()
19 extends the write pipeline with another filter.
20 .SS Character Set Handling
21 Libarchive2 assumed that the local platform uses
25 encoding, which is true on
29 and a few other systems, but is certainly not universal.
30 As a result, pax format archives were written incorrectly on some
31 systems, since pax format requires
33 and libarchive 2 incorrectly
36 strings can be easily converted to
39 Libarchive3 uses the standard iconv library to convert between character
40 sets and is introducing the notion of a
41 ``default character set for the archive''.
44 objects can now be bound to a particular archive when they are created.
45 The automatic character set conversions performed by
47 objects when reading and writing filenames, usernames, and other strings
48 will now use an appropriate default character set:
52 object is bound to an archive, it will use the
53 default character set for that archive.
55 The platform default character encoding (as returned by
56 \fB\%nl_langinfo\fP(\fI\%CHARSET\fP, \fI\%)\fP)
57 will be used if nothing else is specified.
59 Libarchive3 also introduces charset options to many of the archive
60 readers and writers to control the character set that will be used for
61 filenames written in those archives.
62 When possible, this will be set automatically based on information in
64 Combining this with the notion of a default character set for the
65 archive should allow you to configure libarchive to read archives from
66 other platforms and have the filenames and other information
67 transparently converted to the character encoding suitable for your
70 These changes break binary compatibility; libarchive3 has a new shared
71 library version to reflect these changes.
72 The library now uses portable wide types such as
74 instead of less-portable types such as
81 There are a few cases where these changes will affect your source code:
84 In some cases, libarchive's wider types will introduce the possibility
85 of truncation: for example, on a system with a 16-bit
86 Tn uid_t, you risk having uid
94 which can cause serious security problems.
96 Typedef function pointer types will be incompatible.
97 For example, if you define custom skip callbacks, you may have to use
98 code similar to the following if you want to support building against
99 libarchive2 and libarchive3:
102 #if ARCHIVE_VERSION_NUMBER < 3000000
103 typedef off_t myoff_t;
105 typedef int64_t myoff_t;
108 my_skip_function(struct archive *a, void *v, myoff_t o)
110 ... implementation ...
119 \fB\%archive_entry_gid\fP(),
120 \fB\%archive_entry_set_gid\fP()
122 \fB\%archive_entry_uid\fP(),
123 \fB\%archive_entry_set_uid\fP()
125 \fB\%archive_entry_ino\fP(),
126 \fB\%archive_entry_set_ino\fP()
128 \fB\%archive_read_data_block\fP(),
129 \fB\%archive_write_data_block\fP()
131 \fB\%archive_read_disk_gname\fP(),
132 \fB\%archive_read_disk_uname\fP()
134 \fB\%archive_read_disk_set_gname_lookup\fP(),
135 \fB\%archive_read_disk_set_group_lookup\fP(),
136 \fB\%archive_read_disk_set_uname_lookup\fP(),
137 \fB\%archive_read_disk_set_user_lookup\fP()
139 \fB\%archive_skip_callback\fP()
141 \fB\%archive_read_extract_set_skip_file\fP(),
142 \fB\%archive_write_disk_set_skip_file\fP(),
143 \fB\%archive_write_set_skip_file\fP()
145 \fB\%archive_write_disk_set_group_lookup\fP(),
146 \fB\%archive_write_disk_set_user_lookup\fP()
149 Where these functions or their arguments took or returned
155 they now take or return
158 .SS Deprecated Symbols
159 Symbols deprecated in libarchive3 will be removed in libarchive4.
160 These symbols, along with their replacements if any, are listed below:
163 \fB\%archive_position_compressed\fP(), \fB\%archive_position_uncompressed\fP()
164 \fB\%archive_filter_bytes\fP()
166 \fB\%archive_compression\fP()
167 \fB\%archive_filter_code\fP()
169 \fB\%archive_compression_name\fP()
170 \fB\%archive_filter_name\fP()
172 \fB\%archive_read_finish\fP(), \fB\%archive_write_finish\fP()
173 \fB\%archive_read_free\fP(),
174 \fB\%archive_write_free\fP()
176 \fB\%archive_read_open_file\fP(), \fB\%archive_write_open_file\fP()
177 \fB\%archive_read_open_filename\fP(),
178 \fB\%archive_write_open_filename\fP()
180 \fB\%archive_read_support_compression_all\fP()
181 \fB\%archive_read_support_filter_all\fP()
183 \fB\%archive_read_support_compression_bzip2\fP()
184 \fB\%archive_read_support_filter_bzip2\fP()
186 \fB\%archive_read_support_compression_compress\fP()
187 \fB\%archive_read_support_filter_compress\fP()
189 \fB\%archive_read_support_compression_gzip\fP()
190 \fB\%archive_read_support_filter_gzip\fP()
192 \fB\%archive_read_support_compression_lzip\fP()
193 \fB\%archive_read_support_filter_lzip\fP()
195 \fB\%archive_read_support_compression_lzma\fP()
196 \fB\%archive_read_support_filter_lzma\fP()
198 \fB\%archive_read_support_compression_none\fP()
199 \fB\%archive_read_support_filter_none\fP()
201 \fB\%archive_read_support_compression_program\fP()
202 \fB\%archive_read_support_filter_program\fP()
204 \fB\%archive_read_support_compression_program_signature\fP()
205 \fB\%archive_read_support_filter_program_signature\fP()
207 \fB\%archive_read_support_compression_rpm\fP()
208 \fB\%archive_read_support_filter_rpm\fP()
210 \fB\%archive_read_support_compression_uu\fP()
211 \fB\%archive_read_support_filter_uu\fP()
213 \fB\%archive_read_support_compression_xz\fP()
214 \fB\%archive_read_support_filter_xz\fP()
216 \fB\%archive_write_set_compression_bzip2\fP()
217 \fB\%archive_write_add_filter_bzip2\fP()
219 \fB\%archive_write_set_compression_compress\fP()
220 \fB\%archive_write_add_filter_compress\fP()
222 \fB\%archive_write_set_compression_gzip\fP()
223 \fB\%archive_write_add_filter_gzip\fP()
225 \fB\%archive_write_set_compression_lzip\fP()
226 \fB\%archive_write_add_filter_lzip\fP()
228 \fB\%archive_write_set_compression_lzma\fP()
229 \fB\%archive_write_add_filter_lzma\fP()
231 \fB\%archive_write_set_compression_none\fP()
232 \fB\%archive_write_add_filter_none\fP()
234 \fB\%archive_write_set_compression_program\fP()
235 \fB\%archive_write_add_filter_program\fP()
237 \fB\%archive_write_set_compression_filter\fP()
238 \fB\%archive_write_add_filter_filter\fP()
241 These symbols, listed below along with their replacements if any,
242 were deprecated in libarchive2, and are not part of libarchive3.
245 \fB\%archive_api_feature\fP()
246 \fB\%archive_version_number\fP()
248 \fB\%archive_api_version\fP()
249 \fB\%archive_version_number\fP()
251 \fB\%archive_version\fP()
252 \fB\%archive_version_string\fP()
254 \fB\%archive_version_stamp\fP()
255 \fB\%archive_version_number\fP()
257 \fB\%archive_read_set_filter_options\fP()
258 \fB\%archive_read_set_options\fP()
260 \fB\%archive_read_set_filter_option\fP()
262 \fB\%archive_read_set_format_options\fP()
263 \fB\%archive_read_set_options\fP()
265 \fB\%archive_read_set_format_option\fP()
267 \fB\%archive_write_set_filter_options\fP()
268 \fB\%archive_write_set_options\fP()
270 \fB\%archive_write_set_filter_option\fP()
272 \fB\%archive_write_set_format_options\fP()
273 \fB\%archive_write_set_options\fP()
275 \fB\%archive_write_set_format_option\fP()
277 .BR ARCHIVE_API_FEATURE
278 .BR ARCHIVE_VERSION_NUMBER
280 .BR ARCHIVE_API_VERSION
281 .BR ARCHIVE_VERSION_NUMBER
283 .BR ARCHIVE_VERSION_STAMP
284 .BR ARCHIVE_VERSION_NUMBER
286 .BR ARCHIVE_LIBRARY_VERSION
287 .BR ARCHIVE_VERSION_STRING
289 .BR ARCHIVE_COMPRESSION_NONE
290 .BR ARCHIVE_FILTER_NONE
292 .BR ARCHIVE_COMPRESSION_GZIP
293 .BR ARCHIVE_FILTER_GZIP
295 .BR ARCHIVE_COMPRESSION_BZIP2
296 .BR ARCHIVE_FILTER_BZIP2
298 .BR ARCHIVE_COMPRESSION_COMPRESS
299 .BR ARCHIVE_FILTER_COMPRESS
301 .BR ARCHIVE_COMPRESSION_PROGRAM
302 .BR ARCHIVE_FILTER_PROGRAM
304 .BR ARCHIVE_COMPRESSION_LZMA
305 .BR ARCHIVE_FILTER_LZMA
307 .BR ARCHIVE_COMPRESSION_XZ
308 .BR ARCHIVE_FILTER_XZ
310 .BR ARCHIVE_COMPRESSION_UU
311 .BR ARCHIVE_FILTER_UU
313 .BR ARCHIVE_COMPRESSION_RPM
314 .BR ARCHIVE_FILTER_RPM
316 .BR ARCHIVE_COMPRESSION_LZIP
317 .BR ARCHIVE_FILTER_LZIP
319 .BR ARCHIVE_BYTES_PER_RECORD
324 .BR ARCHIVE_DEFAULT_BYTES_PER_BLOCK
332 \fBarchive_read\fP(3),
333 \fBarchive_read_filter\fP(3),
334 \fBarchive_read_format\fP(3),
335 \fBarchive_read_set_options\fP(3),
336 \fBarchive_write\fP(3),
337 \fBarchive_write_filter\fP(3),
338 \fBarchive_write_format\fP(3),
339 \fBarchive_write_set_options\fP(3),
340 \fBarchive_util\fP(3)