From dcbeaa3126adbda8a723f70f1c5ee2a57c1a1698 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 22 Jul 2015 21:35:37 +0100 Subject: [PATCH 01/13] Only install Chris Lea's requests on Ubuntu < 14.04 Fixes #632 Fixes #631 --- bootstrap-salt.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 068f923..4d88309 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1766,14 +1766,18 @@ install_ubuntu_deps() { # Need python-apt for managing packages via Salt __PACKAGES="${__PACKAGES} python-apt" - echoinfo "Installing Python Requests/Chardet from Chris Lea's PPA repository" - if [ "$DISTRO_MAJOR_VERSION" -gt 11 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -gt 04 ]); then - # Above Ubuntu 11.04 add a -y flag - add-apt-repository -y "ppa:chris-lea/python-requests" || return 1 - add-apt-repository -y "ppa:chris-lea/python-chardet" || return 1 - else - add-apt-repository "ppa:chris-lea/python-requests" || return 1 - add-apt-repository "ppa:chris-lea/python-chardet" || return 1 + if [ "$DISTRO_MAJOR_VERSION" -lt 14 ]; then + echoinfo "Installing Python Requests/Chardet from Chris Lea's PPA repository" + if [ "$DISTRO_MAJOR_VERSION" -gt 11 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -gt 04 ]); then + # Above Ubuntu 11.04 add a -y flag + add-apt-repository -y "ppa:chris-lea/python-requests" || return 1 + add-apt-repository -y "ppa:chris-lea/python-chardet" || return 1 + add-apt-repository -y "ppa:chris-lea/python-urllib3" || return 1 + else + add-apt-repository "ppa:chris-lea/python-requests" || return 1 + add-apt-repository "ppa:chris-lea/python-chardet" || return 1 + add-apt-repository "ppa:chris-lea/python-urllib3" || return 1 + fi fi __PACKAGES="${__PACKAGES} python-requests" From 2b662cbf6a5e8813a70a54688c37d00bdc142403 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 23 Jul 2015 10:23:52 +0100 Subject: [PATCH 02/13] Update `-Z` help string to include Ubuntu --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 4d88309..a016d88 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -282,7 +282,7 @@ usage() { 'install__check_services' checks. You can also do this by touching /tmp/disable_salt_checks on the target host. Defaults \${BS_FALSE} -H Use the specified http proxy for the installation - -Z Enable external software source for newer ZeroMQ(Only available for RHEL/CentOS/Fedora based distributions) + -Z Enable external software source for newer ZeroMQ(Only available for RHEL/CentOS/Fedora/Ubuntu based distributions) EOT } # ---------- end of function usage ---------- From 2f34289b6f267632accb166fe1eee0f8e0cb191b Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 23 Jul 2015 10:36:22 +0100 Subject: [PATCH 03/13] Also install python-crypto from Chris Lea's PPA on Ubuntu < 14.04 --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a016d88..81c8d97 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1773,10 +1773,12 @@ install_ubuntu_deps() { add-apt-repository -y "ppa:chris-lea/python-requests" || return 1 add-apt-repository -y "ppa:chris-lea/python-chardet" || return 1 add-apt-repository -y "ppa:chris-lea/python-urllib3" || return 1 + add-apt-repository -y "ppa:chris-lea/python-crypto" || return 1 else add-apt-repository "ppa:chris-lea/python-requests" || return 1 add-apt-repository "ppa:chris-lea/python-chardet" || return 1 add-apt-repository "ppa:chris-lea/python-urllib3" || return 1 + add-apt-repository "ppa:chris-lea/python-crypto" || return 1 fi fi From 7e8317805d9c1d60fc32756c41e0a732ba44f1bc Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 23 Jul 2015 10:40:03 +0100 Subject: [PATCH 04/13] Update changes log --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 77ba1e2..04a1fa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Version 2015.07.xx: + * Fix python-requests installations for Ubuntu >= 14.04 LTS. #631, #632, #633 + * Install python-crypto from Chris Lea's PPA for Ubuntu < 14.04 + + Version 2015.07.22: * Fix tornado installation in Ubuntu. Thanks Yushi Nakai. #627 * Install tornado using pip on Ubuntu for Salt's v2015.8.xx onward stable releases. From 127497d692f976b461f6d2b86eb229244fdf2383 Mon Sep 17 00:00:00 2001 From: Bret Fisher Date: Thu, 23 Jul 2015 14:30:03 -0400 Subject: [PATCH 05/13] bugfix: exit git root before removing it --- bootstrap-salt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 81c8d97..1fd2fee 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -504,6 +504,7 @@ __exit_cleanup() { if [ $_KEEP_TEMP_FILES -eq $BS_FALSE ]; then # Clean up the checked out repository echodebug "Cleaning up the Salt Temporary Git Repository" + cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}" rm -rf "${__SALT_GIT_CHECKOUT_DIR}" else echowarn "Not cleaning up the Salt Temporary git repository on request" From 15ab830d30e77e3ad7dadb4f738254a5b304cf17 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 23 Jul 2015 20:25:18 +0100 Subject: [PATCH 06/13] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 04a1fa2..c1b5e06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Version 2015.07.xx: * Fix python-requests installations for Ubuntu >= 14.04 LTS. #631, #632, #633 * Install python-crypto from Chris Lea's PPA for Ubuntu < 14.04 + * Exit the git checkout directory before deleting it. Thanks Bret Fisher. #634 Version 2015.07.22: From 5c818474f8848b22b741c0ba6170dc7435833801 Mon Sep 17 00:00:00 2001 From: Stanislav Blokhin Date: Mon, 27 Jul 2015 10:46:45 +0200 Subject: [PATCH 07/13] Use prefix /usr for centos git install --- bootstrap-salt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 1fd2fee..d5da3e5 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3033,10 +3033,10 @@ install_centos_git() { _PYEXE=python2 fi if [ -f "${__SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then - $_PYEXE setup.py install --salt-config-dir="$_SALT_ETC_DIR" || \ - $_PYEXE setup.py --salt-config-dir="$_SALT_ETC_DIR" install || return 1 + $_PYEXE setup.py install --prefix=/usr --salt-config-dir="$_SALT_ETC_DIR" || \ + $_PYEXE setup.py --prefix=/usr --salt-config-dir="$_SALT_ETC_DIR" install || return 1 else - $_PYEXE setup.py install || return 1 + $_PYEXE setup.py install --prefix=/usr || return 1 fi return 0 } From 4fae15cfecd51baf4738d908d857ed35ad884dbd Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 27 Jul 2015 11:15:27 +0100 Subject: [PATCH 08/13] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index c1b5e06..a166e1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Version 2015.07.xx: * Fix python-requests installations for Ubuntu >= 14.04 LTS. #631, #632, #633 * Install python-crypto from Chris Lea's PPA for Ubuntu < 14.04 * Exit the git checkout directory before deleting it. Thanks Bret Fisher. #634 + * Use prefix /usr for centos git install. Thanks Stanislav B. #638 Version 2015.07.22: From 69c0a0cc541e12ba50790c68eba6fb58f13c3570 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 27 Jul 2015 11:16:13 +0100 Subject: [PATCH 09/13] Add Stanislav B(@stanislavb) to AUTHORS --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index aa5bc52..b1464dc 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -70,6 +70,7 @@ Roberto Aguilar rca roberto@baremetal.io Roman Inflianskas rominf infroma@gmail.com Ronald van Zantvoort The-Loeki ronald@pcextreme.nl Skyler Berg skylerberg skylertheberg@gmail.com +Stanislav B stanislavb Tate Eskew tateeskew Thomas S. Hatch thatch45 thatch45@saltstack.com Tony Narlock tony From 0d0148d318182841bdf65a6c6a02fcf18d7edf33 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 29 Jul 2015 23:26:23 +0100 Subject: [PATCH 10/13] We no longer support Ubuntu versions bellow 12.04 --- bootstrap-salt.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index d5da3e5..b29734a 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1327,14 +1327,8 @@ __check_end_of_life_versions() { ubuntu) # Ubuntu versions not supported # - # < 10 - # = 10.10 - # = 11.04 - # = 11.10 - if ([ "$DISTRO_MAJOR_VERSION" -eq 10 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]) || \ - ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -eq 04 ]) || \ - ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]) || \ - [ "$DISTRO_MAJOR_VERSION" -lt 10 ]; then + # < 12.04 + if [ "$DISTRO_MAJOR_VERSION" -lt 12 ]; then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " https://wiki.ubuntu.com/Releases" From 9f2b8b75ddf2618cc14062a3126f7f08c442922a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 29 Jul 2015 23:33:31 +0100 Subject: [PATCH 11/13] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index a166e1f..6e3f513 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ Version 2015.07.xx: * Install python-crypto from Chris Lea's PPA for Ubuntu < 14.04 * Exit the git checkout directory before deleting it. Thanks Bret Fisher. #634 * Use prefix /usr for centos git install. Thanks Stanislav B. #638 + * Drop Ubuntu EOL versions. All Ubuntu version before 12.04. Version 2015.07.22: From 2e30cec780ad28650fedb2ca7d3f9a868bb66041 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 6 Aug 2015 14:32:39 +0100 Subject: [PATCH 12/13] Make sure python-dev is installed wheb trying to install tornado from PyPi Fixes #640 --- bootstrap-salt.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b29734a..7605098 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1840,13 +1840,17 @@ install_ubuntu_stable_deps() { add-apt-repository "ppa:$STABLE_PPA" || return 1 fi + __PACKAGES="" if [ ! "$(echo "$STABLE_REV" | egrep '^(2015\.8|latest)$')" = "" ]; then # We need a recent tornado package __REQUIRED_TORNADO="tornado >= 4.0" check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'" if [ "$(which pip)" = "" ]; then - __apt_get_install_noinput python-setuptools python-pip + __PACKAGES="${__PACKAGES} python-setuptools python-pip" fi + __PACKAGES="${__PACKAGES} python-dev" + # shellcheck disable=SC2086 + __apt_get_install_noinput $__PACKAGES pip install -U "${__REQUIRED_TORNADO}" fi @@ -1888,14 +1892,18 @@ install_ubuntu_git_deps() { __git_clone_and_checkout || return 1 + __PACKAGES="" if [ -f "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then # We're on the develop branch, install whichever tornado is on the requirements file __REQUIRED_TORNADO="$(grep tornado "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" if [ "${__REQUIRED_TORNADO}" != "" ]; then + __PACKAGES="${__PACKAGES} python-dev" check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'" if [ "$(which pip)" = "" ]; then - __apt_get_install_noinput python-setuptools python-pip + __PACKAGES="${__PACKAGES} python-setuptools python-pip" fi + # shellcheck disable=SC2086 + __apt_get_install_noinput $__PACKAGES pip install -U "${__REQUIRED_TORNADO}" fi fi @@ -2390,6 +2398,7 @@ install_debian_git_deps() { __REQUIRED_TORNADO="$(grep tornado "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" if [ "${__REQUIRED_TORNADO}" != "" ]; then check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'" + __apt_get_install_noinput python-dev pip install -U "${__REQUIRED_TORNADO}" || return 1 fi fi From 8d7139b557ccc029e1c6326085b4b7dc519411a9 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 6 Aug 2015 14:33:25 +0100 Subject: [PATCH 13/13] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 6e3f513..81e84b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Version 2015.07.xx: * Exit the git checkout directory before deleting it. Thanks Bret Fisher. #634 * Use prefix /usr for centos git install. Thanks Stanislav B. #638 * Drop Ubuntu EOL versions. All Ubuntu version before 12.04. + * Make sure python-dev is installed wheb trying to install tornado from PyPi. #640 Version 2015.07.22: