Skip to content

libutil/tarfile: Mention pathname in warning#14780

Merged
tomberek merged 1 commit intomasterfrom
tarfile-warning
Dec 13, 2025
Merged

libutil/tarfile: Mention pathname in warning#14780
tomberek merged 1 commit intomasterfrom
tarfile-warning

Conversation

@xokdvium
Copy link
Contributor

@xokdvium xokdvium commented Dec 12, 2025

Motivation

Fetching gcc-15.2.0.tar.gz I get a warning about UTF8 archive names. This now mentions problematic pathnames.

warning: getting archive member 'gcc-15.2.0/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir/Äfoo.go': Pathname can't be converted from UTF-8 to current locale.
warning: getting archive member 'gcc-15.2.0/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir/Ämain.go': Pathname can't be converted from UTF-8 to current locale.

Also apparently libarchive depends on locale (yikes). Fixing reproducibility issues that stem from this is a separate issue. At least having the warning actually mention the pathname should be useful enough even though it's not actionable.

At least using the default locale yields something sane:

builtins.readDir "${gcc}/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir"
{
  "Äfoo.go" = "regular";
  "Ämain.go" = "regular";
}

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Fetching gcc-15.2.0.tar.gz I get a warning about UTF8 archive names. This
now mentions problematic pathnames.

warning: getting archive member 'gcc-15.2.0/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir/Äfoo.go': Pathname can't be converted from UTF-8 to current locale.
warning: getting archive member 'gcc-15.2.0/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir/Ämain.go': Pathname can't be converted from UTF-8 to current locale.

Also apparently libarchive depends on locale (yikes). Fixing reproducibility issues
that stem from this is a separate issue. At least having the warning actually mention
the pathname should be useful enough even though it's not actionable.

At least using the default locale yields something sane:

builtins.readDir "${gcc}/gcc/testsuite/go.test/test/fixedbugs/issue27836.dir"
{
  "Äfoo.go" = "regular";
  "Ämain.go" = "regular";
}
@xokdvium
Copy link
Contributor Author

At least using the default locale yields something sane:

Something sane - as in just getting the raw bytes.

@tomberek tomberek added this pull request to the merge queue Dec 13, 2025
Merged via the queue into master with commit 26b86a0 Dec 13, 2025
21 checks passed
@tomberek tomberek deleted the tarfile-warning branch December 13, 2025 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants