Skip to content

fix(bootstrap): support Salt 3008+ major versions and fix repo/key issues#2120

Open
twangboy wants to merge 2 commits into
saltstack:developfrom
twangboy:fix_3008_issues
Open

fix(bootstrap): support Salt 3008+ major versions and fix repo/key issues#2120
twangboy wants to merge 2 commits into
saltstack:developfrom
twangboy:fix_3008_issues

Conversation

@twangboy

@twangboy twangboy commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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 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 #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 #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.

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

twangboy added 2 commits June 26, 2026 09:39
…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.
@twangboy twangboy self-assigned this Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant