fix(bootstrap): support Salt 3008+ major versions and fix repo/key issues#2120
Open
twangboy wants to merge 2 commits into
Open
fix(bootstrap): support Salt 3008+ major versions and fix repo/key issues#2120twangboy wants to merge 2 commits into
twangboy wants to merge 2 commits into
Conversation
…sues Fixes saltstack#2113, saltstack#2118, saltstack#2119 Issue saltstack#2113 — Salt 3008 (and future major versions) was not recognized as a valid major version because every version check in the script used the hardcoded pattern `^(3006|3007)$`. This caused `3008` to fall into the "minor version" branch, appending `-3008` to RPM package names (`yum install salt-minion-3008`) and failing. Fixed by replacing all ~20 occurrences of `'^(3006|3007)$'` with `'^[0-9]{4}$'` so any 4-digit CalVer major is handled generically. Repo setup for new major versions (3008+) falls back to `salt-repo-latest`. Version validation at argument-parse time updated to match, with improved error messages. Issue saltstack#2118 — Bootstrap fails on Ubuntu 26.04 with `NO_PUBKEY` because `__apt_key_fetch()` was copying the ASCII-armored GPG key directly to `/etc/apt/keyrings/salt-archive-keyring.pgp`, but newer apt requires that file in binary (dearmored) format. Fixed by piping the downloaded key through `gpg --dearmor` when gpg is available (it is, since gnupg is installed earlier in the same deps step), with a fallback to the previous `cp` behaviour on systems without gpg. Issue saltstack#2119 — When bootstrapping with `3006` as the major version on RHEL-based systems, the fetched `salt.repo` from the install-guide contains multiple repo entries including `salt-repo-latest` (which now resolves to 3008). The `3006` case in the `yum`/`dnf` config-manager sections was a no-op, leaving `salt-repo-latest` enabled and allowing yum/dnf to install 3008 instead of the requested 3006. Fixed by adding explicit `config-manager --set-disable salt-repo-*` followed by `--set-enabled salt-repo-3006-lts`, matching the same pattern already used for 3007.
Add onedir-3008, stable-3008, and git-3008 test targets across all Linux distros to cover the 3008 major version support added in the previous commit. Add Ubuntu 26.04 to all distro lists (LINUX_DISTROS, STABLE_DISTROS, ONEDIR_DISTROS, ONEDIR_RC_DISTROS) without blacklisting 3006 or 3007 since there are no 26.04-specific packages and the generic Ubuntu packages are used. Regenerate ci.yml.
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?
Issue #2113 — Salt 3008 (and future major versions) was not recognized
as a valid major version because every version check in the script used
the hardcoded pattern
^(3006|3007)$. This caused3008to fall intothe "minor version" branch, appending
-3008to RPM package names(
yum install salt-minion-3008) and failing. Fixed by replacing all~20 occurrences of
'^(3006|3007)$'with'^[0-9]{4}$'so any4-digit CalVer major is handled generically. Repo setup for new major
versions (3008+) falls back to
salt-repo-latest. Version validationat argument-parse time updated to match, with improved error messages.
Issue #2118 — Bootstrap fails on Ubuntu 26.04 with
NO_PUBKEYbecause__apt_key_fetch()was copying the ASCII-armored GPG key directly to/etc/apt/keyrings/salt-archive-keyring.pgp, but newer apt requiresthat file in binary (dearmored) format. Fixed by piping the downloaded
key through
gpg --dearmorwhen gpg is available (it is, since gnupgis installed earlier in the same deps step), with a fallback to the
previous
cpbehaviour on systems without gpg.Issue #2119 — When bootstrapping with
3006as the major version onRHEL-based systems, the fetched
salt.repofrom the install-guidecontains multiple repo entries including
salt-repo-latest(which nowresolves to 3008). The
3006case in theyum/dnfconfig-managersections was a no-op, leaving
salt-repo-latestenabled and allowingyum/dnf to install 3008 instead of the requested 3006. Fixed by adding
explicit
config-manager --set-disable salt-repo-*followed by--set-enabled salt-repo-3006-lts, matching the same pattern alreadyused for 3007.
ci: add Salt 3008 and Ubuntu 26.04 to test matrix
Add onedir-3008, stable-3008, and git-3008 test targets across all
Linux distros to cover the 3008 major version support added in the
previous commit. Add Ubuntu 26.04 to all distro lists (LINUX_DISTROS,
STABLE_DISTROS, ONEDIR_DISTROS, ONEDIR_RC_DISTROS) without blacklisting
3006 or 3007 since there are no 26.04-specific packages and the
generic Ubuntu packages are used. Regenerate ci.yml.
What issues does this PR fix or reference?
Fixes #2113
Fixes #2118
Fixes #2119