Skip to content

fix(packages): ship glibc-all-langpacks so a chosen locale exists - #116

Merged
castrojo merged 1 commit into
mainfrom
claude/glibc-langpacks
Sep 18, 2026
Merged

castrojo merged 1 commit into
mainfrom
claude/glibc-langpacks

Conversation

@hanthor

@hanthor hanthor commented Sep 18, 2026

Copy link
Copy Markdown
Member

Closes #114.

What's wrong

Hummingbird's base installs only glibc-minimal-langpack, which provides C and C.UTF-8 and nothing else. Any other locale a user selects — Region & Language, localectl, or a /etc/locale.conf that survived from a previous install — names data the image doesn't have, and every setlocale() warns on every command:

warning: setlocale: LC_NUMERIC: cannot change locale (en_SG.UTF-8): No such file or directory

@KiKaraage's reading of /etc/profile.d/lang.sh is correct, and I confirmed it against the current setup package source: the reset block (lines 11–24) assigns C.UTF-8 without export, then the locale.conf loop (line 33) evals an export of the original values over it. The safety net does nothing. That's a bug in Fedora's setup package — the fix there is trivial, but it's not this repository's to make.

The fix

One line: glibc-all-langpacks in packages/utah.toml.

  • It's in public-hummingbird-x86_64-rpms at 2.43-8.5.hum1, the same NVR as the glibc-minimal-langpack already on the reporter's image, so the transaction adds a package without moving glibc.
  • Bluefin's Silverblue base ships it, which is why the same locale.conf is quiet there. This is a parity gap the contract couldn't see, because the Bluefin package list doesn't name what its base image provides.
  • glibc-langpack-en alone would fix the reporter's case (it carries en_SG) and be ~200 MB smaller, but it would leave Region & Language a way to reproduce this bug in any other language. Matching Bluefin is the point.

Verification

🤖 Generated with Claude Code

https://claude.ai/code/session_01W6BYLUD6KBzF8rBFXKjP7M


Generated by Claude Code

Hummingbird's base installs only glibc-minimal-langpack, which provides C
and C.UTF-8. Any other locale a user selects -- Region & Language, localectl,
or a /etc/locale.conf that survived from a previous install -- names data
the image does not have, and every setlocale() warns on every command:

    warning: setlocale: LC_NUMERIC: cannot change locale (en_SG.UTF-8)

That is #114, on an X230 whose locale.conf carried en_SG from before the
Utah test. The reporter also read /etc/profile.d/lang.sh correctly: its
C.UTF-8 fallback is real but is overwritten by the locale.conf re-export
that follows it, so the safety net does nothing. That is a bug in Fedora's
setup package and not one this repository can fix; what it can fix is the
missing data.

glibc-all-langpacks is in public-hummingbird-x86_64-rpms, so this is one
name in the install set with no factory work. Bluefin's Silverblue base
ships it, which is why the same locale.conf is quiet there.

Verified: the contract check validates, 96 tests pass. The install
transaction itself is CI's check-repos.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6BYLUD6KBzF8rBFXKjP7M

@castrojo castrojo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against the repositories and an actual image build, not just the green checkmark.

Scope is one package plus its rationale: glibc-all-langpacks appended to [gnome] in packages/utah.toml. Hummingbird's base carries only glibc-minimal-langpack (C and C.UTF-8), so any LANG/LC_* a user picks in Region & Language names a locale that does not exist and every setlocale() warns (#114).

Verified independently:

  • It resolves from an allowed repository. The contract job runs DNF with --disablerepo=* --enablerepo=utah-packages --enablerepo=public-hummingbird-x86_64-rpms, and resolves glibc-all-langpacks-2.43-8.5.hum1 from public-hummingbird-x86_64-rpms. No Fedora repo is enabled, so the "Fedora repositories are never enabled at runtime" invariant holds.
  • It is actually installed, not silently skipped. The main image job marks glibc-all-langpacks-2.43-8.5.hum1.x86_64 user-installed and reports All 75 contract packages are present. It goes through install-packages.py's explicit [gnome] branch into the resolved contract and is asserted by verify-rpm-contract.py.
  • Cost is real but bounded: ~227 MiB installed. That is the price of Region & Language being a working control instead of a way to break the terminal.
  • packages/bluefin.toml, flavor config, and the Renovate-managed digests are untouched. All 14 checks SUCCESS.

Two notes for the record, neither blocking:

  1. [gnome] is a slightly loose home for locale data — it is not a GNOME component. It is nonetheless the only installed desktop-runtime bucket that exists today, and inventing a [base] section would be a taxonomy decision beyond this fix. Correct call to use it.
  2. The parity counts in README.md and docs/skills/package-contract.md are stale, but they were already stale before this PR (they say 61/12/4; reality at this head is 59 Bluefin / 16 Utah additions / 9 unavailable). That is pre-existing debt, so I am deliberately not expanding this PR's scope to fix it.

The /etc/profile.d/lang.sh clobbering story in the comment is narrative rather than load-bearing — the fix stands regardless of why the fallback fails, because installing the locale archive makes the selected locale exist.

Approving.

@castrojo
castrojo merged commit 8cf3cef into main Sep 18, 2026
14 checks passed
@castrojo
castrojo deleted the claude/glibc-langpacks branch September 18, 2026 15:47
hanthor pushed a commit that referenced this pull request Sep 18, 2026
#116 (glibc-all-langpacks) and #129 (the [parity] section) landed after the
baseline was generated, closing 25 of its 969 names. By the file's own rule
they come out: 944 remain, 253 of them in Hummingbird's repository. The
pinned count in tests/test_image_parity.py follows. The header keeps the
Bluefin and Utah totals from the run that generated it and says so; the
next image build's report is where the refreshed Utah count comes from.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6BYLUD6KBzF8rBFXKjP7M
castrojo pushed a commit that referenced this pull request Sep 22, 2026
#116 (glibc-all-langpacks) and #129 (the [parity] section) landed after the
baseline was generated, closing 25 of its 969 names. By the file's own rule
they come out: 944 remain, 253 of them in Hummingbird's repository. The
pinned count in tests/test_image_parity.py follows. The header keeps the
Bluefin and Utah totals from the run that generated it and says so; the
next image build's report is where the refreshed Utah count comes from.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6BYLUD6KBzF8rBFXKjP7M
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.

desktop: locale noise on every command from invalid en_SG.UTF-8, lang.sh fallback does not export reset values

3 participants