1LIBARCHIVE_CHANGES(3) BSD Library Functions Manual LIBARCHIVE_CHANGES(3)
2
4 libarchive_changes — changes in libarchive interface
5
7 This page describes user-visible changes in libarchive3, and lists public
8 functions and other symbols changed, deprecated or removed in
9 libarchive3, along with their replacements if any.
10
11 Multiple Filters
12 Libarchive2 permitted a single (input or output) filter active on an ar‐
13 chive. Libarchive3 extends this into a variable-length stack. Where
14 archive_write_set_compression_XXX() would replace any existing filter,
15 archive_write_add_filter_XXX() extends the write pipeline with another
16 filter.
17
18 Character Set Handling
19 Libarchive2 assumed that the local platform uses Unicode as the native
20 wchar_t encoding, which is true on Windows, modern Linux, and a few other
21 systems, but is certainly not universal. As a result, pax format ar‐
22 chives were written incorrectly on some systems, since pax format
23 requires UTF-8 and libarchive 2 incorrectly assumed that wchar_t strings
24 can be easily converted to UTF-8.
25
26 Libarchive3 uses the standard iconv library to convert between character
27 sets and is introducing the notion of a “default character set for the
28 archive”. To support this, archive_entry objects can now be bound to a
29 particular archive when they are created. The automatic character set
30 conversions performed by archive_entry objects when reading and writing
31 filenames, usernames, and other strings will now use an appropriate
32 default character set:
33
34 If the archive_entry object is bound to an archive, it will use the
35 default character set for that archive.
36
37 The platform default character encoding (as returned by
38 nl_langinfo(CHARSET)) will be used if nothing else is specified.
39
40 Libarchive3 also introduces charset options to many of the archive read‐
41 ers and writers to control the character set that will be used for file‐
42 names written in those archives. When possible, this will be set auto‐
43 matically based on information in the archive itself. Combining this
44 with the notion of a default character set for the archive should allow
45 you to configure libarchive to read archives from other platforms and
46 have the filenames and other information transparently converted to the
47 character encoding suitable for your application.
48
49 Prototype Changes
50 These changes break binary compatibility; libarchive3 has a new shared
51 library version to reflect these changes. The library now uses portable
52 wide types such as int64_t instead of less-portable types such as off_t,
53 gid_t, uid_t, and ino_t.
54
55 There are a few cases where these changes will affect your source code:
56
57 · In some cases, libarchive's wider types will introduce the possibil‐
58 ity of truncation: for example, on a system with a 16-bit uid_t, you
59 risk having uid 65536 be truncated to uid 0, which can cause serious
60 security problems.
61
62 · Typedef function pointer types will be incompatible. For example,
63 if you define custom skip callbacks, you may have to use code simi‐
64 lar to the following if you want to support building against
65 libarchive2 and libarchive3:
66
67 #if ARCHIVE_VERSION_NUMBER < 3000000
68 typedef off_t myoff_t;
69 #else
70 typedef int64_t myoff_t;
71 #endif
72
73 myoff_t
74 my_skip_function(struct archive *a, void *v, myoff_t o)
75 {
76 ... implementation ...
77 }
78
79 Affected functions:
80
81 · archive_entry_gid(), archive_entry_set_gid()
82 · archive_entry_uid(), archive_entry_set_uid()
83 · archive_entry_ino(), archive_entry_set_ino()
84 · archive_read_data_block(), archive_write_data_block()
85 · archive_read_disk_gname(), archive_read_disk_uname()
86 · archive_read_disk_set_gname_lookup(),
87 archive_read_disk_set_group_lookup(),
88 archive_read_disk_set_uname_lookup(),
89 archive_read_disk_set_user_lookup()
90 · archive_skip_callback()
91 · archive_read_extract_set_skip_file(),
92 archive_write_disk_set_skip_file(), archive_write_set_skip_file()
93 · archive_write_disk_set_group_lookup(),
94 archive_write_disk_set_user_lookup()
95
96 Where these functions or their arguments took or returned gid_t, ino_t,
97 off_t, or uid_t they now take or return int64_t or equivalent.
98
99 Deprecated Symbols
100 Symbols deprecated in libarchive3 will be removed in libarchive4. These
101 symbols, along with their replacements if any, are listed below:
102
103 archive_position_compressed(), archive_position_uncompressed()
104 archive_filter_bytes()
105
106 archive_compression()
107 archive_filter_code()
108
109 archive_compression_name()
110 archive_filter_name()
111
112 archive_read_finish(), archive_write_finish()
113 archive_read_free(), archive_write_free()
114
115 archive_read_open_file(), archive_write_open_file()
116 archive_read_open_filename(), archive_write_open_filename()
117
118 archive_read_support_compression_all()
119 archive_read_support_filter_all()
120
121 archive_read_support_compression_bzip2()
122 archive_read_support_filter_bzip2()
123
124 archive_read_support_compression_compress()
125 archive_read_support_filter_compress()
126
127 archive_read_support_compression_gzip()
128 archive_read_support_filter_gzip()
129
130 archive_read_support_compression_lzip()
131 archive_read_support_filter_lzip()
132
133 archive_read_support_compression_lzma()
134 archive_read_support_filter_lzma()
135
136 archive_read_support_compression_none()
137 archive_read_support_filter_none()
138
139 archive_read_support_compression_program()
140 archive_read_support_filter_program()
141
142 archive_read_support_compression_program_signature()
143 archive_read_support_filter_program_signature()
144
145 archive_read_support_compression_rpm()
146 archive_read_support_filter_rpm()
147
148 archive_read_support_compression_uu()
149 archive_read_support_filter_uu()
150
151 archive_read_support_compression_xz()
152 archive_read_support_filter_xz()
153
154 archive_write_set_compression_bzip2()
155 archive_write_add_filter_bzip2()
156
157 archive_write_set_compression_compress()
158 archive_write_add_filter_compress()
159
160 archive_write_set_compression_gzip()
161 archive_write_add_filter_gzip()
162
163 archive_write_set_compression_lzip()
164 archive_write_add_filter_lzip()
165
166 archive_write_set_compression_lzma()
167 archive_write_add_filter_lzma()
168
169 archive_write_set_compression_none()
170 archive_write_add_filter_none()
171
172 archive_write_set_compression_program()
173 archive_write_add_filter_program()
174
175 archive_write_set_compression_filter()
176 archive_write_add_filter_filter()
177
178 Removed Symbols
179 These symbols, listed below along with their replacements if any, were
180 deprecated in libarchive2, and are not part of libarchive3.
181
182 archive_api_feature()
183 archive_version_number()
184
185 archive_api_version()
186 archive_version_number()
187
188 archive_version()
189 archive_version_string()
190
191 archive_version_stamp()
192 archive_version_number()
193
194 archive_read_set_filter_options()
195 archive_read_set_options() or archive_read_set_filter_option()
196
197 archive_read_set_format_options()
198 archive_read_set_options() or archive_read_set_format_option()
199
200 archive_write_set_filter_options()
201 archive_write_set_options() or archive_write_set_filter_option()
202
203 archive_write_set_format_options()
204 archive_write_set_options() or archive_write_set_format_option()
205
206 ARCHIVE_API_FEATURE
207 ARCHIVE_VERSION_NUMBER
208
209 ARCHIVE_API_VERSION
210 ARCHIVE_VERSION_NUMBER
211
212 ARCHIVE_VERSION_STAMP
213 ARCHIVE_VERSION_NUMBER
214
215 ARCHIVE_LIBRARY_VERSION
216 ARCHIVE_VERSION_STRING
217
218 ARCHIVE_COMPRESSION_NONE
219 ARCHIVE_FILTER_NONE
220
221 ARCHIVE_COMPRESSION_GZIP
222 ARCHIVE_FILTER_GZIP
223
224 ARCHIVE_COMPRESSION_BZIP2
225 ARCHIVE_FILTER_BZIP2
226
227 ARCHIVE_COMPRESSION_COMPRESS
228 ARCHIVE_FILTER_COMPRESS
229
230 ARCHIVE_COMPRESSION_PROGRAM
231 ARCHIVE_FILTER_PROGRAM
232
233 ARCHIVE_COMPRESSION_LZMA
234 ARCHIVE_FILTER_LZMA
235
236 ARCHIVE_COMPRESSION_XZ
237 ARCHIVE_FILTER_XZ
238
239 ARCHIVE_COMPRESSION_UU
240 ARCHIVE_FILTER_UU
241
242 ARCHIVE_COMPRESSION_RPM
243 ARCHIVE_FILTER_RPM
244
245 ARCHIVE_COMPRESSION_LZIP
246 ARCHIVE_FILTER_LZIP
247
248 ARCHIVE_BYTES_PER_RECORD
249 512
250
251 ARCHIVE_DEFAULT_BYTES_PER_BLOCK
252 10240
253
255 libarchive(3), archive_read(3), archive_read_filter(3),
256 archive_read_format(3), archive_read_set_options(3), archive_write(3),
257 archive_write_filter(3), archive_write_format(3),
258 archive_write_set_options(3), archive_util(3)
259
260BSD December 23, 2011 BSD