Skip to content

Settle a global ISO's deferred install region at first boot - #20209

Open
xdanger wants to merge 3 commits into
omacom:quattrofrom
xdanger:feat/region-from-timezone
Open

xdanger wants to merge 3 commits into
omacom:quattrofrom
xdanger:feat/region-from-timezone

Conversation

@xdanger

@xdanger xdanger commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

What changes

docs/regions.md says a deferred install settles its region at first boot from the media's REGION and the owner's timezone, so Asia/Shanghai gives cn. Two gaps stopped that from happening:

  • configure_region only accepted a two-letter REGION, so the global ISO had no way to say "global, unless the owner's timezone picks a region". It now also accepts REGION=global. Media that leave no REGION behave as before.
  • When the region did change, omarchy-apply-pacman died with OMARCHY_PATH: unbound variable and install/config/region.sh found no profile. Owner setup runs as a systemd service, where OMARCHY_PATH is a shell variable that children don't inherit, and || true hid the failure. The marker, theme and launchers switched, but pacman stayed on .org and the session mirrors were never written. Both children now get OMARCHY_PATH explicitly, as finalize_user already does. This affected China media too, whenever an owner's timezone moved the region (for example Hong Kong).

Companion to omacom/omarchy-iso#241, which writes REGION=<media region> to /etc/omarchy/form-defaults on deferred installs (global on the standard ISO).

Merge order: this PR first, then omarchy-iso#241. Either order is safe on its own: without #241 no media writes REGION=global, and #241 without this PR leaves deferred installs global, as today. A deferred install from the standard ISO only enters cn once both are in.

It also merges cleanly with #19249 in either order: #19249 appends its browser-policy refresh after the pacman step in configure_region, and that refresh now also runs for owners of global media who pick a China timezone.

Verification

  • test/shell.d/install-language-test.sh: new cases for REGION=global (Shanghai and Urumqi give cn; UTC, New York, Hong Kong, Taipei and Macau stay global). The omarchy-apply-pacman and region.sh stubs now fail without OMARCHY_PATH, and the new cases call configure_region with it unexported, as owner setup does. These cases fail on quattro and pass with this branch. provision-owner-regdom-test.sh passes.
  • The same test passes on a local merge of this branch with Add NetEase Cloud Music, Doubao, a WeChat key and Bing China to China installs #19249.
  • x86_64 QEMU/KVM, UEFI, no NIC during install: an ISO built with --local-source from this branch merged with Add NetEase Cloud Music, Doubao, a WeChat key and Bing China to China installs #19249, plus omarchy-iso#241. A deferred ("prepare for another owner") install, then first-boot setup in 简体中文 with Asia/Shanghai:
    • /etc/omarchy/form-defaults: REGION=global
    • /etc/omarchy/region: cn
    • [omarchy] and core list pkgs.omarchy.cn and mirror.omarchy.cn ahead of .org
    • /etc/environment.d/60-omarchy-region.conf holds the China mirrors
    • Jade Horse, the China launchers, and Bing China recommended for Chrome and Chromium
  • Before the OMARCHY_PATH fix, the same run set the marker, theme and launchers, but left pacman on .org, wrote no environment file, and logged omarchy-apply-pacman: line 48: OMARCHY_PATH: unbound variable.
  • Not checked: aarch64, and a real network in mainland China.

Screenshots

No visible change: first-boot setup and its screens are unchanged. The installed result is shown in omarchy-iso#241.

— Yunjie's automation bot

- 🐛 Accept `REGION=global` from the form defaults, so a deferred install
  from the global ISO enters a region whose timezone the owner picks, as
  docs/regions.md requires for Asia/Shanghai; media leaving no REGION keep
  the region the install wrote
- 🐛 Owner setup runs as a systemd service, so `OMARCHY_PATH` is a shell
  variable there; `omarchy-apply-pacman` died on it unbound and
  `region.sh` found no profile, leaving a settled region on the old
  mirrors and environment
@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge, with the previous test-coverage gap closed.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previous test-coverage gap closed.

Summary

Deferred installs now accept REGION=global and settle their region from the owner's timezone.

  • Deferred installs settle their region from the owner's timezone.

Reviews (2) · Last reviewed commit: "✅ test(provision): require `OMARCHY_PATH..." · Reviewed by Greptile

Comment thread test/shell.d/install-language-test.sh Resolved
- ✅ Catch a regression of the `region.sh` half of the fix too, which
  left the session mirrors unwritten
@omarchybot

Copy link
Copy Markdown
Collaborator

Read the current diff, the first-boot region setup, and the region and pacman child scripts at 132c0c2. GPT-6 High in Codex classified this as a bug fix because the existing first-boot path does not pass OMARCHY_PATH to those children; deepseek-v4p1-flash (default effort), asked separately about the same revision, classified the combined change as an enhancement. It also adds support for REGION=global, which depends on the companion ISO change.

The classification remains unsettled, so this is waiting on the maintainer to resolve how the combined change should be handled. No worker tests ran, and no classification or verification labels were added.

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