feat(orch): support RPM-based and Arch base images for template builds#2941
feat(orch): support RPM-based and Arch base images for template builds#2941mishushakov wants to merge 6 commits into
Conversation
Make the template build provisioning distro-aware so any systemd-based base image works, not just Debian/Ubuntu. provision.sh now detects the package manager (apt/dnf/yum/microdnf/zypper/pacman), maps package names per family, picks the systemd binary path and time-sync unit name, and ensures the CA bundle exists at the Debian-style path. envd.service seeds the cert tmpfs and falls back across update-ca-certificates/update-ca-trust so envd starts on RPM/Arch. Alpine remains unsupported (no systemd). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR SummaryMedium Risk Overview Reviewed by Cursor Bugbot for commit 14306ca. Bugbot is set up for automated code reviews on this repo. Configure here. |
❌ 3 Tests Failed:
View the full list of 3 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Code Review
There are no critical findings or feedback to provide on these changes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49bfe8ea6d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…s distros Addresses integration test failures and PR review on non-Debian base images: - user.go: replace Debian-only `adduser` with `useradd -m -s /bin/bash` (shadow-utils, present on all supported distros) — fixes "create user: exit 127" on Arch/openSUSE. Add user to `wheel` group as fallback when `sudo` group is absent (RHEL/Fedora/openSUSE/Arch). - provision.sh: pass `--allowerasing` to dnf/yum so the preinstalled curl-minimal is swapped for curl instead of failing the transaction (fixes AlmaLinux provisioning). - provision.sh: run update-ca-certificates and update-ca-trust sequentially (not if/elif) and fall back to symlinking the distro bundle, so the Debian-style /etc/ssl/certs/ca-certificates.crt always exists on openSUSE. - rootfs.go: drop the static chrony.service wants symlink that dangled on non-Debian images; provision.sh now enables the correct unit for all distros. - build_template_test.go: assert the CA bundle path exists per distro family. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…portable Second round of cross-distro fixes after CI: - provision.sh: add the passwd/useradd/usermod provider package per family (passwd on Debian, shadow-utils+passwd on RHEL, shadow on SUSE/Arch). Minimal almalinux:9 ships without `passwd`, so `passwd -d root` failed with "command not found" and aborted provisioning under `set -eu`. - configure.sh (finalize): replace Debian-only `adduser` with `useradd`, guard on an existing user, copy skel explicitly, and make the admin-group add tolerant (sudo -> wheel -> skip) — fixes arch's `usermod -aG sudo` exit 6. The /etc/sudoers entry is what grants privileges. - user.go: make the wheel fallback best-effort too (openSUSE ships neither sudo nor wheel group) so group membership never fails the build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On RHEL 9 / AlmaLinux 9 the iptables command ships in the iptables-nft package; bare "iptables" is only a virtual provide, so `dnf install iptables` succeeds but `rpm -q iptables` never matches. Use iptables-nft in the rhel package list and in the fedora/almalinux integration test cases. openSUSE (real `iptables` package) and Arch are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 61aa403. Configure here.
…malinux) Fedora takes the identical "rhel" provisioning path as AlmaLinux (same PKG_FAMILY, package list, and install commands), so it adds no provisioning coverage. The fedora:40 base is also the heaviest image and, when all distro cases run in parallel, boots past envd's init timeout under CI node contention — a test-harness/boot-time issue, not a provisioning bug. Keep AlmaLinux for dnf/RHEL-family coverage; Fedora remains supported at runtime. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
openSUSE was the only distro exercising the zypper path, and its base ships neither a usable Debian-style CA bundle path nor a sudo/wheel group, requiring SUSE-specific provisioning branches. Drop support rather than carry that surface for a single family: - provision.sh: remove the zypper detection branch, the suse package list and install branch, and the suse package-presence check. openSUSE now falls through to the clear "no supported package manager" rejection. - provision.sh: trim the CA-bundle fallback to the /etc/pki source (RHEL); the /var/lib/ca-certificates and /etc/ssl/ca-bundle.pem sources were SUSE-only. The wheel-group fallback in user.go/configure.sh stays — RHEL and Arch still need it. - README: move openSUSE from supported families to the unsupported note. - integration: remove the opensuse template-build case. Supported families remain Debian/Ubuntu (apt), Fedora/RHEL/Rocky/Alma (dnf/yum/microdnf), and Arch (pacman). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Makes template build provisioning distro-aware so any systemd-based base image works, not just Debian/Ubuntu.
provision.shnow detects the package manager (apt / dnf / yum / microdnf / zypper / pacman), maps required package names per distro family, resolves the systemd binary path and the correct time-sync unit name (chronyvschronyd), and ensures the CA bundle exists at the Debian-style/etc/ssl/certs/ca-certificates.crtpath.envd.servicenow seeds the cert tmpfs and falls back acrossupdate-ca-certificates/update-ca-trustso envd starts on RPM/Arch. Alpine and other non-systemd distros remain unsupported (rejected with a clear error). The package-availability integration test is now table-driven across Ubuntu, Fedora, AlmaLinux, openSUSE, and Arch, and the README limitations are updated accordingly.🤖 Generated with Claude Code