Skip to content

feat(orchestrator): support UnionTech OS (UOS) Server 20 template builds - #3829

Open
AdaAibaby wants to merge 1 commit into
e2b-dev:mainfrom
AdaAibaby:feat/uos-distro-support
Open

AdaAibaby wants to merge 1 commit into
e2b-dev:mainfrom
AdaAibaby:feat/uos-distro-support

Conversation

@AdaAibaby

@AdaAibaby AdaAibaby commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Add a UnionTech OS (UOS) Server 20 profile to the template-build distro registry, so builds on a UOS base image are officially supported instead of failing as an unsupported distribution.

Same pattern as TencentOS/OpenCloudOS (#3747 / e78f6cf): declarative Profile keyed on /etc/os-release ID, a parity_test.go entry per family, a profile assertion test, and a README entry.

Why

UnionTech OS (统信 UOS) Server 20 is an RPM/dnf, systemd distribution widely deployed across domestic infrastructure. Its /etc/os-release declares ID=uos with no ID_LIKE, so today a UOS base has no matching profile and no ID_LIKE fallback — provisioning exits with unsupported base image distribution.

The wrinkle (found by testing two images)

The two UOS Server 20 lineages name the account-tools package differently: one ships shadow, the other shadow-utils, and dnf install-ing the name that is absent aborts the whole transaction. Both base images already ship useradd/usermod, so the profile installs neither and relies on the base image (exactly as the Debian family does for shadow tools); passwd is still installed and resolves on both.

Tested (macrosan/uos:v20-1050 and ixuzhi/uos-server:1070a, amd64)

/etc/os-release: ID="uos", VERSION_ID="20", no ID_LIKE
macrosan: shadow EXISTS, shadow-utils ABSENT
ixuzhi:   shadow-utils EXISTS, shadow ABSENT   (dnf install shadow -> "No match", aborts txn)
both: useradd present in base image
profile package set (no shadow*, keeps passwd) resolves cleanly on both:
  macrosan -> Install 49 Packages ; ixuzhi -> Install 107 Packages ; no unresolved packages
dnf and yum present; systemd at /usr/lib/systemd/systemd; wheel group; update-ca-trust present

go test ./packages/orchestrator/pkg/template/build/phases/base/distro/ -v — all pass, including TestUOSProfile, the generic TestRPMProfilesFallBackFromDnf / TestSelectorCoversIDsAndRejects, and the parity trio.

Scope

Four files: distro/distro.go, distro/parity_test.go, distro/distro_test.go, orchestrator/README.md. No behavior change for any existing distro.

/cc @ryan-sana Looking forward to your code review.

UnionTech OS (统信 UOS) Server 20 is an RPM/dnf, systemd distribution. Its
/etc/os-release declares ID=uos and carries no ID_LIKE, so template builds on a
UOS base currently fall through to the "unsupported base image distribution"
error with no best-effort fallback.

Add a uos profile to the distro registry, RHEL-shaped (dnf -> microdnf -> yum
install fallback, systemd at /usr/lib/systemd/systemd, wheel admin group,
update-ca-trust bundle refresh). The one wrinkle, found by testing two
independent UOS Server 20 images, is that the lineages name the account-tools
package differently: one ships shadow, the other shadow-utils, and listing
either aborts the dnf transaction on the image that lacks it. Both base images
already ship useradd/usermod, so the profile installs neither and relies on the
base (as the Debian family does); passwd is still installed and resolves on
both. parity_test.go maps uos shadow-tools to passwd only; TestUOSProfile pins
that neither shadow package is listed; README lists UOS.

Verified against macrosan/uos:v20-1050 and ixuzhi/uos-server:1070a (amd64):
- /etc/os-release: ID="uos", VERSION_ID="20", no ID_LIKE
- macrosan ships shadow (not shadow-utils); ixuzhi ships shadow-utils (not
  shadow); dnf install of the absent name aborts the whole transaction
- both ship useradd in the base image
- the profile package set (no shadow*, keeps passwd) resolves cleanly on both
  (Install 49 / 107 Packages respectively; no unresolved packages)
- dnf and yum present; systemd, wheel group, update-ca-trust all present
- go test ./.../base/distro/ passes (parity trio + generic RPM-fallback and
  selector coverage, plus TestUOSProfile)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants