Skip to content

fix(bootstrap): port ALT Linux onedir fixes to Arch Linux - #2130

Merged
twangboy merged 1 commit into
saltstack:developfrom
twangboy:fix_arch_linux_onedir
Sep 4, 2026
Merged

fix(bootstrap): port ALT Linux onedir fixes to Arch Linux#2130
twangboy merged 1 commit into
saltstack:developfrom
twangboy:fix_arch_linux_onedir

Conversation

@twangboy

@twangboy twangboy commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

install_arch_linux_onedir()/install_arch_linux_onedir_post() carry the same three bugs just fixed for ALT Linux (its code was evidently copied from Arch's originally):

  1. Bare major version isn't resolved. ONEDIR_REV can legitimately be a bare 4-digit major version (e.g. "3006") - a documented, valid input per __validate_salt_version_arg. It passed through unresolved and produced a nonexistent GitHub release tag (v3006).
  2. GitHub Releases doesn't carry an onedir tarball asset for every historical point release. E.g. v3007.1's release page exists but only has source tarballs/docs/epub, no onedir asset - only newer releases got onedir assets attached to GitHub Releases.
  3. Wrong arm64 filename. arch="aarch64" was used, but onedir tarball filenames (on both GitHub and Broadcom's artifactory) use arm64, not aarch64.
  4. install_arch_linux_onedir_post() only exports PATH via /etc/profile.d, which a non-login-shell invocation (e.g. docker exec <container> salt-call ..., exactly how this repo's own CI invokes tests) never sources.

Fix: reuse __get_packagesite_onedir_latest() (already used by the macOS/Windows/Photon onedir installers) to resolve latest/bare-major versions via the artifactory directory listing, fetch the tarball from the artifactory generic repo instead of GitHub Releases, fix the arm64 filename, and symlink onedir binaries into /usr/bin.

Verification

Arch Linux has no CI coverage in this repo - no arch/archlinux reference anywhere in .github/workflows/test-linux.yml or .github/workflows/templates/generate.py - which is exactly how these bugs went unnoticed while the identical ALT Linux code got caught immediately by its own CI matrix. Since this couldn't be verified end-to-end via CI, verified instead:

  • bash -n bootstrap-salt.sh syntax check
  • The version-resolution logic exercised in isolation (stubbed __get_packagesite_onedir_latest) against latest, bare-major (3006), full-minor (3007.13), and package-release-suffix (3008.1-1) inputs - all resolve and build URLs correctly
  • The resulting artifactory URLs confirmed live (200) for a real version, both x86_64 and arm64

Given the lack of CI coverage, extra reviewer scrutiny (or a follow-up "add Arch Linux to the CI matrix" issue) is probably warranted here.

What issues does this PR fix or reference?

Same class of bug as salt-bootstrap#2125 (ALT Linux onedir fixes), applied to Arch Linux's pre-existing, structurally identical code.

install_arch_linux_onedir()/install_arch_linux_onedir_post() carry the
same three bugs just fixed for ALT Linux in bootstrap-salt.sh (its
code was evidently copied from Arch's):

- ONEDIR_REV as a bare major version (e.g. '3006') - a documented,
  valid input per __validate_salt_version_arg - passed through
  unresolved and produced a nonexistent GitHub release tag (v3006).
- GitHub Releases doesn't carry an onedir tarball asset for every
  historical point release (e.g. v3007.1's release page has no onedir
  asset at all, only source tarballs/docs).
- The Linux arm64 tarball name used 'aarch64' instead of the actual
  'arm64' used in onedir filenames on both GitHub and artifactory.
- install_arch_linux_onedir_post() only exported PATH via
  /etc/profile.d, which a non-login-shell invocation (e.g.
  'docker exec <container> salt-call ...') never sources.

Apply the same fixes: resolve 'latest' and bare major versions via
__get_packagesite_onedir_latest() (already used by the macOS/Windows/
Photon onedir installers), fetch from the artifactory generic repo
instead of GitHub Releases, fix the arm64 filename, and symlink onedir
binaries into /usr/bin.

Note: Arch Linux has no CI coverage in this repo (no arch/archlinux
reference in .github/workflows/test-linux.yml or
templates/generate.py), so this couldn't be verified end-to-end via
CI. Verified instead: bash -n syntax check, the version-resolution
logic exercised in isolation against latest/bare-major/full-version/
package-release-suffix inputs, and the resulting artifactory URLs
confirmed live (200) for both x86_64 and arm64.
@twangboy
twangboy merged commit f706f4d into saltstack:develop Sep 4, 2026
143 checks passed
@twangboy
twangboy deleted the fix_arch_linux_onedir branch September 4, 2026 16:25
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.

1 participant