From 126d3c3cde1434f4f4b3b78a4995a05502cdb09b Mon Sep 17 00:00:00 2001 From: ptitdoc Date: Fri, 7 Jan 2022 10:53:57 +0100 Subject: [PATCH 01/19] Enable Kali 2021 --- bootstrap-salt.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 6a9168a..874547d 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1488,6 +1488,7 @@ __debian_derivatives_translation() { devuan_1_debian_base="8.0" devuan_2_debian_base="9.0" kali_1_debian_base="7.0" + kali_2021_debian_base="10.0" linuxmint_1_debian_base="8.0" raspbian_8_debian_base="8.0" raspbian_9_debian_base="9.0" @@ -3771,6 +3772,13 @@ install_debian_git_post() { done } +install_debian_2021_post() { + # Kali 2021 (debian derivative) disables all network services by default + # Using archlinux post function to enable salt systemd services + install_arch_linux_post || return 1 + return 0 +} + install_debian_restart_daemons() { [ "$_START_DAEMONS" -eq $BS_FALSE ] && return 0 From 561b14618ad4328dc2e4d0b96fa03cbcdb22f4b8 Mon Sep 17 00:00:00 2001 From: delucks Date: Sun, 13 Feb 2022 12:59:23 -0500 Subject: [PATCH 02/19] OpenBSD: correct post-Neon package names to python3 versions --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 6d9d5ba..a739d32 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -6010,7 +6010,7 @@ install_openbsd_git_deps() { __git_clone_and_checkout || return 1 if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - pkg_add -I -v py-pip py-setuptools + pkg_add -I -v py3-pip py3-setuptools fi # From a501f491ec4554bef1f598259f1a7986360b1e61 Mon Sep 17 00:00:00 2001 From: krionbsd Date: Tue, 26 Apr 2022 08:19:31 +0200 Subject: [PATCH 03/19] Add g++ dependency for Ubuntu 22 --- bootstrap-salt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index fe5bb5a..9ae50f4 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3124,6 +3124,9 @@ install_ubuntu_git_deps() { fi else __PACKAGES="python${PY_PKG_VER}-dev python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" + if [ "$DISTRO_MAJOR_VERSION" -ge 22 ]; then + __PACKAGES="${__PACKAGES} g++" + fi # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 fi From 81d4ca642529731deedcaccf4c50242d19e0687b Mon Sep 17 00:00:00 2001 From: krionbsd Date: Tue, 26 Apr 2022 09:14:32 +0200 Subject: [PATCH 04/19] Remove Ubuntu 16 from CI --- .github/workflows/main.yml | 92 ------------------------- .github/workflows/templates/generate.py | 10 +-- kitchen.yml | 3 - 3 files changed, 1 insertion(+), 104 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3d15af..0deede8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3405,98 +3405,6 @@ jobs: bundle exec kitchen destroy latest-rockylinux-8 - py3-git-3002-ubuntu-1604: - name: Ubuntu 16.04 v3002 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-3002-ubuntu-1604 || bundle exec kitchen create py3-git-3002-ubuntu-1604 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-3002-ubuntu-1604 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-3002-ubuntu-1604 - - - py3-git-master-ubuntu-1604: - name: Ubuntu 16.04 Master Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-master-ubuntu-1604 || bundle exec kitchen create py3-git-master-ubuntu-1604 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-master-ubuntu-1604 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-master-ubuntu-1604 - - py3-stable-3002-ubuntu-1804: name: Ubuntu 18.04 v3002 Py3 Stable runs-on: ubuntu-latest diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index de12cfc..2b1cc1f 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -24,7 +24,6 @@ LINUX_DISTROS = [ "oraclelinux-7", "oraclelinux-8", "rockylinux-8", - "ubuntu-1604", "ubuntu-1804", "ubuntu-2004", "ubuntu-2110", @@ -104,7 +103,6 @@ BLACKLIST_3003 = [ "opensuse-15", "opensuse-tumbleweed", "rockylinux-8", - "ubuntu-1604", "ubuntu-2204", ] @@ -121,7 +119,6 @@ BLACKLIST_GIT_3003 = [ "opensuse-15", "opensuse-tumbleweed", "rockylinux-8", - "ubuntu-1604", "ubuntu-2004", "ubuntu-2110", "ubuntu-2204", @@ -136,7 +133,6 @@ BLACKLIST_3004 = [ "gentoo-systemd", "opensuse-15", "opensuse-tumbleweed", - "ubuntu-1604", ] BLACKLIST_GIT_3004 = [ @@ -151,7 +147,6 @@ BLACKLIST_GIT_3004 = [ "gentoo-systemd", "opensuse-15", "opensuse-tumbleweed", - "ubuntu-1604", "ubuntu-2004", "ubuntu-2110", "ubuntu-2204", @@ -175,9 +170,7 @@ BRANCH_DISPLAY_NAMES = { STABLE_BRANCH_BLACKLIST = [] -LATEST_PKG_BLACKLIST = [ - "ubuntu-1604", -] +LATEST_PKG_BLACKLIST = [] DISTRO_DISPLAY_NAMES = { "almalinux-8": "AlmaLinux 8", @@ -198,7 +191,6 @@ DISTRO_DISPLAY_NAMES = { "oraclelinux-7": "Oracle Linux 7", "oraclelinux-8": "Oracle Linux 8", "rockylinux-8": "Rocky Linux 8", - "ubuntu-1604": "Ubuntu 16.04", "ubuntu-1804": "Ubuntu 18.04", "ubuntu-2004": "Ubuntu 20.04", "ubuntu-2110": "Ubuntu 21.10", diff --git a/kitchen.yml b/kitchen.yml index 79035ab..1196a7e 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -114,9 +114,6 @@ platforms: - name: ubuntu-18.04 driver: run_command: /lib/systemd/systemd - - name: ubuntu-16.04 - driver_config: - run_command: /lib/systemd/systemd suites: - name: py3-git-3002 From cb75c2140151f7c07870304ff5d64ea783f283fe Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Mon, 25 Apr 2022 21:56:09 +0100 Subject: [PATCH 05/19] feat(macos): add CI testing using Kitchen's `exec` driver --- .github/workflows/kitchen.macos.yml | 132 ++++++++++++++++++++++++++++ kitchen.macos.yml | 36 ++++++++ kitchen.vagrant.yml | 2 +- tests/conftest.py | 5 ++ 4 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/kitchen.macos.yml create mode 100644 kitchen.macos.yml diff --git a/.github/workflows/kitchen.macos.yml b/.github/workflows/kitchen.macos.yml new file mode 100644 index 0000000..6ec70d6 --- /dev/null +++ b/.github/workflows/kitchen.macos.yml @@ -0,0 +1,132 @@ +# yamllint disable rule:line-length +--- +name: 'Kitchen (MacOS)' +'on': ['push', 'pull_request'] + +env: + KITCHEN_LOCAL_YAML: 'kitchen.macos.yml' + +jobs: + generate-actions-workflow: + name: 'Generate The Actions Workflow' + runs-on: 'ubuntu-latest' + steps: + - uses: 'actions/checkout@v1' + - name: 'Set up Python 3.7' + uses: 'actions/setup-python@v1' + with: + python-version: 3.7 + - name: 'Install Pre-Commit' + run: | + pip install -U pip + pip install pre-commit + pre-commit install + - name: 'Generate Workflow Actions' + run: | + pre-commit run -av generate-actions-workflow + lint: + name: 'Lint' + runs-on: 'ubuntu-latest' + needs: 'generate-actions-workflow' + container: 'koalaman/shellcheck-alpine:v0.6.0' + steps: + - uses: 'actions/checkout@v1' + - name: 'ShellCheck' + run: | + shellcheck -s sh -f tty bootstrap-salt.sh + test-12: + runs-on: 'macos-12' + timeout-minutes: 20 + needs: 'lint' + strategy: + fail-fast: false + matrix: + instance: + - latest-macos-12 + - py3-stable-3004-macos-12 + - py3-stable-3003-macos-12 + - py3-stable-3002-macos-12 + steps: + - name: 'Check out code' + uses: 'actions/checkout@v2' + - name: 'Set up Bundler cache' + uses: 'actions/cache@v1' + with: + path: 'vendor/bundle' + key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}" + restore-keys: "${{ runner.os }}-gems-" + - name: 'Run Bundler' + run: | + ruby --version + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - name: 'Install Python Dependencies' + run: | + pip3 install -U pip + pip3 install -r tests/requirements.txt + - name: 'Run Test Kitchen' + run: 'bundle exec kitchen test ${{ matrix.instance }}' + test-11: + runs-on: 'macos-11' + timeout-minutes: 20 + needs: 'lint' + strategy: + fail-fast: false + matrix: + instance: + - latest-macos-11 + - py3-stable-3004-macos-11 + - py3-stable-3003-macos-11 + - py3-stable-3002-macos-11 + steps: + - name: 'Check out code' + uses: 'actions/checkout@v2' + - name: 'Set up Bundler cache' + uses: 'actions/cache@v1' + with: + path: 'vendor/bundle' + key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}" + restore-keys: "${{ runner.os }}-gems-" + - name: 'Run Bundler' + run: | + ruby --version + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - name: 'Install Python Dependencies' + run: | + pip3 install -U pip + pip3 install -r tests/requirements.txt + - name: 'Run Test Kitchen' + run: 'bundle exec kitchen test ${{ matrix.instance }}' + test-1015: + runs-on: 'macos-10.15' + timeout-minutes: 20 + needs: 'lint' + strategy: + fail-fast: false + matrix: + instance: + - latest-macos-1015 + - py3-stable-3004-macos-1015 + - py3-stable-3003-macos-1015 + - py3-stable-3002-macos-1015 + steps: + - name: 'Check out code' + uses: 'actions/checkout@v2' + - name: 'Set up Bundler cache' + uses: 'actions/cache@v1' + with: + path: 'vendor/bundle' + key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}" + restore-keys: "${{ runner.os }}-gems-" + - name: 'Run Bundler' + run: | + ruby --version + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - name: 'Install Python Dependencies' + run: | + pip3 install -U pip + pip3 install -r tests/requirements.txt + - name: 'Run Test Kitchen' + run: 'bundle exec kitchen test ${{ matrix.instance }}' diff --git a/kitchen.macos.yml b/kitchen.macos.yml new file mode 100644 index 0000000..1d89edb --- /dev/null +++ b/kitchen.macos.yml @@ -0,0 +1,36 @@ +--- +driver: + name: exec + +provisioner: + sudo: true + salt_bootstrap_options: -MP stable %s + salt_call_command: /opt/salt/bin/salt-call + init_environment: | + echo 'auto_accept: true' > /tmp/auto-accept-keys.conf + sudo mkdir -p /etc/salt/master.d + sudo mv /tmp/auto-accept-keys.conf /etc/salt/master.d/auto-accept-keys.conf + brew install coreutils + sh -c 't=$(gshuf -i 1-15 -n 1); echo Sleeping $t seconds; sleep $t' + +platforms: + - name: macos-12 + - name: macos-11 + - name: macos-1015 + +suites: + - name: py3-stable-3002 + provisioner: + salt_version: 3002.8 + - name: py3-stable-3003 + provisioner: + salt_version: 3003.4 + - name: py3-stable-3004 + provisioner: + salt_version: 3004.1 + - name: latest + provisioner: + salt_version: latest + +verifier: + command: pytest --cache-clear -v -s -ra --log-cli-level=debug -k "not test_ping" tests/integration/ diff --git a/kitchen.vagrant.yml b/kitchen.vagrant.yml index 0d855e7..1674a22 100644 --- a/kitchen.vagrant.yml +++ b/kitchen.vagrant.yml @@ -9,8 +9,8 @@ driver: gui: false ssh: shell: /bin/sh - <% unless ENV['CI'] %> linked_clone: true + <% unless ENV['CI'] %> synced_folders: - - '.kitchen/kitchen-vagrant/%{instance_name}/vagrant' - '/vagrant' diff --git a/tests/conftest.py b/tests/conftest.py index 2f60c28..6c47deb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,6 +9,11 @@ log = logging.getLogger(__name__) @pytest.fixture(scope="session") def host(): + if os.environ.get("RUNNER_OS", "") == "macOS": + # Adjust the `PATH` so that the `salt-call` executable can be found + os.environ["PATH"] = "/opt/salt/bin{}{}".format(os.pathsep, os.environ["PATH"]) + return testinfra.get_host("local://", sudo=True) + if os.environ.get("KITCHEN_USERNAME") == "vagrant" or "windows" in os.environ.get( "KITCHEN_INSTANCE" ): From 8fdce31eee4de998361e927c46ddcb3038acc187 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 26 Apr 2022 06:17:28 +0100 Subject: [PATCH 06/19] test(requirements): update `testinfra` => `pytest-testinfra` Resolve this `DeprecationWarning`: ``` /usr/local/lib/python3.9/site-packages/_testinfra_renamed.py:5: DeprecationWarning: testinfra package has been renamed to pytest-testinfra. Please `pip install pytest-testinfra` and `pip uninstall testinfra` and update your package requirements to avoid this message ``` --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index cabcdee..c76dfdd 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ -testinfra +pytest-testinfra paramiko pywinrm; sys.platform == 'win32' six>=1.10.0 From e320671e73f1d6cf8bd7f52a7b694909d4daefc9 Mon Sep 17 00:00:00 2001 From: Twangboy Date: Wed, 18 May 2022 09:49:12 -0600 Subject: [PATCH 07/19] Handle missing registry entry properly --- bootstrap-salt.ps1 | 120 ++++++++++++++++++++++++--------------------- 1 file changed, 63 insertions(+), 57 deletions(-) diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index fb6e22a..468732a 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -1,11 +1,11 @@ <# .SYNOPSIS - A simple Powershell script to download and install a salt minion on windows. + A simple Powershell script to download and install a Salt minion on Windows. .DESCRIPTION - The script will download the official salt package from saltstack. It will + The script will download the official Salt package from SaltProject. It will install a specific package version and accept parameters for the master and - minion ids. Finally, it can stop and set the windows service to "manual" for + minion ids. Finally, it can stop and set the Windows service to "manual" for local testing. .EXAMPLE @@ -18,8 +18,9 @@ .EXAMPLE ./bootstrap-salt.ps1 -pythonVersion 3 - Specifies the Python version of the installer. Can be "2" or "3". Defaults to "2". - Python 3 installers are only available for Salt 2017.7.0 and newer. + Specifies the Python version of the installer. Can be "2" or "3". Defaults + to "2". Python 3 installers are only available for Salt 2017.7.0 and newer. + Starting with Python 3002 only Python 3 installers are available. .EXAMPLE ./bootstrap-salt.ps1 -runservice false @@ -71,36 +72,36 @@ #> #=============================================================================== -# Commandlet Binding +# Bind Parameters #=============================================================================== [CmdletBinding()] -Param( - [Parameter(Mandatory=$false,ValueFromPipeline=$true)] +param( + [Parameter(Mandatory=$false, ValueFromPipeline=$True)] # Doesn't support versions prior to "YYYY.M.R-B" # Supports new version and latest # Option 1 means case insensitive [ValidatePattern('^(\d{4}(\.\d{1,2}){0,2}(\-\d{1})?)|(latest)$', Options=1)] - [string]$version = '', + [string]$Version = '', - [Parameter(Mandatory=$false,ValueFromPipeline=$true)] + [Parameter(Mandatory=$false, ValueFromPipeline=$True)] # Doesn't support Python versions prior to "2017.7.0" [ValidateSet("2","3")] - [string]$pythonVersion = "3", + [string]$PythonVersion = "3", - [Parameter(Mandatory=$false,ValueFromPipeline=$true)] + [Parameter(Mandatory=$false, ValueFromPipeline=$True)] [ValidateSet("true","false")] - [string]$runservice = "true", + [string]$RunService = "true", - [Parameter(Mandatory=$false,ValueFromPipeline=$true)] - [string]$minion = "not-specified", + [Parameter(Mandatory=$false, ValueFromPipeline=$True)] + [string]$Minion = "not-specified", - [Parameter(Mandatory=$false,ValueFromPipeline=$true)] - [string]$master = "not-specified", + [Parameter(Mandatory=$false, ValueFromPipeline=$True)] + [string]$Master = "not-specified", - [Parameter(Mandatory=$false,ValueFromPipeline=$true)] - [string]$repourl= "https://repo.saltproject.io/windows", + [Parameter(Mandatory=$false, ValueFromPipeline=$True)] + [string]$RepoUrl= "https://repo.saltproject.io/windows", - [Parameter(Mandatory=$false,ValueFromPipeline=$true)] + [Parameter(Mandatory=$false, ValueFromPipeline=$True)] [switch]$ConfigureOnly ) @@ -125,8 +126,8 @@ function Get-IsUacEnabled #=============================================================================== # Check for Elevated Privileges #=============================================================================== -If (!(Get-IsAdministrator)) { - If (Get-IsUacEnabled) { +if (!(Get-IsAdministrator)) { + if (Get-IsUacEnabled) { # We are not running "as Administrator" - so relaunch as administrator # Create a new process object that starts PowerShell $newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell"; @@ -149,10 +150,10 @@ If (!(Get-IsAdministrator)) { [System.Diagnostics.Process]::Start($newProcess); # Exit from the current, unelevated, process - Exit + exit } - Else { - Throw "You must be administrator to run this script" + else { + throw "You must be administrator to run this script" } } @@ -166,15 +167,15 @@ Write-Verbose "master: $master" Write-Verbose "minion: $minion" Write-Verbose "repourl: $repourl" -If ($runservice.ToLower() -eq "true") { +if ($runservice.ToLower() -eq "true") { Write-Verbose "Windows service will be set to run" [bool]$runservice = $True } -ElseIf ($runservice.ToLower() -eq "false") { +elseif ($runservice.ToLower() -eq "false") { Write-Verbose "Windows service will be stopped and set to manual" [bool]$runservice = $False } -Else { +else { # Param passed in wasn't clear so defaulting to true. Write-Verbose "Windows service defaulting to run automatically" [bool]$runservice = $True @@ -186,22 +187,28 @@ Else { $ConfiguredAnything = $False +$RootDir = "C:\salt" $SaltRegKey = "HKLM:\SOFTWARE\Salt Project\Salt" -$RootDir = If ((Get-ItemProperty $SaltRegKey).root_dir -ne $null) { - (Get-ItemProperty $SaltRegKey).root_dir -} Else { - "C:\salt" +if (Test-Path -Path $SaltRegKey) { + if ($null -ne (Get-ItemProperty $SaltRegKey).root_dir) { + $RootDir = (Get-ItemProperty $SaltRegKey).root_dir + } } + $ConfDir = "$RootDir\conf" $PkiDir = "$ConfDir\pki\minion" +Write-Verbose "ConfDir: $ConfDir" # Create C:\tmp\ New-Item C:\tmp\ -ItemType directory -Force | Out-Null -# Copy Vagrant Files to their proper location. Vagrant files will be placed -# in C:\tmp +#=============================================================================== +# Copy Vagrant Files to their proper location. +#=============================================================================== + +# Vagrant files will be placed in C:\tmp # Check if minion keys have been uploaded, copy to correct location -If (Test-Path C:\tmp\minion.pem) { +if (Test-Path C:\tmp\minion.pem) { New-Item $PkiDir -ItemType Directory -Force | Out-Null Copy-Item -Path C:\tmp\minion.pem -Destination $PkiDir -Force | Out-Null Copy-Item -Path C:\tmp\minion.pub -Destination $PkiDir -Force | Out-Null @@ -211,20 +218,20 @@ If (Test-Path C:\tmp\minion.pem) { # Check if minion config has been uploaded # This should be done before the installer is run so that it can be updated with # id: and master: settings when the installer runs -If (Test-Path C:\tmp\minion) { +if (Test-Path C:\tmp\minion) { New-Item $ConfDir -ItemType Directory -Force | Out-Null Copy-Item -Path C:\tmp\minion -Destination $ConfDir -Force | Out-Null $ConfiguredAnything = $True } # Check if grains config has been uploaded -If (Test-Path C:\tmp\grains) { +if (Test-Path C:\tmp\grains) { New-Item $ConfDir -ItemType Directory -Force | Out-Null Copy-Item -Path C:\tmp\grains -Destination $ConfDir -Force | Out-Null $ConfiguredAnything = $True } -If ($ConfigureOnly -and !$ConfiguredAnything) { +if ($ConfigureOnly -and !$ConfiguredAnything) { Write-Output "No configuration or keys were copied over. No configuration was done!" exit 0 } @@ -232,31 +239,30 @@ If ($ConfigureOnly -and !$ConfiguredAnything) { #=============================================================================== # Detect architecture #=============================================================================== -If ([IntPtr]::Size -eq 4) { +if ([IntPtr]::Size -eq 4) { $arch = "x86" -} -Else { +} else { $arch = "AMD64" } #=============================================================================== # Use version "Latest" if no version is passed #=============================================================================== -If ((!$version) -or ($version.ToLower() -eq 'latest')){ - $versionSection = "Latest-Py$pythonVersion" +if ((!$version) -or ($version.ToLower() -eq 'latest')){ + $versionSection = "Latest-Py$PythonVersion" } else { $versionSection = $version $year = $version.Substring(0, 4) - If ([int]$year -ge 2017) { - If ($pythonVersion -eq "3") { + if ([int]$year -ge 2017) { + if ($PythonVersion -eq "3") { $versionSection = "$version-Py3" - } Else { + } else { $versionSection = "$version-Py2" } } } -If (!$ConfigureOnly) { +if (!$ConfigureOnly) { #=============================================================================== # Download minion setup file #=============================================================================== @@ -275,9 +281,9 @@ If (!$ConfigureOnly) { # - master: salt # - Start the service $parameters = "" - If($minion -ne "not-specified") {$parameters = "/minion-name=$minion"} - If($master -ne "not-specified") {$parameters = "$parameters /master=$master"} - If($runservice -eq $false) {$parameters = "$parameters /start-service=0"} + if($minion -ne "not-specified") {$parameters = "/minion-name=$minion"} + if($master -ne "not-specified") {$parameters = "$parameters /master=$master"} + if($runservice -eq $false) {$parameters = "$parameters /start-service=0"} #=============================================================================== # Install minion silently @@ -291,12 +297,12 @@ If (!$ConfigureOnly) { #=============================================================================== # Wait for salt-minion service to be registered before trying to start it $service = Get-Service salt-minion -ErrorAction SilentlyContinue - While (!$service) { + while (!$service) { Start-Sleep -s 2 $service = Get-Service salt-minion -ErrorAction SilentlyContinue } - If($runservice) { + if($runservice) { # Start service Write-Output "Starting the Salt minion service" Start-Service -Name "salt-minion" -ErrorAction SilentlyContinue @@ -304,7 +310,7 @@ If (!$ConfigureOnly) { # Check if service is started, otherwise retry starting the # service 4 times. $try = 0 - While (($service.Status -ne "Running") -and ($try -ne 4)) { + while (($service.Status -ne "Running") -and ($try -ne 4)) { Start-Service -Name "salt-minion" -ErrorAction SilentlyContinue $service = Get-Service salt-minion -ErrorAction SilentlyContinue Start-Sleep -s 2 @@ -313,12 +319,12 @@ If (!$ConfigureOnly) { # If the salt-minion service is still not running, something probably # went wrong and user intervention is required - report failure. - If ($service.Status -eq "Stopped") { + if ($service.Status -eq "Stopped") { Write-Output -NoNewline "Failed to start salt minion" exit 1 } } - Else { + else { Write-Output -NoNewline "Stopping salt minion and setting it to 'Manual'" Set-Service "salt-minion" -StartupType "Manual" Stop-Service "salt-minion" @@ -328,9 +334,9 @@ If (!$ConfigureOnly) { #=============================================================================== # Script Complete #=============================================================================== -If ($ConfigureOnly) { +if ($ConfigureOnly) { Write-Output "Salt minion successfully configured" } -Else { +else { Write-Output "Salt minion successfully installed" } From 8636d9413092654c91303d64a660841b2e9b2116 Mon Sep 17 00:00:00 2001 From: krionbsd Date: Thu, 19 May 2022 14:17:19 +0200 Subject: [PATCH 08/19] Bump version to 2022.05.19 release --- ChangeLog | 6 ++++++ bootstrap-salt.sh | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bfffef0..fda066b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ Version TBD (In Progress on the Develop Branch): +Version 2022.05.19 + * Fix situations where the registry key for root_dir does not exist + on Windows (twangboy) #1828 + * Add Ubuntu 22 support (krionbsd) #1820 + * Add Fedora 36 support (myii) #1818 + Version 2022.03.15: * Add detection and functions for AlmaLinux and Rocky Linux (myii) #1803 * Copy configs to correct config dirs (v3004+) (dafyddj) #1798 diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 379311f..b0d6d68 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -23,7 +23,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2022.03.15" +__ScriptVersion="2022.05.19" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" From e7d894458b6ccb33431efd3fe08f86af9002c5c0 Mon Sep 17 00:00:00 2001 From: krionbsd Date: Thu, 19 May 2022 13:48:15 +0000 Subject: [PATCH 09/19] Update README.rst with 2022.05.19 release sha256sum --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 29690ae..00f85f4 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: +- 2022.05.19: ``e92e1df6930285cf23eda188bee3cfa3dd6c577b4fb7aa91b29213ad820199b1`` - 2022.03.15: ``8f65952c3435f441e7f793941d5162d3ec2033a9ef82722ff1da67a2ef860a2f`` - 2021.09.17: ``090d652cd6290debce0e3a4eded65086a4272e69446e711eb26f87160593b6a2`` - 2021.09.14: ``30fdcba972f449630b4f13492cb5525e69e08fa2cdb66a6dc78f1536ad279e52`` From 72de037c8560c8771090bdee6dfc0719e8ecc8b7 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 7 Jun 2022 06:29:28 +0100 Subject: [PATCH 10/19] ci(kitchen.macos.yml): fix `macOS` name (align to current branding) https://en.wikipedia.org/wiki/MacOS > Apple shortened the name to "OS X" in 2012 and then changed it to > "macOS" in 2016 to align with the branding of Apple's other operating > systems, iOS, watchOS, and tvOS. --- .github/workflows/kitchen.macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kitchen.macos.yml b/.github/workflows/kitchen.macos.yml index 6ec70d6..d718976 100644 --- a/.github/workflows/kitchen.macos.yml +++ b/.github/workflows/kitchen.macos.yml @@ -1,6 +1,6 @@ # yamllint disable rule:line-length --- -name: 'Kitchen (MacOS)' +name: 'Kitchen (macOS)' 'on': ['push', 'pull_request'] env: From 3265e88e29de806baa1cc52e60ebd0524012ff30 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 7 Jun 2022 06:29:33 +0100 Subject: [PATCH 11/19] ci: remove `fedora-34` (EOL) * https://fedorapeople.org/groups/schedule/f-34/f-34-all-tasks.html - See last entry for `EOL`: Wed 2022-06-01 --- .github/workflows/main.yml | 92 ------------------------- .github/workflows/templates/generate.py | 9 --- kitchen.yml | 5 +- 3 files changed, 1 insertion(+), 105 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0deede8..69030d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2025,98 +2025,6 @@ jobs: bundle exec kitchen destroy latest-debian-9 - py3-git-master-fedora-34: - name: Fedora 34 Master Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-master-fedora-34 || bundle exec kitchen create py3-git-master-fedora-34 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-master-fedora-34 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-master-fedora-34 - - - latest-fedora-34: - name: Fedora 34 Latest packaged release - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create latest-fedora-34 || bundle exec kitchen create latest-fedora-34 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify latest-fedora-34 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy latest-fedora-34 - - py3-git-master-fedora-35: name: Fedora 35 Master Py3 Git runs-on: ubuntu-latest diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 2b1cc1f..1b70af3 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -14,7 +14,6 @@ LINUX_DISTROS = [ "debian-10", "debian-11", "debian-9", - "fedora-34", "fedora-35", "fedora-36", "gentoo", @@ -40,7 +39,6 @@ STABLE_DISTROS = [ "debian-10", "debian-11", "debian-9", - "fedora-34", "fedora-35", "fedora-36", "gentoo", @@ -61,7 +59,6 @@ BLACKLIST_3002 = [ "arch", "centos-stream8", "debian-11", - "fedora-34", "fedora-35", "fedora-36", "gentoo", @@ -79,7 +76,6 @@ BLACKLIST_GIT_3002 = [ "centos-stream8", "debian-10", "debian-11", - "fedora-34", "fedora-35", "fedora-36", "gentoo", @@ -95,7 +91,6 @@ BLACKLIST_GIT_3002 = [ BLACKLIST_3003 = [ "arch", "debian-11", - "fedora-34", "fedora-35", "fedora-36", "gentoo", @@ -111,7 +106,6 @@ BLACKLIST_GIT_3003 = [ "arch", "debian-10", "debian-11", - "fedora-34", "fedora-35", "fedora-36", "gentoo", @@ -126,7 +120,6 @@ BLACKLIST_GIT_3003 = [ BLACKLIST_3004 = [ "arch", - "fedora-34", "fedora-35", "fedora-36", "gentoo", @@ -140,7 +133,6 @@ BLACKLIST_GIT_3004 = [ "arch", "debian-10", "debian-11", - "fedora-34", "fedora-35", "fedora-36", "gentoo", @@ -181,7 +173,6 @@ DISTRO_DISPLAY_NAMES = { "debian-10": "Debian 10", "debian-11": "Debian 11", "debian-9": "Debian 9", - "fedora-34": "Fedora 34", "fedora-35": "Fedora 35", "fedora-36": "Fedora 36", "gentoo": "Gentoo", diff --git a/kitchen.yml b/kitchen.yml index 1196a7e..1da7f1e 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -57,14 +57,11 @@ platforms: driver: image: debian:bullseye run_command: /lib/systemd/systemd - - name: fedora-34 + - name: fedora-35 driver: provision_command: &fedora_provision_command - dnf -y install procps-ng crypto-policies-scripts - update-crypto-policies --set LEGACY - - name: fedora-35 - driver: - provision_command: *fedora_provision_command - name: fedora-36 driver: provision_command: *fedora_provision_command From 9adf295207fac51058b2e57300f558904d933a0e Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Tue, 7 Jun 2022 06:29:36 +0100 Subject: [PATCH 12/19] ci(3002): remove from CI (EOL) * https://saltproject.io/salt-platform-support/ - Phase 3 support ends: Apr 21, 2022 --- .github/workflows/kitchen.macos.yml | 3 - .github/workflows/kitchen.windows.yml | 2 - .github/workflows/main.yml | 644 ------------------------ .github/workflows/templates/generate.py | 42 +- README.rst | 22 +- kitchen.macos.yml | 3 - kitchen.windows.yml | 3 - kitchen.yml | 12 - 8 files changed, 13 insertions(+), 718 deletions(-) diff --git a/.github/workflows/kitchen.macos.yml b/.github/workflows/kitchen.macos.yml index d718976..5e1be29 100644 --- a/.github/workflows/kitchen.macos.yml +++ b/.github/workflows/kitchen.macos.yml @@ -45,7 +45,6 @@ jobs: - latest-macos-12 - py3-stable-3004-macos-12 - py3-stable-3003-macos-12 - - py3-stable-3002-macos-12 steps: - name: 'Check out code' uses: 'actions/checkout@v2' @@ -77,7 +76,6 @@ jobs: - latest-macos-11 - py3-stable-3004-macos-11 - py3-stable-3003-macos-11 - - py3-stable-3002-macos-11 steps: - name: 'Check out code' uses: 'actions/checkout@v2' @@ -109,7 +107,6 @@ jobs: - latest-macos-1015 - py3-stable-3004-macos-1015 - py3-stable-3003-macos-1015 - - py3-stable-3002-macos-1015 steps: - name: 'Check out code' uses: 'actions/checkout@v2' diff --git a/.github/workflows/kitchen.windows.yml b/.github/workflows/kitchen.windows.yml index c3e6ff8..ce5c7c3 100644 --- a/.github/workflows/kitchen.windows.yml +++ b/.github/workflows/kitchen.windows.yml @@ -45,7 +45,6 @@ jobs: fail-fast: false matrix: instance: - - py3-stable-3002-windows-2022 - py3-stable-3003-windows-2022 - py3-stable-3004-windows-2022 - latest-windows-2022 @@ -100,7 +99,6 @@ jobs: fail-fast: false matrix: instance: - - py3-stable-3002-windows-2019 - py3-stable-3003-windows-2019 - py3-stable-3004-windows-2019 - latest-windows-2019 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 69030d6..06864cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -323,52 +323,6 @@ jobs: bundle exec kitchen destroy latest-almalinux-8 - py3-stable-3002-amazon-2: - name: Amazon 2 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-amazon-2 || bundle exec kitchen create py3-stable-3002-amazon-2 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-amazon-2 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-amazon-2 - - py3-stable-3003-amazon-2: name: Amazon 2 v3003 Py3 Stable runs-on: ubuntu-latest @@ -645,98 +599,6 @@ jobs: bundle exec kitchen destroy latest-arch - py3-stable-3002-centos-7: - name: CentOS 7 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-centos-7 || bundle exec kitchen create py3-stable-3002-centos-7 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-centos-7 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-centos-7 - - - py3-git-3002-centos-7: - name: CentOS 7 v3002 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-3002-centos-7 || bundle exec kitchen create py3-git-3002-centos-7 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-3002-centos-7 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-3002-centos-7 - - py3-stable-3003-centos-7: name: CentOS 7 v3003 Py3 Stable runs-on: ubuntu-latest @@ -1289,52 +1151,6 @@ jobs: bundle exec kitchen destroy latest-centos-stream8 - py3-stable-3002-debian-10: - name: Debian 10 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-debian-10 || bundle exec kitchen create py3-stable-3002-debian-10 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-debian-10 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-debian-10 - - py3-stable-3003-debian-10: name: Debian 10 v3003 Py3 Stable runs-on: ubuntu-latest @@ -1657,98 +1473,6 @@ jobs: bundle exec kitchen destroy latest-debian-11 - py3-stable-3002-debian-9: - name: Debian 9 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-debian-9 || bundle exec kitchen create py3-stable-3002-debian-9 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-debian-9 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-debian-9 - - - py3-git-3002-debian-9: - name: Debian 9 v3002 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-3002-debian-9 || bundle exec kitchen create py3-git-3002-debian-9 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-3002-debian-9 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-3002-debian-9 - - py3-stable-3003-debian-9: name: Debian 9 v3003 Py3 Stable runs-on: ubuntu-latest @@ -2393,98 +2117,6 @@ jobs: bundle exec kitchen destroy latest-opensuse-tumbleweed - py3-stable-3002-oraclelinux-7: - name: Oracle Linux 7 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-oraclelinux-7 || bundle exec kitchen create py3-stable-3002-oraclelinux-7 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-oraclelinux-7 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-oraclelinux-7 - - - py3-git-3002-oraclelinux-7: - name: Oracle Linux 7 v3002 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-3002-oraclelinux-7 || bundle exec kitchen create py3-git-3002-oraclelinux-7 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-3002-oraclelinux-7 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-3002-oraclelinux-7 - - py3-stable-3003-oraclelinux-7: name: Oracle Linux 7 v3003 Py3 Stable runs-on: ubuntu-latest @@ -2761,98 +2393,6 @@ jobs: bundle exec kitchen destroy latest-oraclelinux-7 - py3-stable-3002-oraclelinux-8: - name: Oracle Linux 8 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-oraclelinux-8 || bundle exec kitchen create py3-stable-3002-oraclelinux-8 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-oraclelinux-8 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-oraclelinux-8 - - - py3-git-3002-oraclelinux-8: - name: Oracle Linux 8 v3002 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-3002-oraclelinux-8 || bundle exec kitchen create py3-git-3002-oraclelinux-8 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-3002-oraclelinux-8 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-3002-oraclelinux-8 - - py3-stable-3003-oraclelinux-8: name: Oracle Linux 8 v3003 Py3 Stable runs-on: ubuntu-latest @@ -3313,98 +2853,6 @@ jobs: bundle exec kitchen destroy latest-rockylinux-8 - py3-stable-3002-ubuntu-1804: - name: Ubuntu 18.04 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-ubuntu-1804 || bundle exec kitchen create py3-stable-3002-ubuntu-1804 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-ubuntu-1804 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-ubuntu-1804 - - - py3-git-3002-ubuntu-1804: - name: Ubuntu 18.04 v3002 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-3002-ubuntu-1804 || bundle exec kitchen create py3-git-3002-ubuntu-1804 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-3002-ubuntu-1804 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-3002-ubuntu-1804 - - py3-stable-3003-ubuntu-1804: name: Ubuntu 18.04 v3003 Py3 Stable runs-on: ubuntu-latest @@ -3681,52 +3129,6 @@ jobs: bundle exec kitchen destroy latest-ubuntu-1804 - py3-stable-3002-ubuntu-2004: - name: Ubuntu 20.04 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-ubuntu-2004 || bundle exec kitchen create py3-stable-3002-ubuntu-2004 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-ubuntu-2004 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-ubuntu-2004 - - py3-stable-3003-ubuntu-2004: name: Ubuntu 20.04 v3003 Py3 Stable runs-on: ubuntu-latest @@ -3911,52 +3313,6 @@ jobs: bundle exec kitchen destroy latest-ubuntu-2004 - py3-stable-3002-ubuntu-2110: - name: Ubuntu 21.10 v3002 Py3 Stable - runs-on: ubuntu-latest - timeout-minutes: 20 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-stable-3002-ubuntu-2110 || bundle exec kitchen create py3-stable-3002-ubuntu-2110 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-stable-3002-ubuntu-2110 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-stable-3002-ubuntu-2110 - - py3-stable-3003-ubuntu-2110: name: Ubuntu 21.10 v3003 Py3 Stable runs-on: ubuntu-latest diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 1b70af3..54e8d61 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -54,40 +54,6 @@ STABLE_DISTROS = [ "ubuntu-2204", ] -BLACKLIST_3002 = [ - "almalinux-8", - "arch", - "centos-stream8", - "debian-11", - "fedora-35", - "fedora-36", - "gentoo", - "gentoo-systemd", - "opensuse-15", - "opensuse-tumbleweed", - "rockylinux-8", - "ubuntu-2204", -] - -BLACKLIST_GIT_3002 = [ - "almalinux-8", - "amazon-2", - "arch", - "centos-stream8", - "debian-10", - "debian-11", - "fedora-35", - "fedora-36", - "gentoo", - "gentoo-systemd", - "opensuse-15", - "opensuse-tumbleweed", - "rockylinux-8", - "ubuntu-2004", - "ubuntu-2110", - "ubuntu-2204", -] - BLACKLIST_3003 = [ "arch", "debian-11", @@ -145,7 +111,6 @@ BLACKLIST_GIT_3004 = [ ] SALT_BRANCHES = [ - "3002", "3003", "3004", "master", @@ -153,7 +118,6 @@ SALT_BRANCHES = [ ] BRANCH_DISPLAY_NAMES = { - "3002": "v3002", "3003": "v3003", "3004": "v3004", "master": "Master", @@ -265,23 +229,21 @@ def generate_test_jobs(): continue BLACKLIST = { - "3002": BLACKLIST_3002, "3003": BLACKLIST_3003, "3004": BLACKLIST_3004, } if bootstrap_type == "git": BLACKLIST = { - "3002": BLACKLIST_GIT_3002, "3003": BLACKLIST_GIT_3003, "3004": BLACKLIST_GIT_3004, } - # .0 versions are a virtual version for pinning to the first point release of a major release, such as 3002, there is no git version. + # .0 versions are a virtual version for pinning to the first point release of a major release, such as 3003, there is no git version. if branch.endswith("-0"): continue if ( - branch in ("3002", "3003", "3004") + branch in ("3003", "3004") and distro in BLACKLIST[branch] ): continue diff --git a/README.rst b/README.rst index 00f85f4..da4bc95 100644 --- a/README.rst +++ b/README.rst @@ -102,12 +102,12 @@ To view the latest options and descriptions for ``salt-bootstrap``, use ``-h`` a Examples: - bootstrap-salt.sh - bootstrap-salt.sh stable - - bootstrap-salt.sh stable 3003.3 - - bootstrap-salt.sh stable v3002.7 + - bootstrap-salt.sh stable 3004.1 + - bootstrap-salt.sh stable v3003.4 - bootstrap-salt.sh testing - bootstrap-salt.sh git - - bootstrap-salt.sh git 3003.3 - - bootstrap-salt.sh git v3002.7 + - bootstrap-salt.sh git 3004.1 + - bootstrap-salt.sh git v3003.4 - bootstrap-salt.sh git 06f249901a2e2f1ed310d58ea3921a129f214358 Options: @@ -218,14 +218,14 @@ If you want to install a package of a specific release version, from the SaltSta .. code:: console curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io - sudo sh bootstrap-salt.sh -P stable 3003.3 + sudo sh bootstrap-salt.sh -P stable 3004.1 If you want to install a specific release version, based on the Git tags: .. code:: console curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io - sudo sh bootstrap-salt.sh git v3003.3 + sudo sh bootstrap-salt.sh git v3004.1 Using ``curl`` to install latest development version from GitHub: @@ -280,14 +280,14 @@ Installing a specific version from git using ``wget``: .. code:: console wget -O bootstrap-salt.sh https://bootstrap.saltproject.io - sudo sh bootstrap-salt.sh git v3003.3 + sudo sh bootstrap-salt.sh git v3004.1 Installing a specific version package from the SaltStack repo using ``wget``: .. code:: console wget -O bootstrap-salt.sh https://bootstrap.saltproject.io - sudo sh bootstrap-salt.sh -P stable 3003.3 + sudo sh bootstrap-salt.sh -P stable 3004.1 **NOTE** @@ -303,7 +303,7 @@ If you already have Python installed, ``python 2.7``, then it's as easy as: .. code:: console python -m urllib "https://bootstrap.saltproject.io" > bootstrap-salt.sh - sudo sh bootstrap-salt.sh -P stable 3003.3 + sudo sh bootstrap-salt.sh -P stable 3004.1 With python version 2, the following in-line code should always work: @@ -317,7 +317,7 @@ With python version 3: .. code:: console python3 -c 'import urllib.request; print(urllib.request.urlopen("https://bootstrap.saltproject.io").read().decode("ascii"))' > bootstrap-salt.sh - sudo sh bootstrap-salt.sh git v3003.3 + sudo sh bootstrap-salt.sh git v3004.1 Install using fetch ~~~~~~~~~~~~~~~~~~~ @@ -378,7 +378,7 @@ Installing a target version package of Salt from the SaltStack repo: .. code:: console - curl -L https://bootstrap.saltproject.io | sudo sh -s -- stable 3003.3 + curl -L https://bootstrap.saltproject.io | sudo sh -s -- stable 3004.1 Installing the latest master branch of Salt from git: diff --git a/kitchen.macos.yml b/kitchen.macos.yml index 1d89edb..cc4ed9a 100644 --- a/kitchen.macos.yml +++ b/kitchen.macos.yml @@ -19,9 +19,6 @@ platforms: - name: macos-1015 suites: - - name: py3-stable-3002 - provisioner: - salt_version: 3002.8 - name: py3-stable-3003 provisioner: salt_version: 3003.4 diff --git a/kitchen.windows.yml b/kitchen.windows.yml index 0c5b882..b732725 100644 --- a/kitchen.windows.yml +++ b/kitchen.windows.yml @@ -17,9 +17,6 @@ platforms: - name: windows-2019 suites: - - name: py3-stable-3002 - provisioner: - salt_version: 3002.8-1 - name: py3-stable-3003 provisioner: salt_version: 3003.4-1 diff --git a/kitchen.yml b/kitchen.yml index 1da7f1e..7d127ed 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -113,10 +113,6 @@ platforms: run_command: /lib/systemd/systemd suites: - - name: py3-git-3002 - provisioner: - salt_version: 3002 - salt_bootstrap_options: -x python3 -MPfq git %s - name: py3-git-3003 provisioner: salt_version: 3003 @@ -125,10 +121,6 @@ suites: provisioner: salt_version: 3004 salt_bootstrap_options: -x python3 -MPfq git %s - - name: py3-stable-3002-0 - provisioner: - salt_version: 3002 - salt_bootstrap_options: -x python3 -MP stable 3002.0 excludes: - opensuse-15 - opensuse-tumbleweed @@ -152,10 +144,6 @@ suites: - freebsd-130 - freebsd-123 - openbsd-6 - - name: py3-stable-3002 - provisioner: - salt_version: 3002 - salt_bootstrap_options: -x python3 -MP stable %s excludes: - opensuse-15 - opensuse-tumbleweed From 9818c45d8826e898a95853e7e69cd4a280198212 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 8 Jun 2022 09:10:12 +0100 Subject: [PATCH 13/19] test(conftest): adjust `PATH` on macOS jobs only (not Vagrant) --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6c47deb..e718201 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,7 +9,7 @@ log = logging.getLogger(__name__) @pytest.fixture(scope="session") def host(): - if os.environ.get("RUNNER_OS", "") == "macOS": + if os.environ.get("RUNNER_OS", "") == "macOS" and os.environ.get("KITCHEN_LOCAL_YAML", "") == "kitchen.macos.yml": # Adjust the `PATH` so that the `salt-call` executable can be found os.environ["PATH"] = "/opt/salt/bin{}{}".format(os.pathsep, os.environ["PATH"]) return testinfra.get_host("local://", sudo=True) From 197a9c2bac3544e30d3f93754fc6e9e3ac557534 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 8 Jun 2022 09:11:57 +0100 Subject: [PATCH 14/19] chore(gemfile.lock): update to latest gem versions --- Gemfile.lock | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 92cd270..0860045 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,16 +10,17 @@ GEM specs: bcrypt_pbkdf (1.1.0) builder (3.2.4) - chef-utils (17.9.52) + chef-utils (17.10.0) concurrent-ruby - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) ed25519 (1.3.0) erubi (1.10.0) ffi (1.15.5) gssapi (1.3.1) ffi (>= 1.0.1) - gyoku (1.3.1) + gyoku (1.4.0) builder (>= 2.1.2) + rexml (~> 3.0) hashie (5.0.0) httpclient (2.8.3) kitchen-salt (0.7.2) @@ -33,14 +34,14 @@ GEM tty-box (~> 0.6) tty-prompt (~> 0.20) little-plugger (1.1.4) - logging (2.3.0) + logging (2.3.1) little-plugger (~> 1.1) multi_json (~> 1.14) - mixlib-install (3.12.16) + mixlib-install (3.12.19) mixlib-shellout mixlib-versioning thor - mixlib-shellout (3.2.5) + mixlib-shellout (3.2.7) chef-utils mixlib-versioning (1.2.12) multi_json (1.15.0) @@ -52,6 +53,7 @@ GEM nori (2.6.0) pastel (0.8.0) tty-color (~> 0.5) + rexml (3.2.5) rubyntlm (0.6.3) rubyzip (2.3.2) strings (0.2.1) @@ -74,7 +76,7 @@ GEM winrm-elevated (~> 1.0) winrm-fs (~> 1.1) thor (1.2.1) - tomlrb (2.0.1) + tomlrb (2.0.3) tty-box (0.7.0) pastel (~> 0.8) strings (~> 0.2.0) @@ -112,7 +114,7 @@ GEM wisper (2.0.1) PLATFORMS - ruby + x86_64-linux DEPENDENCIES kitchen-docker! @@ -121,4 +123,4 @@ DEPENDENCIES test-kitchen (>= 3.2.2) BUNDLED WITH - 2.1.2 + 2.2.26 From 04abf9711a7c400be292557d282c98f62db95632 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 8 Jun 2022 09:12:47 +0100 Subject: [PATCH 15/19] ci(freebsd): replace `13.0` with newly released `13.1` box * https://app.vagrantup.com/bento/boxes/freebsd-13.1 --- .github/workflows/kitchen.vagrant.yml | 4 ++-- kitchen.vagrant.yml | 4 ++-- kitchen.yml | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/kitchen.vagrant.yml b/.github/workflows/kitchen.vagrant.yml index 7ce5471..1364554 100644 --- a/.github/workflows/kitchen.vagrant.yml +++ b/.github/workflows/kitchen.vagrant.yml @@ -41,10 +41,10 @@ jobs: fail-fast: false matrix: instance: - - py3-git-master-freebsd-130 + - py3-git-master-freebsd-131 - py3-git-master-freebsd-123 # - py3-git-master-openbsd-6 - - latest-freebsd-130 + - latest-freebsd-131 - latest-freebsd-123 - latest-openbsd-6 steps: diff --git a/kitchen.vagrant.yml b/kitchen.vagrant.yml index 1674a22..cd36e71 100644 --- a/kitchen.vagrant.yml +++ b/kitchen.vagrant.yml @@ -27,9 +27,9 @@ provisioner: sudo: true platforms: - - name: freebsd-130 + - name: freebsd-131 driver: - box: bento/freebsd-13.0 + box: bento/freebsd-13.1 - name: freebsd-123 driver: box: bento/freebsd-12.3 diff --git a/kitchen.yml b/kitchen.yml index 7d127ed..743cafb 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -128,7 +128,7 @@ suites: - arch - gentoo - gentoo-systemd - - freebsd-130 + - freebsd-131 - freebsd-123 - openbsd-6 - name: py3-stable-3003-0 @@ -141,14 +141,14 @@ suites: - arch - gentoo - gentoo-systemd - - freebsd-130 + - freebsd-131 - freebsd-123 - openbsd-6 excludes: - opensuse-15 - opensuse-tumbleweed - arch - - freebsd-130 + - freebsd-131 - freebsd-123 - openbsd-6 - name: py3-stable-3003 @@ -159,7 +159,7 @@ suites: - opensuse-15 - opensuse-tumbleweed - arch - - freebsd-130 + - freebsd-131 - freebsd-123 - openbsd-6 - name: py3-stable-3004-0 @@ -172,7 +172,7 @@ suites: - arch - gentoo - gentoo-systemd - - freebsd-130 + - freebsd-131 - freebsd-123 - openbsd-6 - name: py3-stable-3004 @@ -183,7 +183,7 @@ suites: - opensuse-15 - opensuse-tumbleweed - arch - - freebsd-130 + - freebsd-131 - freebsd-123 - openbsd-6 - name: py3-git-master From b903662ad044ece9201a5bbd8efca84ca0aeb106 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 17 Jun 2022 13:17:21 +0100 Subject: [PATCH 16/19] feat(bootstrap-salt): handle openSUSE downstream repo change for `15.4` The difference between `15.3` and `15.4` can be seen here: * https://download.opensuse.org/repositories/systemsmanagement:/saltstack/ - `openSUSE_Leap_15.3` - `15.4` (i.e. not `openSUSE_Leap_15.4`) --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b0d6d68..e2a9b6c 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -6463,6 +6463,8 @@ __set_suse_pkg_repo() { # Set distro repo variable if [ "${DISTRO_MAJOR_VERSION}" -gt 2015 ]; then DISTRO_REPO="openSUSE_Tumbleweed" + elif [ "${DISTRO_MAJOR_VERSION}" -eq 15 ] && [ "${DISTRO_MINOR_VERSION}" -ge 4 ]; then + DISTRO_REPO="${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}" elif [ "${DISTRO_MAJOR_VERSION}" -ge 42 ] || [ "${DISTRO_MAJOR_VERSION}" -eq 15 ]; then DISTRO_REPO="openSUSE_Leap_${DISTRO_MAJOR_VERSION}.${DISTRO_MINOR_VERSION}" else From 0a9badd439aee0b5ca32171a847a1a2a7691fcaa Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 17 Jun 2022 13:19:51 +0100 Subject: [PATCH 17/19] ci(kitchen): update to openSUSE Leap 15.4 --- kitchen.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitchen.yml b/kitchen.yml index 743cafb..1a94327 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -81,7 +81,7 @@ platforms: - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config - name: opensuse-15 driver: - image: opensuse/leap:15.3 + image: opensuse/leap:15.4 provision_command: - &opensuse_provision_command_01 zypper --non-interactive install --auto-agree-with-licenses dbus-1 - &opensuse_provision_command_02 zypper --non-interactive install --auto-agree-with-licenses sudo openssh which curl systemd From 8b33e968e1b9135e1b145138b4a23e7c80133b85 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 17 Jun 2022 13:59:11 +0100 Subject: [PATCH 18/19] fix(bootstrap-salt): add `pyzmq` build deps for Tumbleweed `git` builds --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index e2a9b6c..4c11c5d 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -6614,7 +6614,7 @@ install_opensuse_git_deps() { fi # Check for Tumbleweed elif [ "${DISTRO_MAJOR_VERSION}" -ge 20210101 ]; then - __PACKAGES="python3-pip" + __PACKAGES="python3-pip gcc-c++ python310-pyzmq-devel" else __PACKAGES="python-pip python-setuptools gcc" fi From 86dc5bf7becef68d56cc60608c9f2dd2f38eeaaf Mon Sep 17 00:00:00 2001 From: krionbsd Date: Wed, 13 Jul 2022 08:41:12 +0200 Subject: [PATCH 19/19] Rename to py39-salt, Python 3.9 is default version on FreeBSD --- bootstrap-salt.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 4c11c5d..679426b 100644 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5983,15 +5983,15 @@ install_freebsd_git_deps() { if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - SALT_DEPENDENCIES=$(/usr/local/sbin/pkg rquery %dn py38-salt) + SALT_DEPENDENCIES=$(/usr/local/sbin/pkg rquery %dn py39-salt) # shellcheck disable=SC2086 /usr/local/sbin/pkg install -y ${SALT_DEPENDENCIES} python || return 1 - /usr/local/sbin/pkg install -y py38-requests || return 1 - /usr/local/sbin/pkg install -y py38-tornado4 || return 1 + /usr/local/sbin/pkg install -y py39-requests || return 1 + /usr/local/sbin/pkg install -y py39-tornado4 || return 1 else - /usr/local/sbin/pkg install -y python py38-pip py38-setuptools libzmq4 libunwind || return 1 + /usr/local/sbin/pkg install -y python py39-pip py39-setuptools libzmq4 libunwind || return 1 fi echodebug "Adapting paths to FreeBSD" @@ -6037,7 +6037,7 @@ install_freebsd_stable() { # installing latest version of salt from FreeBSD CURRENT ports repo # # shellcheck disable=SC2086 - /usr/local/sbin/pkg install -y py38-salt || return 1 + /usr/local/sbin/pkg install -y py39-salt || return 1 return 0 }