mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Gentoo - install Salt 3000 (GIT) with Python 3.7.
This commit is contained in:
parent
8275732c6c
commit
6ddf62a3f0
2 changed files with 37 additions and 25 deletions
|
@ -86,14 +86,18 @@ platforms:
|
||||||
run_command: /sbin/init
|
run_command: /sbin/init
|
||||||
provision_command:
|
provision_command:
|
||||||
- rc-update add sshd default
|
- rc-update add sshd default
|
||||||
- emerge --update --deep --with-bdeps=y --newuse @world
|
- emerge --update --deep --with-bdeps=y --newuse --quiet @world
|
||||||
|
- emerge --depclean --quiet
|
||||||
|
- eselect python set python3.8
|
||||||
- name: gentoo-systemd
|
- name: gentoo-systemd
|
||||||
driver_config:
|
driver_config:
|
||||||
image: gentoo/stage3:systemd
|
image: gentoo/stage3:systemd
|
||||||
run_command: /lib/systemd/systemd
|
run_command: /lib/systemd/systemd
|
||||||
provision_command:
|
provision_command:
|
||||||
- systemctl enable sshd.service
|
- systemctl enable sshd.service
|
||||||
- emerge --update --deep --with-bdeps=y --newuse @world
|
- emerge --update --deep --with-bdeps=y --newuse --quiet @world
|
||||||
|
- emerge --depclean --quiet
|
||||||
|
- eselect python set python3.8
|
||||||
- name: opensuse-15
|
- name: opensuse-15
|
||||||
driver_config:
|
driver_config:
|
||||||
image: opensuse/leap:15.1
|
image: opensuse/leap:15.1
|
||||||
|
|
|
@ -7070,10 +7070,20 @@ __gentoo_pre_dep() {
|
||||||
mkdir /etc/portage
|
mkdir /etc/portage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable python 3.6 if installing pre Neon Salt release
|
# Enable Python 3.6 target for pre Neon Salt release
|
||||||
if echo "${STABLE_REV}" | grep -q "2019" || [ "${ITYPE}" = "git" ] && [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then
|
if echo "${STABLE_REV}" | grep -q "2019" || [ "${ITYPE}" = "git" ] && [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then
|
||||||
if ! emerge --info | sed 's/.*\(PYTHON_TARGETS="[^"]*"\).*/\1/' | grep -q 'python3_6' ; then
|
EXTRA_PYTHON_TARGET=python3_6
|
||||||
echo "PYTHON_TARGETS=\"\${PYTHON_TARGETS} python3_6\"" >> /etc/portage/make.conf
|
fi
|
||||||
|
|
||||||
|
# Enable Python 3.7 target for Salt Neon using GIT
|
||||||
|
if [ "${ITYPE}" = "git" ] && [ "${GIT_REV}" = "v3000" ]; then
|
||||||
|
EXTRA_PYTHON_TARGET=python3_7
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${EXTRA_PYTHON_TARGET:-}" ]; then
|
||||||
|
if ! emerge --info | sed 's/.*\(PYTHON_TARGETS="[^"]*"\).*/\1/' | grep -q "${EXTRA_PYTHON_TARGET}" ; then
|
||||||
|
echo "PYTHON_TARGETS=\"\${PYTHON_TARGETS} ${EXTRA_PYTHON_TARGET}\"" >> /etc/portage/make.conf
|
||||||
|
emerge --update --deep --with-bdeps=y --newuse --quiet @world
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -7117,26 +7127,19 @@ install_gentoo_deps() {
|
||||||
install_gentoo_git_deps() {
|
install_gentoo_git_deps() {
|
||||||
__gentoo_pre_dep || return 1
|
__gentoo_pre_dep || return 1
|
||||||
|
|
||||||
GENTOO_GIT_PACKAGES=""
|
|
||||||
|
|
||||||
# Install pip if it does not exist
|
# Install pip if it does not exist
|
||||||
if ! __check_command_exists pip ; then
|
if ! __check_command_exists pip ; then
|
||||||
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES} dev-python/pip"
|
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES:-} dev-python/pip"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install GIT if it does not exist
|
# Install GIT if it does not exist
|
||||||
if ! __check_command_exists git ; then
|
if ! __check_command_exists git ; then
|
||||||
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES} dev-vcs/git"
|
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES:-} dev-vcs/git"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Salt <3000 does not automatically install dependencies. It has to be done manually.
|
# Salt <3000 does not automatically install dependencies. It has to be done manually.
|
||||||
if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then
|
if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then
|
||||||
# Install Python 3.6 if it does not exist
|
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES:-}
|
||||||
if ! __check_command_exists python3.6 ; then
|
|
||||||
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES} dev-lang/python:3.6"
|
|
||||||
fi
|
|
||||||
|
|
||||||
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES}
|
|
||||||
sys-apps/pciutils
|
sys-apps/pciutils
|
||||||
dev-python/pyyaml
|
dev-python/pyyaml
|
||||||
dev-python/pyzmq
|
dev-python/pyzmq
|
||||||
|
@ -7157,10 +7160,10 @@ install_gentoo_git_deps() {
|
||||||
|
|
||||||
# Install libcloud when Salt Cloud support was requested
|
# Install libcloud when Salt Cloud support was requested
|
||||||
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
|
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
|
||||||
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES} dev-python/libcloud"
|
GENTOO_GIT_PACKAGES="${GENTOO_GIT_PACKAGES:-} dev-python/libcloud"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${GENTOO_GIT_PACKAGES}" ]; then
|
if [ -n "${GENTOO_GIT_PACKAGES:-}" ]; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
__autounmask ${GENTOO_GIT_PACKAGES} || return 1
|
__autounmask ${GENTOO_GIT_PACKAGES} || return 1
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
@ -7186,16 +7189,21 @@ install_gentoo_stable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_gentoo_git() {
|
install_gentoo_git() {
|
||||||
if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then
|
_PYEXE=${_PY_EXE}
|
||||||
__install_salt_from_repo_post_neon "${_PY_EXE}" || return 1
|
|
||||||
return 0
|
if [ "$_PY_EXE" = "python3" ] || [ -z "$_PY_EXE" ]; then
|
||||||
|
if [ "${GIT_REV}" = "v3000" ]; then
|
||||||
|
# Salt Neon does not support Python 3.8 and greater
|
||||||
|
_PYEXE=python3.7
|
||||||
|
elif [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then
|
||||||
|
# Tornado 4.3 ebuild supports only Python 3.6, use Python 3.6 as the default Python 3 interpreter
|
||||||
|
_PYEXE=python3.6
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Tornado 4.3 ebuild supports only Python 3.6, use Python 3.6 as the default Python 3 interpreter
|
if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then
|
||||||
if [ "$_PY_EXE" = "python3" ] || [ -z "$_PY_EXE" ]; then
|
__install_salt_from_repo_post_neon "${_PYEXE}" || return 1
|
||||||
_PYEXE=python3.6
|
return 0
|
||||||
else
|
|
||||||
_PYEXE=${_PY_EXE}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then
|
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue