From 6de279db3930811cb48759b64c8a572683777207 Mon Sep 17 00:00:00 2001 From: Salt Project Packaging Date: Wed, 26 Apr 2023 18:47:59 +0000 Subject: [PATCH 1/5] Update README.rst with 2023.04.26 release sha256sum --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 6c1c086..8594bd0 100644 --- a/README.rst +++ b/README.rst @@ -32,6 +32,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file. The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is: +- 2023.04.26: ``516fa9cc2e258cb8484ff360b9674b46918f657985c21ca9301e42a3dd263d60`` - 2023.04.21: ``e364428aa7a25f8e2c5e18e36e222351724c6cf35a1d57158f3357cde1e0a0f0`` - 2023.04.06: ``994bf7e8bd92fe6d70d291c7562aff299f5651046b4e76dfa506cee0d9bb0843`` - 2022.10.04: ``d0686c2daeed18bb726e58eef75a69afe9ee56a1a23b2c32cd4e87d6005638e2`` From e44fc45b5d9c32753a8aff8624d4e1fa4a617795 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Sat, 24 Jun 2023 10:30:47 -0700 Subject: [PATCH 2/5] SUSE Fixes (#1925) * Updating the bootstrap script with fixes to install properly on SUSE. Since we are not building onedir packages and providing them in the Salt project repo, we fall back to the previous stable installs and use the SUSE repos. Removing _DOWNSTREAM_PKG_REPO as it is no longer used. * Gentoo installs are broken because of the Gentoo ebuild. Remove Mac 10.15 as it is EOL. Update BSD tests tor run on MacOS 11. * If the brew update vagrant fails because it is not installed then install it. * blacklist gentoo from latest packages. * Make sure virtualbox is installed * removing cask argument * swap macos-11 for macos-12 to run BSD tests in vagrant. --- .github/workflows/ci.yml | 26 ++------- .github/workflows/templates/generate.py | 10 ++-- .github/workflows/test-bsd.yml | 2 +- bootstrap-salt.sh | 70 ++++++++++++++++++++----- 4 files changed, 67 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd33983..85f4380 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,7 +126,7 @@ jobs: distro-slug: freebsd-131 display-name: FreeBSD 13.1 timeout: 20 - runs-on: macos-10.15 + runs-on: macos-12 instances: '["git-master", "latest"]' @@ -141,7 +141,7 @@ jobs: distro-slug: freebsd-123 display-name: FreeBSD 12.3 timeout: 20 - runs-on: macos-10.15 + runs-on: macos-12 instances: '["git-master", "latest"]' @@ -156,26 +156,11 @@ jobs: distro-slug: openbsd-7 display-name: OpenBSD 7 timeout: 20 - runs-on: macos-10.15 + runs-on: macos-12 instances: '["latest"]' - macos-1015: - name: macOS 10.15 - if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' - uses: ./.github/workflows/test-macos.yml - needs: - - lint - - generate-actions-workflow - with: - distro-slug: macos-1015 - display-name: macOS 10.15 - timeout: 20 - runs-on: macos-10.15 - instances: '["stable-3003", "stable-3004", "stable-3005", "stable-3006", "latest"]' - - macos-11: name: macOS 11 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' @@ -417,7 +402,7 @@ jobs: distro-slug: gentoo display-name: Gentoo timeout: 90 - instances: '["git-master", "latest", "default"]' + instances: '["git-master"]' gentoo-systemd: @@ -431,7 +416,7 @@ jobs: distro-slug: gentoo-systemd display-name: Gentoo (systemd) timeout: 90 - instances: '["git-master", "latest", "default"]' + instances: '["git-master"]' opensuse-15: @@ -585,7 +570,6 @@ jobs: - freebsd-131 - freebsd-123 - openbsd-7 - - macos-1015 - macos-11 - macos-12 - windows-2019 diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 38593e9..61cf640 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -38,7 +38,6 @@ WINDOWS = [ ] OSX = [ - "macos-1015", "macos-11", "macos-12", ] @@ -61,8 +60,6 @@ STABLE_DISTROS = [ "fedora-36", "fedora-37", "fedora-38", - "gentoo", - "gentoo-systemd", "opensuse-15", "opensuse-tumbleweed", "oraclelinux-7", @@ -321,7 +318,10 @@ GIT_DISTRO_BLACKLIST = [ "rockylinux-8", ] -LATEST_PKG_BLACKLIST = [] +LATEST_PKG_BLACKLIST = [ + "gentoo", + "gentoo-systemd", +] DISTRO_DISPLAY_NAMES = { "almalinux-8": "AlmaLinux 8", @@ -389,7 +389,7 @@ def generate_test_jobs(): for distro in BSD: test_jobs += "\n" - runs_on = "macos-10.15" + runs_on = "macos-12" runs_on = f"\n runs-on: {runs_on}" ifcheck = "\n if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'" uses = "./.github/workflows/test-bsd.yml" diff --git a/.github/workflows/test-bsd.yml b/.github/workflows/test-bsd.yml index db8fc58..753956d 100644 --- a/.github/workflows/test-bsd.yml +++ b/.github/workflows/test-bsd.yml @@ -54,7 +54,7 @@ jobs: - name: Update Vagrant run: | brew update - brew upgrade vagrant + brew upgrade vagrant || brew install vagrant - name: Setup Vagrant Cache uses: actions/cache@v3 diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5a103f3..2b42739 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -224,7 +224,6 @@ _KEEP_TEMP_FILES=${BS_KEEP_TEMP_FILES:-$BS_FALSE} _TEMP_CONFIG_DIR="null" _SALTSTACK_REPO_URL="https://github.com/saltstack/salt.git" _SALT_REPO_URL=${_SALTSTACK_REPO_URL} -_DOWNSTREAM_PKG_REPO=$BS_FALSE _TEMP_KEYS_DIR="null" _SLEEP="${__DEFAULT_SLEEP}" _INSTALL_MASTER=$BS_FALSE @@ -401,9 +400,6 @@ __usage() { -v Display script version -V Install Salt into virtualenv (only available for Ubuntu based distributions) - -w Install packages from downstream package repository rather than - upstream, saltstack package repository. This is currently only - implemented for SUSE. -x Changes the Python version used to install Salt. For CentOS 6 git installations python2.7 is supported. Fedora git installation, CentOS 7, Ubuntu 18.04 support python3. @@ -420,7 +416,7 @@ EOT } # ---------- end of function __usage ---------- -while getopts ':hvnDc:g:Gyx:wk:s:MSNXCPFUKIA:i:Lp:dH:bflV:J:j:rR:aq' opt +while getopts ':hvnDc:g:Gyx:k:s:MSNXCPFUKIA:i:Lp:dH:bflV:J:j:rR:aq' opt do case "${opt}" in @@ -436,7 +432,6 @@ do echowarn "No need to provide this option anymore, now it is a default behavior." ;; - w ) _DOWNSTREAM_PKG_REPO=$BS_TRUE ;; k ) _TEMP_KEYS_DIR="$OPTARG" ;; s ) _SLEEP=$OPTARG ;; M ) _INSTALL_MASTER=$BS_TRUE ;; @@ -7699,13 +7694,8 @@ __set_suse_pkg_repo() { DISTRO_REPO="SLE_${DISTRO_MAJOR_VERSION}_SP${SUSE_PATCHLEVEL}" fi - if [ "$_DOWNSTREAM_PKG_REPO" -eq $BS_TRUE ]; then - suse_pkg_url_base="https://download.opensuse.org/repositories/systemsmanagement:/saltstack" - suse_pkg_url_path="${DISTRO_REPO}/systemsmanagement:saltstack.repo" - else - suse_pkg_url_base="${HTTP_VAL}://repo.saltproject.io/opensuse" - suse_pkg_url_path="${DISTRO_REPO}/systemsmanagement:saltstack:products.repo" - fi + suse_pkg_url_base="https://download.opensuse.org/repositories/systemsmanagement:/saltstack" + suse_pkg_url_path="${DISTRO_REPO}/systemsmanagement:saltstack.repo" SUSE_PKG_URL="$suse_pkg_url_base/$suse_pkg_url_path" } @@ -7725,7 +7715,7 @@ __version_lte() { zypper --non-interactive install --auto-agree-with-licenses python || return 1 fi - if [ "$(python -c 'import sys; V1=tuple([int(i) for i in sys.argv[1].split(".")]); V2=tuple([int(i) for i in sys.argv[2].split(".")]); print V1<=V2' "$1" "$2")" = "True" ]; then + if [ "$(${_PY_EXE} -c 'import sys; V1=tuple([int(i) for i in sys.argv[1].split(".")]); V2=tuple([int(i) for i in sys.argv[2].split(".")]); print(V1<=V2)' "$1" "$2")" = "True" ]; then __ZYPPER_REQUIRES_REPLACE_FILES=${BS_TRUE} else __ZYPPER_REQUIRES_REPLACE_FILES=${BS_FALSE} @@ -8131,6 +8121,11 @@ install_opensuse_15_git() { return 0 } +install_opensuse_15_onedir_deps() { + __opensuse_prep_install || return 1 + return 0 +} + # # End of openSUSE Leap 15 # @@ -8160,6 +8155,13 @@ install_suse_15_git_deps() { return 0 } +install_suse_15_onedir_deps() { + __opensuse_prep_install || return 1 + install_opensuse_15_onedir_deps || return 1 + + return 0 +} + install_suse_15_stable() { install_opensuse_stable || return 1 return 0 @@ -8170,6 +8172,11 @@ install_suse_15_git() { return 0 } +install_suse_15_onedir() { + install_opensuse_stable || return 1 + return 0 +} + install_suse_15_stable_post() { install_opensuse_stable_post || return 1 return 0 @@ -8180,6 +8187,11 @@ install_suse_15_git_post() { return 0 } +install_suse_15_onedir_post() { + install_opensuse_stable_post || return 1 + return 0 +} + install_suse_15_restart_daemons() { install_opensuse_restart_daemons || return 1 return 0 @@ -8262,6 +8274,11 @@ install_suse_12_git_deps() { return 0 } +install_suse_12_onedir_deps() { + install_suse_12_stable_deps || return 1 + return 0 +} + install_suse_12_stable() { install_opensuse_stable || return 1 return 0 @@ -8272,6 +8289,11 @@ install_suse_12_git() { return 0 } +install_suse_12_onedir() { + install_opensuse_stable || return 1 + return 0 +} + install_suse_12_stable_post() { install_opensuse_stable_post || return 1 return 0 @@ -8282,6 +8304,11 @@ install_suse_12_git_post() { return 0 } +install_suse_12_onedir_post() { + install_opensuse_stable_post || return 1 + return 0 +} + install_suse_12_restart_daemons() { install_opensuse_restart_daemons || return 1 return 0 @@ -8358,6 +8385,11 @@ install_suse_11_git_deps() { return 0 } +install_suse_11_onedir_deps() { + install_suse_11_stable_deps || return 1 + return 0 +} + install_suse_11_stable() { install_opensuse_stable || return 1 return 0 @@ -8368,6 +8400,11 @@ install_suse_11_git() { return 0 } +install_suse_11_onedir() { + install_opensuse_stable || return 1 + return 0 +} + install_suse_11_stable_post() { install_opensuse_stable_post || return 1 return 0 @@ -8378,6 +8415,11 @@ install_suse_11_git_post() { return 0 } +install_suse_11_onedir_post() { + install_opensuse_stable_post || return 1 + return 0 +} + install_suse_11_restart_daemons() { install_opensuse_restart_daemons || return 1 return 0 From 7867723e2f35b75af1217ef171be1276e19284c8 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Sun, 25 Jun 2023 11:07:38 -0700 Subject: [PATCH 3/5] Add old_stable type (#1934) * add an old_stable install type to avoid cluttering up stable with older non-onedir installs * removing note about default install type. * update kitchen file. * updating github workflows to tests with old_stable type * blacklist versions 3003 and 3004 for stable, those are now in old_stable. * fix script to include old_stable during the installation type check. * make sure old-stable is consistent. * use install_centos_onedir_deps when installing via git on centos like distros * Handle stable install of 3005 version without a minor version * block git-master on amazon-2 and debian-10 * need seperate blacklists for Mac, since stable 3005 is not available as a onedir package. * update kitchen.macos.yml to ensure 3003, 3004, and 3005 are old-stable. * need to include the salt_bootstrap_options to ensure we get the right install type. * ensure ITYPE is set to stable when minor version is included. * git master installs failing on freebsd --- .github/workflows/ci.yml | 34 ++++++------- .github/workflows/templates/generate.py | 67 +++++++++++++++++++++++-- bootstrap-salt.sh | 52 ++++++++++++++----- kitchen.macos.yml | 9 ++-- kitchen.yml | 27 +++++++--- 5 files changed, 144 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85f4380..940b319 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: display-name: FreeBSD 13.1 timeout: 20 runs-on: macos-12 - instances: '["git-master", "latest"]' + instances: '["latest"]' freebsd-123: @@ -142,7 +142,7 @@ jobs: display-name: FreeBSD 12.3 timeout: 20 runs-on: macos-12 - instances: '["git-master", "latest"]' + instances: '["latest"]' openbsd-7: @@ -173,7 +173,7 @@ jobs: display-name: macOS 11 timeout: 20 runs-on: macos-11 - instances: '["stable-3003", "stable-3004", "stable-3005", "stable-3006", "latest"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3006", "latest"]' macos-12: @@ -188,7 +188,7 @@ jobs: display-name: macOS 12 timeout: 20 runs-on: macos-12 - instances: '["stable-3003", "stable-3004", "stable-3005", "stable-3006", "latest"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3006", "latest"]' @@ -204,7 +204,7 @@ jobs: display-name: Windows 2019 timeout: 20 runs-on: windows-2019 - instances: '["stable-3003", "stable-3004", "stable-3005", "stable-3006", "latest"]' + instances: '["stable-3005", "stable-3006", "latest"]' windows-2022: @@ -219,7 +219,7 @@ jobs: display-name: Windows 2022 timeout: 20 runs-on: windows-2022 - instances: '["stable-3003", "stable-3004", "stable-3005", "stable-3006", "latest"]' + instances: '["stable-3005", "stable-3006", "latest"]' @@ -234,7 +234,7 @@ jobs: distro-slug: almalinux-8 display-name: AlmaLinux 8 timeout: 20 - instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' almalinux-9: @@ -262,7 +262,7 @@ jobs: distro-slug: amazon-2 display-name: Amazon 2 timeout: 20 - instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' arch: @@ -290,7 +290,7 @@ jobs: distro-slug: centos-7 display-name: CentOS 7 timeout: 20 - instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' centos-stream8: @@ -304,7 +304,7 @@ jobs: distro-slug: centos-stream8 display-name: CentOS Stream 8 timeout: 20 - instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' centos-stream9: @@ -332,7 +332,7 @@ jobs: distro-slug: debian-10 display-name: Debian 10 timeout: 20 - instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' debian-11: @@ -346,7 +346,7 @@ jobs: distro-slug: debian-11 display-name: Debian 11 timeout: 20 - instances: '["stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' fedora-36: @@ -458,7 +458,7 @@ jobs: distro-slug: oraclelinux-7 display-name: Oracle Linux 7 timeout: 20 - instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' oraclelinux-8: @@ -472,7 +472,7 @@ jobs: distro-slug: oraclelinux-8 display-name: Oracle Linux 8 timeout: 20 - instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' photon-3: @@ -514,7 +514,7 @@ jobs: distro-slug: rockylinux-8 display-name: Rocky Linux 8 timeout: 20 - instances: '["stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' rockylinux-9: @@ -542,7 +542,7 @@ jobs: distro-slug: ubuntu-2004 display-name: Ubuntu 20.04 timeout: 20 - instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' ubuntu-2204: @@ -556,7 +556,7 @@ jobs: distro-slug: ubuntu-2204 display-name: Ubuntu 22.04 timeout: 20 - instances: '["stable-3004", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' set-pipeline-exit-status: diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 61cf640..1a9cf1c 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -47,6 +47,24 @@ BSD = [ "openbsd-7", ] +OLD_STABLE_DISTROS = [ + "almalinux-8", + "amazon-2", + "arch", + "centos-7", + "centos-stream8", + "debian-10", + "debian-11", + "gentoo", + "gentoo-systemd", + "opensuse-15", + "opensuse-tumbleweed", + "oraclelinux-7", + "oraclelinux-8", + "rockylinux-8", + "ubuntu-2004", +] + STABLE_DISTROS = [ "almalinux-8", "almalinux-9", @@ -258,7 +276,7 @@ BLACKLIST_GIT_3006 = [ "ubuntu-2204", ] -BLACKLIST_GIT_MASTER = [] +BLACKLIST_GIT_MASTER = ["amazon-2", "debian-10", "freebsd-131", "freebsd-123"] SALT_VERSIONS = [ "3003", @@ -288,7 +306,29 @@ VERSION_DISPLAY_NAMES = { "nightly": "Nightly", } +OLD_STABLE_VERSION_BLACKLIST = [ + "3006", + "master", + "nightly", +] + STABLE_VERSION_BLACKLIST = [ + "3003", + "3004", + "master", + "nightly", +] + +MAC_OLD_STABLE_VERSION_BLACKLIST = [ + "3006", + "master", + "nightly", +] + +MAC_STABLE_VERSION_BLACKLIST = [ + "3003", + "3004", + "3005", "master", "nightly", ] @@ -427,6 +467,7 @@ def generate_test_jobs(): BLACKLIST = { "3003": BLACKLIST_GIT_3003, "3004": BLACKLIST_GIT_3004, + "master": BLACKLIST_GIT_MASTER, } # .0 versions are a virtual version for pinning to the first @@ -436,7 +477,7 @@ def generate_test_jobs(): continue if ( - salt_version in ("3003", "3004") + salt_version in ("3003", "3004", "master") and distro in BLACKLIST[salt_version] ): continue @@ -480,9 +521,13 @@ def generate_test_jobs(): instances.append(salt_version) continue - for bootstrap_type in ("stable",): + for bootstrap_type in ("stable", "old-stable"): if bootstrap_type == "stable": - if salt_version in STABLE_VERSION_BLACKLIST: + if salt_version in MAC_STABLE_VERSION_BLACKLIST: + continue + + if bootstrap_type == "old-stable": + if salt_version in MAC_OLD_STABLE_VERSION_BLACKLIST: continue kitchen_target = f"{bootstrap_type}-{salt_version}" @@ -574,7 +619,13 @@ def generate_test_jobs(): instances.append(salt_version) continue - for bootstrap_type in ("stable", "git", "onedir", "onedir-rc"): + for bootstrap_type in ( + "old-stable", + "stable", + "git", + "onedir", + "onedir-rc", + ): if bootstrap_type == "onedir": if salt_version not in ONEDIR_SALT_VERSIONS: continue @@ -587,6 +638,12 @@ def generate_test_jobs(): if distro not in ONEDIR_RC_DISTROS: continue + if bootstrap_type == "old-stable": + if salt_version in OLD_STABLE_VERSION_BLACKLIST: + continue + if distro not in OLD_STABLE_DISTROS: + continue + if bootstrap_type == "stable": if salt_version in STABLE_VERSION_BLACKLIST: continue diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2b42739..06c682f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -310,21 +310,31 @@ __usage() { - onedir_rc Install latest onedir RC release. - onedir_rc [version] Install a specific version. Only supported for onedir RC packages available at repo.saltproject.io + - old-stable Install latest old stable release. + - old-stable [branch] Install latest version on a branch. Only supported + for packages available at repo.saltproject.io + - old-stable [version] Install a specific version. Only supported for + packages available at repo.saltproject.io + To pin a 3xxx minor version, specify it as 3xxx.0 Examples: - ${__ScriptName} - ${__ScriptName} stable - - ${__ScriptName} stable 2017.7 - - ${__ScriptName} stable 2017.7.2 + - ${__ScriptName} stable 3006 + - ${__ScriptName} stable 3006.1 - ${__ScriptName} testing - ${__ScriptName} git - ${__ScriptName} git 2017.7 - ${__ScriptName} git v2017.7.2 - ${__ScriptName} git 06f249901a2e2f1ed310d58ea3921a129f214358 - ${__ScriptName} onedir - - ${__ScriptName} onedir 3005 + - ${__ScriptName} onedir 3006 - ${__ScriptName} onedir_rc - - ${__ScriptName} onedir_rc 3005 + - ${__ScriptName} onedir_rc 3006 + - ${__ScriptName} old-stable + - ${__ScriptName} old-stable 3005 + - ${__ScriptName} old-stable 3005.1 + Options: -a Pip install all Python pkg dependencies for Salt. Requires -V to install @@ -591,7 +601,7 @@ if [ "$#" -gt 0 ];then fi # Check installation type -if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git|onedir|onedir_rc)')" = "" ]; then +if [ "$(echo "$ITYPE" | grep -E '(stable|testing|git|onedir|onedir_rc|old-stable)')" = "" ]; then echoerror "Installation type \"$ITYPE\" is not known..." exit 1 fi @@ -615,28 +625,41 @@ elif [ "$ITYPE" = "stable" ]; then _ONEDIR_REV="latest" ITYPE="onedir" else - if [ "$(echo "$1" | grep -E '^(nightly|latest|3006)$')" != "" ]; then + if [ "$(echo "$1" | grep -E '^(nightly|latest|3005|3006)$')" != "" ]; then ONEDIR_REV="$1" _ONEDIR_REV="$1" ITYPE="onedir" shift - elif [ "$(echo "$1" | grep -E '^(3003|3004|3005)$')" != "" ]; then - STABLE_REV="$1" - shift - elif [ "$(echo "$1" | grep -E '^([3-9][0-5]{2}[6-9](\.[0-9]*)?)')" != "" ]; then + elif [ "$(echo "$1" | grep -E '^([3-9][0-5]{2}[5-9](\.[0-9]*)?)')" != "" ]; then ONEDIR_REV="minor/$1" _ONEDIR_REV="$1" ITYPE="onedir" shift + else + echo "Unknown stable version: $1 (valid: 3005, 3006, latest)" + exit 1 + fi + fi + +# If doing old-stable install, check if version specified +elif [ "$ITYPE" = "old-stable" ]; then + if [ "$#" -eq 0 ];then + ITYPE="stable" + else + if [ "$(echo "$1" | grep -E '^(3003|3004|3005)$')" != "" ]; then + STABLE_REV="$1" + ITYPE="stable" + shift elif [ "$(echo "$1" | grep -E '^([3-9][0-5]{3}(\.[0-9]*)?)$')" != "" ]; then # Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix + ITYPE="stable" STABLE_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/') if [ "$(uname)" != "Darwin" ]; then STABLE_REV="archive/$STABLE_REV" fi shift else - echo "Unknown stable version: $1 (valid: 3003, 3004, 3005, 3006, latest)" + echo "Unknown old stable version: $1 (valid: 3003, 3004, 3005)" exit 1 fi fi @@ -4569,6 +4592,12 @@ install_fedora_onedir_post() { # CentOS Install Functions # __install_saltstack_rhel_repository() { + if [ "${DISTRO_MAJOR_VERSION}" -ge 9 ]; then + echoerror "Old stable repository unavailable on RH variants greater than or equal to 9" + echoerror "Use the stable install type." + exit 1 + fi + if [ "$ITYPE" = "stable" ]; then repo_rev="$STABLE_REV" else @@ -4823,7 +4852,6 @@ install_centos_git_deps() { # Set ONEDIR_REV to STABLE_REV in case we # end up calling install_centos_onedir_deps ONEDIR_REV=${STABLE_REV} - install_centos_stable_deps || \ install_centos_onedir_deps || \ return 1 diff --git a/kitchen.macos.yml b/kitchen.macos.yml index f6cd2dc..5635d70 100644 --- a/kitchen.macos.yml +++ b/kitchen.macos.yml @@ -18,16 +18,19 @@ platforms: - name: macos-1015 suites: - - name: stable-3003 + - name: old-stable-3003 provisioner: + salt_bootstrap_options: -MP old-stable %s salt_version: 3003.4 salt_call_command: /opt/salt/bin/salt-call - - name: stable-3004 + - name: old-stable-3004 provisioner: + salt_bootstrap_options: -MP old-stable %s salt_version: 3004.1 salt_call_command: /opt/salt/bin/salt-call - - name: stable-3005 + - name: old-stable-3005 provisioner: + salt_bootstrap_options: -MP old-stable %s salt_version: 3005.1 salt_call_command: /opt/salt/bin/salt-call - name: stable-3006 diff --git a/kitchen.yml b/kitchen.yml index 21fecc5..9f073a7 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -224,10 +224,10 @@ suites: - freebsd-131 - freebsd-123 - openbsd-6 - - name: stable-3003-0 + - name: old-stable-3003-0 provisioner: salt_version: 3003 - salt_bootstrap_options: -x python3 -MP stable 3003.0 + salt_bootstrap_options: -x python3 -MP old-stable 3003.0 excludes: - opensuse-15 - opensuse-tumbleweed @@ -244,10 +244,10 @@ suites: - freebsd-131 - freebsd-123 - openbsd-6 - - name: stable-3003 + - name: old-stable-3003 provisioner: salt_version: 3003 - salt_bootstrap_options: -x python3 -MP stable %s + salt_bootstrap_options: -x python3 -MP old-stable %s excludes: - opensuse-15 - opensuse-tumbleweed @@ -255,10 +255,10 @@ suites: - freebsd-131 - freebsd-123 - openbsd-6 - - name: stable-3004-0 + - name: old-stable-3004-0 provisioner: salt_version: 3004 - salt_bootstrap_options: -x python3 -MP stable 3004.0 + salt_bootstrap_options: -x python3 -MP old-stable 3004.0 excludes: - opensuse-15 - opensuse-tumbleweed @@ -268,10 +268,21 @@ suites: - freebsd-131 - freebsd-123 - openbsd-6 - - name: stable-3004 + - name: old-stable-3004 provisioner: salt_version: 3004 - salt_bootstrap_options: -x python3 -MP stable %s + salt_bootstrap_options: -x python3 -MP old-stable %s + excludes: + - opensuse-15 + - opensuse-tumbleweed + - arch + - freebsd-131 + - freebsd-123 + - openbsd-6 + - name: old-stable-3005 + provisioner: + salt_version: 3005 + salt_bootstrap_options: -x python3 -MP old-stable %s excludes: - opensuse-15 - opensuse-tumbleweed From 4fefc1cbed9d94502bd0cc3868c298f50a1a51cf Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Mon, 26 Jun 2023 15:48:10 -0700 Subject: [PATCH 4/5] Test out the minor versions (#1936) * Test out the minor versions * update the maxsplit for the target_salt_version to account for minor versions passed in with dashes because kitchen does not like dots. * Blacklist 3005-1 and 3006-1 for git. * different approach to getting the target salt version * Adding missing kitchen files. --- .github/workflows/ci.yml | 46 ++++++++++++------------- .github/workflows/templates/generate.py | 16 ++++++++- kitchen.macos.yml | 4 +++ kitchen.windows.yml | 7 ++++ kitchen.yml | 22 ++++++++++++ tests/conftest.py | 14 +++++++- 6 files changed, 84 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 940b319..666e065 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,7 +173,7 @@ jobs: display-name: macOS 11 timeout: 20 runs-on: macos-11 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3006", "latest"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3006", "stable-3006-1", "latest"]' macos-12: @@ -188,7 +188,7 @@ jobs: display-name: macOS 12 timeout: 20 runs-on: macos-12 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3006", "latest"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3006", "stable-3006-1", "latest"]' @@ -204,7 +204,7 @@ jobs: display-name: Windows 2019 timeout: 20 runs-on: windows-2019 - instances: '["stable-3005", "stable-3006", "latest"]' + instances: '["stable-3005", "stable-3005-1", "stable-3006", "stable-3006-1", "latest"]' windows-2022: @@ -219,7 +219,7 @@ jobs: display-name: Windows 2022 timeout: 20 runs-on: windows-2022 - instances: '["stable-3005", "stable-3006", "latest"]' + instances: '["stable-3005", "stable-3005-1", "stable-3006", "stable-3006-1", "latest"]' @@ -234,7 +234,7 @@ jobs: distro-slug: almalinux-8 display-name: AlmaLinux 8 timeout: 20 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' almalinux-9: @@ -248,7 +248,7 @@ jobs: distro-slug: almalinux-9 display-name: AlmaLinux 9 timeout: 20 - instances: '["git-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' amazon-2: @@ -262,7 +262,7 @@ jobs: distro-slug: amazon-2 display-name: Amazon 2 timeout: 20 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' arch: @@ -290,7 +290,7 @@ jobs: distro-slug: centos-7 display-name: CentOS 7 timeout: 20 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' centos-stream8: @@ -304,7 +304,7 @@ jobs: distro-slug: centos-stream8 display-name: CentOS Stream 8 timeout: 20 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' centos-stream9: @@ -318,7 +318,7 @@ jobs: distro-slug: centos-stream9 display-name: CentOS Stream 9 timeout: 20 - instances: '["git-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' debian-10: @@ -332,7 +332,7 @@ jobs: distro-slug: debian-10 display-name: Debian 10 timeout: 20 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' debian-11: @@ -346,7 +346,7 @@ jobs: distro-slug: debian-11 display-name: Debian 11 timeout: 20 - instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' fedora-36: @@ -360,7 +360,7 @@ jobs: distro-slug: fedora-36 display-name: Fedora 36 timeout: 20 - instances: '["stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' fedora-37: @@ -374,7 +374,7 @@ jobs: distro-slug: fedora-37 display-name: Fedora 37 timeout: 20 - instances: '["stable-3006", "onedir-3006", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' fedora-38: @@ -388,7 +388,7 @@ jobs: distro-slug: fedora-38 display-name: Fedora 38 timeout: 20 - instances: '["stable-3006", "onedir-3006", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' gentoo: @@ -458,7 +458,7 @@ jobs: distro-slug: oraclelinux-7 display-name: Oracle Linux 7 timeout: 20 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' oraclelinux-8: @@ -472,7 +472,7 @@ jobs: distro-slug: oraclelinux-8 display-name: Oracle Linux 8 timeout: 20 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' photon-3: @@ -486,7 +486,7 @@ jobs: distro-slug: photon-3 display-name: Photon OS 3 timeout: 20 - instances: '["stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' photon-4: @@ -500,7 +500,7 @@ jobs: distro-slug: photon-4 display-name: Photon OS 4 timeout: 20 - instances: '["stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' rockylinux-8: @@ -514,7 +514,7 @@ jobs: distro-slug: rockylinux-8 display-name: Rocky Linux 8 timeout: 20 - instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "latest", "default"]' + instances: '["old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "latest", "default"]' rockylinux-9: @@ -528,7 +528,7 @@ jobs: distro-slug: rockylinux-9 display-name: Rocky Linux 9 timeout: 20 - instances: '["git-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["git-3005", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' ubuntu-2004: @@ -542,7 +542,7 @@ jobs: distro-slug: ubuntu-2004 display-name: Ubuntu 20.04 timeout: 20 - instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["old-stable-3003", "old-stable-3004", "old-stable-3005", "stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' ubuntu-2204: @@ -556,7 +556,7 @@ jobs: distro-slug: ubuntu-2204 display-name: Ubuntu 22.04 timeout: 20 - instances: '["stable-3005", "onedir-3005", "stable-3006", "onedir-3006", "git-master", "latest", "default"]' + instances: '["stable-3005", "onedir-3005", "stable-3005-1", "stable-3006", "onedir-3006", "stable-3006-1", "git-master", "latest", "default"]' set-pipeline-exit-status: diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 1a9cf1c..4fb4ded 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -282,7 +282,9 @@ SALT_VERSIONS = [ "3003", "3004", "3005", + "3005-1", "3006", + "3006-1", "master", "latest", "nightly", @@ -300,14 +302,18 @@ VERSION_DISPLAY_NAMES = { "3003": "v3003", "3004": "v3004", "3005": "v3005", + "3005-1": "v3005.1", "3006": "v3006", + "3006-1": "v3006.1", "master": "Master", "latest": "Latest", "nightly": "Nightly", } OLD_STABLE_VERSION_BLACKLIST = [ + "3005-1", "3006", + "3006-1", "master", "nightly", ] @@ -320,7 +326,9 @@ STABLE_VERSION_BLACKLIST = [ ] MAC_OLD_STABLE_VERSION_BLACKLIST = [ + "3005-1", "3006", + "3006-1", "master", "nightly", ] @@ -329,11 +337,14 @@ MAC_STABLE_VERSION_BLACKLIST = [ "3003", "3004", "3005", + "3005-1", "master", "nightly", ] GIT_VERSION_BLACKLIST = [ + "3005-1", + "3006-1", "nightly", ] @@ -660,7 +671,9 @@ def generate_test_jobs(): "3003": BLACKLIST_3003, "3004": BLACKLIST_3004, "3005": BLACKLIST_3005, + "3005-1": BLACKLIST_3005, "3006": BLACKLIST_3006, + "3006-1": BLACKLIST_3006, } if bootstrap_type == "git": BLACKLIST = { @@ -678,7 +691,8 @@ def generate_test_jobs(): continue if ( - salt_version in ("3003", "3004", "3005", "3006", "master") + salt_version + in ("3003", "3004", "3005", "3005-1", "3006", "3006-1", "master") and distro in BLACKLIST[salt_version] ): continue diff --git a/kitchen.macos.yml b/kitchen.macos.yml index 5635d70..78467f0 100644 --- a/kitchen.macos.yml +++ b/kitchen.macos.yml @@ -37,6 +37,10 @@ suites: provisioner: salt_version: 3006 salt_call_command: /opt/salt/salt-call + - name: stable-3006-1 + provisioner: + salt_version: 3006.1 + salt_call_command: /opt/salt/salt-call - name: latest provisioner: salt_version: latest diff --git a/kitchen.windows.yml b/kitchen.windows.yml index f3e16b3..a21ffa6 100644 --- a/kitchen.windows.yml +++ b/kitchen.windows.yml @@ -28,10 +28,17 @@ suites: - name: stable-3005 provisioner: salt_version: 3005.1-1 + - name: stable-3005-1 + provisioner: + salt_version: 3005.1-1 - name: stable-3006 provisioner: salt_version: 3006.0 salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe + - name: stable-3006-1 + provisioner: + salt_version: 3006.1 + salt_call_command: c:\Program Files\Salt Project\Salt\salt-call.exe - name: latest provisioner: salt_version: latest diff --git a/kitchen.yml b/kitchen.yml index 9f073a7..f5b0ddf 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -301,6 +301,17 @@ suites: - freebsd-131 - freebsd-123 - openbsd-6 + - name: stable-3005-1 + provisioner: + salt_version: 3005.1 + salt_bootstrap_options: -x python3 -MP stable %s + excludes: + - opensuse-15 + - opensuse-tumbleweed + - arch + - freebsd-131 + - freebsd-123 + - openbsd-6 - name: stable-3006 provisioner: salt_version: 3006 @@ -312,6 +323,17 @@ suites: - freebsd-131 - freebsd-123 - openbsd-6 + - name: stable-3006-1 + provisioner: + salt_version: 3006.1 + salt_bootstrap_options: -x python3 -MP stable %s + excludes: + - opensuse-15 + - opensuse-tumbleweed + - arch + - freebsd-131 + - freebsd-123 + - openbsd-6 - name: git-master provisioner: salt_version: master diff --git a/tests/conftest.py b/tests/conftest.py index 1366f85..21ec674 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -47,7 +47,19 @@ def target_python_version(): @pytest.fixture(scope="session") def target_salt_version(): - target_salt = os.environ["KITCHEN_SUITE"].split("-", 2)[-1].replace("-", ".") + bootstrap_types = ("git", "stable", "old", "stable", "onedir", "onedir_rc") + + # filter out any bootstrap types and then join + target_salt = ".".join( + [ + item + for item in os.environ["KITCHEN_SUITE"].split("-") + if item not in bootstrap_types + ] + ) + + # target_salt = os.environ["KITCHEN_SUITE"].split("-", 1)[-1].replace("-", ".") + if target_salt.startswith("v"): target_salt = target_salt[1:] if target_salt in ("default", "latest", "master", "nightly"): From 24161893b6591c68e0557e2eaa1e9820c7039efe Mon Sep 17 00:00:00 2001 From: Salt Project Packaging Date: Wed, 28 Jun 2023 20:27:05 +0000 Subject: [PATCH 5/5] Update develop branch for the v2023.06.28 release --- CHANGELOG.md | 10 ++++++++++ bootstrap-salt.sh | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b018222..b4100b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# v2023.06.28 + +## What's Changed + +- SUSE Fixes by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1925 +- Add old_stable type by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1934 +- Test out the minor versions by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1936 + +**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2023.04.26...v2023.06.28 + # v2023.04.26 ## What's Changed diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 06c682f..29f0413 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -23,7 +23,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2023.04.26" +__ScriptVersion="2023.06.28" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0"