SPB Git

Repository Public License

NOTICE.md 9.1 KB 156 lines markdown

1# libarchive (with liblzma and libzstd)23| | libarchive | liblzma (XZ Utils) | libzstd (Zstandard) |4|---|---|---|---|5| Version | 3.8.11 | 5.8.4 | 1.5.7 |6| Source | https://github.com/libarchive/libarchive/releases/download/v3.8.11/libarchive-3.8.11.tar.xz | https://github.com/tukaani-project/xz/releases/download/v5.8.4/xz-5.8.4.tar.xz | https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-1.5.7.tar.gz |7| SHA-256 of the archive | `a3dc0872b1b39da34dc18ef1b944f0f11ffd37425d70ae04be679279f1cf43d2` | `4ce24038fd4221e0d13bc1a2de7a4db56e90b92b3bf75321f6c14be73f65de4b` | `eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3` |8| Project | https://www.libarchive.org | https://tukaani.org/xz/ | https://facebook.github.io/zstd/ |9| License | BSD 2-Clause (a few files: BSD 3-Clause UC Regents, public domain, CC0 / Apache-2.0 for the BLAKE2 reference code) | BSD Zero Clause (0BSD) — liblzma only | BSD 3-Clause (the project is dual BSD / GPLv2; ORIX Convert uses it under BSD) |1011The three SHA-256 values were compared, on 2026-11-21, with the digests GitHub publishes for the release assets12(`libarchive-3.8.11.tar.xz`, `xz-5.8.4.tar.xz`) and with the `.sha256` file published next to `zstd-1.5.7.tar.gz`:13they match. `build.sh` refuses any other content.1415**xz backdoor (CVE-2024-3094).** The backdoor was in the release tarballs of xz 5.6.0 and 5.6.1 only. 5.8.4 is a16later release of the cleaned code line, published by the current maintainer; `build.sh` refuses to build 5.6.0 or175.6.1 whatever checksum is given. The backdoor lived in the Autotools build scripts of the tarball: this build uses18the CMake project instead, builds liblzma only (no `xz` tools, no scripts, no translations) and links it statically.1920## Why it is bundled2122The archive engine needs readers and writers for ZIP, 7z, TAR (with gzip, bzip2, xz and zstd), single compressed23streams, and a reader for RAR. macOS has `/usr/lib/libarchive.2.dylib` but ships no public headers for it in the SDK24and no zstd support of its own (the system `bsdtar` shells out to a `zstd` program): it cannot be used.2526## How it is built and linked2728`build.sh` downloads the three archives, checks their SHA-256, and builds with CMake for arm64 / macOS 15.029(Release, static, position-independent):3031- **liblzma**: library only (`XZ_TOOL_*=OFF`, no NLS, no docs), POSIX threads.32- **libzstd**: library only, multithreaded compression on, legacy formats off.33- **libarchive**: `ENABLE_OPENSSL / NETTLE / MBEDTLS / LIBB2 / LZ4 / LZO / LIBXML2 / EXPAT / PCRE / ACL = OFF`, no34  `bsdtar` / `bsdcpio` / `bsdcat` / `bsdunzip`, tests off. zlib, bzip2 and iconv are the macOS SDK's35  (`libz`, `libbz2`, `libiconv`, linked dynamically, as every macOS program does). Digests, AES and PBKDF2 come from36  **CommonCrypto** (libSystem): there is no OpenSSL or Nettle dependency. The script checks the generated37  `config.h` and stops if any of the excluded libraries was picked up (Homebrew prefixes are ignored by the build).3839**External-program filters are physically removed.** libarchive can pipe data through helper programs40(`archive_read_support_filter_program`, `archive_write_add_filter_program`, and the automatic fallbacks to `lz4`,41`lzop`, `grzip`, `lrzip`… when their library is absent). After the build, the script deletes the three objects that42implement this (`filter_fork_posix`, `archive_read_support_filter_program`, `archive_write_add_filter_program`) from43the static library and verifies they are gone. The engine never calls the "support everything" functions, and if a44later change did, the application would fail to **link** rather than gain the ability to launch a program.4546The three libraries are merged into `libCArchive.a` with `libtool -static` and wrapped, with `archive.h` and47`archive_entry.h`, into `CArchive.xcframework`, consumed by `Packages/EngineArchive/Package.swift` as a SwiftPM48`binaryTarget` (module `CArchive`). Everything is statically linked into the application; nothing is loaded at run49time and nothing is looked up on the user's Mac.5051Build-time tools: `cmake` (Homebrew, already present on the build machine), `make`, `ar`, `libtool`, `xcodebuild`.52Size of the product: `libCArchive.a` 2 190 824 bytes, `CArchive.xcframework` 2.2 MB.5354The sources are not modified. `src/`, `work/`, `prefix/` and `CArchive.xcframework/` are build products and are not55committed.5657## What this build can and cannot do (measured by the engine's tests, see docs/compatibility/engines/archive.md)5859- ZIP encryption: reading and writing ZipCrypto and WinZip AES (AES-256 written) through CommonCrypto.60- 7z: no encryption support in libarchive (reading or writing). RAR: reading only, no decryption.61- The gzip reader does not check the CRC-32 / length trailer (a `TODO` in `archive_read_support_filter_gzip.c`), and62  the RAR readers do not check the CRC of files stored without compression. The engine performs both checks itself.6364## Obligations6566- **libarchive** (BSD 2-Clause and the notices listed in its `COPYING`): the copyright notice, conditions and67  disclaimer must be reproduced in the documentation or other materials provided with the binary distribution.68- **Zstandard** (BSD 3-Clause): same, and the name of Meta / Facebook or of contributors must not be used to endorse69  the product.70- **liblzma** (0BSD): no condition; credited here.7172The application's acknowledgements must include the two texts below.7374### libarchive7576```77Copyright (c) 2003-2018 <author(s)>78All rights reserved.7980Redistribution and use in source and binary forms, with or without81modification, are permitted provided that the following conditions82are met:831. Redistributions of source code must retain the above copyright84   notice, this list of conditions and the following disclaimer85   in this position and unchanged.862. Redistributions in binary form must reproduce the above copyright87   notice, this list of conditions and the following disclaimer in the88   documentation and/or other materials provided with the distribution.8990THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR91IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES92OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.93IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT,94INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT95NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,96DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY97THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT98(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF99THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.100```101102Parts of libarchive carry additional notices (3-clause UC Regents in `archive_read_support_filter_compress.c` and103`archive_write_add_filter_compress.c`; public domain `archive_parse_date.c`; BLAKE2 reference code under CC0 1.0 /104OpenSSL / Apache 2.0, used here under CC0). See `src/libarchive/COPYING` after running `build.sh`.105106### Zstandard107108```109BSD License110111For Zstandard software112113Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.114115Redistribution and use in source and binary forms, with or without modification,116are permitted provided that the following conditions are met:117118 * Redistributions of source code must retain the above copyright notice, this119   list of conditions and the following disclaimer.120121 * Redistributions in binary form must reproduce the above copyright notice,122   this list of conditions and the following disclaimer in the documentation123   and/or other materials provided with the distribution.124125 * Neither the name Facebook, nor Meta, nor the names of its contributors may126   be used to endorse or promote products derived from this software without127   specific prior written permission.128129THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND130ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED131WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE132DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR133ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES134(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;135LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON136ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT137(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS138SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.139```140141### liblzma142143```144Permission to use, copy, modify, and/or distribute this145software for any purpose with or without fee is hereby granted.146147THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL148WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED149WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL150THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR151CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM152LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,153NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN154CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.155```156
Files main
Menu

Theme