Merge develop into stable for v2023.04.06 release

This commit is contained in:
github-actions[bot] on behalf of @garethgreenaway 2023-04-06 17:47:29 +00:00
commit bb50b9c83c
16 changed files with 655 additions and 168 deletions

View file

@ -93,7 +93,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
needs: collect-changed-files
container: koalaman/shellcheck-alpine:v0.6.0
container: koalaman/shellcheck-alpine:v0.7.0
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
steps:
- uses: actions/checkout@v3
@ -145,16 +145,16 @@ jobs:
instances: '["git-master", "latest"]'
openbsd-6:
name: OpenBSD 6
openbsd-7:
name: OpenBSD 7
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-bsd.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: openbsd-6
display-name: OpenBSD 6
distro-slug: openbsd-7
display-name: OpenBSD 7
timeout: 20
runs-on: macos-10.15
instances: '["latest"]'
@ -173,7 +173,7 @@ jobs:
display-name: macOS 10.15
timeout: 20
runs-on: macos-10.15
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
macos-11:
@ -188,7 +188,7 @@ jobs:
display-name: macOS 11
timeout: 20
runs-on: macos-11
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
macos-12:
@ -203,7 +203,7 @@ jobs:
display-name: macOS 12
timeout: 20
runs-on: macos-12
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
@ -219,7 +219,7 @@ jobs:
display-name: Windows 2019
timeout: 20
runs-on: windows-2019
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
windows-2022:
@ -234,7 +234,7 @@ jobs:
display-name: Windows 2022
timeout: 20
runs-on: windows-2022
instances: '["stable-3003", "stable-3004", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "latest"]'
@ -249,7 +249,21 @@ jobs:
distro-slug: almalinux-8
display-name: AlmaLinux 8
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
almalinux-9:
name: AlmaLinux 9
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: almalinux-9
display-name: AlmaLinux 9
timeout: 20
instances: '["git-3005", "onedir-3005", "git-master", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
amazon-2:
@ -263,7 +277,7 @@ jobs:
distro-slug: amazon-2
display-name: Amazon 2
timeout: 20
instances: '["stable-3003", "stable-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "git-master", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
arch:
@ -291,7 +305,7 @@ jobs:
distro-slug: centos-7
display-name: CentOS 7
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
centos-stream8:
@ -305,7 +319,21 @@ jobs:
distro-slug: centos-stream8
display-name: CentOS Stream 8
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
centos-stream9:
name: CentOS Stream 9
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: centos-stream9
display-name: CentOS Stream 9
timeout: 20
instances: '["git-3005", "onedir-3005", "git-master", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
debian-10:
@ -319,7 +347,7 @@ jobs:
distro-slug: debian-10
display-name: Debian 10
timeout: 20
instances: '["stable-3003", "stable-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "git-master", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
debian-11:
@ -333,21 +361,7 @@ jobs:
distro-slug: debian-11
display-name: Debian 11
timeout: 20
instances: '["stable-3004", "git-master", "latest"]'
debian-9:
name: Debian 9
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: debian-9
display-name: Debian 9
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3004", "stable-3005", "onedir-3005", "git-master", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
fedora-35:
@ -378,6 +392,34 @@ jobs:
instances: '["git-master", "latest"]'
fedora-37:
name: Fedora 37
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: fedora-37
display-name: Fedora 37
timeout: 20
instances: '["latest"]'
fedora-38:
name: Fedora 38
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: fedora-38
display-name: Fedora 38
timeout: 20
instances: '["latest"]'
gentoo:
name: Gentoo
if: github.event_name == 'push'
@ -417,7 +459,7 @@ jobs:
distro-slug: opensuse-15
display-name: Opensuse 15
timeout: 20
instances: '["git-master", "latest"]'
instances: '["latest"]'
opensuse-tumbleweed:
@ -445,7 +487,7 @@ jobs:
distro-slug: oraclelinux-7
display-name: Oracle Linux 7
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
oraclelinux-8:
@ -459,7 +501,7 @@ jobs:
distro-slug: oraclelinux-8
display-name: Oracle Linux 8
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
rockylinux-8:
@ -473,21 +515,21 @@ jobs:
distro-slug: rockylinux-8
display-name: Rocky Linux 8
timeout: 20
instances: '["stable-3004", "git-3004", "git-master", "latest"]'
instances: '["stable-3004", "stable-3005", "onedir-3005", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
ubuntu-1804:
name: Ubuntu 18.04
rockylinux-9:
name: Rocky Linux 9
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
uses: ./.github/workflows/test-linux.yml
needs:
- lint
- generate-actions-workflow
with:
distro-slug: ubuntu-1804
display-name: Ubuntu 18.04
distro-slug: rockylinux-9
display-name: Rocky Linux 9
timeout: 20
instances: '["stable-3003", "git-3003", "stable-3004", "git-3004", "git-master", "latest"]'
instances: '["git-3005", "onedir-3005", "git-master", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
ubuntu-2004:
@ -501,7 +543,7 @@ jobs:
distro-slug: ubuntu-2004
display-name: Ubuntu 20.04
timeout: 20
instances: '["stable-3003", "stable-3004", "git-master", "latest"]'
instances: '["stable-3003", "stable-3004", "stable-3005", "onedir-3005", "git-master", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
ubuntu-2204:
@ -515,7 +557,7 @@ jobs:
distro-slug: ubuntu-2204
display-name: Ubuntu 22.04
timeout: 20
instances: '["stable-3004", "git-master", "latest"]'
instances: '["stable-3004", "stable-3005", "onedir-3005", "git-master", "latest", "onedir-nightly", "onedir-rc-3006-0rc1", "onedir-rc-3006-0rc2"]'
set-pipeline-exit-status:
@ -528,22 +570,25 @@ jobs:
- generate-actions-workflow
- freebsd-131
- freebsd-123
- openbsd-6
- openbsd-7
- macos-1015
- macos-11
- macos-12
- windows-2019
- windows-2022
- almalinux-8
- almalinux-9
- amazon-2
- arch
- centos-7
- centos-stream8
- centos-stream9
- debian-10
- debian-11
- debian-9
- fedora-35
- fedora-36
- fedora-37
- fedora-38
- gentoo
- gentoo-systemd
- opensuse-15
@ -551,7 +596,7 @@ jobs:
- oraclelinux-7
- oraclelinux-8
- rockylinux-8
- ubuntu-1804
- rockylinux-9
- ubuntu-2004
- ubuntu-2204
if: always()

View file

@ -93,7 +93,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
needs: collect-changed-files
container: koalaman/shellcheck-alpine:v0.6.0
container: koalaman/shellcheck-alpine:v0.7.0
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
steps:
- uses: actions/checkout@v3

View file

@ -9,15 +9,18 @@ os.chdir(os.path.abspath(os.path.dirname(__file__)))
LINUX_DISTROS = [
"almalinux-8",
"almalinux-9",
"amazon-2",
"arch",
"centos-7",
"centos-stream8",
"centos-stream9",
"debian-10",
"debian-11",
"debian-9",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"gentoo",
"gentoo-systemd",
"opensuse-15",
@ -25,7 +28,7 @@ LINUX_DISTROS = [
"oraclelinux-7",
"oraclelinux-8",
"rockylinux-8",
"ubuntu-1804",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2204",
]
@ -42,7 +45,7 @@ OSX = [
BSD = [
"freebsd-131",
"freebsd-123",
"openbsd-6",
"openbsd-7",
]
STABLE_DISTROS = [
@ -53,9 +56,10 @@ STABLE_DISTROS = [
"centos-stream8",
"debian-10",
"debian-11",
"debian-9",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"gentoo",
"gentoo-systemd",
"opensuse-15",
@ -63,45 +67,105 @@ STABLE_DISTROS = [
"oraclelinux-7",
"oraclelinux-8",
"rockylinux-8",
"ubuntu-1804",
"ubuntu-2004",
"ubuntu-2204",
]
ONEDIR_DISTROS = [
"almalinux-8",
"almalinux-9",
"amazon-2",
"centos-7",
"centos-stream8",
"centos-stream9",
"debian-10",
"debian-11",
"oraclelinux-7",
"oraclelinux-8",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2204",
]
ONEDIR_RC_DISTROS = [
"almalinux-8",
"almalinux-9",
"amazon-2",
"centos-7",
"centos-stream8",
"centos-stream9",
"debian-10",
"debian-11",
"oraclelinux-7",
"oraclelinux-8",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2204",
]
BLACKLIST_3003 = [
"almalinux-9",
"arch",
"centos-stream9",
"debian-11",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"gentoo",
"gentoo-systemd",
"opensuse-15",
"opensuse-tumbleweed",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2204",
]
BLACKLIST_GIT_3003 = [
"almalinux-9",
"amazon-2",
"arch",
"centos-stream9",
"debian-10",
"debian-11",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"gentoo",
"gentoo-systemd",
"opensuse-15",
"opensuse-tumbleweed",
"rockylinux-8",
"rockylinux-9",
"ubuntu-2004",
"ubuntu-2110",
"ubuntu-2204",
]
BLACKLIST_3004 = [
"almalinux-9",
"arch",
"centos-stream9",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"gentoo",
"gentoo-systemd",
"opensuse-15",
"opensuse-tumbleweed",
"rockylinux-9",
]
BLACKLIST_3005 = [
"arch",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"gentoo",
"gentoo-systemd",
"opensuse-15",
@ -109,12 +173,35 @@ BLACKLIST_3004 = [
]
BLACKLIST_GIT_3004 = [
"almalinux-9",
"amazon-2",
"arch",
"centos-stream9",
"debian-10",
"debian-11",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"gentoo",
"gentoo-systemd",
"opensuse-15",
"opensuse-tumbleweed",
"ubuntu-2004",
"ubuntu-2110",
"ubuntu-2204",
"rockylinux-9",
]
BLACKLIST_GIT_3005 = [
"amazon-2",
"arch",
"debian-10",
"debian-11",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"gentoo",
"gentoo-systemd",
"opensuse-15",
@ -127,32 +214,88 @@ BLACKLIST_GIT_3004 = [
SALT_VERSIONS = [
"3003",
"3004",
"3005",
"master",
"latest",
"nightly",
"3006-0rc1",
"3006-0rc2",
]
ONEDIR_SALT_VERSIONS = [
"3005",
"latest",
"nightly",
]
ONEDIR_RC_SALT_VERSIONS = [
"3006-0rc1",
"3006-0rc2",
]
VERSION_DISPLAY_NAMES = {
"3003": "v3003",
"3004": "v3004",
"3005": "v3005",
"master": "Master",
"latest": "Latest",
"nightly": "Nightly",
}
STABLE_VERSION_BLACKLIST = []
STABLE_VERSION_BLACKLIST = [
"master",
"nightly",
"3006-0rc1",
"3006-0rc2",
]
LATEST_PKG_BLACKLIST = []
GIT_VERSION_BLACKLIST = [
"nightly",
"3006-0rc1",
"3006-0rc2",
]
# TODO: Revert the commit relating to this section, once the Git-based builds
# have been fixed for the distros listed below
#
# Apparent failure is:
#
# /usr/lib/python3.11/site-packages/setuptools/command/install.py:34:
# SetuptoolsDeprecationWarning: setup.py install is deprecated.
# Use build and pip and other standards-based tools.
#
GIT_DISTRO_BLACKLIST = [
"almalinux-8",
"centos-7",
"centos-stream8",
"fedora-37",
"fedora-38",
"opensuse-15",
"oraclelinux-7",
"oraclelinux-8",
"rockylinux-8",
]
LATEST_PKG_BLACKLIST = [
"almalinux-9",
"centos-stream9",
"rockylinux-9",
]
DISTRO_DISPLAY_NAMES = {
"almalinux-8": "AlmaLinux 8",
"almalinux-9": "AlmaLinux 9",
"amazon-2": "Amazon 2",
"arch": "Arch",
"centos-7": "CentOS 7",
"centos-stream8": "CentOS Stream 8",
"centos-stream9": "CentOS Stream 9",
"debian-10": "Debian 10",
"debian-11": "Debian 11",
"debian-9": "Debian 9",
"fedora-35": "Fedora 35",
"fedora-36": "Fedora 36",
"fedora-37": "Fedora 37",
"fedora-38": "Fedora 38",
"gentoo": "Gentoo",
"gentoo-systemd": "Gentoo (systemd)",
"opensuse-15": "Opensuse 15",
@ -160,7 +303,7 @@ DISTRO_DISPLAY_NAMES = {
"oraclelinux-7": "Oracle Linux 7",
"oraclelinux-8": "Oracle Linux 8",
"rockylinux-8": "Rocky Linux 8",
"ubuntu-1804": "Ubuntu 18.04",
"rockylinux-9": "Rocky Linux 9",
"ubuntu-2004": "Ubuntu 20.04",
"ubuntu-2204": "Ubuntu 22.04",
"macos-1015": "macOS 10.15",
@ -168,7 +311,7 @@ DISTRO_DISPLAY_NAMES = {
"macos-12": "macOS 12",
"freebsd-131": "FreeBSD 13.1",
"freebsd-123": "FreeBSD 12.3",
"openbsd-6": "OpenBSD 6",
"openbsd-7": "OpenBSD 7",
"windows-2019": "Windows 2019",
"windows-2022": "Windows 2022",
}
@ -223,7 +366,7 @@ def generate_test_jobs():
instances.append(salt_version)
continue
if distro == "openbsd-6":
if distro == "openbsd-7":
# Only test latest on OpenBSD 6
continue
@ -297,8 +440,7 @@ def generate_test_jobs():
for bootstrap_type in ("stable",):
if bootstrap_type == "stable":
if salt_version == "master":
# For the master branch there's no stable build
if salt_version in STABLE_VERSION_BLACKLIST:
continue
kitchen_target = f"{bootstrap_type}-{salt_version}"
@ -338,8 +480,7 @@ def generate_test_jobs():
for bootstrap_type in ("stable",):
if bootstrap_type == "stable":
if salt_version == "master":
# For the master branch there's no stable build
if salt_version in STABLE_VERSION_BLACKLIST:
continue
kitchen_target = f"{bootstrap_type}-{salt_version}"
@ -381,29 +522,45 @@ def generate_test_jobs():
instances.append(salt_version)
continue
for bootstrap_type in ("stable", "git"):
if bootstrap_type == "stable":
if salt_version == "master":
# For the master branch there's no stable build
for bootstrap_type in ("stable", "git", "onedir", "onedir-rc"):
if bootstrap_type == "onedir":
if salt_version not in ONEDIR_SALT_VERSIONS:
continue
if distro not in STABLE_DISTROS:
if distro not in ONEDIR_DISTROS:
continue
if bootstrap_type == "onedir-rc":
if salt_version not in ONEDIR_RC_SALT_VERSIONS:
continue
if distro not in ONEDIR_RC_DISTROS:
continue
if bootstrap_type == "stable":
if salt_version in STABLE_VERSION_BLACKLIST:
continue
if distro not in STABLE_DISTROS:
continue
if distro.startswith("fedora") and salt_version != "latest":
# Fedora does not keep old builds around
continue
if bootstrap_type == "git":
if salt_version in GIT_VERSION_BLACKLIST:
continue
if distro in GIT_DISTRO_BLACKLIST:
continue
BLACKLIST = {
"3003": BLACKLIST_3003,
"3004": BLACKLIST_3004,
"3005": BLACKLIST_3005,
}
if bootstrap_type == "git":
BLACKLIST = {
"3003": BLACKLIST_GIT_3003,
"3004": BLACKLIST_GIT_3004,
"3005": BLACKLIST_GIT_3005,
}
# .0 versions are a virtual version for pinning to the first
@ -413,7 +570,7 @@ def generate_test_jobs():
continue
if (
salt_version in ("3003", "3004")
salt_version in ("3003", "3004", "3005")
and distro in BLACKLIST[salt_version]
):
continue

View file

@ -26,9 +26,10 @@ on:
jobs:
Test:
name: ${{ matrix.instance }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
timeout-minutes: ${{ inputs.timeout }}
strategy:
max-parallel: 2
fail-fast: false
matrix:
instance: ${{ fromJSON(inputs.instances) }}

View file

@ -70,10 +70,14 @@ jobs:
$password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force
New-LocalUser $env:machine_user -Password $password
Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user
Get-LocalUser
Get-LocalGroupMember -Group "Administrators"
- name: Set up WinRM
run: |
Set-WSManQuickConfig -Force
winrm set winrm/config/service '@{AllowUnencrypted="True"}'
env
- name: Set up Python 3.9
uses: actions/setup-python@v4
@ -91,6 +95,7 @@ jobs:
- name: Test Bootstrap
run: |
env
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
- name: Destroy Test Instance

View file

@ -1,3 +1,36 @@
# v2023.04.06
## What's Changed
- Fix missing functions for post-installation on EL clones by @ggiesen in https://github.com/saltstack/salt-bootstrap/pull/1877
- Support for dotZero in version beginning in 3006 by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1879
- Update gemfile by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1882
- update openbsd to 7, seems like 6 (6.9) is no longer available. by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1881
- Adding tests for installing onedir packages by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1880
- Removing EPEL, which is no longer needed. by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1884
- Add support for the -R flag on macOS. by @pjcreath in https://github.com/saltstack/salt-bootstrap/pull/1871
- feat: add `onedir nightly` support by @myii in https://github.com/saltstack/salt-bootstrap/pull/1885
- ci: add `fedora-37` & `fedora-38` by @myii in https://github.com/saltstack/salt-bootstrap/pull/1840
- Debian ARM Fix by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1887
- Added Pop!\_OS as a Ubuntu derivative by @shombando in https://github.com/saltstack/salt-bootstrap/pull/1888
- Don't attempt to stable install on Red Hat onedir only systems by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1889
- \[docs\] Improve Windows readme instructions and links in script by @dafyddj in https://github.com/saltstack/salt-bootstrap/pull/1897
- Adding newer versions of CentOS Stream and AlmaLinux by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1890
- Add support for KDE neon based on Ubuntu 22.04 by @digitalkram in https://github.com/saltstack/salt-bootstrap/pull/1894
- Removing Ubuntu 16.04 by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1886
- Adding rockylinux 9 by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1899
- Bootstrap fixes for 3006 by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1900
- Adding 3006.0rc1 to Github actions. by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1901
- Adding 3006.0rc2 to bootstrap tests. by @garethgreenaway in https://github.com/saltstack/salt-bootstrap/pull/1902
## New Contributors
- @ggiesen made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1877
- @shombando made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1888
- @digitalkram made their first contribution in https://github.com/saltstack/salt-bootstrap/pull/1894
**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2022.10.04...v2023.04.06
# v2022.10.04
## What's Changed

View file

@ -4,7 +4,7 @@ source "https://rubygems.org"
gem 'test-kitchen', '>= 3.2.2'
gem 'kitchen-salt', '>= 0.7.2'
gem 'kitchen-docker', git: 'https://github.com/test-kitchen/kitchen-docker.git'
gem 'kitchen-docker', :git => 'https://github.com/test-kitchen/kitchen-docker.git', :branch => 'main'
group :vagrant do
gem 'kitchen-vagrant'

View file

@ -32,6 +32,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file.
The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is:
- 2022.10.04: ``d0686c2daeed18bb726e58eef75a69afe9ee56a1a23b2c32cd4e87d6005638e2``
- 2022.08.13: ``af922699c1a2bb3b89b6dac04397389999df1b3416b8d0b5c93766412f14c95c``
- 2022.08.12: ``b46f018bbf02f45c6096ab96e9261a9adb3a78ff65092c3976f32ffde909afcb``
- 2022.05.19: ``e92e1df6930285cf23eda188bee3cfa3dd6c577b4fb7aa91b29213ad820199b1``
@ -192,7 +193,7 @@ To view the latest options and descriptions for ``salt-bootstrap``, use ``-h`` a
-q Quiet salt installation from git (setup.py install -q)
-x Changes the Python version used to install Salt.
For CentOS 6 git installations python2.7 is supported.
Fedora git installation, CentOS 7, Debian 9, Ubuntu 16.04 and 18.04 support python3.
Fedora git installation, CentOS 7, Ubuntu 18.04 support python3.
-y Installs a different python version on host. Currently this has only been
tested with CentOS 6 and is considered experimental. This will install the
ius repo on the box if disable repo is false. This must be used in conjunction
@ -396,12 +397,16 @@ Using ``PowerShell`` to install latest stable version:
.. code:: console
New-Item -ItemType Directory -Force -Path C:\Temp
Invoke-WebRequest -Uri https://winbootstrap.saltproject.io -OutFile C:\Temp\bootstrap-salt.ps1
Invoke-WebRequest -Uri https://winbootstrap.saltproject.io -OutFile $env:TEMP\bootstrap-salt.ps1
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
C:\Temp\bootstrap-salt.ps1
& $env:TEMP\bootstrap-salt.ps1
Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser
Display information about the install script parameters:
.. code:: console
help $env:TEMP\bootstrap-salt.ps1 -Detailed
Using ``cygwin`` to install latest stable version:
@ -485,9 +490,8 @@ in combination with the ``git`` installation method.
Ubuntu and derivatives
~~~~~~~~~~~~~~~~~~~~~~
- KDE neon (based on Ubuntu 18.04)
- KDE neon (based on Ubuntu 18.04/20.04/22.04)
- Linux Mint 17/18
- Ubuntu 14.04/16.04/18.04 and subsequent non-LTS releases (see below)
Ubuntu Best Effort Support: Non-LTS Releases
********************************************
@ -562,12 +566,9 @@ Some distributions support installing Salt to use Python 3 instead of Python 2.
this offering, while limited, is as follows:
- CentOS 7
- Centos 8
- Debian 9
- Debian 10
- Debian 11
- Fedora (only git installations)
- Ubuntu 16.04
- Ubuntu 18.04
- Ubuntu 20.04

View file

@ -65,10 +65,10 @@
version. The architecture is dynamically determined by the script.
.LINK
Bootstrap GitHub Project (script home) - https://github.com/saltstack/salt-windows-bootstrap
Original Vagrant Provisioner Project -https://github.com/saltstack/salty-vagrant
Salt Bootstrap GitHub Project (script home) - https://github.com/saltstack/salt-bootstrap
Original Vagrant Provisioner Project - https://github.com/saltstack/salty-vagrant
Vagrant Project (utilizes this script) - https://github.com/mitchellh/vagrant
SaltStack Download Location - https://repo.saltproject.io/windows/
Salt Download Location - https://repo.saltproject.io/windows/
#>
#===============================================================================

View file

@ -23,7 +23,7 @@
#======================================================================================================================
set -o nounset # Treat unset variables as an error
__ScriptVersion="2022.10.04"
__ScriptVersion="2023.04.06"
__ScriptName="bootstrap-salt.sh"
__ScriptFullName="$0"
@ -269,6 +269,7 @@ _CUSTOM_MINION_CONFIG="null"
_QUIET_GIT_INSTALLATION=$BS_FALSE
_REPO_URL="repo.saltproject.io"
_ONEDIR_DIR="salt"
_ONEDIR_NIGHTLY_DIR="salt-dev/${_ONEDIR_DIR}"
_PY_EXE="python3"
_INSTALL_PY="$BS_FALSE"
_TORNADO_MAX_PY3_VERSION="5.0"
@ -276,6 +277,7 @@ _POST_NEON_INSTALL=$BS_FALSE
_MINIMUM_PIP_VERSION="9.0.1"
_MINIMUM_SETUPTOOLS_VERSION="9.1"
_POST_NEON_PIP_INSTALL_ARGS="--prefix=/usr"
_PIP_DOWNLOAD_ARGS=""
# Defaults for install arguments
ITYPE="stable"
@ -388,7 +390,7 @@ __usage() {
points to a repository that mirrors Salt packages located at
repo.saltproject.io. The option passed with -R replaces the
"repo.saltproject.io". If -R is passed, -r is also set. Currently only
works on CentOS/RHEL and Debian based distributions.
works on CentOS/RHEL and Debian based distributions and macOS.
-s Sleep time used when waiting for daemons to start, restart and when
checking for the services running. Default: ${__DEFAULT_SLEEP}
-S Also install salt-syndic
@ -404,7 +406,7 @@ __usage() {
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, Debian 9, Ubuntu 16.04 and 18.04 support python3.
Fedora git installation, CentOS 7, Ubuntu 18.04 support python3.
-X Do not start daemons after installation
-y Installs a different python version on host. Currently this has only been
tested with CentOS 6 and is considered experimental. This will install the
@ -635,16 +637,19 @@ elif [ "$ITYPE" = "onedir" ]; then
if [ "$#" -eq 0 ];then
ONEDIR_REV="latest"
else
if [ "$(echo "$1" | grep -E '^(latest|3005)$')" != "" ]; then
if [ "$(echo "$1" | grep -E '^(nightly|latest|3005)$')" != "" ]; then
ONEDIR_REV="$1"
shift
elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then
# Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix
ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/')
elif [ "$(echo "$1" | grep -E '^(3005(\.[0-9]*)?)')" != "" ]; then
# Handle the 3005.0 version as 3005 archive (pin to minor) and strip the fake ".0" suffix
ONEDIR_REV=$(echo "$1" | sed -E 's/^(3005)\.0$/\1/')
ONEDIR_REV="minor/$ONEDIR_REV"
shift
elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}(\.[0-9]*)?)')" != "" ]; then
ONEDIR_REV="minor/$1"
shift
else
echo "Unknown stable version: $1 (valid: 3005, latest.)"
echo "Unknown onedir version: $1 (valid: 3005, latest, nightly.)"
exit 1
fi
fi
@ -667,8 +672,13 @@ elif [ "$ITYPE" = "onedir_rc" ]; then
#ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/')
ONEDIR_REV="minor/$1"
shift
elif [ "$(echo "$1" | grep -E '^([3-9][0-9]{3}\.[0-9]?rc[0-9]$)')" != "" ]; then
# Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix
#ONEDIR_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/')
ONEDIR_REV="minor/$1"
shift
else
echo "Unknown stable version: $1 (valid: 3005-1, latest.)"
echo "Unknown onedir_rc version: $1 (valid: 3005-1, latest.)"
exit 1
fi
fi
@ -1365,7 +1375,7 @@ __gather_system_info() {
#----------------------------------------------------------------------------------------------------------------------
# shellcheck disable=SC2034
__ubuntu_derivatives_translation() {
UBUNTU_DERIVATIVES="(trisquel|linuxmint|linaro|elementary_os|neon)"
UBUNTU_DERIVATIVES="(trisquel|linuxmint|linaro|elementary_os|neon|pop)"
# Mappings
trisquel_6_ubuntu_base="12.04"
linuxmint_13_ubuntu_base="12.04"
@ -1378,6 +1388,8 @@ __ubuntu_derivatives_translation() {
neon_16_ubuntu_base="16.04"
neon_18_ubuntu_base="18.04"
neon_20_ubuntu_base="20.04"
neon_22_ubuntu_base="22.04"
pop_22_ubuntu_base="22.04"
# Translate Ubuntu derivatives to their base Ubuntu version
match=$(echo "$DISTRO_NAME_L" | grep -E ${UBUNTU_DERIVATIVES})
@ -1437,9 +1449,13 @@ __check_dpkg_architecture() {
if [ "$_CUSTOM_REPO_URL" != "null" ]; then
warn_msg="Support for arm64 is experimental, make sure the custom repository used has the expected structure and contents."
else
# Saltstack official repository does not yet have arm64 metadata,
# use arm64 repositories on arm64, since all pkgs are arch-independent
__REPO_ARCH="arm64"
# Saltstack official repository has arm64 metadata beginning with Debian 11,
# use amd64 repositories on arm64 for anything older, since all pkgs are arch-independent
if [ "$DISTRO_NAME_L" = "debian" ] || [ "$DISTRO_MAJOR_VERSION" -lt 11 ]; then
__REPO_ARCH="amd64"
else
__REPO_ARCH="arm64"
fi
__REPO_ARCH_DEB="deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=$__REPO_ARCH]"
warn_msg="Support for arm64 packages is experimental and might rely on architecture-independent packages from the amd64 repository."
fi
@ -1819,6 +1835,12 @@ else
fi
fi
# Red Hat variants after 9.x not supported by stable type
if [ "$(echo "${DISTRO_NAME_L}" | grep -E '(centos|red_hat|scientific|almalinux|rocky)')" != "" ] && [ "$ITYPE" = "stable" ] && [ "$DISTRO_MAJOR_VERSION" -ge 9 ]; then
echoerror "${DISTRO_NAME} ${DISTRO_VERSION} not supported by stable type, use type onedir."
exit 1
fi
# For Ubuntu derivatives, pretend to be their Ubuntu base version
__ubuntu_derivatives_translation
@ -2095,20 +2117,13 @@ __rpm_import_gpg() {
#----------------------------------------------------------------------------------------------------------------------
__yum_install_noinput() {
ENABLE_EPEL_CMD=""
# Skip Amazon Linux for the first round, since EPEL is no longer required.
# See issue #724
if [ $_DISABLE_REPOS -eq $BS_FALSE ] && [ "$DISTRO_NAME_L" != "amazon_linux_ami" ]; then
ENABLE_EPEL_CMD="--enablerepo=${_EPEL_REPO}"
fi
if [ "$DISTRO_NAME_L" = "oracle_linux" ]; then
# We need to install one package at a time because --enablerepo=X disables ALL OTHER REPOS!!!!
for package in "${@}"; do
yum -y install "${package}" || yum -y install "${package}" ${ENABLE_EPEL_CMD} || return $?
yum -y install "${package}" || yum -y install "${package}" || return $?
done
else
yum -y install "${@}" ${ENABLE_EPEL_CMD} || return $?
yum -y install "${@}" || return $?
fi
} # ---------- end of function __yum_install_noinput ----------
@ -2815,15 +2830,15 @@ EOM
fi
echodebug "Running '${_pip_cmd} install wheel ${_setuptools_dep}'"
${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} wheel "${_setuptools_dep}"
${_pip_cmd} install --upgrade ${_POST_NEON_PIP_INSTALL_ARGS} wheel "${_setuptools_dep}"
echoinfo "Installing salt using ${_py_exe}"
cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1
mkdir /tmp/git/deps
echoinfo "Downloading Salt Dependencies from PyPi"
echodebug "Running '${_pip_cmd} download -d /tmp/git/deps .'"
${_pip_cmd} download -d /tmp/git/deps . || (echo "Failed to download salt dependencies" && return 1)
echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} .'"
${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} . || (echo "Failed to download salt dependencies" && return 1)
echoinfo "Installing Downloaded Salt Dependencies"
echodebug "Running '${_pip_cmd} install --ignore-installed ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/*'"
@ -3057,9 +3072,16 @@ __install_saltstack_ubuntu_onedir_repository() {
# SaltStack's stable Ubuntu repository:
SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/${ONEDIR_REV}/"
if [ "${ONEDIR_REV}" = "nightly" ] ; then
SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/"
fi
echo "$__REPO_ARCH_DEB $SALTSTACK_UBUNTU_URL $UBUNTU_CODENAME main" > /etc/apt/sources.list.d/salt.list
__apt_key_fetch "${SALTSTACK_UBUNTU_URL}salt-archive-keyring.gpg" || return 1
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005|nightly)')" != "" ]; then
__apt_key_fetch "${SALTSTACK_UBUNTU_URL}salt-archive-keyring.gpg" || return 1
else
__apt_key_fetch "${SALTSTACK_UBUNTU_URL}SALT-PROJECT-GPG-PUBKEY-2023.gpg" || return 1
fi
__wait_for_apt apt-get update || return 1
}
@ -3318,7 +3340,15 @@ install_ubuntu_git() {
_POST_NEON_PIP_INSTALL_ARGS=""
__install_salt_from_repo_post_neon "${_PY_EXE}" || return 1
cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1
sed -i 's:/usr/bin:/usr/local/bin:g' pkg/*.service
# Account for new path for services files in later releases
if [ -d "pkg/common" ]; then
_SERVICE_DIR="pkg/common"
else
_SERVICE_DIR="pkg"
fi
sed -i 's:/usr/bin:/usr/local/bin:g' ${_SERVICE_DIR}/*.service
return 0
fi
@ -3390,8 +3420,15 @@ install_ubuntu_git_post() {
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
# Account for new path for services files in later releases
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/common"
else
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg"
fi
if [ -f /bin/systemctl ] && [ "$DISTRO_MAJOR_VERSION" -ge 16 ]; then
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
# Skip salt-api since the service should be opt-in and not necessarily started on boot
[ $fname = "api" ] && continue
@ -3406,8 +3443,8 @@ install_ubuntu_git_post() {
if [ ! -f $_upstart_conf ]; then
# upstart does not know about our service, let's copy the proper file
echowarn "Upstart does not appear to know about salt-$fname"
echodebug "Copying ${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-$fname.upstart to $_upstart_conf"
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.upstart" "$_upstart_conf"
echodebug "Copying ${_SERVICE_DIR}/salt-$fname.upstart to $_upstart_conf"
__copyfile "${_SERVICE_DIR}/salt-${fname}.upstart" "$_upstart_conf"
# Set service to know about virtualenv
if [ "${_VIRTUALENV_DIR}" != "null" ]; then
echo "SALT_USE_VIRTUALENV=${_VIRTUALENV_DIR}" > /etc/default/salt-${fname}
@ -3579,9 +3616,16 @@ __install_saltstack_debian_onedir_repository() {
# amd64 is just a part of repository URI, 32-bit pkgs are hosted under the same location
SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/${ONEDIR_REV}/"
if [ "${ONEDIR_REV}" = "nightly" ] ; then
SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/debian/${DEBIAN_RELEASE}/${__REPO_ARCH}/"
fi
echo "$__REPO_ARCH_DEB $SALTSTACK_DEBIAN_URL $DEBIAN_CODENAME main" > "/etc/apt/sources.list.d/salt.list"
__apt_key_fetch "${SALTSTACK_DEBIAN_URL}salt-archive-keyring.gpg" || return 1
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005|nightly)')" != "" ]; then
__apt_key_fetch "${SALTSTACK_DEBIAN_URL}salt-archive-keyring.gpg" || return 1
else
__apt_key_fetch "${SALTSTACK_DEBIAN_URL}SALT-PROJECT-GPG-PUBKEY-2023.gpg" || return 1
fi
__wait_for_apt apt-get update || return 1
}
@ -3940,7 +3984,15 @@ install_debian_git() {
_POST_NEON_PIP_INSTALL_ARGS=""
__install_salt_from_repo_post_neon "${_PY_EXE}" || return 1
cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1
sed -i 's:/usr/bin:/usr/local/bin:g' pkg/*.service
# Account for new path for services files in later releases
if [ -d "pkg/common" ]; then
_SERVICE_DIR="pkg/common"
else
_SERVICE_DIR="pkg"
fi
sed -i 's:/usr/bin:/usr/local/bin:g' ${_SERVICE_DIR}/*.service
return 0
fi
@ -3999,16 +4051,23 @@ install_debian_git_post() {
[ "$fname" = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
[ "$fname" = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
# Account for new path for services files in later releases
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/common"
else
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg"
fi
# Configure SystemD for Debian 8 "Jessie" and later
if [ -f /bin/systemctl ]; then
if [ ! -f /lib/systemd/system/salt-${fname}.service ] || \
{ [ -f /lib/systemd/system/salt-${fname}.service ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]; }; then
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.service" ]; then
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.service" /lib/systemd/system
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.environment" "/etc/default/salt-${fname}"
if [ -f "${_SERVICE_DIR}/salt-${fname}.service" ]; then
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" /lib/systemd/system
__copyfile "${_SERVICE_DIR}/salt-${fname}.environment" "/etc/default/salt-${fname}"
else
# workaround before adding Debian-specific unit files to the Salt main repo
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.service" /lib/systemd/system
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" /lib/systemd/system
sed -i -e '/^Type/ s/notify/simple/' /lib/systemd/system/salt-${fname}.service
fi
fi
@ -4308,12 +4367,18 @@ install_fedora_git_post() {
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
# Account for new path for services files in later releases
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/common"
else
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm"
fi
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
# Salt executables are located under `/usr/local/bin/` on Fedora 36+
if [ "${DISTRO_VERSION}" -ge 36 ]; then
sed -i -e 's:/usr/bin/:/usr/local/bin/:g' /lib/systemd/system/salt-*.service
fi
#if [ "${DISTRO_VERSION}" -ge 36 ]; then
# sed -i -e 's:/usr/bin/:/usr/local/bin/:g' /lib/systemd/system/salt-*.service
#fi
# Skip salt-api since the service should be opt-in and not necessarily started on boot
[ $fname = "api" ] && continue
@ -4370,30 +4435,6 @@ install_fedora_check_services() {
#
# CentOS Install Functions
#
__install_epel_repository() {
if [ ${_EPEL_REPOS_INSTALLED} -eq $BS_TRUE ]; then
return 0
fi
# Check if epel repo is already enabled and flag it accordingly
if yum repolist | grep -q "^[!]\\?${_EPEL_REPO}/"; then
_EPEL_REPOS_INSTALLED=$BS_TRUE
return 0
fi
# Download latest 'epel-next-release' package for the distro version directly
epel_next_repo_url="${HTTP_VAL}://dl.fedoraproject.org/pub/epel/epel-next-release-latest-${DISTRO_MAJOR_VERSION}.noarch.rpm"
# Download latest 'epel-release' package for the distro version directly
epel_repo_url="${HTTP_VAL}://dl.fedoraproject.org/pub/epel/epel-release-latest-${DISTRO_MAJOR_VERSION}.noarch.rpm"
yum -y install "${epel_next_repo_url}" "${epel_repo_url}"
_EPEL_REPOS_INSTALLED=$BS_TRUE
return 0
}
__install_saltstack_rhel_repository() {
if [ "$ITYPE" = "stable" ]; then
repo_rev="$STABLE_REV"
@ -4465,10 +4506,17 @@ __install_saltstack_rhel_onedir_repository() {
# Avoid using '$releasever' variable for yum.
# Instead, this should work correctly on all RHEL variants.
base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${ONEDIR_REV}/"
if [ "${DISTRO_MAJOR_VERSION}" -eq 9 ]; then
gpg_key="SALTSTACK-GPG-KEY2.pub"
if [ "${ONEDIR_REV}" = "nightly" ] ; then
base_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/"
fi
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005|nightly)')" != "" ]; then
if [ "${DISTRO_MAJOR_VERSION}" -eq 9 ]; then
gpg_key="SALTSTACK-GPG-KEY2.pub"
else
gpg_key="SALTSTACK-GPG-KEY.pub"
fi
else
gpg_key="SALTSTACK-GPG-KEY.pub"
gpg_key="SALT-PROJECT-GPG-PUBKEY-2023.pub"
fi
gpg_key_urls=""
@ -4491,6 +4539,9 @@ enabled_metadata=1
_eof
fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${ONEDIR_REV}/"
if [ "${ONEDIR_REV}" = "nightly" ] ; then
fetch_url="${HTTP_VAL}://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/"
fi
for key in $gpg_key; do
__rpm_import_gpg "${fetch_url}${key}" || return 1
done
@ -4516,7 +4567,6 @@ install_centos_stable_deps() {
fi
if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ]; then
__install_epel_repository || return 1
__install_saltstack_rhel_repository || return 1
fi
@ -4558,6 +4608,8 @@ install_centos_stable_deps() {
fi
fi
__PACKAGES="${__PACKAGES} procps"
# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
@ -4590,6 +4642,13 @@ install_centos_stable() {
# shellcheck disable=SC2086
__yum_install_noinput ${__PACKAGES} || return 1
# Workaround for 3.11 broken on CentOS Stream 8.x
# Re-install Python 3.6
_py_version=$(${_PY_EXE} -c "import sys; print('{0}.{1}'.format(*sys.version_info))")
if [ "$DISTRO_MAJOR_VERSION" -eq 8 ] && [ "${_py_version}" = "3.11" ]; then
__yum_install_noinput python3
fi
return 0
}
@ -4625,7 +4684,15 @@ install_centos_stable_post() {
}
install_centos_git_deps() {
install_centos_stable_deps || return 1
# First try stable deps then fall back to onedir deps if that one fails
# if we're installing on a Red Hat based host that doesn't have the classic
# package repos available.
# 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
if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then
__yum_install_noinput ca-certificates || return 1
@ -4785,10 +4852,16 @@ install_centos_git_post() {
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
# Account for new path for services files in later releases
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
_SERVICE_FILE="${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service"
else
_SERVICE_FILE="${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service"
fi
if [ -f /bin/systemctl ]; then
if [ ! -f "/usr/lib/systemd/system/salt-${fname}.service" ] || \
{ [ -f "/usr/lib/systemd/system/salt-${fname}.service" ] && [ "$_FORCE_OVERWRITE" -eq $BS_TRUE ]; }; then
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" /usr/lib/systemd/system
__copyfile "${_SERVICE_FILE}" /usr/lib/systemd/system
fi
SYSTEMD_RELOAD=$BS_TRUE
@ -4820,7 +4893,6 @@ install_centos_onedir_deps() {
fi
if [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ]; then
__install_epel_repository || return 1
__install_saltstack_rhel_onedir_repository || return 1
fi
@ -5344,6 +5416,11 @@ install_oracle_linux_git_post() {
return 0
}
install_oracle_linux_onedir_post() {
install_centos_onedir_post || return 1
return 0
}
install_oracle_linux_testing_post() {
install_centos_testing_post || return 1
return 0
@ -5417,6 +5494,11 @@ install_almalinux_git_post() {
return 0
}
install_almalinux_onedir_post() {
install_centos_onedir_post || return 1
return 0
}
install_almalinux_testing_post() {
install_centos_testing_post || return 1
return 0
@ -5490,6 +5572,11 @@ install_rocky_linux_git_post() {
return 0
}
install_rocky_linux_onedir_post() {
install_centos_onedir_post || return 1
return 0
}
install_rocky_linux_testing_post() {
install_centos_testing_post || return 1
return 0
@ -5563,6 +5650,11 @@ install_scientific_linux_git_post() {
return 0
}
install_scientific_linux_onedir_post() {
install_centos_onedir_post || return 1
return 0
}
install_scientific_linux_testing_post() {
install_centos_testing_post || return 1
return 0
@ -6206,9 +6298,17 @@ install_amazon_linux_ami_2_onedir_deps() {
fi
base_url="$HTTP_VAL://${_REPO_URL}/${_ONEDIR_DIR}/${__PY_VERSION_REPO}/amazon/2/\$basearch/$repo_rev/"
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub,${base_url}base/RPM-GPG-KEY-CentOS-7"
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub"
if [ "${ONEDIR_REV}" = "nightly" ] ; then
base_url="$HTTP_VAL://${_REPO_URL}/${_ONEDIR_NIGHTLY_DIR}/${__PY_VERSION_REPO}/amazon/2/\$basearch/"
fi
if [ "$(echo "${ONEDIR_REV}" | grep -E '(3004|3005|nightly)')" != "" ]; then
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub,${base_url}base/RPM-GPG-KEY-CentOS-7"
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
gpg_key="${base_url}SALTSTACK-GPG-KEY.pub"
fi
else
gpg_key="${base_url}SALT-PROJECT-GPG-PUBKEY-2023.pub"
fi
# This should prob be refactored to use __install_saltstack_rhel_repository()
@ -6445,6 +6545,8 @@ install_arch_linux_stable() {
install_arch_linux_git() {
_POST_NEON_PIP_INSTALL_ARGS="${_POST_NEON_PIP_INSTALL_ARGS} --use-pep517"
_PIP_DOWNLOAD_ARGS="${_PIP_DOWNLOAD_ARGS} --use-pep517"
if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then
__install_salt_from_repo_post_neon "${_PY_EXE}" || return 1
return 0
@ -6502,8 +6604,15 @@ install_arch_linux_git_post() {
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
# Account for new path for services files in later releases
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/common"
else
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm"
fi
if [ -f /usr/bin/systemctl ]; then
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
# Skip salt-api since the service should be opt-in and not necessarily started on boot
[ $fname = "api" ] && continue
@ -7233,7 +7342,7 @@ install_opensuse_git_deps() {
fi
# Check for Tumbleweed
elif [ "${DISTRO_MAJOR_VERSION}" -ge 20210101 ]; then
__PACKAGES="python3-pip gcc-c++ python310-pyzmq-devel"
__PACKAGES="python3-pip gcc-c++ python3-pyzmq-devel"
else
__PACKAGES="python-pip python-setuptools gcc"
fi
@ -7326,10 +7435,17 @@ install_opensuse_git_post() {
use_usr_lib=$BS_TRUE
fi
if [ "${use_usr_lib}" -eq $BS_TRUE ]; then
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.service" "/usr/lib/systemd/system/salt-${fname}.service"
# Account for new path for services files in later releases
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/common"
else
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/"
fi
if [ "${use_usr_lib}" -eq $BS_TRUE ]; then
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" "/usr/lib/systemd/system/salt-${fname}.service"
else
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
fi
continue
@ -7949,6 +8065,9 @@ install_gentoo_git_deps() {
__emerge ${GENTOO_GIT_PACKAGES} || return 1
fi
echoinfo "Running emerge -v1 setuptools"
__emerge -v1 setuptools || return 1
__git_clone_and_checkout || return 1
__gentoo_post_dep || return 1
}
@ -8031,8 +8150,15 @@ install_gentoo_git_post() {
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
# Account for new path for services files in later releases
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg/common"
else
_SERVICE_DIR="${_SALT_GIT_CHECKOUT_DIR}/pkg"
fi
if __check_command_exists systemctl ; then
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
__copyfile "${_SERVICE_DIR}/salt-${fname}.service" "/lib/systemd/system/salt-${fname}.service"
# Skip salt-api since the service should be opt-in and not necessarily started on boot
[ $fname = "api" ] && continue
@ -8229,7 +8355,7 @@ __macosx_get_packagesite() {
fi
PKG="salt-${STABLE_REV}-${__PY_VERSION_REPO}-${DARWIN_ARCH}.pkg"
SALTPKGCONFURL="https://repo.saltproject.io/osx/${PKG}"
SALTPKGCONFURL="https://${_REPO_URL}/osx/${PKG}"
}
# Using a separate conf step to head for idempotent install...
@ -8554,7 +8680,11 @@ daemons_running_onedir() {
[ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
salt_path="/opt/saltstack/salt/run/run ${fname}"
if [ -f "/opt/saltstack/salt/run/run" ]; then
salt_path="/opt/saltstack/salt/run/run ${fname}"
else
salt_path="salt-${fname}"
fi
process_running=$(pgrep -f "${salt_path}")
if [ "${process_running}" = "" ]; then
echoerror "${salt_path} was not found running"

View file

@ -33,12 +33,16 @@ platforms:
- name: freebsd-123
driver:
box: bento/freebsd-12.3
- name: openbsd-6
- name: openbsd-7
driver:
box: generic/openbsd6
box: generic/openbsd7
ssh:
shell: /bin/ksh
synced_folders: []
transport:
name: ssh
username: vagrant
password: vagrant
provisioner:
init_environment: |
echo 'auto_accept: true' > /tmp/auto-accept-keys.conf

View file

@ -25,6 +25,9 @@ suites:
- name: stable-3004
provisioner:
salt_version: 3004.1
- name: stable-3005
provisioner:
salt_version: 3005.1
- name: latest
provisioner:
salt_version: latest

View file

@ -23,6 +23,9 @@ suites:
- name: stable-3004
provisioner:
salt_version: 3004.1-1
- name: stable-3005
provisioner:
salt_version: 3005.1-1
- name: latest
provisioner:
salt_version: latest

View file

@ -29,6 +29,12 @@ provisioner:
sh -c 't=$(shuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t'
platforms:
- name: almalinux-9
driver:
provision_command:
- dnf -y install crypto-policies-scripts procps-ng
- update-crypto-policies --set DEFAULT:SHA1
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
- name: almalinux-8
- name: amazon-2
driver:
@ -36,6 +42,12 @@ platforms:
platform: rhel
provision_command:
- yum -y install procps-ng
- name: amazon-2023
driver:
image: amazonlinux:2023
platform: fedora
provision_command:
- yum -y install procps-ng
- name: arch
driver:
image: archlinux/archlinux
@ -43,6 +55,14 @@ platforms:
- pacman -Syu --noconfirm --needed systemd grep awk procps which
- systemctl enable sshd
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
- name: centos-stream9
driver:
platform: centosstream
image: quay.io/centos/centos:stream9
provision_command:
- dnf -y install crypto-policies-scripts procps-ng
- update-crypto-policies --set DEFAULT:SHA1
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
- name: centos-stream8
driver:
image: quay.io/centos/centos:stream8
@ -65,6 +85,12 @@ platforms:
- name: fedora-36
driver:
provision_command: *fedora_provision_command
- name: fedora-37
driver:
provision_command: *fedora_provision_command
- name: fedora-38
driver:
provision_command: *fedora_provision_command
- name: gentoo
driver:
image: gentoo/stage3:latest
@ -94,6 +120,15 @@ platforms:
- *opensuse_provision_command_02
- *opensuse_provision_command_03
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
- name: rockylinux-9
driver:
platform: centosstream
run_command: /usr/lib/systemd/systemd
provision_command:
- dnf -y install crypto-policies-scripts procps-ng
- update-crypto-policies --set DEFAULT:SHA1
- echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config
- name: rockylinux-8
- name: oraclelinux-8
- name: oraclelinux-7
- name: rockylinux-8
@ -131,6 +166,20 @@ suites:
- freebsd-131
- freebsd-123
- openbsd-6
- name: git-3005
provisioner:
salt_version: 3005
salt_bootstrap_options: -x python3 -MPfq git %s
excludes:
- opensuse-15
- opensuse-tumbleweed
- debian-11
- arch
- gentoo
- gentoo-systemd
- freebsd-131
- freebsd-123
- openbsd-6
- name: stable-3003-0
provisioner:
salt_version: 3003
@ -186,6 +235,17 @@ suites:
- freebsd-131
- freebsd-123
- openbsd-6
- name: stable-3005
provisioner:
salt_version: 3005
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
@ -196,6 +256,49 @@ suites:
salt_version: latest
salt_bootstrap_options: -MP stable %s
- name: onedir-nightly
provisioner:
salt_version: nightly
salt_bootstrap_options: -MP onedir %s
- name: onedir-latest
provisioner:
salt_version: latest
salt_bootstrap_options: -MP onedir %s
- name: onedir-3005
provisioner:
salt_version: 3005
salt_bootstrap_options: -MP onedir %s
- name: onedir-rc-3006-0rc2
provisioner:
salt_version: 3006.0rc2
salt_bootstrap_options: -R staging.repo.saltproject.io -MP onedir_rc %s
excludes:
- arch
- freebsd-131
- freebsd-123
- gentoo
- openbsd-6
- opensuse-15
- opensuse-tumbleweed
- ubuntu-1804
- name: onedir-rc-3006-0rc1
provisioner:
salt_version: 3006.0rc1
salt_bootstrap_options: -R staging.repo.saltproject.io -MP onedir_rc %s
excludes:
- arch
- freebsd-131
- freebsd-123
- gentoo
- openbsd-6
- opensuse-15
- opensuse-tumbleweed
- ubuntu-1804
verifier:
name: shell
remote_exec: false

View file

@ -21,10 +21,11 @@ def host():
"KITCHEN_INSTANCE"
):
if "windows" in os.environ.get("KITCHEN_INSTANCE"):
_url = "winrm://{KITCHEN_USERNAME}:{KITCHEN_PASSWORD}@{KITCHEN_HOSTNAME}:{KITCHEN_PORT}".format(
**os.environ
)
return testinfra.get_host(
"winrm://{KITCHEN_USERNAME}:{KITCHEN_PASSWORD}@{KITCHEN_HOSTNAME}:{KITCHEN_PORT}".format(
**os.environ
),
_url,
no_ssl=True,
)
return testinfra.get_host(
@ -46,6 +47,6 @@ def target_python_version():
@pytest.fixture(scope="session")
def target_salt_version():
target_salt = os.environ["KITCHEN_SUITE"].split("-", 2)[-1].replace("-", ".")
if target_salt in ("latest", "master"):
if target_salt in ("latest", "master", "nightly"):
pytest.skip("Don't have a specific salt version to test against")
return target_salt

View file

@ -1,4 +1,5 @@
pytest-testinfra
paramiko
requests-ntlm==1.1.0; sys.platform == 'win32'
pywinrm; sys.platform == 'win32'
six>=1.10.0