From 124e62e9fab3ba743989fdad9c019d31ebd9970e Mon Sep 17 00:00:00 2001 From: Salt Project Packaging Date: Tue, 26 Nov 2024 16:41:23 +0000 Subject: [PATCH 1/8] Update README.rst with 2024.11.26 release sha256sum --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index db15cc47a..8a2310760 100644 --- a/README.rst +++ b/README.rst @@ -37,6 +37,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file. The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is: +- 2024.11.26: ``832c7a20b96e1df171d715323df9afff8a11aef42d15598c007f240bc89d723c`` - 2024.11.21: ``ddf624c3a94d721da3f7629402a6c7ecc9dd96d13c1ead2a626314e97cee982a`` - 2024.11.07: ``70a9783649e129985563d1a86cf28b8984499643e62ae1dc47dc008bd204fcbb`` - 2024.09.24: ``88e4e4cad4b115a7b721dd9c21d5ee5df390b5b73b63de48f99399146f43f371`` From b96a669d39485d761c5552703f36e4f00d74f055 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 26 Nov 2024 09:57:47 -0700 Subject: [PATCH 2/8] Testin ggit install methods --- bootstrap-salt.sh | 83 +++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ea0f9f391..b41c25688 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2742,43 +2742,43 @@ __install_salt_from_repo() { echodebug "Installed pip version: $(${_pip_cmd} --version)" - CHECK_PIP_VERSION_SCRIPT=$(cat << EOM -import sys -try: - import pip - installed_pip_version=tuple([int(part.strip()) for part in pip.__version__.split('.') if part.isdigit()]) - desired_pip_version=($(echo ${_MINIMUM_PIP_VERSION} | sed 's/\./, /g' )) - if installed_pip_version < desired_pip_version: - print('Desired pip version {!r} > Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) - sys.exit(1) - print('Desired pip version {!r} < Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) - sys.exit(0) -except ImportError: - print('Failed to import pip') - sys.exit(1) -EOM -) - if ! ${_py_exe} -c "$CHECK_PIP_VERSION_SCRIPT"; then - # Upgrade pip to at least 1.2 which is when we can start using "python3 -m pip" - echodebug "Running '${_pip_cmd} install ${_PIP_INSTALL_ARGS} pip>=${_MINIMUM_PIP_VERSION}'" - ${_pip_cmd} install ${_PIP_INSTALL_ARGS} -v "pip>=${_MINIMUM_PIP_VERSION}" - sleep 1 - echodebug "PATH: ${PATH}" - _pip_cmd="pip${_py_version}" - if ! __check_command_exists "${_pip_cmd}"; then - echodebug "The pip binary '${_pip_cmd}' was not found in PATH" - _pip_cmd="pip$(echo "${_py_version}" | cut -c -1)" - if ! __check_command_exists "${_pip_cmd}"; then - echodebug "The pip binary '${_pip_cmd}' was not found in PATH" - _pip_cmd="pip" - if ! __check_command_exists "${_pip_cmd}"; then - echoerror "Unable to find a pip binary" - return 1 - fi - fi - fi - echodebug "Installed pip version: $(${_pip_cmd} --version)" - fi +## DGM CHECK_PIP_VERSION_SCRIPT=$(cat << EOM +## DGM import sys +## DGM try: +## DGM import pip +## DGM installed_pip_version=tuple([int(part.strip()) for part in pip.__version__.split('.') if part.isdigit()]) +## DGM desired_pip_version=($(echo ${_MINIMUM_PIP_VERSION} | sed 's/\./, /g' )) +## DGM if installed_pip_version < desired_pip_version: +## DGM print('Desired pip version {!r} > Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) +## DGM sys.exit(1) +## DGM print('Desired pip version {!r} < Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) +## DGM sys.exit(0) +## DGM except ImportError: +## DGM print('Failed to import pip') +## DGM sys.exit(1) +## DGM EOM +## DGM ) +## DGM if ! ${_py_exe} -c "$CHECK_PIP_VERSION_SCRIPT"; then +## DGM # Upgrade pip to at least 1.2 which is when we can start using "python3 -m pip" +## DGM echodebug "Running '${_pip_cmd} install ${_PIP_INSTALL_ARGS} pip>=${_MINIMUM_PIP_VERSION}'" +## DGM ${_pip_cmd} install ${_PIP_INSTALL_ARGS} -v "pip>=${_MINIMUM_PIP_VERSION}" +## DGM sleep 1 +## DGM echodebug "PATH: ${PATH}" +## DGM _pip_cmd="pip${_py_version}" +## DGM if ! __check_command_exists "${_pip_cmd}"; then +## DGM echodebug "The pip binary '${_pip_cmd}' was not found in PATH" +## DGM _pip_cmd="pip$(echo "${_py_version}" | cut -c -1)" +## DGM if ! __check_command_exists "${_pip_cmd}"; then +## DGM echodebug "The pip binary '${_pip_cmd}' was not found in PATH" +## DGM _pip_cmd="pip" +## DGM if ! __check_command_exists "${_pip_cmd}"; then +## DGM echoerror "Unable to find a pip binary" +## DGM return 1 +## DGM fi +## DGM fi +## DGM fi +## DGM echodebug "Installed pip version: $(${_pip_cmd} --version)" +## DGM fi _setuptools_dep="setuptools>=${_MINIMUM_SETUPTOOLS_VERSION},<${_MAXIMUM_SETUPTOOLS_VERSION}" if [ "$_PY_MAJOR_VERSION" -ne 3 ]; then @@ -2816,8 +2816,13 @@ EOM fi echoinfo "Downloading Salt Dependencies from PyPi" - echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} .'" - ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} . + if [ "${OS_NAME}" = "Linux" ]; then + echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" + ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r "requirements/static/ci/py${_py_version}/linux.txt" + else + echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} .'" + ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} . + fi # shellcheck disable=SC2181 if [ $? -ne 0 ]; then echo "Failed to download salt dependencies" From a79cd05fa070f32d23e397d291beb18592ff6741 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 26 Nov 2024 10:45:49 -0700 Subject: [PATCH 3/8] Updated to install jaraco.functools v4.0.0 for splat on Linux --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++- .github/workflows/templates/generate.py | 29 +++++++------- bootstrap-salt.sh | 2 + 3 files changed, 66 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 980dc7e15..d7fc1acf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,6 +180,51 @@ jobs: + amazonlinux-2: + name: Amazon 2 + 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: amazonlinux-2 + display-name: Amazon 2 + container-slug: systemd-amazonlinux-2 + timeout: 20 + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' + + + amazonlinux-2023: + name: Amazon 2023 + 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: amazonlinux-2023 + display-name: Amazon 2023 + container-slug: systemd-amazonlinux-2023 + timeout: 20 + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' + + + debian-11: + name: Debian 11 + 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-11 + display-name: Debian 11 + container-slug: systemd-debian-11 + timeout: 20 + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' + + debian-12: name: Debian 12 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' @@ -192,7 +237,7 @@ jobs: display-name: Debian 12 container-slug: systemd-debian-12 timeout: 20 - instances: '["stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' + instances: '["stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]' photon-5: @@ -237,7 +282,7 @@ jobs: display-name: Rocky Linux 9 container-slug: systemd-rockylinux-9 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' + instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]' ubuntu-2204: @@ -267,6 +312,9 @@ jobs: - macos-13 - macos-14 - windows-2022 + - amazonlinux-2 + - amazonlinux-2023 + - debian-11 - debian-12 - photon-5 - rockylinux-8 diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 0207d9888..cab372d80 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -8,16 +8,15 @@ # only test against current containers with systemd # will add these when they become available with systemd -# "amazonlinux-2", -# "amazonlinux-2023", -# "debian-11", -# "debian-12", # "debian-13", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", LINUX_DISTROS = [ + "amazonlinux-2", + "amazonlinux-2023", + "debian-11", "debian-12", "photon-5", "rockylinux-8", @@ -37,15 +36,15 @@ # only test against current containers with systemd # will add these when they become available with systemd -# "amazonlinux-2", -# "amazonlinux-2023", -# "debian-11", # "debian-13", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", STABLE_DISTROS = [ + "amazonlinux-2", + "amazonlinux-2023", + "debian-11", "debian-12", "photon-5", "rockylinux-8", @@ -55,15 +54,15 @@ # only test against current containers with systemd # will add these when they become available with systemd -# "amazonlinux-2", -# "amazonlinux-2023", -# "debian-11", # "debian-13", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", ONEDIR_DISTROS = [ + "amazonlinux-2", + "amazonlinux-2023", + "debian-11", "debian-12", "photon-5", "rockylinux-8", @@ -97,6 +96,7 @@ "photon-5", ] +# "rockylinux-9", # "ubuntu-2204", BLACKLIST_GIT_3006 = [ "amazonlinux-2", @@ -106,36 +106,35 @@ "fedora-40", "photon-4", "photon-5", - "rockylinux-9", "ubuntu-2004", "ubuntu-2404", ] +# "debian-12", +# "rockylinux-9", # "ubuntu-2204", BLACKLIST_GIT_3007 = [ "amazonlinux-2", "amazonlinux-2023", "debian-11", - "debian-12", "debian-13", "fedora-40", "photon-4", "photon-5", - "rockylinux-9", "ubuntu-2004", "ubuntu-2404", ] +# "debian-12", +# "rockylinux-9", BLACKLIST_GIT_MASTER = [ "amazonlinux-2", "amazonlinux-2023", "debian-11", - "debian-12", "debian-13", "fedora-40", "photon-4", "photon-5", - "rockylinux-9", ] SALT_VERSIONS = [ diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b41c25688..f094907b9 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2817,6 +2817,8 @@ __install_salt_from_repo() { echoinfo "Downloading Salt Dependencies from PyPi" if [ "${OS_NAME}" = "Linux" ]; then + echodebug "Solving jaraco.functools splat issue, installing jaraco.functools v4.0.0" + ${_pip_cmd} install "jaraco.functools==4.0.0" || return 1 echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r "requirements/static/ci/py${_py_version}/linux.txt" else From e4b316413634295557f769ea7178b920b6be7da1 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 26 Nov 2024 11:40:09 -0700 Subject: [PATCH 4/8] Updated containers, and added back in AlmaLinux --- .github/workflows/ci.yml | 48 ------------------------- .github/workflows/templates/generate.py | 18 +++++----- bootstrap-salt.sh | 32 ++++++++--------- 3 files changed, 25 insertions(+), 73 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7fc1acf7..3af9085ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -180,51 +180,6 @@ jobs: - amazonlinux-2: - name: Amazon 2 - 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: amazonlinux-2 - display-name: Amazon 2 - container-slug: systemd-amazonlinux-2 - timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' - - - amazonlinux-2023: - name: Amazon 2023 - 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: amazonlinux-2023 - display-name: Amazon 2023 - container-slug: systemd-amazonlinux-2023 - timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' - - - debian-11: - name: Debian 11 - 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-11 - display-name: Debian 11 - container-slug: systemd-debian-11 - timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' - - debian-12: name: Debian 12 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' @@ -312,9 +267,6 @@ jobs: - macos-13 - macos-14 - windows-2022 - - amazonlinux-2 - - amazonlinux-2023 - - debian-11 - debian-12 - photon-5 - rockylinux-8 diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index cab372d80..68ee54ee5 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -8,15 +8,15 @@ # only test against current containers with systemd # will add these when they become available with systemd +# "amazonlinux-2", +# "amazonlinux-2023", +# "debian-11", # "debian-13", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", LINUX_DISTROS = [ - "amazonlinux-2", - "amazonlinux-2023", - "debian-11", "debian-12", "photon-5", "rockylinux-8", @@ -36,15 +36,15 @@ # only test against current containers with systemd # will add these when they become available with systemd +# "amazonlinux-2", +# "amazonlinux-2023", +# "debian-11", # "debian-13", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", STABLE_DISTROS = [ - "amazonlinux-2", - "amazonlinux-2023", - "debian-11", "debian-12", "photon-5", "rockylinux-8", @@ -54,15 +54,15 @@ # only test against current containers with systemd # will add these when they become available with systemd +# "amazonlinux-2", +# "amazonlinux-2023", +# "debian-11", # "debian-13", # "fedora-40", # "photon-4", # "ubuntu-2004", # "ubuntu-2404", ONEDIR_DISTROS = [ - "amazonlinux-2", - "amazonlinux-2023", - "debian-11", "debian-12", "photon-5", "rockylinux-8", diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f094907b9..4e39521f6 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5146,79 +5146,79 @@ install_oracle_linux_check_services() { ####################################################################################################################### # -# RockyLinux Install Functions +# ALmaLinux Install Functions # -install_rockylinux_stable_deps() { +install_almalinux_stable_deps() { install_centos_stable_deps || return 1 return 0 } -install_rockylinux_git_deps() { +install_almalinux_git_deps() { install_centos_git_deps || return 1 return 0 } -install_rockylinux_onedir_deps() { +install_almalinux_onedir_deps() { install_centos_onedir_deps || return 1 return 0 } -install_rockylinux_testing_deps() { +install_almalinux_testing_deps() { install_centos_testing_deps || return 1 return 0 } -install_rockylinux_stable() { +install_almalinux_stable() { install_centos_stable || return 1 return 0 } -install_rockylinux_git() { +install_almalinux_git() { install_centos_git || return 1 return 0 } -install_rockylinux_onedir() { +install_almalinux_onedir() { install_centos_onedir || return 1 return 0 } -install_rockylinux_testing() { +install_almalinux_testing() { install_centos_testing || return 1 return 0 } -install_rockylinux_stable_post() { +install_almalinux_stable_post() { install_centos_stable_post || return 1 return 0 } -install_rockylinux_git_post() { +install_almalinux_git_post() { install_centos_git_post || return 1 return 0 } -install_rockylinux_onedir_post() { +install_almalinux_onedir_post() { install_centos_onedir_post || return 1 return 0 } -install_rockylinux_testing_post() { +install_almalinux_testing_post() { install_centos_testing_post || return 1 return 0 } -install_rockylinux_restart_daemons() { +install_almalinux_restart_daemons() { install_centos_restart_daemons || return 1 return 0 } -install_rockylinux_check_services() { +install_almalinux_check_services() { install_centos_check_services || return 1 return 0 } # -# Ended RockyLinux Install Functions +# Ended AlmaLinux Install Functions # ####################################################################################################################### From 9b3055b1bd2c619d979dfce29edc80f756671c4d Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 26 Nov 2024 15:06:24 -0700 Subject: [PATCH 5/8] Testing fixes for PyPI requirements clashes --- bootstrap-salt.sh | 50 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 4e39521f6..49c006f3c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2815,27 +2815,47 @@ __install_salt_from_repo() { fi fi - echoinfo "Downloading Salt Dependencies from PyPi" - if [ "${OS_NAME}" = "Linux" ]; then - echodebug "Solving jaraco.functools splat issue, installing jaraco.functools v4.0.0" - ${_pip_cmd} install "jaraco.functools==4.0.0" || return 1 - echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" - ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r "requirements/static/ci/py${_py_version}/linux.txt" - else - echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} .'" - ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} . - fi + ## DGM echoinfo "Downloading Salt Dependencies from PyPi" + ## DGM if [ "${OS_NAME}" = "Linux" ]; then + ## DGM echodebug "Solving jaraco.functools splat issue, installing jaraco.functools v4.0.0" + ## DGM ${_pip_cmd} install "jaraco.functools==4.0.0" || return 1 + ## DGM echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" + ## DGM ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r "requirements/static/ci/py${_py_version}/linux.txt" + ## DGM else + ## DGM echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} .'" + ## DGM ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} . + ## DGM fi + ## DGM # shellcheck disable=SC2181 + ## DGM if [ $? -ne 0 ]; then + ## DGM echo "Failed to download salt dependencies" + ## DGM return 1 + ## DGM fi + + + ## DGM echoinfo "Installing Downloaded Salt Dependencies" + ## DGM echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/*'" + ## DGM ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/* || return 1 + + rm -f /tmp/git/deps/* + + ## DGM different attempt, try installing requirements + echoinfo "DGM Installing Salt reuqirements from PyPi, ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} -r "requirements/static/ci/py${_py_version}/linux.txt" # shellcheck disable=SC2181 if [ $? -ne 0 ]; then - echo "Failed to download salt dependencies" + echo "Failed to install salt requirements for the version of Python ${_py_version}" return 1 fi + if [ "${OS_NAME}" = "Linux" ]; then + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.functools==4.1.0" || return 1 + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.text==4.0.0" || return 1 + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.collections==5.1.0" || return 1 + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.context==6.0.1" || return 1 + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.classes==3.4.0" || return 1 - echoinfo "Installing Downloaded Salt Dependencies" - echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/*'" - ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/* || return 1 - rm -f /tmp/git/deps/* + ${_pip_cmd} list + fi echoinfo "Building Salt Python Wheel" if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then From d0bd4612a69b2075c73f4bfdb94d307181c56dd9 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 26 Nov 2024 17:32:02 -0700 Subject: [PATCH 6/8] Testing pip installs from PyPI --- bootstrap-salt.sh | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 49c006f3c..5dacb8828 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -26,7 +26,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2024.11.26" +__ScriptVersion="2024.11.27" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -2797,6 +2797,9 @@ __install_salt_from_repo() { echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --upgrade ${_PIP_INSTALL_ARGS} wheel ${_setuptools_dep}" ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --upgrade ${_PIP_INSTALL_ARGS} wheel "${_setuptools_dep}" + echodebug "DGM doing pip list" + ${_pip_cmd} list + echoinfo "Installing salt using ${_py_exe}, $(${_py_exe} --version)" cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 @@ -2836,10 +2839,16 @@ __install_salt_from_repo() { ## DGM echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/*'" ## DGM ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/* || return 1 + echodebug "DGM doing pip list" + ${_pip_cmd} list + rm -f /tmp/git/deps/* + echodebug "DGM doing pip list" + ${_pip_cmd} list + ## DGM different attempt, try installing requirements - echoinfo "DGM Installing Salt reuqirements from PyPi, ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" + echoinfo "DGM Installing Salt requirements from PyPi, ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} -r "requirements/static/ci/py${_py_version}/linux.txt" # shellcheck disable=SC2181 if [ $? -ne 0 ]; then @@ -2854,6 +2863,7 @@ __install_salt_from_repo() { ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.context==6.0.1" || return 1 ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.classes==3.4.0" || return 1 + echodebug "DGM doing pip list" ${_pip_cmd} list fi @@ -6400,7 +6410,7 @@ install_photon_deps() { __PACKAGES="${__PACKAGES} libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pip python${PY_PKG_VER}-m2crypto python${PY_PKG_VER}-pyyaml" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd sudo shadow" if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" @@ -6450,6 +6460,14 @@ install_photon_git_deps() { __PACKAGES="${__PACKAGES} git" fi + if ! __check_command_exists sudo; then + __PACKAGES="${__PACKAGES} sudo" + fi + + if ! __check_command_exists usermod; then + __PACKAGES="${__PACKAGES} shadow" + fi + if [ -n "${__PACKAGES}" ]; then # shellcheck disable=SC2086 __tdnf_install_noinput ${__PACKAGES} || return 1 @@ -6498,6 +6516,8 @@ install_photon_git() { return 1 fi + install_photon_git_deps + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then ${_PYEXE} setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install --prefix=/usr || return 1 else @@ -6606,7 +6626,7 @@ install_photon_onedir_deps() { __install_saltstack_photon_onedir_repository || return 1 fi - __PACKAGES="procps-ng" + __PACKAGES="procps-ng sudo shadow" # shellcheck disable=SC2086 __tdnf_install_noinput ${__PACKAGES} || return 1 From 3c0f302b77f603b4abace42d0b164c789222bcbc Mon Sep 17 00:00:00 2001 From: David Murphy Date: Wed, 27 Nov 2024 11:26:48 -0700 Subject: [PATCH 7/8] Added support for AlmaLinux, removed Rocky Linux 9 from git testing --- .github/workflows/ci.yml | 4 +- .github/workflows/templates/generate.py | 8 +-- bootstrap-salt.sh | 75 +------------------------ 3 files changed, 7 insertions(+), 80 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3af9085ab..e88f30f52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -207,7 +207,7 @@ jobs: display-name: Photon OS 5 container-slug: systemd-photon-5 timeout: 20 - instances: '["stable-3006", "onedir-3006", "stable-3006-8", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' rockylinux-8: @@ -237,7 +237,7 @@ jobs: display-name: Rocky Linux 9 container-slug: systemd-rockylinux-9 timeout: 20 - instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-8", "stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "git-master", "latest", "default"]' + instances: '["stable-3006", "onedir-3006", "stable-3006-8", "stable-3007", "onedir-3007", "stable-3007-1", "latest", "default"]' ubuntu-2204: diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index 68ee54ee5..ca31b4cfa 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -91,12 +91,11 @@ "ubuntu-2404", ] +# "photon-5", BLACKLIST_3007 = [ "photon-4", - "photon-5", ] -# "rockylinux-9", # "ubuntu-2204", BLACKLIST_GIT_3006 = [ "amazonlinux-2", @@ -106,12 +105,12 @@ "fedora-40", "photon-4", "photon-5", + "rockylinux-9", "ubuntu-2004", "ubuntu-2404", ] # "debian-12", -# "rockylinux-9", # "ubuntu-2204", BLACKLIST_GIT_3007 = [ "amazonlinux-2", @@ -121,12 +120,12 @@ "fedora-40", "photon-4", "photon-5", + "rockylinux-9", "ubuntu-2004", "ubuntu-2404", ] # "debian-12", -# "rockylinux-9", BLACKLIST_GIT_MASTER = [ "amazonlinux-2", "amazonlinux-2023", @@ -135,6 +134,7 @@ "fedora-40", "photon-4", "photon-5", + "rockylinux-9", ] SALT_VERSIONS = [ diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5dacb8828..f43acdfbe 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2742,44 +2742,6 @@ __install_salt_from_repo() { echodebug "Installed pip version: $(${_pip_cmd} --version)" -## DGM CHECK_PIP_VERSION_SCRIPT=$(cat << EOM -## DGM import sys -## DGM try: -## DGM import pip -## DGM installed_pip_version=tuple([int(part.strip()) for part in pip.__version__.split('.') if part.isdigit()]) -## DGM desired_pip_version=($(echo ${_MINIMUM_PIP_VERSION} | sed 's/\./, /g' )) -## DGM if installed_pip_version < desired_pip_version: -## DGM print('Desired pip version {!r} > Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) -## DGM sys.exit(1) -## DGM print('Desired pip version {!r} < Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) -## DGM sys.exit(0) -## DGM except ImportError: -## DGM print('Failed to import pip') -## DGM sys.exit(1) -## DGM EOM -## DGM ) -## DGM if ! ${_py_exe} -c "$CHECK_PIP_VERSION_SCRIPT"; then -## DGM # Upgrade pip to at least 1.2 which is when we can start using "python3 -m pip" -## DGM echodebug "Running '${_pip_cmd} install ${_PIP_INSTALL_ARGS} pip>=${_MINIMUM_PIP_VERSION}'" -## DGM ${_pip_cmd} install ${_PIP_INSTALL_ARGS} -v "pip>=${_MINIMUM_PIP_VERSION}" -## DGM sleep 1 -## DGM echodebug "PATH: ${PATH}" -## DGM _pip_cmd="pip${_py_version}" -## DGM if ! __check_command_exists "${_pip_cmd}"; then -## DGM echodebug "The pip binary '${_pip_cmd}' was not found in PATH" -## DGM _pip_cmd="pip$(echo "${_py_version}" | cut -c -1)" -## DGM if ! __check_command_exists "${_pip_cmd}"; then -## DGM echodebug "The pip binary '${_pip_cmd}' was not found in PATH" -## DGM _pip_cmd="pip" -## DGM if ! __check_command_exists "${_pip_cmd}"; then -## DGM echoerror "Unable to find a pip binary" -## DGM return 1 -## DGM fi -## DGM fi -## DGM fi -## DGM echodebug "Installed pip version: $(${_pip_cmd} --version)" -## DGM fi - _setuptools_dep="setuptools>=${_MINIMUM_SETUPTOOLS_VERSION},<${_MAXIMUM_SETUPTOOLS_VERSION}" if [ "$_PY_MAJOR_VERSION" -ne 3 ]; then echoerror "Python version is no longer supported, only Python 3" @@ -2797,15 +2759,11 @@ __install_salt_from_repo() { echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --upgrade ${_PIP_INSTALL_ARGS} wheel ${_setuptools_dep}" ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --upgrade ${_PIP_INSTALL_ARGS} wheel "${_setuptools_dep}" - echodebug "DGM doing pip list" - ${_pip_cmd} list - echoinfo "Installing salt using ${_py_exe}, $(${_py_exe} --version)" cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 mkdir -p /tmp/git/deps echodebug "Created directory /tmp/git/deps" - echodebug "Installing Salt dependencies for Salt version $(python3 salt/version.py)" if [ ${DISTRO_NAME_L} = "ubuntu" ] && [ "$DISTRO_MAJOR_VERSION" -eq 22 ]; then echodebug "Ubuntu 22.04 has problem with base.txt requirements file, not parsing sys_platform == 'win32', upgrading from default pip works" @@ -2818,37 +2776,9 @@ __install_salt_from_repo() { fi fi - ## DGM echoinfo "Downloading Salt Dependencies from PyPi" - ## DGM if [ "${OS_NAME}" = "Linux" ]; then - ## DGM echodebug "Solving jaraco.functools splat issue, installing jaraco.functools v4.0.0" - ## DGM ${_pip_cmd} install "jaraco.functools==4.0.0" || return 1 - ## DGM echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" - ## DGM ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} -r "requirements/static/ci/py${_py_version}/linux.txt" - ## DGM else - ## DGM echodebug "Running '${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} .'" - ## DGM ${_pip_cmd} download -d /tmp/git/deps ${_PIP_DOWNLOAD_ARGS} . - ## DGM fi - ## DGM # shellcheck disable=SC2181 - ## DGM if [ $? -ne 0 ]; then - ## DGM echo "Failed to download salt dependencies" - ## DGM return 1 - ## DGM fi - - - ## DGM echoinfo "Installing Downloaded Salt Dependencies" - ## DGM echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/*'" - ## DGM ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} /tmp/git/deps/* || return 1 - - echodebug "DGM doing pip list" - ${_pip_cmd} list - rm -f /tmp/git/deps/* - echodebug "DGM doing pip list" - ${_pip_cmd} list - - ## DGM different attempt, try installing requirements - echoinfo "DGM Installing Salt requirements from PyPi, ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" + echodebug "Installing Salt requirements from PyPi, ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} -r requirements/static/ci/py${_py_version}/linux.txt" ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed ${_PIP_INSTALL_ARGS} -r "requirements/static/ci/py${_py_version}/linux.txt" # shellcheck disable=SC2181 if [ $? -ne 0 ]; then @@ -2862,9 +2792,6 @@ __install_salt_from_repo() { ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.collections==5.1.0" || return 1 ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.context==6.0.1" || return 1 ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --ignore-installed --upgrade ${_PIP_INSTALL_ARGS} "jaraco.classes==3.4.0" || return 1 - - echodebug "DGM doing pip list" - ${_pip_cmd} list fi echoinfo "Building Salt Python Wheel" From 7492ff27f307ffd6068c5c6f4abbb640c3df522e Mon Sep 17 00:00:00 2001 From: Salt Project Packaging Date: Wed, 27 Nov 2024 18:56:47 +0000 Subject: [PATCH 8/8] Update develop branch for the v2024.11.27 release --- CHANGELOG.md | 8 ++++++++ bootstrap-salt.ps1 | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4d9ac944..ae589d07b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# v2024.11.27 + +## What's Changed + +- Testing git install methods by @dmurphy18 in https://github.com/saltstack/salt-bootstrap/pull/2057 + +**Full Changelog**: https://github.com/saltstack/salt-bootstrap/compare/v2024.11.26...v2024.11.27 + # v2024.11.26 ## What's Changed diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index cd70eebad..4a0d30fda 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -108,7 +108,7 @@ if ($help) { exit 0 } -$__ScriptVersion = "2024.11.26" +$__ScriptVersion = "2024.11.27" $ScriptName = $myInvocation.MyCommand.Name # We'll check for the Version next, because it also has no requirements