libarchive_changes.3.html 14 KB

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