mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Add Debian 10 python3 git support
This commit is contained in:
parent
527b9a1da1
commit
b5b00043cd
1 changed files with 57 additions and 3 deletions
|
@ -2516,9 +2516,16 @@ __install_pip_pkgs() {
|
|||
|
||||
# Install pip and pip dependencies
|
||||
if ! __check_command_exists "${_pip_cmd} --version"; then
|
||||
__PACKAGES="${_py_pkg}-setuptools ${_py_pkg}-pip gcc ${_py_pkg}-devel"
|
||||
__PACKAGES="${_py_pkg}-setuptools ${_py_pkg}-pip gcc"
|
||||
# shellcheck disable=SC2086
|
||||
__yum_install_noinput ${__PACKAGES} || return 1
|
||||
if [ "$DISTRO_NAME_L" = "debian" ];then
|
||||
__PACKAGES="${__PACKAGES} ${_py_pkg}-dev"
|
||||
__apt_get_install_noinput ${__PACKAGES} || return 1
|
||||
else
|
||||
__PACKAGES="${__PACKAGES} ${_py_pkg}-devel"
|
||||
__yum_install_noinput ${__PACKAGES} || return 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
echoinfo "Installing pip packages: ${_pip_pkgs} using ${_py_exe}"
|
||||
|
@ -2526,6 +2533,18 @@ __install_pip_pkgs() {
|
|||
${_pip_cmd} install ${_pip_pkgs} || return 1
|
||||
}
|
||||
|
||||
#--- FUNCTION -------------------------------------------------------------------------------------------------------
|
||||
# NAME: __install_tornado_pip
|
||||
# PARAMETERS: python executable
|
||||
# DESCRIPTION: Return 0 or 1 if successfully able to install tornado<5.0
|
||||
#----------------------------------------------------------------------------------------------------------------------
|
||||
__install_tornado_pip() {
|
||||
# OS needs tornado <5.0 from pip
|
||||
__check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt on Python 3"
|
||||
## install pip if its not installed and install tornado
|
||||
__install_pip_pkgs "tornado<5.0" "${1}" || return 1
|
||||
}
|
||||
|
||||
#--- FUNCTION -------------------------------------------------------------------------------------------------------
|
||||
# NAME: __install_pip_deps
|
||||
# DESCRIPTION: Return 0 or 1 if successfully able to install pip packages via requirements file
|
||||
|
@ -3140,6 +3159,24 @@ install_debian_deps() {
|
|||
return 0
|
||||
}
|
||||
|
||||
install_debian_git_pre() {
|
||||
if ! __check_command_exists git; then
|
||||
__apt_get_install_noinput git || return 1
|
||||
fi
|
||||
|
||||
if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then
|
||||
__apt_get_install_noinput ca-certificates
|
||||
fi
|
||||
|
||||
__git_clone_and_checkout || return 1
|
||||
|
||||
# Let's trigger config_salt()
|
||||
if [ "$_TEMP_CONFIG_DIR" = "null" ]; then
|
||||
_TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/"
|
||||
CONFIG_SALT_FUNC="config_salt"
|
||||
fi
|
||||
}
|
||||
|
||||
install_debian_git_deps() {
|
||||
if ! __check_command_exists git; then
|
||||
__apt_get_install_noinput git || return 1
|
||||
|
@ -3289,7 +3326,24 @@ install_debian_9_git_deps() {
|
|||
}
|
||||
|
||||
install_debian_10_git_deps() {
|
||||
install_debian_9_git_deps || return 1
|
||||
install_debian_git_pre || return 1
|
||||
|
||||
if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
|
||||
_py=${_PY_EXE}
|
||||
PY_PKG_VER=3
|
||||
__PACKAGES="python${PY_PKG_VER}-distutils"
|
||||
else
|
||||
PY_PKG_VER=""
|
||||
_py="python"
|
||||
fi
|
||||
|
||||
__install_tornado_pip ${_py}|| return 1
|
||||
# shellcheck disable=SC2086
|
||||
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-jinja2"
|
||||
__PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-yaml python${PY_PKG_VER}-zmq"
|
||||
|
||||
__apt_get_install_noinput ${__PACKAGES} || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue