fix(bootstrap): port ALT Linux onedir fixes to Arch Linux - #2130
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):ONEDIR_REVcan 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).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.arch="aarch64"was used, but onedir tarball filenames (on both GitHub and Broadcom's artifactory) usearm64, notaarch64.install_arch_linux_onedir_post()only exportsPATHvia/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 resolvelatest/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/archlinuxreference anywhere in.github/workflows/test-linux.ymlor.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.shsyntax check__get_packagesite_onedir_latest) againstlatest, bare-major (3006), full-minor (3007.13), and package-release-suffix (3008.1-1) inputs - all resolve and build URLs correctlyx86_64andarm64Given 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.