From b17e02b4b39db113ce28f1ec5f683dbd9822e186 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 17 Sep 2024 16:32:36 -0600 Subject: [PATCH 01/14] Added Salt version information and debug info --- bootstrap-salt.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 072b3fd8a..1c0d32b44 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2106,6 +2106,7 @@ __git_clone_and_checkout() { # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}" __SHALLOW_CLONE=$BS_TRUE + echoinfo "shallow git cloned $GIT_REV, version $(git describe)" else # Shallow clone above failed(missing upstream tags???), let's resume the old behaviour. echowarn "Failed to shallow clone." @@ -2123,6 +2124,8 @@ __git_clone_and_checkout() { # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}" + echoinfo "git cloned $GIT_REV, version $(git describe)" + if ! echo "$_SALT_REPO_URL" | grep -q -F -w "${_SALTSTACK_REPO_URL#*://}"; then # We need to add the saltstack repository as a remote and fetch tags for proper versioning echoinfo "Adding SaltStack's Salt repository as a remote" @@ -2698,7 +2701,9 @@ EOM echoinfo "Installing salt using ${_py_exe}" cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 - mkdir /tmp/git/deps + mkdir -p /tmp/git/deps + echodebug "Created directory /tmp/git/deps" + echodebug "Installing Salt dependencies for Salt version $(git describe)" 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" From 6c37a9a9c3a9999a3b84e9c5280ed33b28a3af41 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Tue, 17 Sep 2024 17:33:51 -0600 Subject: [PATCH 02/14] Getting Salt version directly --- bootstrap-salt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 1c0d32b44..4665bef6e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2106,7 +2106,7 @@ __git_clone_and_checkout() { # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}" __SHALLOW_CLONE=$BS_TRUE - echoinfo "shallow git cloned $GIT_REV, version $(git describe)" + echoinfo "shallow git cloned $GIT_REV, version $(python3 salt/version.py)" else # Shallow clone above failed(missing upstream tags???), let's resume the old behaviour. echowarn "Failed to shallow clone." @@ -2124,7 +2124,7 @@ __git_clone_and_checkout() { # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}" - echoinfo "git cloned $GIT_REV, version $(git describe)" + echoinfo "git cloned $GIT_REV, version $(python3 salt/version.py)" if ! echo "$_SALT_REPO_URL" | grep -q -F -w "${_SALTSTACK_REPO_URL#*://}"; then # We need to add the saltstack repository as a remote and fetch tags for proper versioning @@ -2703,7 +2703,7 @@ EOM mkdir -p /tmp/git/deps echodebug "Created directory /tmp/git/deps" - echodebug "Installing Salt dependencies for Salt version $(git describe)" + 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" From 9848c3311e9ad4e5f8daf75b2863808299c860cf Mon Sep 17 00:00:00 2001 From: David Murphy Date: Wed, 18 Sep 2024 09:58:40 -0600 Subject: [PATCH 03/14] Git shallow cloning removal of depth --- bootstrap-salt.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 4665bef6e..b98f17e37 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -260,7 +260,7 @@ _EXTRA_PACKAGES="" _HTTP_PROXY="" _SALT_GIT_CHECKOUT_DIR=${BS_SALT_GIT_CHECKOUT_DIR:-/tmp/git/salt} _NO_DEPS=$BS_FALSE -_FORCE_SHALLOW_CLONE=$BS_FALSE +## DGM _FORCE_SHALLOW_CLONE=$BS_FALSE _DISABLE_SSL=$BS_FALSE _DISABLE_REPOS=$BS_FALSE _CUSTOM_REPO_URL="null" @@ -2102,7 +2102,12 @@ __git_clone_and_checkout() { if [ "$(git clone 2>&1 | grep 'single-branch')" != "" ]; then # The "--single-branch" option is supported, attempt shallow cloning echoinfo "Attempting to shallow clone $GIT_REV from Salt's repository ${_SALT_REPO_URL}" - if git clone --depth 1 --branch "$GIT_REV" "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME"; then + ## DGM Shallow cloning is resulting in the wrong version of Salt, even with a depth of 5 + ## DGM getting 3007.0+0na.246d066 when it should be 3007.1+410.g246d066457 + ## DGM disabling for now + ## DGM if git clone --depth 1 --branch "$GIT_REV" "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME"; then + echodebug "git command, git clone --branch $GIT_REV $_SALT_REPO_URL $__SALT_CHECKOUT_REPONAME" + if git clone --branch "$GIT_REV" "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME"; then # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}" __SHALLOW_CLONE=$BS_TRUE @@ -2120,6 +2125,7 @@ __git_clone_and_checkout() { fi if [ "$__SHALLOW_CLONE" -eq $BS_FALSE ]; then + echodebug "shadow clone false, BS_FALSE $BS_FALSE, git clone $_SALT_REPO_URL $__SALT_CHECKOUT_REPONAME" git clone "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME" || return 1 # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}" From 8c9e6621db01ea9e891d1f6406f0f56a83433b1b Mon Sep 17 00:00:00 2001 From: David Murphy Date: Wed, 18 Sep 2024 17:00:36 -0600 Subject: [PATCH 04/14] Removed testing for OpenSUSE Tumbleweed and install contextvars for Fedora git --- .github/workflows/ci.yml | 15 --------------- .github/workflows/templates/generate.py | 14 +++++++------- bootstrap-salt.sh | 4 ++++ kitchen.yml | 17 +++++++++-------- 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c81057c1..bc416fed5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -346,20 +346,6 @@ jobs: instances: '["latest", "default"]' - opensuse-tumbleweed: - name: Opensuse Tumbleweed - 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: opensuse-tumbleweed - display-name: Opensuse Tumbleweed - timeout: 20 - instances: '["git-master", "latest", "default"]' - - oraclelinux-8: name: Oracle Linux 8 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' @@ -510,7 +496,6 @@ jobs: - gentoo - gentoo-systemd - opensuse-15 - - opensuse-tumbleweed - oraclelinux-8 - oraclelinux-9 - photon-4 diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index a1cd88726..0fb618158 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -7,6 +7,7 @@ os.chdir(os.path.abspath(os.path.dirname(__file__))) ## "amazon-2023", +## "opensuse-tumbleweed", LINUX_DISTROS = [ "almalinux-8", "almalinux-9", @@ -20,7 +21,6 @@ "gentoo", "gentoo-systemd", "opensuse-15", - "opensuse-tumbleweed", "oraclelinux-8", "oraclelinux-9", "photon-4", @@ -43,6 +43,7 @@ ## "amazon-2023", +## "opensuse-tumbleweed", STABLE_DISTROS = [ "almalinux-8", "almalinux-9", @@ -54,7 +55,6 @@ "fedora-39", "fedora-40", "opensuse-15", - "opensuse-tumbleweed", "oraclelinux-8", "oraclelinux-9", "photon-4", @@ -99,6 +99,7 @@ "ubuntu-2404", ] +## "opensuse-tumbleweed", BLACKLIST_3006 = [ "arch", "debian-12", @@ -106,22 +107,22 @@ "gentoo", "gentoo-systemd", "opensuse-15", - "opensuse-tumbleweed", "ubuntu-2404", ] +## "opensuse-tumbleweed", BLACKLIST_3007 = [ "arch", "fedora-39", "gentoo", "gentoo-systemd", "opensuse-15", - "opensuse-tumbleweed", "photon-4", "photon-5", ] ## "amazon-2023", +## "opensuse-tumbleweed", BLACKLIST_GIT_3006 = [ "almalinux-9", "amazon-2", @@ -133,7 +134,6 @@ "gentoo", "gentoo-systemd", "opensuse-15", - "opensuse-tumbleweed", "oraclelinux-9", "photon-4", "photon-5", @@ -144,6 +144,7 @@ ] ## "amazon-2023", +## "opensuse-tumbleweed", BLACKLIST_GIT_3007 = [ "almalinux-9", "amazon-2", @@ -156,7 +157,6 @@ "gentoo", "gentoo-systemd", "opensuse-15", - "opensuse-tumbleweed", "oraclelinux-9", "photon-4", "photon-5", @@ -240,6 +240,7 @@ ] ## "amazon-2023": "Amazon 2023", +## "opensuse-tumbleweed": "Opensuse Tumbleweed", DISTRO_DISPLAY_NAMES = { "almalinux-8": "AlmaLinux 8", "almalinux-9": "AlmaLinux 9", @@ -253,7 +254,6 @@ "gentoo": "Gentoo", "gentoo-systemd": "Gentoo (systemd)", "opensuse-15": "Opensuse 15", - "opensuse-tumbleweed": "Opensuse Tumbleweed", "oraclelinux-8": "Oracle Linux 8", "oraclelinux-9": "Oracle Linux 9", "photon-4": "Photon OS 4", diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b98f17e37..ef88685c3 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3843,6 +3843,10 @@ install_fedora_git_deps() { CONFIG_SALT_FUNC="config_salt" fi + _fedora_dep="contextvars" + echodebug "Running '${_PY_EXE} -m pip install --upgrade ${_fedora_dep}'" + ${_PY_EXE} -m pip install --upgrade "${_fedora_dep}" + return 0 } diff --git a/kitchen.yml b/kitchen.yml index 4fe49f6f8..62cc73808 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -36,6 +36,15 @@ provisioner: ## - yum -y install --allowerasing procps-ng curl ## - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config +## - name: opensuse-tumbleweed +## driver: +## image: opensuse/tumbleweed:latest +## provision_command: +## - *opensuse_provision_command_01 +## - *opensuse_provision_command_02 +## - *opensuse_provision_command_03 +## - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config + platforms: - name: almalinux-9 driver: @@ -104,14 +113,6 @@ platforms: - &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 - &opensuse_provision_command_03 systemctl enable sshd.service - - name: opensuse-tumbleweed - driver: - image: opensuse/tumbleweed:latest - provision_command: - - *opensuse_provision_command_01 - - *opensuse_provision_command_02 - - *opensuse_provision_command_03 - - echo "PubkeyAcceptedAlgorithms +ssh-rsa" | tee -a /etc/ssh/sshd_config - name: rockylinux-9 driver: platform: centosstream From fba26a227b17a999b0778a5a369a6258c7ef069a Mon Sep 17 00:00:00 2001 From: David Murphy Date: Thu, 19 Sep 2024 09:17:30 -0600 Subject: [PATCH 05/14] Forcing setuptools to Salt requirements/constraints.txt setuptools >= 65.6.3,< 69.0 --- bootstrap-salt.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ef88685c3..6abf83cbb 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -272,7 +272,9 @@ _ONEDIR_DIR="salt" _ONEDIR_NIGHTLY_DIR="salt-dev/${_ONEDIR_DIR}" _PY_EXE="python3" _MINIMUM_PIP_VERSION="9.0.1" -_MINIMUM_SETUPTOOLS_VERSION="9.1" +## DGM _MINIMUM_SETUPTOOLS_VERSION="9.1" +_MINIMUM_SETUPTOOLS_VERSION="65.6.3" +_MAXIMUM_SETUPTOOLS_VERSION="69" _PIP_INSTALL_ARGS="--prefix=/usr" _PIP_DOWNLOAD_ARGS="" _QUICK_START="$BS_FALSE" @@ -1853,7 +1855,7 @@ if [ "$ITYPE" = "git" ]; then echowarn "git based installations will always install salt" echowarn "and its dependencies using pip which will be upgraded to" echowarn "at least v${_MINIMUM_PIP_VERSION}, and, in case the setuptools version is also" - echowarn "too old, it will be upgraded to at least v${_MINIMUM_SETUPTOOLS_VERSION}" + echowarn "too old, it will be upgraded to at least v${_MINIMUM_SETUPTOOLS_VERSION} and less than v${_MAXIMUM_SETUPTOOLS_VERSION}" echo echowarn "You have 10 seconds to cancel and stop the bootstrap process..." echo @@ -2687,7 +2689,7 @@ EOM echodebug "Installed pip version: $(${_pip_cmd} --version)" fi - _setuptools_dep="setuptools>=${_MINIMUM_SETUPTOOLS_VERSION}" + _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" return 1 @@ -2704,7 +2706,7 @@ EOM 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}" - echoinfo "Installing salt using ${_py_exe}" + echoinfo "Installing salt using ${_py_exe}, $(${_py_exe} --version)" cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 mkdir -p /tmp/git/deps @@ -6039,7 +6041,7 @@ install_photon_git_deps() { if [ "${DISTRO_MAJOR_VERSION}" -gt 3 ]; then # Need newer version of setuptools on Photon - _setuptools_dep="setuptools>=${_MINIMUM_SETUPTOOLS_VERSION}" + _setuptools_dep="setuptools>=${_MINIMUM_SETUPTOOLS_VERSION},<${_MAXIMUM_SETUPTOOLS_VERSION}" echodebug "Running '${_PY_EXE} -m pip install --upgrade ${_setuptools_dep}'" ${_PY_EXE} -m pip install --upgrade "${_setuptools_dep}" fi From d7baa83fc61ae892213ff0002e66e5ae1ac4b412 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Thu, 19 Sep 2024 09:18:35 -0600 Subject: [PATCH 06/14] Fixed typo --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 6abf83cbb..38a76abb2 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -274,7 +274,7 @@ _PY_EXE="python3" _MINIMUM_PIP_VERSION="9.0.1" ## DGM _MINIMUM_SETUPTOOLS_VERSION="9.1" _MINIMUM_SETUPTOOLS_VERSION="65.6.3" -_MAXIMUM_SETUPTOOLS_VERSION="69" +_MAXIMUM_SETUPTOOLS_VERSION="69.0" _PIP_INSTALL_ARGS="--prefix=/usr" _PIP_DOWNLOAD_ARGS="" _QUICK_START="$BS_FALSE" From da9ad0b8bf9c7501ec2e4c39236b3228f391b7cf Mon Sep 17 00:00:00 2001 From: David Murphy Date: Thu, 19 Sep 2024 14:05:23 -0600 Subject: [PATCH 07/14] Force Arch git deps to use cryptography 42.0.0 --- bootstrap-salt.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 38a76abb2..2329f91d3 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5734,6 +5734,10 @@ install_arch_linux_git_deps() { CONFIG_SALT_FUNC="config_salt" fi + _arch_dep="cryptography==42.0.0" + echodebug "Running '${_PY_EXE} -m pip install --upgrade ${_arch_dep}'" + ${_PY_EXE} -m pip install --upgrade "${_arch_dep}" + return 0 } From 70558b1768beb8bed66cb8cb319893f787b17d5f Mon Sep 17 00:00:00 2001 From: David Murphy Date: Thu, 19 Sep 2024 14:29:55 -0600 Subject: [PATCH 08/14] Forcing pip install on Arch --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2329f91d3..6f039919c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5735,7 +5735,7 @@ install_arch_linux_git_deps() { fi _arch_dep="cryptography==42.0.0" - echodebug "Running '${_PY_EXE} -m pip install --upgrade ${_arch_dep}'" + echodebug "Running '${_PY_EXE} -m pip install -break-system-packages --upgrade ${_arch_dep}'" ${_PY_EXE} -m pip install --upgrade "${_arch_dep}" return 0 From ae440cb321259d138bdeed2eb2592744c20b16d8 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Thu, 19 Sep 2024 14:49:28 -0600 Subject: [PATCH 09/14] Fix typo --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 6f039919c..87ee6cd43 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5735,7 +5735,7 @@ install_arch_linux_git_deps() { fi _arch_dep="cryptography==42.0.0" - echodebug "Running '${_PY_EXE} -m pip install -break-system-packages --upgrade ${_arch_dep}'" + echodebug "Running '${_PY_EXE} -m pip install --break-system-packages --upgrade ${_arch_dep}'" ${_PY_EXE} -m pip install --upgrade "${_arch_dep}" return 0 From 7c6a4a0da7333db9777b60d591903859a6db5552 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 20 Sep 2024 09:47:04 -0600 Subject: [PATCH 10/14] debugging --- bootstrap-salt.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 87ee6cd43..468fed6ef 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1238,6 +1238,7 @@ __gather_linux_system_info() { esac DISTRO_NAME=$n DISTRO_VERSION=$v + echodebug "Linux distro '${DISTRO_NAME}', distro version '${DISTRO_VERSION}'" break done } @@ -1250,6 +1251,7 @@ __gather_linux_system_info() { __gather_osx_system_info() { DISTRO_NAME="MacOSX" DISTRO_VERSION=$(sw_vers -productVersion) + echodebug "MacOS distro '${DISTRO_NAME}', distro version '${DISTRO_VERSION}'" } @@ -2742,6 +2744,13 @@ EOM echoinfo "Installing Built Salt Wheel" ${_pip_cmd} uninstall --yes ${_USE_BREAK_SYSTEM_PACKAGES} salt 2>/dev/null || true + + if [ "${DISTRO_NAME}" = "Arch Linux" ]; then + _arch_dep="cryptography==42.0.0" + echodebug "Running '${_pip_cmd} --force-reinstall --break-system-packages ${_arch_dep}'" + ${_pip_cmd} --force-reinstall --break-system-packages "${_arch_dep}" + fi + echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --no-deps --force-reinstall ${_PIP_INSTALL_ARGS} /tmp/git/deps/salt*.whl'" ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --no-deps --force-reinstall \ @@ -5734,10 +5743,6 @@ install_arch_linux_git_deps() { CONFIG_SALT_FUNC="config_salt" fi - _arch_dep="cryptography==42.0.0" - echodebug "Running '${_PY_EXE} -m pip install --break-system-packages --upgrade ${_arch_dep}'" - ${_PY_EXE} -m pip install --upgrade "${_arch_dep}" - return 0 } From ec457c25ae5377e45cef4c1605bab6a294046542 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 20 Sep 2024 10:22:37 -0600 Subject: [PATCH 11/14] more debugging --- bootstrap-salt.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 468fed6ef..9ac1a0659 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1238,7 +1238,6 @@ __gather_linux_system_info() { esac DISTRO_NAME=$n DISTRO_VERSION=$v - echodebug "Linux distro '${DISTRO_NAME}', distro version '${DISTRO_VERSION}'" break done } @@ -1251,7 +1250,6 @@ __gather_linux_system_info() { __gather_osx_system_info() { DISTRO_NAME="MacOSX" DISTRO_VERSION=$(sw_vers -productVersion) - echodebug "MacOS distro '${DISTRO_NAME}', distro version '${DISTRO_VERSION}'" } @@ -2747,12 +2745,14 @@ EOM if [ "${DISTRO_NAME}" = "Arch Linux" ]; then _arch_dep="cryptography==42.0.0" - echodebug "Running '${_pip_cmd} --force-reinstall --break-system-packages ${_arch_dep}'" - ${_pip_cmd} --force-reinstall --break-system-packages "${_arch_dep}" + echodebug "Running '${_pip_cmd} install --force-reinstall --break-system-packages ${_arch_dep}'" + ${_pip_cmd} install --force-reinstall --break-system-packages "${_arch_dep}" fi echodebug "Running '${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --no-deps --force-reinstall ${_PIP_INSTALL_ARGS} /tmp/git/deps/salt*.whl'" + echodebug "Running ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --no-deps --force-reinstall ${_PIP_INSTALL_ARGS} --global-option=--salt-config-dir=$_SALT_ETC_DIR --salt-cache-dir=${_SALT_CACHE_DIR} ${SETUP_PY_INSTALL_ARGS} /tmp/git/deps/salt*.whl" + ${_pip_cmd} install ${_USE_BREAK_SYSTEM_PACKAGES} --no-deps --force-reinstall \ ${_PIP_INSTALL_ARGS} \ --global-option="--salt-config-dir=$_SALT_ETC_DIR --salt-cache-dir=${_SALT_CACHE_DIR} ${SETUP_PY_INSTALL_ARGS}" \ From 425fb310f6fe3b3ff5b8298f446d012d9e8e76b1 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 20 Sep 2024 11:19:13 -0600 Subject: [PATCH 12/14] Setting cryptography to 42.0.7 for Arch, its current version - debugging --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 9ac1a0659..9802a25b2 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2744,7 +2744,7 @@ EOM ${_pip_cmd} uninstall --yes ${_USE_BREAK_SYSTEM_PACKAGES} salt 2>/dev/null || true if [ "${DISTRO_NAME}" = "Arch Linux" ]; then - _arch_dep="cryptography==42.0.0" + _arch_dep="cryptography==42.0.7" # debug matching current Arch version of python-cryptography echodebug "Running '${_pip_cmd} install --force-reinstall --break-system-packages ${_arch_dep}'" ${_pip_cmd} install --force-reinstall --break-system-packages "${_arch_dep}" fi From a4b8359357e01b5cc32b3b9692ed0991fead0b9c Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 20 Sep 2024 12:51:23 -0600 Subject: [PATCH 13/14] Finialize changes for working Arch git-master --- bootstrap-salt.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 9802a25b2..d2aab1708 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -260,7 +260,7 @@ _EXTRA_PACKAGES="" _HTTP_PROXY="" _SALT_GIT_CHECKOUT_DIR=${BS_SALT_GIT_CHECKOUT_DIR:-/tmp/git/salt} _NO_DEPS=$BS_FALSE -## DGM _FORCE_SHALLOW_CLONE=$BS_FALSE +_FORCE_SHALLOW_CLONE=$BS_FALSE _DISABLE_SSL=$BS_FALSE _DISABLE_REPOS=$BS_FALSE _CUSTOM_REPO_URL="null" @@ -272,7 +272,6 @@ _ONEDIR_DIR="salt" _ONEDIR_NIGHTLY_DIR="salt-dev/${_ONEDIR_DIR}" _PY_EXE="python3" _MINIMUM_PIP_VERSION="9.0.1" -## DGM _MINIMUM_SETUPTOOLS_VERSION="9.1" _MINIMUM_SETUPTOOLS_VERSION="65.6.3" _MAXIMUM_SETUPTOOLS_VERSION="69.0" _PIP_INSTALL_ARGS="--prefix=/usr" @@ -2104,10 +2103,9 @@ __git_clone_and_checkout() { if [ "$(git clone 2>&1 | grep 'single-branch')" != "" ]; then # The "--single-branch" option is supported, attempt shallow cloning echoinfo "Attempting to shallow clone $GIT_REV from Salt's repository ${_SALT_REPO_URL}" - ## DGM Shallow cloning is resulting in the wrong version of Salt, even with a depth of 5 - ## DGM getting 3007.0+0na.246d066 when it should be 3007.1+410.g246d066457 - ## DGM disabling for now - ## DGM if git clone --depth 1 --branch "$GIT_REV" "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME"; then + ## Shallow cloning is resulting in the wrong version of Salt, even with a depth of 5 + ## getting 3007.0+0na.246d066 when it should be 3007.1+410.g246d066457, disabling for now + ## if git clone --depth 1 --branch "$GIT_REV" "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME"; then echodebug "git command, git clone --branch $GIT_REV $_SALT_REPO_URL $__SALT_CHECKOUT_REPONAME" if git clone --branch "$GIT_REV" "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME"; then # shellcheck disable=SC2164 @@ -2743,6 +2741,7 @@ EOM echoinfo "Installing Built Salt Wheel" ${_pip_cmd} uninstall --yes ${_USE_BREAK_SYSTEM_PACKAGES} salt 2>/dev/null || true + # Hack for getting current Arch working with git-master if [ "${DISTRO_NAME}" = "Arch Linux" ]; then _arch_dep="cryptography==42.0.7" # debug matching current Arch version of python-cryptography echodebug "Running '${_pip_cmd} install --force-reinstall --break-system-packages ${_arch_dep}'" From f7eae7c3fac926921dde9b9e406124bb7d1467d4 Mon Sep 17 00:00:00 2001 From: David Murphy Date: Fri, 20 Sep 2024 13:49:17 -0600 Subject: [PATCH 14/14] Fix typo --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index d2aab1708..123ebfcca 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2111,7 +2111,7 @@ __git_clone_and_checkout() { # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}" __SHALLOW_CLONE=$BS_TRUE - echoinfo "shallow git cloned $GIT_REV, version $(python3 salt/version.py)" + echoinfo "shallow path (disabled shallow) git cloned $GIT_REV, version $(python3 salt/version.py)" else # Shallow clone above failed(missing upstream tags???), let's resume the old behaviour. echowarn "Failed to shallow clone." @@ -2125,7 +2125,7 @@ __git_clone_and_checkout() { fi if [ "$__SHALLOW_CLONE" -eq $BS_FALSE ]; then - echodebug "shadow clone false, BS_FALSE $BS_FALSE, git clone $_SALT_REPO_URL $__SALT_CHECKOUT_REPONAME" + echodebug "shallow clone false, BS_FALSE $BS_FALSE, git clone $_SALT_REPO_URL $__SALT_CHECKOUT_REPONAME" git clone "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME" || return 1 # shellcheck disable=SC2164 cd "${_SALT_GIT_CHECKOUT_DIR}"