diff --git a/AUTHORS.rst b/AUTHORS.rst index d99284e06..aa5bc5239 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -78,4 +78,5 @@ Vladimir Kozhukalov kozhukalov Whit Morriss whitmo whit@nocoast.us Wolodja Wentland babilen w@babilen5.org Wout wfhg +Yushi Nakai nyushi ========================== ===================== ============================ diff --git a/ChangeLog b/ChangeLog index 14dc60e12..77ba1e2bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +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. + * Install requests on Ubuntu from Chris Lea's PPA. #630 + Version 2015.07.17: * Make sure setuptools is installed before using it. #598. * `systemd` is only fully supported from 15.04 onwards. #602 diff --git a/bootstrap-salt.ps1 b/bootstrap-salt.ps1 index 36c50b0a9..70d6c62d5 100644 --- a/bootstrap-salt.ps1 +++ b/bootstrap-salt.ps1 @@ -100,14 +100,14 @@ If ([IntPtr]::Size -eq 4) { } # Download minion setup file -Write-Host "Downloading Salt minion installer Salt-Minion-$version-$arch-Setup.exe" +Write-Host -NoNewline "Downloading Salt minion installer Salt-Minion-$version-$arch-Setup.exe" $webclient = New-Object System.Net.WebClient $url = "https://docs.saltstack.com/downloads/Salt-Minion-$version-$arch-Setup.exe" $file = "C:\tmp\salt.exe" $webclient.DownloadFile($url, $file) # Install minion silently -Write-Host "Installing Salt minion" +Write-Host -NoNewline "Installing Salt minion" #Wait for process to exit before continuing. C:\tmp\salt.exe /S /minion-name=$minion /master=$master | Out-Null @@ -141,14 +141,14 @@ If($runservice) { # If the salt-minion service is still not running, something probably # went wrong and user intervention is required - report failure. If ($service.Status -eq "Stopped") { - Write-Host "Failed to start salt minion" + Write-Host -NoNewline "Failed to start salt minion" exit 1 } } Else { - Write-Host "Stopping salt minion and setting it to 'Manual'" + Write-Host -NoNewline "Stopping salt minion and setting it to 'Manual'" Set-Service "salt-minion" -startupType "Manual" Stop-Service "salt-minion" } -Write-Host "Salt minion successfully installed" +Write-Host -NoNewline "Salt minion successfully installed" diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7d872a28c..1f3415418 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -17,7 +17,7 @@ # CREATED: 10/15/2012 09:49:37 PM WEST #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2015.07.17" +__ScriptVersion="2015.07.22" __ScriptName="bootstrap-salt.sh" #====================================================================================================================== @@ -426,8 +426,8 @@ elif [ "$ITYPE" = "stable" ]; then STABLE_REV="latest" else __check_unparsed_options "$*" - if [ "$(echo "$1" | egrep '^(latest|1\.6|1\.7|2014\.1|2014\.7|2015\.5)$')" = "" ]; then - echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, latest)" + if [ "$(echo "$1" | egrep '^(latest|1\.6|1\.7|2014\.1|2014\.7|2015\.5|2015\.8)$')" = "" ]; then + echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, latest)" exit 1 else STABLE_REV="$1" @@ -1758,39 +1758,50 @@ install_ubuntu_deps() { __enable_universe_repository || return 1 + __PIP_PACKAGES="" + # Minimal systems might not have upstart installed, install it - __apt_get_install_noinput upstart + __PACKAGES="upstart" # Need python-apt for managing packages via Salt - __apt_get_install_noinput python-apt + __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 + fi + + __PACKAGES="${__PACKAGES} python-requests" if [ "$DISTRO_MAJOR_VERSION" -gt 12 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -gt 03 ]); then if ([ "$DISTRO_MAJOR_VERSION" -lt 15 ] && [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]); then echoinfo "Installing ZMQ>=4/PyZMQ>=14 from Chris Lea's PPA repository" add-apt-repository -y ppa:chris-lea/zeromq || return 1 - apt-get update fi - __apt_get_install_noinput python-requests - __PIP_PACKAGES="" - else - check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package 'requests'" - __apt_get_install_noinput python-setuptools python-pip - # shellcheck disable=SC2089 - __PIP_PACKAGES="requests>=$_PY_REQUESTS_MIN_VERSION" fi # Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813 - __apt_get_install_noinput procps pciutils || return 1 + __PACKAGES="${__PACKAGES} procps pciutils" + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then check_pip_allowed "You need to allow pip based installations (-P) in order to install 'apache-libcloud'" - if [ "${__PIP_PACKAGES}" = "" ]; then - __apt_get_install_noinput python-pip + if [ "$(which pip)" = "" ]; then + __PACKAGES="${__PACKAGES} python-setuptools python-pip" fi # shellcheck disable=SC2089 __PIP_PACKAGES="${__PIP_PACKAGES} 'apache-libcloud>=$_LIBCLOUD_MIN_VERSION'" fi + apt-get update + # shellcheck disable=SC2086,SC2090 + __apt_get_install_noinput ${__PACKAGES} || return 1 + if [ "${__PIP_PACKAGES}" != "" ]; then # shellcheck disable=SC2086,SC2090 pip install -U ${__PIP_PACKAGES} @@ -1828,6 +1839,16 @@ install_ubuntu_stable_deps() { add-apt-repository "ppa:$STABLE_PPA" || return 1 fi + 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 + fi + pip install -U "${__REQUIRED_TORNADO}" + fi + apt-get update } @@ -1874,7 +1895,7 @@ install_ubuntu_git_deps() { if [ "$(which pip)" = "" ]; then __apt_get_install_noinput python-setuptools python-pip fi - pip install -U "'${__REQUIRED_TORNADO}'" + pip install -U "${__REQUIRED_TORNADO}" fi fi @@ -4226,7 +4247,7 @@ install_smartos_git_deps() { if [ "$(which pip)" = "" ]; then pkgin -y install py27-pip fi - pip install -U "'${__REQUIRED_TORNADO}'" + pip install -U "${__REQUIRED_TORNADO}" fi fi