mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-17 02:00:22 +00:00
Merge pull request #991 from vutny/fix-missing-certs-for-git-on-deb
Install TLS certs before cloning git repo via https
This commit is contained in:
commit
473f5e655f
1 changed files with 38 additions and 1 deletions
|
@ -2498,7 +2498,15 @@ install_ubuntu_daily_deps() {
|
||||||
|
|
||||||
install_ubuntu_git_deps() {
|
install_ubuntu_git_deps() {
|
||||||
apt-get update
|
apt-get update
|
||||||
__apt_get_install_noinput git-core || return 1
|
|
||||||
|
if ! __check_command_exists git; then
|
||||||
|
__apt_get_install_noinput git-core || 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
|
__git_clone_and_checkout || return 1
|
||||||
|
|
||||||
__PACKAGES=""
|
__PACKAGES=""
|
||||||
|
@ -2955,6 +2963,10 @@ install_debian_git_deps() {
|
||||||
__apt_get_install_noinput git || return 1
|
__apt_get_install_noinput git || return 1
|
||||||
fi
|
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
|
__git_clone_and_checkout || return 1
|
||||||
|
|
||||||
__PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-backports.ssl-match-hostname python-crypto"
|
__PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-backports.ssl-match-hostname python-crypto"
|
||||||
|
@ -2992,6 +3004,10 @@ install_debian_8_git_deps() {
|
||||||
__apt_get_install_noinput git || return 1
|
__apt_get_install_noinput git || return 1
|
||||||
fi
|
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
|
__git_clone_and_checkout || return 1
|
||||||
|
|
||||||
__PACKAGES='libzmq3 libzmq3-dev lsb-release python-apt python-crypto python-jinja2 python-msgpack python-requests python-yaml python-zmq'
|
__PACKAGES='libzmq3 libzmq3-dev lsb-release python-apt python-crypto python-jinja2 python-msgpack python-requests python-yaml python-zmq'
|
||||||
|
@ -3285,6 +3301,11 @@ install_fedora_stable_post() {
|
||||||
|
|
||||||
install_fedora_git_deps() {
|
install_fedora_git_deps() {
|
||||||
__fedora_get_package_manager
|
__fedora_get_package_manager
|
||||||
|
|
||||||
|
if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then
|
||||||
|
$FEDORA_PACKAGE_MANAGER ca-certificates || return 1
|
||||||
|
fi
|
||||||
|
|
||||||
install_fedora_deps || return 1
|
install_fedora_deps || return 1
|
||||||
|
|
||||||
if ! __check_command_exists git; then
|
if ! __check_command_exists git; then
|
||||||
|
@ -3625,6 +3646,14 @@ install_centos_stable_post() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_centos_git_deps() {
|
install_centos_git_deps() {
|
||||||
|
if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then
|
||||||
|
if [ "$DISTRO_MAJOR_VERSION" -gt 5 ]; then
|
||||||
|
__yum_install_noinput ca-certificates || return 1
|
||||||
|
else
|
||||||
|
__yum_install_noinput "openssl.${CPU_ARCH_L}" || return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
install_centos_stable_deps || return 1
|
install_centos_stable_deps || return 1
|
||||||
|
|
||||||
if ! __check_command_exists git; then
|
if ! __check_command_exists git; then
|
||||||
|
@ -4232,6 +4261,10 @@ _eof
|
||||||
}
|
}
|
||||||
|
|
||||||
install_amazon_linux_ami_git_deps() {
|
install_amazon_linux_ami_git_deps() {
|
||||||
|
if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then
|
||||||
|
yum -y install ca-certificates || return 1
|
||||||
|
fi
|
||||||
|
|
||||||
install_amazon_linux_ami_deps || return 1
|
install_amazon_linux_ami_deps || return 1
|
||||||
|
|
||||||
ENABLE_EPEL_CMD=""
|
ENABLE_EPEL_CMD=""
|
||||||
|
@ -5232,6 +5265,10 @@ install_opensuse_stable_deps() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_opensuse_git_deps() {
|
install_opensuse_git_deps() {
|
||||||
|
if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then
|
||||||
|
__zypper_install ca-certificates || return 1
|
||||||
|
fi
|
||||||
|
|
||||||
install_opensuse_stable_deps || return 1
|
install_opensuse_stable_deps || return 1
|
||||||
|
|
||||||
if ! __check_command_exists git; then
|
if ! __check_command_exists git; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue