1
0
mirror of https://github.com/ostreedev/ostree.git synced 2026-02-05 09:44:55 +01:00
Files
Colin Walters 2fb111424e libarchive: Handle UTF-8 filenames without locale dependency
When importing archives (including OCI container layers), libarchive
attempts to convert filenames from UTF-8 to the current locale charset.
In POSIX/C locale (which uses ASCII), this conversion fails for any
non-ASCII UTF-8 characters, returning ARCHIVE_WARN.

This is triggered by Python 3.14 which creates a "𝜋thon" symlink in
venvs, and affects bootc installations in environments where LANG is
not set (defaulting to POSIX locale).

Fix this by:

1. Using archive_entry_pathname_utf8() and archive_entry_symlink_utf8()
   which return UTF-8 directly without locale conversion

2. Falling back to the regular accessors with explicit UTF-8 validation
   when the _utf8 variants return NULL

3. Accepting ARCHIVE_WARN from archive_read_next_header() since we now
   validate UTF-8 ourselves rather than relying on libarchive charset
   conversion

This matches the behavior of GNU tar which treats filenames as opaque
bytes without charset conversion.

Closes: https://github.com/ostreedev/ostree/issues/3431
2026-01-21 17:15:22 -05:00
..
2025-05-23 14:39:55 +10:00
2025-06-26 10:40:42 -04:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00
2020-05-27 21:59:23 +00:00
2024-02-16 13:34:34 +01:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00
2025-03-18 16:21:25 +09:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00
2025-07-10 10:02:00 -04:00
2023-05-02 08:42:19 -04:00
2023-05-02 08:42:19 -04:00