From 9f99661bbf25968072cbb4aeb3c4a604a5354012 Mon Sep 17 00:00:00 2001 From: ek9 Date: Sun, 8 Jan 2017 15:18:51 +0100 Subject: [PATCH 01/77] add Alpine Linux + tweaks to sort | uniq This commit add Alpine Linux support. Additionally, it updates few functions: - `sort --ignore-case` is changed to `sorf -f` as Alpine's `sort` only supports `-f` parameter. This is standard alias and shouldn't cause any problems in other installs - `sort --unique` is replaced with `| uniq` as Alpine's `sort`. `uniq` is usually part of coreutils package which is installed on most systems. --- bootstrap-salt.sh | 164 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 161 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 9253b80..b8d7916 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -876,13 +876,13 @@ __strip_duplicates() { # enough. #---------------------------------------------------------------------------------------------------------------------- __sort_release_files() { - KNOWN_RELEASE_FILES=$(echo "(arch|centos|debian|ubuntu|fedora|redhat|suse|\ + KNOWN_RELEASE_FILES=$(echo "(arch|alpine|centos|debian|ubuntu|fedora|redhat|suse|\ mandrake|mandriva|gentoo|slackware|turbolinux|unitedlinux|lsb|system|\ oracle|os)(-|_)(release|version)" | sed -r 's:[[:space:]]::g') primary_release_files="" secondary_release_files="" # Sort know VS un-known files first - for release_file in $(echo "${@}" | sed -r 's:[[:space:]]:\n:g' | sort --unique --ignore-case); do + for release_file in $(echo "${@}" | sed -r 's:[[:space:]]:\n:g' | sort -f | uniq); do match=$(echo "$release_file" | egrep -i "${KNOWN_RELEASE_FILES}") if [ "${match}" != "" ]; then primary_release_files="${primary_release_files} ${release_file}" @@ -973,7 +973,6 @@ __gather_linux_system_info() { # We already have the distribution name and version return fi - # shellcheck disable=SC2035,SC2086 for rsource in $(__sort_release_files "$( cd /etc && /bin/ls *[_-]release *[_-]version 2>/dev/null | env -i sort | \ @@ -986,6 +985,7 @@ __gather_linux_system_info() { n=$(echo "${rsource}" | sed -e 's/[_-]release$//' -e 's/[_-]version$//') shortname=$(echo "${n}" | tr '[:upper:]' '[:lower:]') + if [ "$shortname" = "debian" ]; then rv=$(__derive_debian_numeric_version "$(cat /etc/${rsource})") else @@ -993,6 +993,7 @@ __gather_linux_system_info() { fi [ "${rv}" = "" ] && [ "$shortname" != "arch" ] && continue # There's no version information. Continue to next rsource v=$(__parse_version_string "$rv") + case $shortname in redhat ) if [ "$(egrep 'CentOS' /etc/${rsource})" != "" ]; then @@ -1006,6 +1007,7 @@ __gather_linux_system_info() { fi ;; arch ) n="Arch Linux" ;; + alpine ) n="Alpine Linux" ;; centos ) n="CentOS" ;; debian ) n="Debian" ;; ubuntu ) n="Ubuntu" ;; @@ -1032,6 +1034,10 @@ __gather_linux_system_info() { rv="$(__unquote_string "$(grep '^VERSION_ID=' /etc/os-release | sed -e 's/^VERSION_ID=\(.*\)$/\1/g')")" [ "${rv}" != "" ] && v=$(__parse_version_string "$rv") || v="" case $(echo "${nn}" | tr '[:upper:]' '[:lower:]') in + alpine ) + n="Alpine Linux" + v="${rv}" + ;; amzn ) # Amazon AMI's after 2014.09 match here n="Amazon Linux AMI" @@ -2136,6 +2142,32 @@ __check_services_openbsd() { fi } # ---------- end of function __check_services_openbsd ---------- +#--- FUNCTION ------------------------------------------------------------------------------------------------------- +# NAME: __check_services_alpine +# DESCRIPTION: Return 0 or 1 in case the service is enabled or not +# PARAMETERS: servicename +#---------------------------------------------------------------------------------------------------------------------- +__check_services_alpine() { + if [ $# -eq 0 ]; then + echoerror "You need to pass a service name to check!" + exit 1 + elif [ $# -ne 1 ]; then + echoerror "You need to pass a service name to check as the single argument to the function" + fi + + servicename=$1 + echodebug "Checking if service ${servicename} is enabled" + + # shellcheck disable=SC2086,SC2046,SC2144 + if rc-service ${servicename} status; then + echodebug "Service ${servicename} is enabled" + return 0 + else + echodebug "Service ${servicename} is NOT enabled" + return 1 + fi +} # ---------- end of function __check_services_openbsd ---------- + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __create_virtualenv @@ -4158,6 +4190,132 @@ install_cloud_linux_check_services() { # ####################################################################################################################### +####################################################################################################################### +# +# Alpine Linux Install Functions +# +install_alpine_linux_stable_deps() { + __COMUNITY_REPO_ENABLED="$(grep '^https://dl-cdn.alpinelinux.org/alpine/edge/community$' /etc/apk/repositories)" + if [ "${__COMUNITY_REPO_ENABLED}" != "" ]; then + apk update + else + echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories + apk update + fi +} + +install_alpine_linux_stable() { + __PACKAGES="salt" + + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ];then + __PACKAGES="${__PACKAGES} salt-cloud" + fi + if [ "$_INSTALL_MASTER" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-master" + fi + if [ "$_INSTALL_MINION" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-minion" + fi + if [ "$_INSTALL_SYNDIC" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} salt-syndic" + fi + + apk add ${__PACKAGES} || return 1 + return 0 +} + +install_alpine_linux_git() { + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then + python2 setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} install || return 1 + else + python2 setup.py ${SETUP_PY_INSTALL_ARGS} install || return 1 + fi + return 0 +} + +install_alpine_linux_post() { + for fname in api master minion syndic; do + # Skip if not meant to be installed + [ $fname = "api" ] && \ + ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || ! __check_command_exists "salt-${fname}") && continue + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + + if [ -f /sbin/rc-update ]; then + /sbin/rc-update add salt-$fname > /dev/null 2>&1 + continue + fi + + done +} + +install_alpine_linux_git_post() { + for fname in api master minion syndic; do + # Skip if not meant to be installed + [ $fname = "api" ] && \ + ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || ! __check_command_exists "salt-${fname}") && continue + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + + if [ -f /sbin/rc-update ]; then + /sbin/rc-update add salt-$fname > dev/null 2>&1 + continue + fi + + done +} + +install_alpine_linux_restart_daemons() { + [ $_START_DAEMONS -eq $BS_FALSE ] && return + + for fname in api master minion syndic; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + + # Skip if not meant to be installed + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + /sbin/rc-service salt-$fname stop > /dev/null 2>&1 + /sbin/rc-service salt-$fname start + done +} + +install_alpine_check_services() { + if [ ! -f /usr/bin/systemctl ]; then + # Not running systemd!? Don't check! + return 0 + fi + + for fname in api master minion syndic; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + + # Skip if not meant to be installed + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + __check_services_alpine salt-$fname || return 1 + done + + return 0 +} +# +# Ended Alpine Linux Install Functions +# +####################################################################################################################### + + ####################################################################################################################### # # Amazon Linux AMI Install Functions From 48f814502606fd0a8caae43e42217794029d073e Mon Sep 17 00:00:00 2001 From: ek9 Date: Sun, 8 Jan 2017 16:01:02 +0100 Subject: [PATCH 02/77] alpine: fix Syndic not having openRC service + daemons_running_alpine - Fix Syndic based checks when Syndic is installed as when it is installed it does not have a daemon on Alpine Linux - Add `daemons_running_alpine_linux()` function which check if daemons are running after install. It's a copy of daemons_running with Syndic exluded from the checks. --- bootstrap-salt.sh | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b8d7916..71abd79 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4245,6 +4245,9 @@ install_alpine_linux_post() { # Skip salt-api since the service should be opt-in and not necessarily started on boot [ $fname = "api" ] && continue + # Skip salt-syndic as there is no service for it on Alpine Linux + [ $fname = "syndic" ] && continue + if [ -f /sbin/rc-update ]; then /sbin/rc-update add salt-$fname > /dev/null 2>&1 continue @@ -4265,6 +4268,9 @@ install_alpine_linux_git_post() { # Skip salt-api since the service should be opt-in and not necessarily started on boot [ $fname = "api" ] && continue + # Skip salt-syndic as there is no service for it on Alpine Linux + [ $fname = "syndic" ] && continue + if [ -f /sbin/rc-update ]; then /sbin/rc-update add salt-$fname > dev/null 2>&1 continue @@ -4280,17 +4286,19 @@ install_alpine_linux_restart_daemons() { # Skip salt-api since the service should be opt-in and not necessarily started on boot [ $fname = "api" ] && continue + # Skip salt-syndic as there is no service for it on Alpine Linux + [ $fname = "syndic" ] && continue + # Skip if not meant to be installed [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue - [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue /sbin/rc-service salt-$fname stop > /dev/null 2>&1 /sbin/rc-service salt-$fname start done } -install_alpine_check_services() { +install_alpine_linux_check_services() { if [ ! -f /usr/bin/systemctl ]; then # Not running systemd!? Don't check! return 0 @@ -4300,16 +4308,43 @@ install_alpine_check_services() { # Skip salt-api since the service should be opt-in and not necessarily started on boot [ $fname = "api" ] && continue + # Skip salt-syndic as there is no service for it on Alpine Linux + [ $fname = "syndic" ] && continue + # Skip if not meant to be installed [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue - [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue __check_services_alpine salt-$fname || return 1 done return 0 } + +daemons_running_alpine_linux() { + [ "$_START_DAEMONS" -eq $BS_FALSE ] && return 0 + + FAILED_DAEMONS=0 + for fname in api master minion syndic; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + + # Skip salt-syndic as there is no service for it on Alpine Linux + [ $fname = "syndic" ] && continue + + # Skip if not meant to be installed + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + + if [ "$(ps wwwaux | grep -v grep | grep salt-$fname)" = "" ]; then + echoerror "salt-$fname was not found running" + FAILED_DAEMONS=$((FAILED_DAEMONS + 1)) + fi + done + + return $FAILED_DAEMONS +} + # # Ended Alpine Linux Install Functions # From 50a67a5203ce2a47b418ea726514aa137394eb53 Mon Sep 17 00:00:00 2001 From: ek9 Date: Sun, 8 Jan 2017 16:03:24 +0100 Subject: [PATCH 03/77] alpine: add git install support via install_alpine_linux_git_deps() Add basic support of installing via `git`. --- bootstrap-salt.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 71abd79..7c34c9e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4204,6 +4204,35 @@ install_alpine_linux_stable_deps() { fi } +install_alpine_linux_git_deps() { + apk -U add python2 py-virtualenv py2-crypto py2-setuptools \ + py2-jinja2 py2-markupsafe py2-msgpack py2-psutil \ + py2-zmq zeromq py2-requests || return 1 + + # Don't fail if un-installing python2-distribute threw an error + if ! __check_command_exists git; then + apk -U add git || return 1 + fi + + __git_clone_and_checkout || return 1 + + 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 + apk -U add py2-tornado + fi + fi + + # 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 + + return 0 +} + install_alpine_linux_stable() { __PACKAGES="salt" From 597298274702445def8c153312b9bc119b982f44 Mon Sep 17 00:00:00 2001 From: ek9 Date: Sun, 8 Jan 2017 16:09:00 +0100 Subject: [PATCH 04/77] alpine: add py2-yaml as git dep --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7c34c9e..97e50ff 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4206,7 +4206,7 @@ install_alpine_linux_stable_deps() { install_alpine_linux_git_deps() { apk -U add python2 py-virtualenv py2-crypto py2-setuptools \ - py2-jinja2 py2-markupsafe py2-msgpack py2-psutil \ + py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ py2-zmq zeromq py2-requests || return 1 # Don't fail if un-installing python2-distribute threw an error @@ -4249,7 +4249,7 @@ install_alpine_linux_stable() { __PACKAGES="${__PACKAGES} salt-syndic" fi - apk add ${__PACKAGES} || return 1 + apk -U add ${__PACKAGES} || return 1 return 0 } From 32f3179e9fde987d1798f450030fbdffaefb5708 Mon Sep 17 00:00:00 2001 From: ek9 Date: Sun, 8 Jan 2017 16:17:51 +0100 Subject: [PATCH 05/77] styling: remove 2 unnecessarily added new lines --- bootstrap-salt.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 97e50ff..b37aadf 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -985,7 +985,6 @@ __gather_linux_system_info() { n=$(echo "${rsource}" | sed -e 's/[_-]release$//' -e 's/[_-]version$//') shortname=$(echo "${n}" | tr '[:upper:]' '[:lower:]') - if [ "$shortname" = "debian" ]; then rv=$(__derive_debian_numeric_version "$(cat /etc/${rsource})") else @@ -993,7 +992,6 @@ __gather_linux_system_info() { fi [ "${rv}" = "" ] && [ "$shortname" != "arch" ] && continue # There's no version information. Continue to next rsource v=$(__parse_version_string "$rv") - case $shortname in redhat ) if [ "$(egrep 'CentOS' /etc/${rsource})" != "" ]; then From d4da00c63be7e9784b8036e5d70ae0154d122e1b Mon Sep 17 00:00:00 2001 From: ek9 Date: Tue, 10 Jan 2017 23:17:48 +0100 Subject: [PATCH 06/77] shell lint fix --- bootstrap-salt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b37aadf..fd58ef1 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4247,7 +4247,7 @@ install_alpine_linux_stable() { __PACKAGES="${__PACKAGES} salt-syndic" fi - apk -U add ${__PACKAGES} || return 1 + apk -U add "${__PACKAGES}" || return 1 return 0 } @@ -4363,6 +4363,7 @@ daemons_running_alpine_linux() { [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + # shellcheck disable=SC2009 if [ "$(ps wwwaux | grep -v grep | grep salt-$fname)" = "" ]; then echoerror "salt-$fname was not found running" FAILED_DAEMONS=$((FAILED_DAEMONS + 1)) From 075907e90d3132719d68350ae331dea9560afcc2 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Wed, 11 Jan 2017 13:05:09 +0200 Subject: [PATCH 07/77] README: add table of contents --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 6eb2b7b..e1882fc 100644 --- a/README.rst +++ b/README.rst @@ -4,6 +4,9 @@ Bootstrapping Salt |windows_build| +.. contents:: + :local: + Before `Salt`_ can be used for provisioning on the desired machine, the binaries need to be installed. Since `Salt`_ supports many different distributions and versions of operating systems, the `Salt`_ installation process is handled by this shell script ``bootstrap-salt.sh``. This From 68f36b5b2ddf365d146b89e492be6af9893becbb Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Wed, 11 Jan 2017 13:10:55 +0200 Subject: [PATCH 08/77] README: fix code block formatting --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index e1882fc..0f1a334 100644 --- a/README.rst +++ b/README.rst @@ -186,7 +186,7 @@ Installing the latest stable release of Salt (default): Using ``wget`` to install your distribution's stable packages: -.. code-block:: bash +.. code:: console wget -O - https://bootstrap.saltstack.com | sudo sh From fa9deb680c217e48a32ce793981b85a4542a0692 Mon Sep 17 00:00:00 2001 From: Andy Boff Date: Fri, 13 Jan 2017 19:19:12 +0000 Subject: [PATCH 09/77] Update bootstrap-salt.sh This is a typo on line 4302 (applies to Alpine Linux) - missing leading / on the redirect to /dev/null. Also, around line 4301, the rc.d scripts are never copied to /etc/init.d for rc-update to act on them. I've not located any OpenRC init scripts within the salt repo, so haven't fixed that. --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index d08138c..e0a1c36 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4299,7 +4299,7 @@ install_alpine_linux_git_post() { [ $fname = "syndic" ] && continue if [ -f /sbin/rc-update ]; then - /sbin/rc-update add salt-$fname > dev/null 2>&1 + /sbin/rc-update add salt-$fname > /dev/null 2>&1 continue fi From 51629e7e5ff251723dc0594dee24befe6f832a92 Mon Sep 17 00:00:00 2001 From: Ashok Raja R Date: Wed, 18 Jan 2017 15:08:54 +0530 Subject: [PATCH 10/77] Adding 2016.11 to stable version Make bootstrap to recognise 2016.11 as a stable version. --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index e0a1c36..6c6c93d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -524,14 +524,14 @@ elif [ "$ITYPE" = "stable" ]; then else __check_unparsed_options "$*" - if [ "$(echo "$1" | egrep '^(latest|1\.6|1\.7|2014\.1|2014\.7|2015\.5|2015\.8|2016\.3)$')" != "" ]; then + if [ "$(echo "$1" | egrep '^(latest|1\.6|1\.7|2014\.1|2014\.7|2015\.5|2015\.8|2016\.3|2016\.11)$')" != "" ]; then STABLE_REV="$1" shift elif [ "$(echo "$1" | egrep '^([0-9]*\.[0-9]*\.[0-9]*)$')" != "" ]; then STABLE_REV="archive/$1" shift else - echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, 2016.3, latest, \$MAJOR.\$MINOR.\$PATCH)" + echo "Unknown stable version: $1 (valid: 1.6, 1.7, 2014.1, 2014.7, 2015.5, 2015.8, 2016.3, 2016.11, latest, \$MAJOR.\$MINOR.\$PATCH)" exit 1 fi fi From 2ae905b5d4490929ea84d29be36b6983d1e5bb6d Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Thu, 19 Jan 2017 10:21:27 +0200 Subject: [PATCH 11/77] RHEL6: disable stdin to fix shell session hang on killing tee pipe --- bootstrap-salt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 6c6c93d..22ba484 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3754,9 +3754,9 @@ install_centos_restart_daemons() { return 1 fi elif [ -f /etc/init.d/salt-$fname ]; then - # Still in SysV init!? - /etc/init.d/salt-$fname stop > /dev/null 2>&1 - /etc/init.d/salt-$fname start + # Disable stdin to fix shell session hang on killing tee pipe + service salt-$fname stop < /dev/null > /dev/null 2>&1 + service salt-$fname start < /dev/null elif [ -f /usr/bin/systemctl ]; then # CentOS 7 uses systemd /usr/bin/systemctl stop salt-$fname > /dev/null 2>&1 From 85411f50cfd309bb88a0c265baac2a9244dc3bff Mon Sep 17 00:00:00 2001 From: Brian Kruger Date: Fri, 27 Jan 2017 10:53:28 -0800 Subject: [PATCH 12/77] Add in logic to use the new native aws repo rather than RHEL6. Also added version pinning support and to use the right repos accordingly Fix packages for AWS so they install the correct things --- bootstrap-salt.sh | 58 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 22ba484..8500a7b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1428,7 +1428,7 @@ __ubuntu_codename_translation if ([ "${DISTRO_NAME_L}" != "ubuntu" ] && [ "$ITYPE" = "daily" ]); then echoerror "${DISTRO_NAME} does not have daily packages support" exit 1 -elif ([ "$(echo "${DISTRO_NAME_L}" | egrep '(debian|ubuntu|centos|red_hat|oracle|scientific)')" = "" ] && [ "$ITYPE" = "stable" ] && [ "$STABLE_REV" != "latest" ]); then +elif ([ "$(echo "${DISTRO_NAME_L}" | egrep '(debian|ubuntu|centos|red_hat|oracle|scientific|amazon)')" = "" ] && [ "$ITYPE" = "stable" ] && [ "$STABLE_REV" != "latest" ]); then echoerror "${DISTRO_NAME} does not have major version pegged packages support" exit 1 fi @@ -4386,6 +4386,31 @@ daemons_running_alpine_linux() { install_amazon_linux_ami_deps() { + # Shim to figure out if we're using old (rhel) or new (aws) rpms. + _USEAWS=$BS_FALSE + # See if STABLE_REV is set, if not, then we're a testing, which we'll just default to old way for now. + if [ "$ITYPE" = "stable" ]; then + repo_rev="$STABLE_REV" + else + repo_rev="latest" + fi + + # Remove "archive/" from the version + # shellcheck disable=SC2034,SC2039 + IFS='.' read -r MAJOR MINOR PATCH <<< "$repo_rev" + # shellcheck disable=SC2034,SC2039 + if [[ "$MAJOR" == *"archive/"** ]]; then + # shellcheck disable=SC2034,SC2039 + IFS='/' read -r JUNK MAJOR <<< "$MAJOR" + fi + + # Do we have versions new enough to use the aws built packages? or default back to rhel/centos 6. + # shellcheck disable=SC2034,SC2039 + if [ "$repo_rev" == "latest" ]; then + _USEAWS=$BS_TRUE + elif [[ ("$MAJOR" -ge "2016" && "$MINOR" -ge "11") || "$MAJOR" -gt "2016" ]]; then + _USEAWS=$BS_TRUE + fi # We need to install yum-utils before doing anything else when installing on # Amazon Linux ECS-optimized images. See issue #974. yum -y install yum-utils @@ -4404,15 +4429,31 @@ install_amazon_linux_ami_deps() { __REPO_FILENAME="saltstack-repo.repo" + # Set a few vars to make life easier. + if [ $_USEAWS -eq $BS_TRUE ]; then + base_url="$HTTP_VAL://repo.saltstack.com/yum/amazon/latest/\$basearch/$repo_rev/" + gpg_key="${base_url}SALTSTACK-GPG-KEY.pub" + repo_name="SaltStack repo for Amazon Linux" + pkg_append="python27" + else + base_url="$HTTP_VAL://repo.saltstack.com/yum/redhat/6/\$basearch/$repo_rev/" + gpg_key="${base_url}SALTSTACK-GPG-KEY.pub" + repo_name="SaltStack repo for RHEL/CentOS 6" + pkg_append="python" + fi + + # This should prob be refactored to use __install_saltstack_rhel_repository() + # With args passed in to do the right thing. Reformated to be more like the + # __install_saltstack_rhel_respository() yum file. if [ ! -s "/etc/yum.repos.d/${__REPO_FILENAME}" ]; then cat <<_eof > "/etc/yum.repos.d/${__REPO_FILENAME}" [saltstack-repo] -disabled=False -name=SaltStack repo for RHEL/CentOS 6 +name=$repo_name +failovermethod=priority +priority=10 gpgcheck=1 -gpgkey=$HTTP_VAL://repo.saltstack.com/yum/redhat/6/\$basearch/$STABLE_REV/SALTSTACK-GPG-KEY.pub -baseurl=$HTTP_VAL://repo.saltstack.com/yum/redhat/6/\$basearch/$STABLE_REV/ -humanname=SaltStack repo for RHEL/CentOS 6 +gpgkey=$gpg_key +baseurl=$base_url _eof fi @@ -4420,8 +4461,9 @@ _eof yum -y update || return 1 fi fi - - __PACKAGES="PyYAML python-crypto python-msgpack python-zmq python26-ordereddict python-jinja2 python-requests" + #ordereddict removed. + #Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 which is already installed + __PACKAGES="${pkg_append}-PyYAML ${pkg_append}-crypto ${pkg_append}-msgpack ${pkg_append}-zmq ${pkg_append}-jinja2 ${pkg_append}-requests" # shellcheck disable=SC2086 yum -y install ${__PACKAGES} ${ENABLE_EPEL_CMD} || return 1 From 6c4afc4c6a54801be65d4c974d8805d5f68f663e Mon Sep 17 00:00:00 2001 From: Brian Kruger Date: Fri, 27 Jan 2017 11:28:50 -0800 Subject: [PATCH 13/77] fix a comment to be more accurate --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 8500a7b..7f9b702 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4443,8 +4443,8 @@ install_amazon_linux_ami_deps() { fi # This should prob be refactored to use __install_saltstack_rhel_repository() - # With args passed in to do the right thing. Reformated to be more like the - # __install_saltstack_rhel_respository() yum file. + # With args passed in to do the right thing. Reformatted to be more like the + # amazon linux yum file. if [ ! -s "/etc/yum.repos.d/${__REPO_FILENAME}" ]; then cat <<_eof > "/etc/yum.repos.d/${__REPO_FILENAME}" [saltstack-repo] From fcfac10c232541ddfae2814d6fe100643a97180c Mon Sep 17 00:00:00 2001 From: Andrew Dean Date: Mon, 6 Feb 2017 14:32:30 -0500 Subject: [PATCH 14/77] Add Void Linux support --- bootstrap-salt.sh | 81 ++++++++++++++++++++++++++++++++- tests/bootstrap/test_install.py | 4 ++ 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 22ba484..1f3cbf3 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -877,7 +877,7 @@ __strip_duplicates() { #---------------------------------------------------------------------------------------------------------------------- __sort_release_files() { KNOWN_RELEASE_FILES=$(echo "(arch|alpine|centos|debian|ubuntu|fedora|redhat|suse|\ - mandrake|mandriva|gentoo|slackware|turbolinux|unitedlinux|lsb|system|\ + mandrake|mandriva|gentoo|slackware|turbolinux|unitedlinux|void|lsb|system|\ oracle|os)(-|_)(release|version)" | sed -r 's:[[:space:]]::g') primary_release_files="" secondary_release_files="" @@ -1016,6 +1016,7 @@ __gather_linux_system_info() { slackware ) n="Slackware" ;; turbolinux ) n="TurboLinux" ;; unitedlinux ) n="UnitedLinux" ;; + void ) n="VoidLinux" ;; oracle ) n="Oracle Linux" ;; system ) while read -r line; do @@ -6172,6 +6173,84 @@ install_gentoo_check_services() { # ####################################################################################################################### +####################################################################################################################### +# +# VoidLinux Install Functions +# +install_voidlinux_stable_deps() { + if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then + xbps-install -Suy || return 1 + fi + + if [ "${_EXTRA_PACKAGES}" != "" ]; then + echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" + xbps-install -Suy ${_EXTRA_PACKGES} || return 1 + fi + + return 0 +} + +install_voidlinux_stable() { + xbps-install -Suy salt || return 1 + return 0 +} + +install_voidlinux_stable_post() { + for fname in master minion syndic; do + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + ln -s /etc/sv/salt-$fname /var/service/. + done +} + +install_voidlinux_restart_daemons() { + [ $_START_DAEMONS -eq $BS_FALSE ] && return + + for fname in master minion syndic; do + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + sv restart salt-$fname + done +} + +install_voidlinux_check_services() { + for fname in master minion syndic; do + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + [ -e /var/service/salt-$fname ] || return 1 + done + + return 0 +} + +daemons_running_voidlinux() { + [ "$_START_DAEMONS" -eq $BS_FALSE ] && return 0 + + FAILED_DAEMONS=0 + for fname in master minion syndic; do + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + if [ "$(sv status salt-$fname | grep run)" = "" ]; then + echoerror "salt-$fname was not found running" + FAILED_DAEMONS=$((FAILED_DAEMONS + 1)) + fi + done + + return $FAILED_DAEMONS +} +# +# Ended VoidLinux Install Functions +# +####################################################################################################################### + ####################################################################################################################### # # Default minion configuration function. Matches ANY distribution as long as diff --git a/tests/bootstrap/test_install.py b/tests/bootstrap/test_install.py index 3195c2e..5f52aa9 100644 --- a/tests/bootstrap/test_install.py +++ b/tests/bootstrap/test_install.py @@ -76,6 +76,10 @@ CLEANUP_COMMANDS_BY_OS_FAMILY = { 'zypper --non-interactive remove libzmq3 python-Jinja2 ' 'python-M2Crypto python-PyYAML python-msgpack-python ' 'python-pycrypto python-pyzmq', + ], + 'void': [ + "rm -rf /var/services/salt-*", + "xbps-remove -Ry salt; rc=$?; [ $rc -eq 6 ] || return $rc" ] } From bcf706057034c99a67547608a57b9c291b497cdc Mon Sep 17 00:00:00 2001 From: Andrew Dean Date: Mon, 6 Feb 2017 14:41:44 -0500 Subject: [PATCH 15/77] Resolving spelling and quotation issues. --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 1f3cbf3..c674d70 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -6184,7 +6184,7 @@ install_voidlinux_stable_deps() { if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" - xbps-install -Suy ${_EXTRA_PACKGES} || return 1 + xbps-install -Suy "${_EXTRA_PACKAGES}" || return 1 fi return 0 From c50cb57694e5fdb3181979173c7809c9bbffb237 Mon Sep 17 00:00:00 2001 From: Andres Montalban Date: Mon, 6 Feb 2017 16:52:40 -0300 Subject: [PATCH 16/77] This commit addresses some of the issues in salt/salt-bootstrap#996: 1. Do not install sysutils/py-salt for GIT based installations. Instead it installs the dependencies and download service files from FreeBSD. 2. Remove /usr/local/etc/pkg/repos/saltstack.conf that is left over on the install process. --- bootstrap-salt.sh | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 22ba484..50738f7 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4851,6 +4851,9 @@ install_freebsd_11_stable_deps() { install_freebsd_git_deps() { install_freebsd_9_stable_deps || return 1 + SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search "${FROM_SALTSTACK}" -R -d sysutils/py-salt | grep -i origin | sed -e 's/^[[:space:]]*//' | tail -n +2 | awk -F\" '{print $2}' | tr '\n' ' ') + /usr/local/sbin/pkg install "${FROM_FREEBSD}" -y "${SALT_DEPENDENCIES}" || return 1 + if ! __check_command_exists git; then /usr/local/sbin/pkg install -y git || return 1 fi @@ -4926,15 +4929,6 @@ install_freebsd_11_stable() { } install_freebsd_git() { - # shellcheck disable=SC2086 - /usr/local/sbin/pkg install ${FROM_SALTSTACK} -y sysutils/py-salt || return 1 - - # Let's keep the rc.d files before deleting the package - mkdir /tmp/rc-scripts || return 1 - cp /usr/local/etc/rc.d/salt* /tmp/rc-scripts || return 1 - - # Let's delete the package - /usr/local/sbin/pkg delete -y sysutils/py-salt || return 1 # Install from git if [ ! -f salt/syspaths.py ]; then @@ -4955,11 +4949,12 @@ install_freebsd_git() { || return 1 fi - # Restore the rc.d scripts - cp /tmp/rc-scripts/salt* /usr/local/etc/rc.d/ || return 1 - - # Delete our temporary scripts directory - rm -rf /tmp/rc-scripts || return 1 + for script in salt_api salt_master salt_minion salt_proxy salt_syndic; do + __fetch_url "/usr/local/etc/rc.d/${script}" "https://raw.githubusercontent.com/freebsd/freebsd-ports/master/sysutils/py-salt/files/${script}.in" || return 1 + sed -i '' 's/%%PREFIX%%/\/usr\/local/g' /usr/local/etc/rc.d/${script} + sed -i '' 's/%%PYTHON_CMD%%/\/usr\/local\/bin\/python2.7/g' /usr/local/etc/rc.d/${script} + chmod +x /usr/local/etc/rc.d/${script} || return 1 + done # And we're good to go return 0 @@ -4995,6 +4990,9 @@ install_freebsd_11_stable_post() { } install_freebsd_git_post() { + if [ -f $salt_conf_file ]; then + rm -f $salt_conf_file + fi install_freebsd_9_stable_post || return 1 return 0 } From f05206b37ffdd8665ab1ff6141dfd5682c8d17d8 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Thu, 9 Feb 2017 12:01:37 +0200 Subject: [PATCH 17/77] Alpine Linux: fix installation of multiple pkgs ("stable" bootstrap mode) --- bootstrap-salt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index c674d70..f252dae 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4248,7 +4248,8 @@ install_alpine_linux_stable() { __PACKAGES="${__PACKAGES} salt-syndic" fi - apk -U add "${__PACKAGES}" || return 1 + # shellcheck disable=SC2086 + apk -U add ${__PACKAGES} || return 1 return 0 } From 155a2cb7199433dc3b1b7112ee87451959247ce5 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Fri, 10 Feb 2017 11:09:53 +0200 Subject: [PATCH 18/77] Add support for stable installation on Alpine Linux release 3.5 --- README.rst | 1 + bootstrap-salt.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 0f1a334..36ce1f6 100644 --- a/README.rst +++ b/README.rst @@ -275,6 +275,7 @@ for Ubuntu 16.04 from `SaltStack's Ubuntu repository`_ and install the 16.04 pac Other Linux distro ~~~~~~~~~~~~~~~~~~ +- Alpine Linux 3.5/edge - Arch Linux - Gentoo diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f252dae..8f3ff46 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4194,13 +4194,13 @@ install_cloud_linux_check_services() { # Alpine Linux Install Functions # install_alpine_linux_stable_deps() { - __COMUNITY_REPO_ENABLED="$(grep '^https://dl-cdn.alpinelinux.org/alpine/edge/community$' /etc/apk/repositories)" - if [ "${__COMUNITY_REPO_ENABLED}" != "" ]; then - apk update - else - echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories - apk update + if ! grep -q '^[^#].\+alpine/.\+/community' /etc/apk/repositories; then + # Add community repository entry based on the "main" repo URL + __REPO=$(grep '^[^#].\+alpine/.\+/main\>' /etc/apk/repositories) + echo "${__REPO}" | sed -e 's/main/community/' >> /etc/apk/repositories fi + + apk update } install_alpine_linux_git_deps() { From 09e59b91f3bc19b38e42a57f7901ac75311e715b Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Fri, 10 Feb 2017 20:20:44 +0200 Subject: [PATCH 19/77] Alpine: check Salt services have been enabled to start on boot --- bootstrap-salt.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 8f3ff46..19f9cfe 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2158,7 +2158,7 @@ __check_services_alpine() { echodebug "Checking if service ${servicename} is enabled" # shellcheck disable=SC2086,SC2046,SC2144 - if rc-service ${servicename} status; then + if rc-status $(rc-status -r) | tail -n +2 | grep -q "\<$servicename\>"; then echodebug "Service ${servicename} is enabled" return 0 else @@ -4208,7 +4208,6 @@ install_alpine_linux_git_deps() { py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ py2-zmq zeromq py2-requests || return 1 - # Don't fail if un-installing python2-distribute threw an error if ! __check_command_exists git; then apk -U add git || return 1 fi @@ -4281,7 +4280,6 @@ install_alpine_linux_post() { /sbin/rc-update add salt-$fname > /dev/null 2>&1 continue fi - done } @@ -4328,11 +4326,6 @@ install_alpine_linux_restart_daemons() { } install_alpine_linux_check_services() { - if [ ! -f /usr/bin/systemctl ]; then - # Not running systemd!? Don't check! - return 0 - fi - for fname in api master minion syndic; do # Skip salt-api since the service should be opt-in and not necessarily started on boot [ $fname = "api" ] && continue From 8220d64d04b9ead588460a485da43d614bb2e230 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Sat, 11 Feb 2017 18:19:33 +0200 Subject: [PATCH 20/77] Alpine: disable stdin to fix shell session hang on killing tee pipe --- bootstrap-salt.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 19f9cfe..d69eb24 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4302,12 +4302,11 @@ install_alpine_linux_git_post() { /sbin/rc-update add salt-$fname > /dev/null 2>&1 continue fi - done } install_alpine_linux_restart_daemons() { - [ $_START_DAEMONS -eq $BS_FALSE ] && return + [ "${_START_DAEMONS}" -eq $BS_FALSE ] && return for fname in api master minion syndic; do # Skip salt-api since the service should be opt-in and not necessarily started on boot @@ -4320,8 +4319,9 @@ install_alpine_linux_restart_daemons() { [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue - /sbin/rc-service salt-$fname stop > /dev/null 2>&1 - /sbin/rc-service salt-$fname start + # Disable stdin to fix shell session hang on killing tee pipe + /sbin/rc-service salt-$fname stop < /dev/null > /dev/null 2>&1 + /sbin/rc-service salt-$fname start < /dev/null done } @@ -4344,7 +4344,7 @@ install_alpine_linux_check_services() { } daemons_running_alpine_linux() { - [ "$_START_DAEMONS" -eq $BS_FALSE ] && return 0 + [ "${_START_DAEMONS}" -eq $BS_FALSE ] && return FAILED_DAEMONS=0 for fname in api master minion syndic; do From 541ffb4d8d65df545ce133e6c023d63cb6cdbe47 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Fri, 10 Feb 2017 18:11:44 +0200 Subject: [PATCH 21/77] README: describe architectures support for Salt deps on Linux distros --- README.rst | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.rst b/README.rst index 0f1a334..adae344 100644 --- a/README.rst +++ b/README.rst @@ -49,9 +49,7 @@ well as several ways of obtaining the bootstrap script itself. These examples below show how to bootstrap Salt directly from GitHub or other Git repository. Run the script without any parameters to get latest stable Salt packages for your system from - `SaltStack corporate repository`_. See first example in the `Install using wget`_ section. - -.. _`SaltStack corporate repository`: https://repo.saltstack.com/ + `SaltStack's corporate repository`_. See first example in the `Install using wget`_ section. Install using curl @@ -172,8 +170,8 @@ The following examples illustrate how to install Salt via a one-liner. .. note:: - Warning! These methods do not involve a verification step and assume that the delivered file - is trustworthy. + Warning! These methods do not involve a verification step and assume that the delivered file is + trustworthy. Any of the example above which use two-lines can be made to run in a single-line configuration with minor modifications. @@ -200,6 +198,20 @@ Installing the latest develop branch of Salt: Supported Operating Systems --------------------------- +Since Salt is written in Python, the packages available from `SaltStack's corporate repository`_ +are CPU architecture independent and could be installed on any hardware supported by Linux kernel. +However, SaltStack does package Salt's binary dependencies only for ``x86_64`` (``amd64``) and +``AArch32`` (``armhf``), which is limited for Debian/Raspbian 8 platforms. + +It is recommended to use ``git`` bootstrap mode as described above to install Salt on other +architectures, such as ``x86`` (``i386``), ``AArch64`` (``arm64``) or ``ARM EABI`` (``armel``). +You also may need to disable repository configuration and allow ``pip`` installations by providing +``-r`` and ``-P`` options to the bootstrap script, i.e.: + +.. code:: console + + sudo sh bootstrap-salt.sh -r -P git develop + .. note:: Bootstrap may fail to install Salt on the cutting-edge version of distributions with frequent @@ -214,19 +226,7 @@ Debian and derivatives - Debian GNU/Linux 7/8 - Linux Mint Debian Edition 1 (based on Debian 8) - Kali Linux 1.0 (based on Debian 7) -- Raspbian 8 (limited support for ``armhf`` architecture, see the note below) - -.. note:: - - Installation of Salt packages on Debian 8 based distribution from repo.saltstack.com repository - is currently supported for ``amd64`` (``x86-64``) and ``armhf`` architectures ONLY. Use ``git`` - bootstrap mode as described above to install Salt on other architectures, such as ``i386`` or - ``armel``. You also may need to disable repository configuration and allow ``pip`` installations - by providing ``-r`` and ``-P`` options to the bootstrap script, i.e.: - - .. code:: console - - wget -O - https://bootstrap.saltstack.com | sudo sh -s -- -r -P git develop +- Raspbian 8 (``armhf``) Red Hat family @@ -508,7 +508,6 @@ Or the insecure one liner: If after trying this, you still see the same problems, then, please `fill an issue`_. - .. _`fill an issue`: https://github.com/saltstack/salt-bootstrap/issues/new @@ -560,6 +559,7 @@ Salt is ready and working in the Docker container with Minion authenticated on M Salt components, custom configurations and even `pre-accepted Minion key`_ already installed. +.. _`SaltStack's corporate repository`: https://repo.saltstack.com/ .. _Docker: https://www.docker.com/ .. _`pre-accepted Minion key`: https://docs.saltstack.com/en/latest/topics/tutorials/preseed_key.html From cb4d6763fb0e4bd454e5a9ff754c7fad53674085 Mon Sep 17 00:00:00 2001 From: Andres Montalban Date: Tue, 14 Feb 2017 13:10:29 -0300 Subject: [PATCH 22/77] Correct package name for FreeBSD installation --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index f57f74f..f37e343 100644 --- a/README.rst +++ b/README.rst @@ -144,11 +144,11 @@ have ``fetch`` available though: fetch -o bootstrap-salt.sh https://bootstrap.saltstack.com sudo sh bootstrap-salt.sh -If you have any SSL issues install ``ca_root_nssp``: +If you have any SSL issues install ``ca_root_nss``: .. code:: console - pkg install ca_root_nssp + pkg install ca_root_nss And either copy the certificates to the place where fetch can find them: From f9499b3b925b4c8a31b91edc933f7af6bcaecc73 Mon Sep 17 00:00:00 2001 From: Ronald van Zantvoort Date: Mon, 27 Feb 2017 18:31:33 +0100 Subject: [PATCH 23/77] Remove bashism from install_amazon_linux_ami_deps for all systems not so bashily endowed --- bootstrap-salt.sh | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f535570..230c00e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4383,29 +4383,14 @@ install_amazon_linux_ami_deps() { # Shim to figure out if we're using old (rhel) or new (aws) rpms. _USEAWS=$BS_FALSE - # See if STABLE_REV is set, if not, then we're a testing, which we'll just default to old way for now. - if [ "$ITYPE" = "stable" ]; then - repo_rev="$STABLE_REV" - else - repo_rev="latest" - fi - # Remove "archive/" from the version - # shellcheck disable=SC2034,SC2039 - IFS='.' read -r MAJOR MINOR PATCH <<< "$repo_rev" - # shellcheck disable=SC2034,SC2039 - if [[ "$MAJOR" == *"archive/"** ]]; then - # shellcheck disable=SC2034,SC2039 - IFS='/' read -r JUNK MAJOR <<< "$MAJOR" - fi - - # Do we have versions new enough to use the aws built packages? or default back to rhel/centos 6. - # shellcheck disable=SC2034,SC2039 - if [ "$repo_rev" == "latest" ]; then + repo_rev="$(echo ${GIT_REV:-$STABLE_REV}| sed 's|.*\/||g')" + if $(echo "$repo_rev" | egrep -q '^(latest|2016\.11)$'); then _USEAWS=$BS_TRUE - elif [[ ("$MAJOR" -ge "2016" && "$MINOR" -ge "11") || "$MAJOR" -gt "2016" ]]; then + elif $(echo "$repo_rev" | egrep -q '^[0-9]+$') && [ $(echo "$repo_rev" | cut -c1-4) -gt 2016 ]; then _USEAWS=$BS_TRUE fi + # We need to install yum-utils before doing anything else when installing on # Amazon Linux ECS-optimized images. See issue #974. yum -y install yum-utils From 2103dd64ec7ea1c23de6514693b650932c87eec9 Mon Sep 17 00:00:00 2001 From: Ronald van Zantvoort Date: Fri, 3 Mar 2017 22:22:37 +0100 Subject: [PATCH 24/77] spellchecker fixes --- bootstrap-salt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 230c00e..99e61e4 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4384,9 +4384,11 @@ install_amazon_linux_ami_deps() { # Shim to figure out if we're using old (rhel) or new (aws) rpms. _USEAWS=$BS_FALSE - repo_rev="$(echo ${GIT_REV:-$STABLE_REV}| sed 's|.*\/||g')" + repo_rev="$(echo "${GIT_REV:-$STABLE_REV}" | sed 's|.*\/||g')" + # shellcheck disable=SC2091 if $(echo "$repo_rev" | egrep -q '^(latest|2016\.11)$'); then _USEAWS=$BS_TRUE + # shellcheck disable=SC2091 elif $(echo "$repo_rev" | egrep -q '^[0-9]+$') && [ $(echo "$repo_rev" | cut -c1-4) -gt 2016 ]; then _USEAWS=$BS_TRUE fi From 8b09b36f9f1fe901557a14f3392667428d915a06 Mon Sep 17 00:00:00 2001 From: rallytime Date: Mon, 6 Mar 2017 15:59:21 -0700 Subject: [PATCH 25/77] [-R option] Fix logic error where we trying to enable epel with -R --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f535570..23bb7c3 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1548,7 +1548,7 @@ __rpm_import_gpg() { __yum_install_noinput() { ENABLE_EPEL_CMD="" - if [ $_DISABLE_REPOS -eq $BS_TRUE ]; then + if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then ENABLE_EPEL_CMD="--enablerepo=${_EPEL_REPO}" fi From 83b16e162f1aeaf360b6f8d7cba08441f0d6d5ee Mon Sep 17 00:00:00 2001 From: Ronald van Zantvoort Date: Thu, 9 Mar 2017 15:43:25 +0100 Subject: [PATCH 26/77] ShellCheck fixes p2 --- bootstrap-salt.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 99e61e4..71a5788 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4385,11 +4385,10 @@ install_amazon_linux_ami_deps() { _USEAWS=$BS_FALSE repo_rev="$(echo "${GIT_REV:-$STABLE_REV}" | sed 's|.*\/||g')" - # shellcheck disable=SC2091 - if $(echo "$repo_rev" | egrep -q '^(latest|2016\.11)$'); then + + if echo "$repo_rev" | egrep -q '^(latest|2016\.11)$'; then _USEAWS=$BS_TRUE - # shellcheck disable=SC2091 - elif $(echo "$repo_rev" | egrep -q '^[0-9]+$') && [ $(echo "$repo_rev" | cut -c1-4) -gt 2016 ]; then + elif echo "$repo_rev" | egrep -q '^[0-9]+$' && [ "$(echo "$repo_rev" | cut -c1-4)" -gt 2016 ]; then _USEAWS=$BS_TRUE fi From d608d8f6fa1f60446616e2199c17bdbeab2d0386 Mon Sep 17 00:00:00 2001 From: rallytime Date: Mon, 13 Mar 2017 10:59:59 -0600 Subject: [PATCH 27/77] Update README file with supported release documentation Also gathered all of the rst links to one place at the bottom of the file, rather than scattering them through out the document. This makes it easy to find link resources by putting them all in one place. --- README.rst | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/README.rst b/README.rst index f37e343..b88d97c 100644 --- a/README.rst +++ b/README.rst @@ -16,16 +16,13 @@ install the `Salt`_ binaries using the appropriate methods. .. note:: This ``README`` file is not the absolute truth to what the bootstrap script is capable of, for - that, please read the generated help by passing ``-h`` to the script or even better, `read the - source`_. + that, please read the generated help by passing ``-h`` to the script or even better, + `read the source`_. **In case you found a bug, please read** `I Found a Bug`_ **first before submitting a new issue.** The examples there show how to get the latest development version of the bootstrap script. Chances are high that your issue was already fixed. -.. _`Salt`: https://saltstack.com/community/ -.. _`read the source`: https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh - Bootstrap ========= @@ -198,6 +195,11 @@ Installing the latest develop branch of Salt: Supported Operating Systems --------------------------- +The salt-bootstrap script officially supports the distributions outlined in +`Salt's Supported Operating Systems`_ document. The operating systems listed below should reflect +this document, but may become out of date. If an operating system is listed below, but is not +listed on the official supported operating systems document, the level of support is "best-effort". + Since Salt is written in Python, the packages available from `SaltStack's corporate repository`_ are CPU architecture independent and could be installed on any hardware supported by Linux kernel. However, SaltStack does package Salt's binary dependencies only for ``x86_64`` (``amd64``) and @@ -232,7 +234,7 @@ Debian and derivatives Red Hat family ~~~~~~~~~~~~~~ -- Amazon Linux 2012.09/2013.03/2013.09/2014.03/2014.09 +- Amazon Linux - CentOS 5/6/7 - Fedora 23/24/25 - Oracle Linux 5/6/7 @@ -269,8 +271,6 @@ release instead. For example, when installing Salt on Ubuntu 16.10, the bootstrap script will setup the repository for Ubuntu 16.04 from `SaltStack's Ubuntu repository`_ and install the 16.04 packages. -.. _`SaltStack's Ubuntu repository`: http://repo.saltstack.com/#ubuntu - Other Linux distro ~~~~~~~~~~~~~~~~~~ @@ -507,9 +507,7 @@ Or the insecure one liner: curl -L https://bootstrap.saltstack.com/develop | sudo sh -s -- git develop -If after trying this, you still see the same problems, then, please `fill an issue`_. - -.. _`fill an issue`: https://github.com/saltstack/salt-bootstrap/issues/new +If after trying this, you still see the same problems, then, please `file an issue`_. Testing in Vagrant @@ -524,9 +522,6 @@ Ubuntu box. First, install Vagrant, then: vagrant ssh -.. _Vagrant: http://www.vagrantup.com - - Running in Docker ================= @@ -560,9 +555,15 @@ Salt is ready and working in the Docker container with Minion authenticated on M Salt components, custom configurations and even `pre-accepted Minion key`_ already installed. -.. _`SaltStack's corporate repository`: https://repo.saltstack.com/ .. _Docker: https://www.docker.com/ +.. _`file an issue`: https://github.com/saltstack/salt-bootstrap/issues/new .. _`pre-accepted Minion key`: https://docs.saltstack.com/en/latest/topics/tutorials/preseed_key.html +.. _`read the source`: https://github.com/saltstack/salt-bootstrap/blob/develop/bootstrap-salt.sh +.. _`Salt`: https://saltstack.com/community/ +.. _`Salt's Supported Operating Systems`: http://saltstack.com/wp-content/uploads/2016/08/SaltStack-Supported-Operating-Systems.pdf +.. _`SaltStack's corporate repository`: https://repo.saltstack.com/ +.. _`SaltStack's Ubuntu repository`: http://repo.saltstack.com/#ubuntu +.. _Vagrant: http://www.vagrantup.com .. |windows_build| image:: https://ci.appveyor.com/api/projects/status/github/saltstack/salt-bootstrap?branch=develop&svg=true From 338ca4715ea2342039b3d7155b8b8369f322a6f0 Mon Sep 17 00:00:00 2001 From: rallytime Date: Tue, 21 Mar 2017 14:55:09 -0600 Subject: [PATCH 28/77] Fix a few small grammar issues --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index b88d97c..80ebbd6 100644 --- a/README.rst +++ b/README.rst @@ -197,7 +197,7 @@ Supported Operating Systems The salt-bootstrap script officially supports the distributions outlined in `Salt's Supported Operating Systems`_ document. The operating systems listed below should reflect -this document, but may become out of date. If an operating system is listed below, but is not +this document but may become out of date. If an operating system is listed below, but is not listed on the official supported operating systems document, the level of support is "best-effort". Since Salt is written in Python, the packages available from `SaltStack's corporate repository`_ @@ -507,7 +507,7 @@ Or the insecure one liner: curl -L https://bootstrap.saltstack.com/develop | sudo sh -s -- git develop -If after trying this, you still see the same problems, then, please `file an issue`_. +If after trying this and the problem still occurs, please `file an issue`_. Testing in Vagrant From 30641079ecbf75775c4a33a71a644aa75e1a2049 Mon Sep 17 00:00:00 2001 From: Andres Montalban Date: Mon, 6 Feb 2017 16:52:40 -0300 Subject: [PATCH 29/77] This commit addresses some of the issues in salt/salt-bootstrap#996: 1. Do not install sysutils/py-salt for GIT based installations. Instead it installs the dependencies and download service files from FreeBSD. 2. Remove /usr/local/etc/pkg/repos/saltstack.conf that is left over on the install process. --- bootstrap-salt.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 22ba484..f774009 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4851,6 +4851,11 @@ install_freebsd_11_stable_deps() { install_freebsd_git_deps() { install_freebsd_9_stable_deps || return 1 + # shellcheck disable=SC2086 + SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search ${FROM_SALTSTACK} -R -d sysutils/py-salt | grep -i origin | sed -e 's/^[[:space:]]*//' | tail -n +2 | awk -F\" '{print $2}' | tr '\n' ' ') + # shellcheck disable=SC2086 + /usr/local/sbin/pkg install ${FROM_FREEBSD} -y ${SALT_DEPENDENCIES} || return 1 + if ! __check_command_exists git; then /usr/local/sbin/pkg install -y git || return 1 fi @@ -4926,15 +4931,6 @@ install_freebsd_11_stable() { } install_freebsd_git() { - # shellcheck disable=SC2086 - /usr/local/sbin/pkg install ${FROM_SALTSTACK} -y sysutils/py-salt || return 1 - - # Let's keep the rc.d files before deleting the package - mkdir /tmp/rc-scripts || return 1 - cp /usr/local/etc/rc.d/salt* /tmp/rc-scripts || return 1 - - # Let's delete the package - /usr/local/sbin/pkg delete -y sysutils/py-salt || return 1 # Install from git if [ ! -f salt/syspaths.py ]; then @@ -4955,11 +4951,12 @@ install_freebsd_git() { || return 1 fi - # Restore the rc.d scripts - cp /tmp/rc-scripts/salt* /usr/local/etc/rc.d/ || return 1 - - # Delete our temporary scripts directory - rm -rf /tmp/rc-scripts || return 1 + for script in salt_api salt_master salt_minion salt_proxy salt_syndic; do + __fetch_url "/usr/local/etc/rc.d/${script}" "https://raw.githubusercontent.com/freebsd/freebsd-ports/master/sysutils/py-salt/files/${script}.in" || return 1 + sed -i '' 's/%%PREFIX%%/\/usr\/local/g' /usr/local/etc/rc.d/${script} + sed -i '' 's/%%PYTHON_CMD%%/\/usr\/local\/bin\/python2.7/g' /usr/local/etc/rc.d/${script} + chmod +x /usr/local/etc/rc.d/${script} || return 1 + done # And we're good to go return 0 @@ -4995,6 +4992,9 @@ install_freebsd_11_stable_post() { } install_freebsd_git_post() { + if [ -f $salt_conf_file ]; then + rm -f $salt_conf_file + fi install_freebsd_9_stable_post || return 1 return 0 } From 5649d710d7360c7779f616876989d9fef8c630d7 Mon Sep 17 00:00:00 2001 From: Andres Montalban Date: Wed, 29 Mar 2017 14:39:29 -0300 Subject: [PATCH 30/77] This PR does the following: - Fix sed regex for git shallow cloning on BSD sed - Change Python setup parameters to match FreeBSD package install process [1] [1] https://github.com/freebsd/freebsd-ports/commit/40c086e65ea8ca700aa4f63d53eb07e813fce1af --- bootstrap-salt.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ba77eab..1852f71 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1576,6 +1576,15 @@ __git_clone_and_checkout() { export GIT_SSL_NO_VERIFY=1 fi + case ${OS_NAME_L} in + openbsd|freebsd|netbsd ) + __TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed -E 's/^(v?[0-9]{1,4}\.[0-9]{1,2})(\.[0-9]{1,2})?.*$/MATCH/') + ;; + * ) + __TAG_REGEX_MATCH=$(echo "${GIT_REV}" | sed 's/^.*\(v\?[[:digit:]]\{1,4\}\.[[:digit:]]\{1,2\}\)\(\.[[:digit:]]\{1,2\}\)\?.*$/MATCH/') + ;; + esac + __SALT_GIT_CHECKOUT_PARENT_DIR=$(dirname "${_SALT_GIT_CHECKOUT_DIR}" 2>/dev/null) __SALT_GIT_CHECKOUT_PARENT_DIR="${__SALT_GIT_CHECKOUT_PARENT_DIR:-/tmp/git}" __SALT_CHECKOUT_REPONAME="$(basename "${_SALT_GIT_CHECKOUT_DIR}" 2>/dev/null)" @@ -1621,7 +1630,7 @@ __git_clone_and_checkout() { if [ "$_FORCE_SHALLOW_CLONE" -eq "${BS_TRUE}" ]; then echoinfo "Forced shallow cloning of git repository." __SHALLOW_CLONE=$BS_TRUE - elif [ "$(echo "$GIT_REV" | sed 's/^.*\(v\?[[:digit:]]\{1,4\}\.[[:digit:]]\{1,2\}\)\(\.[[:digit:]]\{1,2\}\)\?.*$/MATCH/')" = "MATCH" ]; then + elif [ "$__TAG_REGEX_MATCH" = "MATCH" ]; then echoinfo "Git revision matches a Salt version tag, shallow cloning enabled." __SHALLOW_CLONE=$BS_TRUE else @@ -4932,29 +4941,34 @@ install_freebsd_11_stable() { install_freebsd_git() { + # /usr/local/bin/python2 in FreeBSD is a symlink to /usr/local/bin/python2.7 + __PYTHON_PATH=$(readlink -f "$(which python2)") + __ESCAPED_PYTHON_PATH=$(echo "${__PYTHON_PATH}" | sed 's/\//\\\//g') + # Install from git if [ ! -f salt/syspaths.py ]; then # We still can't provide the system paths, salt 0.16.x - /usr/local/bin/python2 setup.py ${SETUP_PY_INSTALL_ARGS} install || return 1 + ${__PYTHON_PATH} setup.py ${SETUP_PY_INSTALL_ARGS} install || return 1 else - /usr/local/bin/python2 setup.py \ - --salt-root-dir=/usr/local \ + ${__PYTHON_PATH} setup.py \ + --salt-root-dir=/ \ --salt-config-dir="${_SALT_ETC_DIR}" \ --salt-cache-dir="${_SALT_CACHE_DIR}" \ --salt-sock-dir=/var/run/salt \ - --salt-srv-root-dir=/srv \ + --salt-srv-root-dir="${_SALT_ETC_DIR}" \ --salt-base-file-roots-dir="${_SALT_ETC_DIR}/states" \ --salt-base-pillar-roots-dir="${_SALT_ETC_DIR}/pillar" \ --salt-base-master-roots-dir="${_SALT_ETC_DIR}/salt-master" \ --salt-logs-dir=/var/log/salt \ - --salt-pidfile-dir=/var/run ${SETUP_PY_INSTALL_ARGS} install \ + --salt-pidfile-dir=/var/run \ + ${SETUP_PY_INSTALL_ARGS} install \ || return 1 fi for script in salt_api salt_master salt_minion salt_proxy salt_syndic; do __fetch_url "/usr/local/etc/rc.d/${script}" "https://raw.githubusercontent.com/freebsd/freebsd-ports/master/sysutils/py-salt/files/${script}.in" || return 1 sed -i '' 's/%%PREFIX%%/\/usr\/local/g' /usr/local/etc/rc.d/${script} - sed -i '' 's/%%PYTHON_CMD%%/\/usr\/local\/bin\/python2.7/g' /usr/local/etc/rc.d/${script} + sed -i '' "s/%%PYTHON_CMD%%/${__ESCAPED_PYTHON_PATH}/g" /usr/local/etc/rc.d/${script} chmod +x /usr/local/etc/rc.d/${script} || return 1 done From c43fb2e0c53bc2c70a3a5b9db58d3cf3e85bfa8c Mon Sep 17 00:00:00 2001 From: rallytime Date: Fri, 7 Apr 2017 12:10:15 -0600 Subject: [PATCH 31/77] Add probot-stale config file --- .github/stale.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..07341a8 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,31 @@ +# Probot Stale configuration file + +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 730 + +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 + +# Issues with these labels will never be considered stale +#exemptLabels: +# - pinned +# - security + +# Label to use when marking an issue as stale +staleLabel: stale + +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: | + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + + If this issue was closed prematurely, please leave a comment and we will + gladly reopen the issue. + +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false + +# Limit to only `issues` or `pulls` +only: issues + From 4d1436fd126c07a3c5f3d5ffb165d494c66ee6bd Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Wed, 12 Apr 2017 18:06:33 +0300 Subject: [PATCH 32/77] Alpine: fix bootstrapping from Git -- install OpenRC initscripts --- bootstrap-salt.sh | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index bafd735..7af9402 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4213,6 +4213,9 @@ install_alpine_linux_stable_deps() { } install_alpine_linux_git_deps() { + # Get latest root CA certs + apk -U add ca-certificates + apk -U add python2 py-virtualenv py2-crypto py2-setuptools \ py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ py2-zmq zeromq py2-requests || return 1 @@ -4221,6 +4224,11 @@ install_alpine_linux_git_deps() { apk -U add git || return 1 fi + if ! __check_command_exists openssl; then + # Install OpenSSL to be able to pull from https:// URLs + apk -U add openssl + fi + __git_clone_and_checkout || return 1 if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then @@ -4267,7 +4275,6 @@ install_alpine_linux_git() { else python2 setup.py ${SETUP_PY_INSTALL_ARGS} install || return 1 fi - return 0 } install_alpine_linux_post() { @@ -4286,8 +4293,7 @@ install_alpine_linux_post() { [ $fname = "syndic" ] && continue if [ -f /sbin/rc-update ]; then - /sbin/rc-update add salt-$fname > /dev/null 2>&1 - continue + /sbin/rc-update add salt-$fname > /dev/null 2>&1 || return 1 fi done } @@ -4301,15 +4307,21 @@ install_alpine_linux_git_post() { [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue - # Skip salt-api since the service should be opt-in and not necessarily started on boot - [ $fname = "api" ] && continue - - # Skip salt-syndic as there is no service for it on Alpine Linux - [ $fname = "syndic" ] && continue - if [ -f /sbin/rc-update ]; then - /sbin/rc-update add salt-$fname > /dev/null 2>&1 - continue + script_url="${_SALTSTACK_REPO_URL%.git}/raw/develop/pkg/alpine/salt-$fname" + __fetch_url "/etc/init.d/salt-$fname" "$script_url" + + if [ $? -eq 0 ]; then + chmod +x "/etc/init.d/salt-$fname" + else + echoerror "Failed to get OpenRC init script for $OS_NAME from $script_url." + return 1 + fi + + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + + /sbin/rc-update add "salt-$fname" > /dev/null 2>&1 || return 1 fi done } @@ -4330,7 +4342,7 @@ install_alpine_linux_restart_daemons() { # Disable stdin to fix shell session hang on killing tee pipe /sbin/rc-service salt-$fname stop < /dev/null > /dev/null 2>&1 - /sbin/rc-service salt-$fname start < /dev/null + /sbin/rc-service salt-$fname start < /dev/null || return 1 done } From da0144b77594cd7987afe50bf49d065de8b2f5c5 Mon Sep 17 00:00:00 2001 From: rallytime Date: Tue, 21 Mar 2017 17:13:10 -0600 Subject: [PATCH 33/77] Set the _REPO_URL value higher up in the script to use elsewhere That way we only have to check for the _CUSTOM_REPO_URL value and set the _REPO_URL value once, whether than is the custom option provided via -R or simply repo.saltstack.com. --- bootstrap-salt.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index bafd735..2714444 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -549,10 +549,16 @@ if [ "$ITYPE" != "git" ]; then fi fi -# Check for -r if -R is being passed. Set -r with a warning. -if [ "$_CUSTOM_REPO_URL" != "null" ] && [ "$_DISABLE_REPOS" -eq $BS_FALSE ]; then - echowarn "Detected -R option. No other repositories will be configured when -R is used. Setting -r option to True." - _DISABLE_REPOS=$BS_TRUE +# Set the _REPO_URL value based on if -R was passed or not. Defaults to repo.saltstack.com. +if [ "$_CUSTOM_REPO_URL" != "null" ]; then + _REPO_URL="$_CUSTOM_REPO_URL" + + # Check for -r since -R is being passed. Set -r with a warning. + if [ "$_DISABLE_REPOS" -eq $BS_FALSE ]; then + echowarn "Detected -R option. No other repositories will be configured when -R is used. Setting -r option to True." + _DISABLE_REPOS=$BS_TRUE +else + _REPO_URL="repo.saltstack.com" fi # Check for any unparsed arguments. Should be an error. @@ -3472,21 +3478,14 @@ __install_saltstack_rhel_repository() { repo_rev="latest" fi - # Check if a custom repo URL was passed with -R. If not, use repo.salstack.com. - if [ "$_CUSTOM_REPO_URL" != "null" ]; then - repo_url="$_CUSTOM_REPO_URL" - else - repo_url="repo.saltstack.com" - fi - # Cloud Linux $releasever = 7.x, which doesn't exist in repo.saltstack.com, we need this to be "7" if [ "${DISTRO_NAME}" = "Cloud Linux" ] && [ "${DISTRO_MAJOR_VERSION}" = "7" ]; then - base_url="${HTTP_VAL}://${repo_url}/yum/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${repo_rev}/" + base_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${repo_rev}/" else - base_url="${HTTP_VAL}://${repo_url}/yum/redhat/\$releasever/\$basearch/${repo_rev}/" + base_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/\$releasever/\$basearch/${repo_rev}/" fi - fetch_url="${HTTP_VAL}://${repo_url}/yum/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${repo_rev}/" + fetch_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${repo_rev}/" if [ "${DISTRO_MAJOR_VERSION}" -eq 5 ]; then gpg_key="SALTSTACK-EL5-GPG-KEY.pub" @@ -3514,7 +3513,7 @@ _eof # Import CentOS 7 GPG key on RHEL for installing base dependencies from # Salt corporate repository rpm -qa gpg-pubkey\* --qf "%{name}-%{version}\n" | grep -q ^gpg-pubkey-f4a80eb5$ || \ - __rpm_import_gpg "${HTTP_VAL}://${repo_url}/yum/redhat/7/x86_64/${repo_rev}/base/RPM-GPG-KEY-CentOS-7" || return 1 + __rpm_import_gpg "${HTTP_VAL}://${_REPO_URL}/yum/redhat/7/x86_64/${repo_rev}/base/RPM-GPG-KEY-CentOS-7" || return 1 fi return 0 From 4a7524cc109915bd9bb7072a7b8b21c819f43204 Mon Sep 17 00:00:00 2001 From: rallytime Date: Tue, 21 Mar 2017 17:54:38 -0600 Subject: [PATCH 34/77] Allow -R option to work for Debian/Ubuntu --- bootstrap-salt.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2714444..ef7e442 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -342,7 +342,7 @@ __usage() { points to a repository that mirrors Salt packages located at repo.saltstack.com. The option passed with -R replaces the "repo.saltstack.com". If -R is passed, -r is also set. Currently only - works on CentOS/RHEL based distributions. + works on CentOS/RHEL and Debian based distributions. -J Replace the Master config file with data passed in as a JSON string. If a Master config file is found, a reasonable effort will be made to save the file with a ".bak" extension. If used in conjunction with -C or -F, @@ -544,7 +544,6 @@ if [ "$ITYPE" != "git" ]; then exit 1 fi if [ "$_VIRTUALENV_DIR" != "null" ]; then - echoerror "Virtualenv installs via -V is only possible when installing Salt via git" exit 1 fi fi @@ -2439,12 +2438,12 @@ install_ubuntu_stable_deps() { __REPO_ARCH="$DPKG_ARCHITECTURE" if [ "$DPKG_ARCHITECTURE" = "i386" ]; then - echoerror "repo.saltstack.com likely doesn't have all required 32-bit packages for Ubuntu $DISTRO_MAJOR_VERSION (yet?)." + echoerror "$_REPO_URL likely doesn't have all required 32-bit packages for Ubuntu $DISTRO_MAJOR_VERSION (yet?)." # amd64 is just a part of repository URI, 32-bit pkgs are hosted under the same location __REPO_ARCH="amd64" elif [ "$DPKG_ARCHITECTURE" != "amd64" ]; then - echoerror "repo.saltstack.com doesn't have packages for your system architecture: $DPKG_ARCHITECTURE." + echoerror "$_REPO_URL doesn't have packages for your system architecture: $DPKG_ARCHITECTURE." if [ "$ITYPE" != "git" ]; then echoerror "You can try git installation mode, i.e.: sh ${__ScriptName} git v2016.3.1" exit 1 @@ -2464,7 +2463,7 @@ install_ubuntu_stable_deps() { fi # SaltStack's stable Ubuntu repository: - SALTSTACK_UBUNTU_URL="${HTTP_VAL}://repo.saltstack.com/apt/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/${STABLE_REV}" + SALTSTACK_UBUNTU_URL="${HTTP_VAL}://${_REPO_URL}/apt/ubuntu/${UBUNTU_VERSION}/${__REPO_ARCH}/${STABLE_REV}" echo "deb $SALTSTACK_UBUNTU_URL $UBUNTU_CODENAME main" > /etc/apt/sources.list.d/saltstack.list # Make sure https transport is available @@ -2840,7 +2839,7 @@ install_debian_7_deps() { __REPO_ARCH="$DPKG_ARCHITECTURE" if [ "$DPKG_ARCHITECTURE" = "i386" ]; then - echoerror "repo.saltstack.com likely doesn't have all required 32-bit packages for Debian $DISTRO_MAJOR_VERSION (yet?)." + echoerror "$_REPO_URL likely doesn't have all required 32-bit packages for Debian $DISTRO_MAJOR_VERSION (yet?)." if [ "$ITYPE" != "git" ]; then echoerror "You can try git installation mode, i.e.: sh ${__ScriptName} git v2016.3.1" @@ -2849,14 +2848,14 @@ install_debian_7_deps() { # amd64 is just a part of repository URI, 32-bit pkgs are hosted under the same location __REPO_ARCH="amd64" elif [ "$DPKG_ARCHITECTURE" != "amd64" ]; then - echoerror "repo.saltstack.com doesn't have packages for your system architecture: $DPKG_ARCHITECTURE." + echoerror "$_REPO_URL doesn't have packages for your system architecture: $DPKG_ARCHITECTURE." exit 1 fi # Versions starting with 2015.8.7 and 2016.3.0 are hosted at repo.saltstack.com if [ "$(echo "$STABLE_REV" | egrep '^(2015\.8|2016\.3|2016\.11|latest|archive\/201[5-6]\.)')" != "" ]; then # amd64 is just a part of repository URI, 32-bit pkgs are hosted under the same location - SALTSTACK_DEBIAN_URL="${HTTP_VAL}://repo.saltstack.com/apt/debian/${DISTRO_MAJOR_VERSION}/${__REPO_ARCH}/${STABLE_REV}" + SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/apt/debian/${DISTRO_MAJOR_VERSION}/${__REPO_ARCH}/${STABLE_REV}" echo "deb $SALTSTACK_DEBIAN_URL wheezy main" > "/etc/apt/sources.list.d/saltstack.list" if [ "$HTTP_VAL" = "https" ] ; then @@ -2872,7 +2871,7 @@ install_debian_7_deps() { apt-get update else - echowarn "Packages from repo.saltstack.com are required to install Salt version 2015.8 or higher on Debian $DISTRO_MAJOR_VERSION." + echowarn "Packages from $_REPO_URL are required to install Salt version 2015.8 or higher on Debian $DISTRO_MAJOR_VERSION." fi # Additionally install procps and pciutils which allows for Docker bootstraps. See 366#issuecomment-39666813 @@ -2919,7 +2918,7 @@ install_debian_8_deps() { __REPO_ARCH="$DPKG_ARCHITECTURE" if [ "$DPKG_ARCHITECTURE" = "i386" ]; then - echoerror "repo.saltstack.com likely doesn't have all required 32-bit packages for Debian $DISTRO_MAJOR_VERSION (yet?)." + echoerror "$_REPO_URL likely doesn't have all required 32-bit packages for Debian $DISTRO_MAJOR_VERSION (yet?)." if [ "$ITYPE" != "git" ]; then echoerror "You can try git installation mode, i.e.: sh ${__ScriptName} git v2016.3.1" @@ -2928,16 +2927,16 @@ install_debian_8_deps() { # amd64 is just a part of repository URI, 32-bit pkgs are hosted under the same location __REPO_ARCH="amd64" elif [ "$DPKG_ARCHITECTURE" != "amd64" ] && [ "$DPKG_ARCHITECTURE" != "armhf" ]; then - echoerror "repo.saltstack.com doesn't have packages for your system architecture: $DPKG_ARCHITECTURE." + echoerror "$_REPO_URL doesn't have packages for your system architecture: $DPKG_ARCHITECTURE." echoerror "Try git installation mode with pip and disable SaltStack apt repository, for example:" echoerror " sh ${__ScriptName} -r -P git v2016.3.1" exit 1 fi - # Versions starting with 2015.5.6, 2015.8.1 and 2016.3.0 are hosted at repo.saltstack.com + # Versions starting with 2015.5.6, 2015.8.1 and 2016.3.0 are hosted at $_REPO_URL if [ "$(echo "$STABLE_REV" | egrep '^(2015\.5|2015\.8|2016\.3|2016\.11|latest|archive\/201[5-6]\.)')" != "" ]; then - SALTSTACK_DEBIAN_URL="${HTTP_VAL}://repo.saltstack.com/apt/debian/${DISTRO_MAJOR_VERSION}/${__REPO_ARCH}/${STABLE_REV}" + SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/apt/debian/${DISTRO_MAJOR_VERSION}/${__REPO_ARCH}/${STABLE_REV}" echo "deb $SALTSTACK_DEBIAN_URL jessie main" > "/etc/apt/sources.list.d/saltstack.list" if [ "$HTTP_VAL" = "https" ] ; then From 5c19b294ebe13119ec129ac270ef07915b9bd6bf Mon Sep 17 00:00:00 2001 From: rallytime Date: Thu, 13 Apr 2017 14:18:47 -0600 Subject: [PATCH 35/77] Add missing closing "fi" to if block --- bootstrap-salt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ef7e442..715ea5d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -556,6 +556,7 @@ if [ "$_CUSTOM_REPO_URL" != "null" ]; then if [ "$_DISABLE_REPOS" -eq $BS_FALSE ]; then echowarn "Detected -R option. No other repositories will be configured when -R is used. Setting -r option to True." _DISABLE_REPOS=$BS_TRUE + fi else _REPO_URL="repo.saltstack.com" fi From aed01b7df972282eb62f9381e19825312ecd1a0b Mon Sep 17 00:00:00 2001 From: rallytime Date: Thu, 13 Apr 2017 14:23:10 -0600 Subject: [PATCH 36/77] Add error logline back in that was accidentally removed --- bootstrap-salt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 715ea5d..032512c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -544,6 +544,7 @@ if [ "$ITYPE" != "git" ]; then exit 1 fi if [ "$_VIRTUALENV_DIR" != "null" ]; then + echoerror "Virtualenv installs via -V is only possible when installing Salt via git" exit 1 fi fi From 2c2dcb0c106e1a02becfb33c04764e951d449d76 Mon Sep 17 00:00:00 2001 From: rallytime Date: Fri, 14 Apr 2017 09:53:43 -0600 Subject: [PATCH 37/77] Define _REPO_URL default at the top of the script And update a comment to not include the $_REPO_URL variable --- bootstrap-salt.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 032512c..39813e8 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -239,6 +239,7 @@ _CUSTOM_REPO_URL="null" _CUSTOM_MASTER_CONFIG="null" _CUSTOM_MINION_CONFIG="null" _QUIET_GIT_INSTALLATION=$BS_FALSE +_REPO_URL="repo.saltstack.com" #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __usage @@ -558,8 +559,6 @@ if [ "$_CUSTOM_REPO_URL" != "null" ]; then echowarn "Detected -R option. No other repositories will be configured when -R is used. Setting -r option to True." _DISABLE_REPOS=$BS_TRUE fi -else - _REPO_URL="repo.saltstack.com" fi # Check for any unparsed arguments. Should be an error. @@ -2936,7 +2935,7 @@ install_debian_8_deps() { exit 1 fi - # Versions starting with 2015.5.6, 2015.8.1 and 2016.3.0 are hosted at $_REPO_URL + # Versions starting with 2015.5.6, 2015.8.1 and 2016.3.0 are hosted at repo.saltstack.com if [ "$(echo "$STABLE_REV" | egrep '^(2015\.5|2015\.8|2016\.3|2016\.11|latest|archive\/201[5-6]\.)')" != "" ]; then SALTSTACK_DEBIAN_URL="${HTTP_VAL}://${_REPO_URL}/apt/debian/${DISTRO_MAJOR_VERSION}/${__REPO_ARCH}/${STABLE_REV}" echo "deb $SALTSTACK_DEBIAN_URL jessie main" > "/etc/apt/sources.list.d/saltstack.list" From 4485a2af029e6259d4e0e6262dc4b70a932e3b81 Mon Sep 17 00:00:00 2001 From: rallytime Date: Fri, 14 Apr 2017 14:45:51 -0600 Subject: [PATCH 38/77] Reduce the number of days an issue is considered "stale" --- .github/stale.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 07341a8..11111a3 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,7 +1,7 @@ # Probot Stale configuration file # Number of days of inactivity before an issue becomes stale -daysUntilStale: 730 +daysUntilStale: 365 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 @@ -20,7 +20,7 @@ markComment: | recent activity. It will be closed if no further activity occurs. Thank you for your contributions. - If this issue was closed prematurely, please leave a comment and we will + If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. # Comment to post when closing a stale issue. Set to `false` to disable From a9460100449b6b59d64190516b089cebbc664eb3 Mon Sep 17 00:00:00 2001 From: rallytime Date: Fri, 14 Apr 2017 16:46:44 -0600 Subject: [PATCH 39/77] Adjust "daysUntilStale" variable to 190 days. --- .github/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/stale.yml b/.github/stale.yml index 11111a3..e153752 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,7 +1,7 @@ # Probot Stale configuration file # Number of days of inactivity before an issue becomes stale -daysUntilStale: 365 +daysUntilStale: 190 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 From 2bcacb75938c8318401351e391788acc7183282d Mon Sep 17 00:00:00 2001 From: Eric Radman Date: Sat, 15 Apr 2017 23:10:22 -0400 Subject: [PATCH 40/77] Support OpenBSD 6.1 Fetch official list of mirrors and write /etc/installurl https://www.openbsd.org/faq/upgrade61.html --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index da8f78c..9912f9d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4720,7 +4720,7 @@ install_freebsd_restart_daemons() { __choose_openbsd_mirror() { OPENBSD_REPO='' MINTIME='' - MIRROR_LIST=$(awk -F= '/installpath = / {print $2}' /etc/examples/pkg.conf) + MIRROR_LIST=$(ftp -w 15 -Vao - 'http://ftp.openbsd.org/cgi-bin/ftplist.cgi?dbversion=1' | awk '/^http/ {print $1}') for MIRROR in $MIRROR_LIST; do MIRROR_HOST=$(echo "$MIRROR" | sed -e 's|.*//||' -e 's|+*/.*$||') @@ -4744,7 +4744,7 @@ install_openbsd_deps() { __choose_openbsd_mirror || return 1 echoinfo "setting package repository to $OPENBSD_REPO with ping time of $MINTIME" [ -n "$OPENBSD_REPO" ] || return 1 - echo "installpath += ${OPENBSD_REPO}" >>/etc/pkg.conf || return 1 + echo "${OPENBSD_REPO}" >>/etc/installurl || return 1 if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" From e982700050ab7bb98079b4ce60523f32517fa9ec Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Mon, 17 Apr 2017 17:37:38 -0400 Subject: [PATCH 41/77] add option to bootstrap to install different version of python with git install --- bootstrap-salt.sh | 53 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7c538e3..45ad254 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -355,12 +355,18 @@ __usage() { no ".bak" file will be created as either of those options will force a complete overwrite of the file. -q Quiet salt installation from git (setup.py install -q) + -x Changes the python version used to install a git version of salt. Currently + this is considered experimental and has only been tested on Centos 6. + -y Installs a different python version on host. Currently this only works + with Centos 6 and is considered experimental. This will install the ius + repo on the box. This must be used in conjunction with -x + For example: sh bootstrap.sh -y -x python2.7 git v2016.11.3 EOT } # ---------- end of function __usage ---------- -while getopts ':hvnDc:g:Gwk:s:MSNXCPFUKIA:i:Lp:dH:ZbflV:J:j:rR:aq' opt +while getopts ':hvnDc:g:Gyx:wk:s:MSNXCPFUKIA:i:Lp:dH:ZbflV:J:j:rR:aq' opt do case "${opt}" in @@ -425,6 +431,8 @@ do J ) _CUSTOM_MASTER_CONFIG=$OPTARG ;; j ) _CUSTOM_MINION_CONFIG=$OPTARG ;; q ) _QUIET_GIT_INSTALLATION=$BS_TRUE ;; + x ) _PY_EXE="$OPTARG" ;; + y ) _INSTALL_PY="$BS_TRUE" ;; \?) echo echoerror "Option does not exist : $OPTARG" @@ -1075,6 +1083,34 @@ __gather_linux_system_info() { done } +#--- FUNCTION ------------------------------------------------------------------------------------------------------- +# NAME: __install_python_and_deps() +# DESCRIPTION: Install a different version of python and its dependencies on a host. Currently this has only been +# tested on Centos 6 and is considered experimental. +#---------------------------------------------------------------------------------------------------------------------- +__install_python_and_deps() { + if [[ ${_PY_EXE:='None'} == 'None' ]]; then + echoerror "Must specify -x with -y to install a specific python version" + exit 1 + fi + + __PACKAGES="${_PY_EXE//./} ${_PY_EXE//./}-pip ${_PY_EXE//./}-devel gcc" + + #Install new python version + __PYTHON_REPO_URL="https://centos${DISTRO_MAJOR_VERSION}.iuscommunity.org/ius-release.rpm" + + if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then + yum install -y ${__PYTHON_REPO_URL} || return 1 + fi + + yum install -y ${__PACKAGES} || return 1 + + _PIP_PACKAGES="tornado PyYAML msgpack-python jinja2 pycrypto zmq" + + # Install Dependencies with different python version + ${_PY_EXE} -m pip install ${_PIP_PACKAGES} || return 1 +} + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __gather_sunos_system_info @@ -3637,6 +3673,10 @@ install_centos_stable_post() { } install_centos_git_deps() { + if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then + __install_epel_repository || return 1 + fi + 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 @@ -3671,8 +3711,12 @@ install_centos_git_deps() { __PACKAGES="${__PACKAGES} python-libcloud" fi - # shellcheck disable=SC2086 - __yum_install_noinput ${__PACKAGES} || return 1 + if [ "${_INSTALL_PY:='None'}" -eq "${BS_TRUE}" ]; then + __install_python_and_deps || return 1 + else + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then @@ -3686,6 +3730,9 @@ install_centos_git_deps() { install_centos_git() { if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then _PYEXE=python2.6 + elif [[ ${_PY_EXE:='None'} != 'None' ]]; then + _PYEXE=${_PY_EXE} + echoinfo "Using the following python version: ${_PY-EXE} to install salt" else _PYEXE=python2 fi From 3a919343ccfbcd734c2f29df6ef01173e4254345 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Tue, 18 Apr 2017 10:21:39 -0400 Subject: [PATCH 42/77] add more docs --- bootstrap-salt.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 45ad254..18d30b1 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -357,10 +357,13 @@ __usage() { -q Quiet salt installation from git (setup.py install -q) -x Changes the python version used to install a git version of salt. Currently this is considered experimental and has only been tested on Centos 6. - -y Installs a different python version on host. Currently this only works - with Centos 6 and is considered experimental. This will install the ius - repo on the box. This must be used in conjunction with -x - For example: sh bootstrap.sh -y -x python2.7 git v2016.11.3 + -y Installs a different python version on host. Currently this has only been + tested with Centos 6 and is considered experimental. This will install the + ius repo on the box if disable repo is false. This must be used in conjunction + with -x . For example: + sh bootstrap.sh -y -x python2.7 git v2016.11.3 + The above will install python27 and install the git version of salt using the + python2.7 executable. EOT } # ---------- end of function __usage ---------- From 10ea818d62b4e74247eb6df5516c82a58190e08c Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Tue, 18 Apr 2017 10:53:18 -0400 Subject: [PATCH 43/77] add logging --- bootstrap-salt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 18d30b1..82699e0 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1103,14 +1103,17 @@ __install_python_and_deps() { __PYTHON_REPO_URL="https://centos${DISTRO_MAJOR_VERSION}.iuscommunity.org/ius-release.rpm" if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then + echoinfo "Installing IUS repo" yum install -y ${__PYTHON_REPO_URL} || return 1 fi + echoinfo "Installing ${_PY_EXE}" yum install -y ${__PACKAGES} || return 1 _PIP_PACKAGES="tornado PyYAML msgpack-python jinja2 pycrypto zmq" # Install Dependencies with different python version + echoinfo "Installing salt dependencies using the ${_PY_EXE} pip executable" ${_PY_EXE} -m pip install ${_PIP_PACKAGES} || return 1 } From 42431a37c4cc2f16767874ddf25cd6f01c17e8cb Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Tue, 18 Apr 2017 11:02:57 -0400 Subject: [PATCH 44/77] fix if statement --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 82699e0..4fafa8a 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3717,7 +3717,7 @@ install_centos_git_deps() { __PACKAGES="${__PACKAGES} python-libcloud" fi - if [ "${_INSTALL_PY:='None'}" -eq "${BS_TRUE}" ]; then + if [ "${_INSTALL_PY:='None'}" == "${BS_TRUE}" ]; then __install_python_and_deps || return 1 else # shellcheck disable=SC2086 From 03bc33121f28e61cf134d7dbc0be34a41441044d Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Tue, 18 Apr 2017 14:40:34 -0400 Subject: [PATCH 45/77] fix lint errors --- bootstrap-salt.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 4fafa8a..410642a 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -356,14 +356,15 @@ __usage() { a complete overwrite of the file. -q Quiet salt installation from git (setup.py install -q) -x Changes the python version used to install a git version of salt. Currently - this is considered experimental and has only been tested on Centos 6. + this is considered experimental and has only been tested on Centos 6. This + only works for git installations. -y Installs a different python version on host. Currently this has only been tested with Centos 6 and is considered experimental. This will install the ius repo on the box if disable repo is false. This must be used in conjunction with -x . For example: sh bootstrap.sh -y -x python2.7 git v2016.11.3 The above will install python27 and install the git version of salt using the - python2.7 executable. + python2.7 executable. This only works for git installations. EOT } # ---------- end of function __usage ---------- @@ -1092,12 +1093,13 @@ __gather_linux_system_info() { # tested on Centos 6 and is considered experimental. #---------------------------------------------------------------------------------------------------------------------- __install_python_and_deps() { - if [[ ${_PY_EXE:='None'} == 'None' ]]; then + if [ ${_PY_EXE:='None'} = 'None' ]; then echoerror "Must specify -x with -y to install a specific python version" exit 1 fi - __PACKAGES="${_PY_EXE//./} ${_PY_EXE//./}-pip ${_PY_EXE//./}-devel gcc" + py_pkg_v=$(echo "$_PY_EXE" | sed -r "s/\.//g") + __PACKAGES="${py_pkg_v} ${py_pkg_v}-pip ${py_pkg_v}-devel gcc" #Install new python version __PYTHON_REPO_URL="https://centos${DISTRO_MAJOR_VERSION}.iuscommunity.org/ius-release.rpm" @@ -3717,7 +3719,7 @@ install_centos_git_deps() { __PACKAGES="${__PACKAGES} python-libcloud" fi - if [ "${_INSTALL_PY:='None'}" == "${BS_TRUE}" ]; then + if [ "${_INSTALL_PY:='None'}" = "${BS_TRUE}" ]; then __install_python_and_deps || return 1 else # shellcheck disable=SC2086 @@ -3736,7 +3738,7 @@ install_centos_git_deps() { install_centos_git() { if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then _PYEXE=python2.6 - elif [[ ${_PY_EXE:='None'} != 'None' ]]; then + elif [ ${_PY_EXE:='None'} != 'None' ]; then _PYEXE=${_PY_EXE} echoinfo "Using the following python version: ${_PY-EXE} to install salt" else From 7d907d1fb70ef9c3daa5777156bfc97bc747dac6 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Wed, 19 Apr 2017 13:40:25 -0400 Subject: [PATCH 46/77] fix merge --- bootstrap-salt.sh | 57 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 410642a..dae7f05 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -240,6 +240,7 @@ _CUSTOM_MASTER_CONFIG="null" _CUSTOM_MINION_CONFIG="null" _QUIET_GIT_INSTALLATION=$BS_FALSE _REPO_URL="repo.saltstack.com" +_PY_EXE="" #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __usage @@ -1093,30 +1094,34 @@ __gather_linux_system_info() { # tested on Centos 6 and is considered experimental. #---------------------------------------------------------------------------------------------------------------------- __install_python_and_deps() { - if [ ${_PY_EXE:='None'} = 'None' ]; then + if [ "$_PY_EXE" = "" ]; then echoerror "Must specify -x with -y to install a specific python version" exit 1 fi - py_pkg_v=$(echo "$_PY_EXE" | sed -r "s/\.//g") - __PACKAGES="${py_pkg_v} ${py_pkg_v}-pip ${py_pkg_v}-devel gcc" + PY_PKG_V=$(echo "$_PY_EXE" | sed -r "s/\.//g") + __PACKAGES="${PY_PKG_V}" - #Install new python version - __PYTHON_REPO_URL="https://centos${DISTRO_MAJOR_VERSION}.iuscommunity.org/ius-release.rpm" + case "$DISTRO_NAME_L" in + [red_hat] | [centos]*) + __PYTHON_REPO_URL="https://centos${DISTRO_MAJOR_VERSION}.iuscommunity.org/ius-release.rpm" + ;; + *) + echoerror "__install_python_and_deps is not currently supported on your platform" + exit 1 + ;; + esac if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then echoinfo "Installing IUS repo" - yum install -y ${__PYTHON_REPO_URL} || return 1 + __yum_install_noinput ${__PYTHON_REPO_URL} || return 1 fi - echoinfo "Installing ${_PY_EXE}" - yum install -y ${__PACKAGES} || return 1 + echoinfo "Installing ${__PACKAGES}" + __yum_install_noinput ${__PACKAGES} || return 1 _PIP_PACKAGES="tornado PyYAML msgpack-python jinja2 pycrypto zmq" - - # Install Dependencies with different python version - echoinfo "Installing salt dependencies using the ${_PY_EXE} pip executable" - ${_PY_EXE} -m pip install ${_PIP_PACKAGES} || return 1 + __install_pip_pkgs "${_PIP_PACKAGES}" "${_PY_EXE}" || return 1 } @@ -2261,6 +2266,34 @@ __activate_virtualenv() { return 0 } # ---------- end of function __activate_virtualenv ---------- +#--- FUNCTION ------------------------------------------------------------------------------------------------------- +# NAME: __install_pip_pkgs +# DESCRIPTION: Return 0 or 1 if successfully able to install pip packages. Can provide a different python version to +# install pip packages with. If $py_ver is not specified it will use the default python version. +# PARAMETERS: pkgs, py_ver +#---------------------------------------------------------------------------------------------------------------------- + +__install_pip_pkgs() { + _pip_pkgs="$1" + _py_exe="$2" + _py_pkg=$(echo "$_py_exe" | sed -r "s/\.//g") + _pip_cmd="${_py_exe} -m pip" + + if [ $_py_exe = "" ]; then + _py_exe='python' + fi + + __check_pip_allowed + + # Install pip and pip dependencies + if ! __check_command_exists "${_pip_cmd} --version"; then + __PACKAGES="${_py_pkg}-setuptools ${_py_pkg}-pip gcc ${_py_pkg}-devel" + __yum_install_noinput ${__PACKAGES} || return 1 + fi + + echoinfo "Installing pip packages: ${_pip_pkgs} using ${_py_exe}" + ${_pip_cmd} install ${_pip_pkgs} || return 1 +} #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __install_pip_deps From 47fd79be4cc04b5fcd444b0ae2d295c838d96d77 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Wed, 19 Apr 2017 13:22:45 -0400 Subject: [PATCH 47/77] fix py_exe default value --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index dae7f05..45db0ec 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3771,9 +3771,9 @@ install_centos_git_deps() { install_centos_git() { if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then _PYEXE=python2.6 - elif [ ${_PY_EXE:='None'} != 'None' ]; then + elif [ "${_PY_EXE}" != "" ]; then _PYEXE=${_PY_EXE} - echoinfo "Using the following python version: ${_PY-EXE} to install salt" + echoinfo "Using the following python version: ${_PY_EXE} to install salt" else _PYEXE=python2 fi From 055a5c2184e2d6d45df8bead6a576a5be17b51e2 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Wed, 19 Apr 2017 13:55:09 -0400 Subject: [PATCH 48/77] fix lint --- bootstrap-salt.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 45db0ec..67b6491 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1114,11 +1114,11 @@ __install_python_and_deps() { if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then echoinfo "Installing IUS repo" - __yum_install_noinput ${__PYTHON_REPO_URL} || return 1 + __yum_install_noinput "${__PYTHON_REPO_URL}" || return 1 fi echoinfo "Installing ${__PACKAGES}" - __yum_install_noinput ${__PACKAGES} || return 1 + __yum_install_noinput "${__PACKAGES}" || return 1 _PIP_PACKAGES="tornado PyYAML msgpack-python jinja2 pycrypto zmq" __install_pip_pkgs "${_PIP_PACKAGES}" "${_PY_EXE}" || return 1 @@ -2279,7 +2279,7 @@ __install_pip_pkgs() { _py_pkg=$(echo "$_py_exe" | sed -r "s/\.//g") _pip_cmd="${_py_exe} -m pip" - if [ $_py_exe = "" ]; then + if [ "${_py_exe}" = "" ]; then _py_exe='python' fi @@ -2288,10 +2288,12 @@ __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" + # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 fi echoinfo "Installing pip packages: ${_pip_pkgs} using ${_py_exe}" + # shellcheck disable=SC2086 ${_pip_cmd} install ${_pip_pkgs} || return 1 } From 80a175aa02a80cd266278c1dcfd32c64e78c3922 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Wed, 19 Apr 2017 14:01:48 -0400 Subject: [PATCH 49/77] add more docs around pip installation --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 67b6491..2424cdb 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -363,9 +363,9 @@ __usage() { tested with Centos 6 and is considered experimental. This will install the ius repo on the box if disable repo is false. This must be used in conjunction with -x . For example: - sh bootstrap.sh -y -x python2.7 git v2016.11.3 + sh bootstrap.sh -P -y -x python2.7 git v2016.11.3 The above will install python27 and install the git version of salt using the - python2.7 executable. This only works for git installations. + python2.7 executable. This only works for git and pip installations. EOT } # ---------- end of function __usage ---------- From b85aa79e353c73121960248da02fcd17ed38b8b9 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Wed, 19 Apr 2017 14:38:37 -0400 Subject: [PATCH 50/77] improve logic to install repo --- bootstrap-salt.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2424cdb..cccbc18 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -241,6 +241,7 @@ _CUSTOM_MINION_CONFIG="null" _QUIET_GIT_INSTALLATION=$BS_FALSE _REPO_URL="repo.saltstack.com" _PY_EXE="" +_INSTALL_PY="$BS_FALSE" #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __usage @@ -1102,17 +1103,21 @@ __install_python_and_deps() { PY_PKG_V=$(echo "$_PY_EXE" | sed -r "s/\.//g") __PACKAGES="${PY_PKG_V}" - case "$DISTRO_NAME_L" in - [red_hat] | [centos]*) - __PYTHON_REPO_URL="https://centos${DISTRO_MAJOR_VERSION}.iuscommunity.org/ius-release.rpm" - ;; - *) - echoerror "__install_python_and_deps is not currently supported on your platform" - exit 1 - ;; - esac if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then + echoinfo "Attempting to install a repo to help provide a separate python package" + echoinfo "$DISTRO_NAME_L" + case "$DISTRO_NAME_L" in + "red_hat"|"centos") + __PYTHON_REPO_URL="https://centos${DISTRO_MAJOR_VERSION}.iuscommunity.org/ius-release.rpm" + ;; + *) + echoerror "Installing a repo to provide a python package is only supported on Redhat/CentOS. + If a repo is already available please try running script with -r" + exit 1 + ;; + esac + echoinfo "Installing IUS repo" __yum_install_noinput "${__PYTHON_REPO_URL}" || return 1 fi @@ -3754,7 +3759,7 @@ install_centos_git_deps() { __PACKAGES="${__PACKAGES} python-libcloud" fi - if [ "${_INSTALL_PY:='None'}" = "${BS_TRUE}" ]; then + if [ "${_INSTALL_PY}" = "${BS_TRUE}" ]; then __install_python_and_deps || return 1 else # shellcheck disable=SC2086 From 50f713222218515a011ccc009ea05c5d163ba93a Mon Sep 17 00:00:00 2001 From: rallytime Date: Wed, 19 Apr 2017 17:00:07 -0600 Subject: [PATCH 51/77] Add non-LTS support for Ubuntu 17.04 --- bootstrap-salt.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7c538e3..1eba19d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1276,6 +1276,11 @@ __ubuntu_codename_translation() { DISTRO_CODENAME="yakkety" fi ;; + "17") + if [ "$_april" ]; then + DISTRO_CODENAME="zesty" + fi + ;; *) DISTRO_CODENAME="trusty" ;; @@ -2454,10 +2459,10 @@ install_ubuntu_stable_deps() { # Versions starting with 2015.5.6, 2015.8.1 and 2016.3.0 are hosted at repo.saltstack.com if [ "$(echo "$STABLE_REV" | egrep '^(2015\.5|2015\.8|2016\.3|2016\.11|latest|archive\/)')" != "" ]; then # Workaround for latest non-LTS ubuntu - if [ "$DISTRO_VERSION" = "16.10" ]; then + if [ "$DISTRO_VERSION" = "16.10" ] || [ "$DISTRO_VERSION" = "17.04" ]; then echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages from latest LTS release. You may experience problems." UBUNTU_VERSION=16.04 - UBUNTU_CODENAME=xenial + UBUNTU_CODENAME="xenial" else UBUNTU_VERSION=$DISTRO_VERSION UBUNTU_CODENAME=$DISTRO_CODENAME From e89a6ef6c6aa42211beb1801c6d35eaebc694963 Mon Sep 17 00:00:00 2001 From: rallytime Date: Wed, 19 Apr 2017 17:18:33 -0600 Subject: [PATCH 52/77] Use correct name for gnupg-curl package for Ubuntu 17 --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 1eba19d..4284dd5 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1468,7 +1468,7 @@ fi # Starting from Ubuntu 16.10, gnupg-curl has been renamed to gnupg1-curl. GNUPG_CURL="gnupg-curl" -if ([ "${DISTRO_NAME_L}" = "ubuntu" ] && [ "${DISTRO_VERSION}" = "16.10" ]); then +if ([ "${DISTRO_NAME_L}" = "ubuntu" ] && ([ "${DISTRO_VERSION}" = "16.10" ] || [ "$DISTRO_MAJOR_VERSION" -gt 16 ])); then GNUPG_CURL="gnupg1-curl" fi From 58e14d5118173340977cdf1e6d75324744ccd9fd Mon Sep 17 00:00:00 2001 From: rallytime Date: Thu, 20 Apr 2017 10:33:17 -0600 Subject: [PATCH 53/77] Make check for Ubuntu 17 work for 17.04 and 17.10 And shorted up one of the long if statements --- bootstrap-salt.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 4284dd5..cb59c99 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1468,8 +1468,10 @@ fi # Starting from Ubuntu 16.10, gnupg-curl has been renamed to gnupg1-curl. GNUPG_CURL="gnupg-curl" -if ([ "${DISTRO_NAME_L}" = "ubuntu" ] && ([ "${DISTRO_VERSION}" = "16.10" ] || [ "$DISTRO_MAJOR_VERSION" -gt 16 ])); then - GNUPG_CURL="gnupg1-curl" +if [ "${DISTRO_NAME_L}" = "ubuntu" ]; then + if [ "${DISTRO_VERSION}" = "16.10" ] || [ "$DISTRO_MAJOR_VERSION" -gt 16 ]; then + GNUPG_CURL="gnupg1-curl" + fi fi @@ -2459,7 +2461,7 @@ install_ubuntu_stable_deps() { # Versions starting with 2015.5.6, 2015.8.1 and 2016.3.0 are hosted at repo.saltstack.com if [ "$(echo "$STABLE_REV" | egrep '^(2015\.5|2015\.8|2016\.3|2016\.11|latest|archive\/)')" != "" ]; then # Workaround for latest non-LTS ubuntu - if [ "$DISTRO_VERSION" = "16.10" ] || [ "$DISTRO_VERSION" = "17.04" ]; then + if [ "$DISTRO_VERSION" = "16.10" ] || [ "$DISTRO_MAJOR_VERSION" -gt 16 ]; then echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages from latest LTS release. You may experience problems." UBUNTU_VERSION=16.04 UBUNTU_CODENAME="xenial" From 29cfc366ba97f08ed8995fa5993fc081fbfc3219 Mon Sep 17 00:00:00 2001 From: Lorenzo Perone Date: Fri, 21 Apr 2017 10:46:03 +0200 Subject: [PATCH 54/77] update install_freebsd_10_stable to use FreeBSD repo --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7c538e3..2b5d856 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4960,7 +4960,7 @@ install_freebsd_9_stable() { } install_freebsd_10_stable() { - install_freebsd_9_stable + /usr/local/sbin/pkg install ${FROM_FREEBSD} -y sysutils/py-salt || return 1 } install_freebsd_11_stable() { From 7822a81f6a17fb4fa2a58671a8f8ec5522ea3647 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Fri, 21 Apr 2017 12:05:30 -0400 Subject: [PATCH 55/77] add libcloud dependency --- bootstrap-salt.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index cccbc18..1f041a1 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1126,6 +1126,10 @@ __install_python_and_deps() { __yum_install_noinput "${__PACKAGES}" || return 1 _PIP_PACKAGES="tornado PyYAML msgpack-python jinja2 pycrypto zmq" + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + _PIP_PACKAGES="${_PIP_PACKAGES} apache-libcloud" + fi + __install_pip_pkgs "${_PIP_PACKAGES}" "${_PY_EXE}" || return 1 } From fae8788b8ab04691a7207a23b54f9535673dac14 Mon Sep 17 00:00:00 2001 From: Nicole Thomas Date: Fri, 21 Apr 2017 10:48:33 -0600 Subject: [PATCH 56/77] Update daysUntilStale value in probot-stale config --- .github/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/stale.yml b/.github/stale.yml index e153752..7e3412a 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,7 +1,7 @@ # Probot Stale configuration file # Number of days of inactivity before an issue becomes stale -daysUntilStale: 190 +daysUntilStale: 200 # Number of days of inactivity before a stale issue is closed daysUntilClose: 7 From 51db2222d8c5696a6b85739652a834983bd72037 Mon Sep 17 00:00:00 2001 From: Lorenzo Perone Date: Sat, 22 Apr 2017 14:10:27 +0200 Subject: [PATCH 57/77] resolved jenkins style warnings in install_freebsd_10_stable (adjusting to same style as install_freebsd_9_stable) --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 2b5d856..e5120cb 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4960,7 +4960,9 @@ install_freebsd_9_stable() { } install_freebsd_10_stable() { + # shellcheck disable=SC2086 /usr/local/sbin/pkg install ${FROM_FREEBSD} -y sysutils/py-salt || return 1 + return 0 } install_freebsd_11_stable() { From 7f9b88cb470bc110be958abb9eea8c701df82896 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Mon, 24 Apr 2017 11:44:43 +0300 Subject: [PATCH 58/77] Fix `git` bootstrap mode for CentOS --- bootstrap-salt.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index daa61b8..21fe533 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3732,9 +3732,7 @@ install_centos_stable_post() { } install_centos_git_deps() { - if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then - __install_epel_repository || return 1 - fi + install_centos_stable_deps || return 1 if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then if [ "$DISTRO_MAJOR_VERSION" -gt 5 ]; then @@ -3744,8 +3742,6 @@ install_centos_git_deps() { fi fi - install_centos_stable_deps || return 1 - if ! __check_command_exists git; then __yum_install_noinput git || return 1 fi From 7b5642d29bc1b64385fc45efd7f5c2ed808113b2 Mon Sep 17 00:00:00 2001 From: rallytime Date: Mon, 24 Apr 2017 09:40:06 -0600 Subject: [PATCH 59/77] Update probot-stale message formatting. --- .github/stale.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 7e3412a..8b39c72 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -16,12 +16,9 @@ staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable markComment: | - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. + This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. - If this issue is closed prematurely, please leave a comment and we will - gladly reopen the issue. + If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false From 5e4b0907bd5845851da00da1e2ffd38ba790ce70 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Tue, 25 Apr 2017 12:42:22 +0300 Subject: [PATCH 60/77] Alpine: fix adding, checking and running Salt Syndic in stable mode --- bootstrap-salt.sh | 52 ++++++++++------------------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 933c653..66dd379 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4311,11 +4311,18 @@ install_alpine_linux_stable_deps() { fi apk update + + # Get latest root CA certs + apk -U add ca-certificates + + if ! __check_command_exists openssl; then + # Install OpenSSL to be able to pull from https:// URLs + apk -U add openssl + fi } install_alpine_linux_git_deps() { - # Get latest root CA certs - apk -U add ca-certificates + install_alpine_linux_stable_deps || return 1 apk -U add python2 py-virtualenv py2-crypto py2-setuptools \ py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ @@ -4325,18 +4332,13 @@ install_alpine_linux_git_deps() { apk -U add git || return 1 fi - if ! __check_command_exists openssl; then - # Install OpenSSL to be able to pull from https:// URLs - apk -U add openssl - fi - __git_clone_and_checkout || return 1 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 - apk -U add py2-tornado + apk -U add py2-tornado || return 1 fi fi @@ -4345,8 +4347,6 @@ install_alpine_linux_git_deps() { _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" CONFIG_SALT_FUNC="config_salt" fi - - return 0 } install_alpine_linux_stable() { @@ -4379,27 +4379,6 @@ install_alpine_linux_git() { } install_alpine_linux_post() { - for fname in api master minion syndic; do - # Skip if not meant to be installed - [ $fname = "api" ] && \ - ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || ! __check_command_exists "salt-${fname}") && continue - [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue - [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue - [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue - - # Skip salt-api since the service should be opt-in and not necessarily started on boot - [ $fname = "api" ] && continue - - # Skip salt-syndic as there is no service for it on Alpine Linux - [ $fname = "syndic" ] && continue - - if [ -f /sbin/rc-update ]; then - /sbin/rc-update add salt-$fname > /dev/null 2>&1 || return 1 - fi - done -} - -install_alpine_linux_git_post() { for fname in api master minion syndic; do # Skip if not meant to be installed [ $fname = "api" ] && \ @@ -4410,7 +4389,7 @@ install_alpine_linux_git_post() { if [ -f /sbin/rc-update ]; then script_url="${_SALTSTACK_REPO_URL%.git}/raw/develop/pkg/alpine/salt-$fname" - __fetch_url "/etc/init.d/salt-$fname" "$script_url" + [ -f "/etc/init.d/salt-$fname" ] || __fetch_url "/etc/init.d/salt-$fname" "$script_url" if [ $? -eq 0 ]; then chmod +x "/etc/init.d/salt-$fname" @@ -4434,9 +4413,6 @@ install_alpine_linux_restart_daemons() { # Skip salt-api since the service should be opt-in and not necessarily started on boot [ $fname = "api" ] && continue - # Skip salt-syndic as there is no service for it on Alpine Linux - [ $fname = "syndic" ] && continue - # Skip if not meant to be installed [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue @@ -4452,9 +4428,6 @@ install_alpine_linux_check_services() { # Skip salt-api since the service should be opt-in and not necessarily started on boot [ $fname = "api" ] && continue - # Skip salt-syndic as there is no service for it on Alpine Linux - [ $fname = "syndic" ] && continue - # Skip if not meant to be installed [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue @@ -4473,9 +4446,6 @@ daemons_running_alpine_linux() { # Skip salt-api since the service should be opt-in and not necessarily started on boot [ $fname = "api" ] && continue - # Skip salt-syndic as there is no service for it on Alpine Linux - [ $fname = "syndic" ] && continue - # Skip if not meant to be installed [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue From a7f6d4675b420ed72ba9000b11296e35e9fc6d48 Mon Sep 17 00:00:00 2001 From: EHJ-52n Date: Wed, 26 Apr 2017 10:01:29 +0200 Subject: [PATCH 61/77] Add KDE neon... ...ubuntu base version to __ubuntu_derivatives_translation() --- bootstrap-salt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 933c653..4233bce 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1266,7 +1266,7 @@ __get_dpkg_architecture() { #---------------------------------------------------------------------------------------------------------------------- # shellcheck disable=SC2034 __ubuntu_derivatives_translation() { - UBUNTU_DERIVATIVES="(trisquel|linuxmint|linaro|elementary_os)" + UBUNTU_DERIVATIVES="(trisquel|linuxmint|linaro|elementary_os|neon)" # Mappings trisquel_6_ubuntu_base="12.04" linuxmint_13_ubuntu_base="12.04" @@ -1274,6 +1274,7 @@ __ubuntu_derivatives_translation() { linuxmint_18_ubuntu_base="16.04" linaro_12_ubuntu_base="12.04" elementary_os_02_ubuntu_base="12.04" + neon_16_ubuntu_base="16.04" # Translate Ubuntu derivatives to their base Ubuntu version match=$(echo "$DISTRO_NAME_L" | egrep ${UBUNTU_DERIVATIVES}) From 3c06f05ec41de008a9b4b00d9333941241050192 Mon Sep 17 00:00:00 2001 From: EHJ-52n Date: Thu, 27 Apr 2017 10:46:11 +0200 Subject: [PATCH 62/77] Add KDE neon to supported ubuntu derivatives list --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 80ebbd6..52fbf6a 100644 --- a/README.rst +++ b/README.rst @@ -259,6 +259,7 @@ Ubuntu and derivatives - Linux Mint 13/17/18 - Trisquel GNU/Linux 6 (based on Ubuntu 12.04) - Ubuntu 12.04/14.04/16.04 +- KDE neon Ubuntu Best Effort Support: Non-LTS Releases ******************************************** From e6e7c221ef2308b43bd685d8d188319b62b14bc7 Mon Sep 17 00:00:00 2001 From: Daniel Wallace Date: Thu, 27 Apr 2017 15:31:18 -0600 Subject: [PATCH 63/77] Archlinux must always update Pacman does not manage dependencies, so there is no way to always rely on -Sy, you must use -Su afterwards, or broken dependencies could abound. The only time this is not always the case is with archlinux-keyring. This removes the ability to configure arch to not update the whole system, because of its rolling release nature, anytime the repositories are refreshed, you must do a system upgrade. --- bootstrap-salt.sh | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a22bd52..adebbc6 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4651,29 +4651,29 @@ install_arch_linux_stable_deps() { pacman-key --init && pacman-key --populate archlinux || return 1 fi - pacman -Sy --noconfirm --needed archlinux-keyring || return 1 + # Pacman does not resolve dependencies on outdated versions + # They always need to be updated + pacman -Syy --noconfirm - pacman -Sy --noconfirm --needed pacman || return 1 + pacman -S --noconfirm --needed archlinux-keyring || return 1 + + pacman -Su --noconfirm --needed pacman || return 1 if __check_command_exists pacman-db-upgrade; then pacman-db-upgrade || return 1 fi # YAML module is used for generating custom master/minion configs - pacman -Sy --noconfirm --needed python2-yaml - - if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then - pacman -Syyu --noconfirm --needed || return 1 - fi + pacman -Su --noconfirm --needed python2-yaml if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - pacman -Sy --noconfirm --needed apache-libcloud || return 1 + pacman -Su --noconfirm --needed apache-libcloud || return 1 fi if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" # shellcheck disable=SC2086 - pacman -Sy --noconfirm --needed ${_EXTRA_PACKAGES} || return 1 + pacman -Su --noconfirm --needed ${_EXTRA_PACKAGES} || return 1 fi } @@ -4685,7 +4685,7 @@ install_arch_linux_git_deps() { pacman -Sy --noconfirm --needed git || return 1 fi pacman -R --noconfirm python2-distribute - pacman -Sy --noconfirm --needed python2-crypto python2-setuptools python2-jinja \ + pacman -Su --noconfirm --needed python2-crypto python2-setuptools python2-jinja \ python2-markupsafe python2-msgpack python2-psutil \ python2-pyzmq zeromq python2-requests python2-systemd || return 1 @@ -4695,7 +4695,7 @@ install_arch_linux_git_deps() { # 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 - pacman -Sy --noconfirm --needed python2-tornado + pacman -Su --noconfirm --needed python2-tornado fi fi @@ -4710,7 +4710,11 @@ install_arch_linux_git_deps() { } install_arch_linux_stable() { - pacman -Sy --noconfirm --needed pacman || return 1 + # Pacman does not resolve dependencies on outdated versions + # They always need to be updated + pacman -Syy --noconfirm + + pacman -Su --noconfirm --needed pacman || return 1 # See https://mailman.archlinux.org/pipermail/arch-dev-public/2013-June/025043.html # to know why we're ignoring below. pacman -Syu --noconfirm --ignore filesystem,bash || return 1 From 8edfcf33b3364a9ed5bb06adf425248a43ed4501 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Fri, 28 Apr 2017 12:34:58 +0300 Subject: [PATCH 64/77] Properly detect all supported Debian GNU/Linux derivatives --- README.rst | 5 +++-- bootstrap-salt.sh | 31 +++++++++++++++++-------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/README.rst b/README.rst index 52fbf6a..d6b389c 100644 --- a/README.rst +++ b/README.rst @@ -225,6 +225,7 @@ You also may need to disable repository configuration and allow ``pip`` installa Debian and derivatives ~~~~~~~~~~~~~~~~~~~~~~ +- Cumulus Linux 2/3 - Debian GNU/Linux 7/8 - Linux Mint Debian Edition 1 (based on Debian 8) - Kali Linux 1.0 (based on Debian 7) @@ -255,11 +256,11 @@ Ubuntu and derivatives ~~~~~~~~~~~~~~~~~~~~~~ - Elementary OS 0.2 (based on Ubuntu 12.04) +- KDE neon (based on Ubuntu 16.04) - Linaro 12.04 - Linux Mint 13/17/18 - Trisquel GNU/Linux 6 (based on Ubuntu 12.04) -- Ubuntu 12.04/14.04/16.04 -- KDE neon +- Ubuntu 12.04/14.04/16.04 and subsequent non-TLS releases (see below) Ubuntu Best Effort Support: Non-LTS Releases ******************************************** diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index adebbc6..d49947d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -975,10 +975,6 @@ __gather_linux_system_info() { elif [ "${DISTRO_NAME}" = "Arch" ]; then DISTRO_NAME="Arch Linux" return - elif [ "${DISTRO_NAME}" = "Raspbian" ]; then - DISTRO_NAME="Debian" - elif [ "${DISTRO_NAME}" = "Cumulus Linux" ]; then - DISTRO_NAME="Debian" fi rv=$(lsb_release -sr) [ "${rv}" != "" ] && DISTRO_VERSION=$(__parse_version_string "$rv") @@ -1089,6 +1085,7 @@ __gather_linux_system_info() { done } + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __install_python_and_deps() # DESCRIPTION: Install a different version of python and its dependencies on a host. Currently this has only been @@ -1243,6 +1240,7 @@ __gather_system_info() { } + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __get_dpkg_architecture # DESCRIPTION: Determine primary architecture for packages to install on Debian and derivatives @@ -1258,6 +1256,7 @@ __get_dpkg_architecture() { return 0 } + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __ubuntu_derivatives_translation # DESCRIPTION: Map Ubuntu derivatives to their Ubuntu base versions. @@ -1303,6 +1302,7 @@ __ubuntu_derivatives_translation() { fi } + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __ubuntu_codename_translation # DESCRIPTION: Map Ubuntu major versions to their corresponding codenames @@ -1346,6 +1346,7 @@ __ubuntu_codename_translation() { esac } + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __debian_derivatives_translation # DESCRIPTION: Map Debian derivatives to their Debian base versions. @@ -1354,25 +1355,26 @@ __ubuntu_codename_translation() { #---------------------------------------------------------------------------------------------------------------------- # shellcheck disable=SC2034 __debian_derivatives_translation() { - # If the file does not exist, return [ ! -f /etc/os-release ] && return - DEBIAN_DERIVATIVES="(kali|linuxmint|cumulus-linux)" + DEBIAN_DERIVATIVES="(cumulus_.+|kali|linuxmint|raspbian)" # Mappings - kali_1_debian_base="7.0" - linuxmint_1_debian_base="8.0" cumulus_2_debian_base="7.0" cumulus_3_debian_base="8.0" - - # Detect derivates, Cumulus Linux, Kali and LinuxMint *only* for now - rv=$(grep ^ID= /etc/os-release | sed -e 's/.*=//') + kali_1_debian_base="7.0" + linuxmint_1_debian_base="8.0" + raspbian_8_debian_base="8.0" # Translate Debian derivatives to their base Debian version - match=$(echo "$rv" | egrep ${DEBIAN_DERIVATIVES}) + match=$(echo "$DISTRO_NAME_L" | egrep ${DEBIAN_DERIVATIVES}) if [ "${match}" != "" ]; then case $match in + cumulus_*) + _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') + _debian_derivative="cumulus" + ;; kali) _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="kali" @@ -1381,9 +1383,9 @@ __debian_derivatives_translation() { _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="linuxmint" ;; - cumulus-linux) + raspbian) _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') - _debian_derivative="cumulus" + _debian_derivative="raspbian" ;; esac @@ -1413,6 +1415,7 @@ __check_and_refresh_suse_pkg_repo() { fi } + __gather_system_info echo From 795b9f87444713829abb8a0173164c4793fc737c Mon Sep 17 00:00:00 2001 From: luthes Date: Tue, 2 May 2017 12:53:11 -0700 Subject: [PATCH 65/77] Add Manjaro as Arch derivative --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index d49947d..fc7fa87 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -972,6 +972,8 @@ __gather_linux_system_info() { DISTRO_NAME="Oracle Linux" elif [ "${DISTRO_NAME}" = "AmazonAMI" ]; then DISTRO_NAME="Amazon Linux AMI" + elif [ "${DISTRO_NAME}" = "ManjaroLinux" ]; then + DISTRO_NAME="Arch Linux" elif [ "${DISTRO_NAME}" = "Arch" ]; then DISTRO_NAME="Arch Linux" return From c2aba217b70e8582b2f0d8b78021e7e2294d1de8 Mon Sep 17 00:00:00 2001 From: rallytime Date: Tue, 2 May 2017 16:48:03 -0600 Subject: [PATCH 66/77] Add "unmarkComment" option to probot-stale config --- .github/stale.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/stale.yml b/.github/stale.yml index 8b39c72..e5049ca 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -20,6 +20,10 @@ markComment: | If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. +# Comment to post when removing the stale label. Set to `false` to disable +unmarkComment: | + Thank you for updating this issue. It is no longer marked as stale. + # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false From c48c36c40e28839b8be48f996b102440bfcf0b1c Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Fri, 5 May 2017 11:56:27 +0300 Subject: [PATCH 67/77] Fix #1067: remove `$releasever` from repo URL for RHEL variants --- bootstrap-salt.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index fc7fa87..8648721 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1539,7 +1539,6 @@ if [ "${DISTRO_NAME_L}" = "ubuntu" ]; then fi - #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __function_defined # DESCRIPTION: Checks if a function is defined within this scripts scope @@ -3579,14 +3578,9 @@ __install_saltstack_rhel_repository() { repo_rev="latest" fi - # Cloud Linux $releasever = 7.x, which doesn't exist in repo.saltstack.com, we need this to be "7" - if [ "${DISTRO_NAME}" = "Cloud Linux" ] && [ "${DISTRO_MAJOR_VERSION}" = "7" ]; then - base_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${repo_rev}/" - else - base_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/\$releasever/\$basearch/${repo_rev}/" - fi - - fetch_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${repo_rev}/" + # Avoid using '$releasever' variable for yum. + # Instead, this should work correctly on all RHEL variants. + base_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${repo_rev}/" if [ "${DISTRO_MAJOR_VERSION}" -eq 5 ]; then gpg_key="SALTSTACK-EL5-GPG-KEY.pub" @@ -3607,6 +3601,7 @@ enabled=1 enabled_metadata=1 _eof + fetch_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/${DISTRO_MAJOR_VERSION}/${CPU_ARCH_L}/${repo_rev}/" __rpm_import_gpg "${fetch_url}${gpg_key}" || return 1 fi @@ -4478,7 +4473,6 @@ daemons_running_alpine_linux() { # install_amazon_linux_ami_deps() { - # Shim to figure out if we're using old (rhel) or new (aws) rpms. _USEAWS=$BS_FALSE From f1a08d0fde6bc70f011291b9a613ca02da5644d5 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Fri, 5 May 2017 12:02:14 +0300 Subject: [PATCH 68/77] Drop legacy workaround for installing GnuPG pub key --- bootstrap-salt.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 8648721..48c8226 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3605,13 +3605,6 @@ _eof __rpm_import_gpg "${fetch_url}${gpg_key}" || return 1 fi - if [ "$DISTRO_MAJOR_VERSION" -eq 7 ] && ([ "$repo_rev" = "latest" ] || [ "$repo_rev" = "2015.8" ]); then - # Import CentOS 7 GPG key on RHEL for installing base dependencies from - # Salt corporate repository - rpm -qa gpg-pubkey\* --qf "%{name}-%{version}\n" | grep -q ^gpg-pubkey-f4a80eb5$ || \ - __rpm_import_gpg "${HTTP_VAL}://${_REPO_URL}/yum/redhat/7/x86_64/${repo_rev}/base/RPM-GPG-KEY-CentOS-7" || return 1 - fi - return 0 } From 3cfc189bd772d7bb04f2ab40010b2e199a3b0bdd Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Thu, 4 May 2017 15:59:52 +0300 Subject: [PATCH 69/77] Declare End-of-Life for RHEL 5 and its variants --- README.rst | 11 ++++++----- bootstrap-salt.sh | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index d6b389c..271a521 100644 --- a/README.rst +++ b/README.rst @@ -235,12 +235,13 @@ Debian and derivatives Red Hat family ~~~~~~~~~~~~~~ -- Amazon Linux -- CentOS 5/6/7 +- Amazon Linux 2012.3 and later +- CentOS 6/7 +- Cloud Linux 6/7 - Fedora 23/24/25 -- Oracle Linux 5/6/7 -- Red Hat Enterprise Linux 5/6/7 -- Scientific Linux 5/6/7 +- Oracle Linux 6/7 +- Red Hat Enterprise Linux 6/7 +- Scientific Linux 6/7 SUSE family diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 48c8226..edeba6d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1840,7 +1840,7 @@ __check_end_of_life_versions() { centos) # CentOS versions lower than 5 are no longer supported - if [ "$DISTRO_MAJOR_VERSION" -lt 5 ]; then + if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " http://wiki.centos.org/Download" @@ -1850,7 +1850,7 @@ __check_end_of_life_versions() { red_hat*linux) # Red Hat (Enterprise) Linux versions lower than 5 are no longer supported - if [ "$DISTRO_MAJOR_VERSION" -lt 5 ]; then + if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " https://access.redhat.com/support/policy/updates/errata/" @@ -1858,6 +1858,36 @@ __check_end_of_life_versions() { fi ;; + oracle*linux) + # Oracle Linux versions lower than 5 are no longer supported + if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then + echoerror "End of life distributions are not supported." + echoerror "Please consider upgrading to the next stable. See:" + echoerror " http://www.oracle.com/us/support/library/elsp-lifetime-069338.pdf" + exit 1 + fi + ;; + + scientific*linux) + # Scientific Linux versions lower than 5 are no longer supported + if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then + echoerror "End of life distributions are not supported." + echoerror "Please consider upgrading to the next stable. See:" + echoerror " https://www.scientificlinux.org/downloads/sl-versions/" + exit 1 + fi + ;; + + cloud*linux) + # Cloud Linux versions lower than 5 are no longer supported + if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then + echoerror "End of life distributions are not supported." + echoerror "Please consider upgrading to the next stable. See:" + echoerror " https://docs.cloudlinux.com/index.html?cloudlinux_life-cycle.html" + exit 1 + fi + ;; + amazon*linux*ami) # Amazon Linux versions lower than 2012.0X no longer supported if [ "$DISTRO_MAJOR_VERSION" -lt 2012 ]; then From d6ad3605fd9250fabbf895b19460ebcc9763e33b Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Mon, 8 May 2017 11:39:47 +0300 Subject: [PATCH 70/77] Drop workarounds for RHEL 5 variants --- bootstrap-salt.sh | 58 ++++++++--------------------------------------- 1 file changed, 10 insertions(+), 48 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index edeba6d..3f7a769 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3572,18 +3572,10 @@ __install_epel_repository() { # Download latest 'epel-release' package for the distro version directly epel_repo_url="${HTTP_VAL}://dl.fedoraproject.org/pub/epel/epel-release-latest-${DISTRO_MAJOR_VERSION}.noarch.rpm" - if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then - __fetch_url /tmp/epel-release.rpm "$epel_repo_url" || return 1 - rpm -Uvh --force /tmp/epel-release.rpm || return 1 - rm -f /tmp/epel-release.rpm - elif [ "$DISTRO_MAJOR_VERSION" -ge 6 ]; then - rpm -Uvh --force "$epel_repo_url" || return 1 - else - echoerror "Failed add EPEL repository support." - return 1 - fi + rpm -Uvh --force "$epel_repo_url" || return 1 _EPEL_REPOS_INSTALLED=$BS_TRUE + return 0 } @@ -3611,19 +3603,14 @@ __install_saltstack_rhel_repository() { # Avoid using '$releasever' variable for yum. # Instead, this should work correctly on all RHEL variants. base_url="${HTTP_VAL}://${_REPO_URL}/yum/redhat/${DISTRO_MAJOR_VERSION}/\$basearch/${repo_rev}/" - - if [ "${DISTRO_MAJOR_VERSION}" -eq 5 ]; then - gpg_key="SALTSTACK-EL5-GPG-KEY.pub" - else - gpg_key="SALTSTACK-GPG-KEY.pub" - fi - + gpg_key="SALTSTACK-GPG-KEY.pub" repo_file="/etc/yum.repos.d/saltstack.repo" + if [ ! -s "$repo_file" ]; then cat <<_eof > "$repo_file" [saltstack] name=SaltStack ${repo_rev} Release Channel for RHEL/CentOS \$releasever -baseurl=$base_url +baseurl=${base_url} skip_if_unavailable=True gpgcheck=1 gpgkey=${base_url}${gpg_key} @@ -3663,11 +3650,6 @@ install_centos_stable_deps() { yum -y update || return 1 fi - if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then - # Install curl which is not included in @core CentOS 5 installation - __check_command_exists curl || yum -y install "curl.${CPU_ARCH_L}" || return 1 - fi - if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then __install_epel_repository || return 1 __install_saltstack_rhel_repository || return 1 @@ -3680,14 +3662,8 @@ install_centos_stable_deps() { __install_saltstack_rhel_repository || return 1 fi - __PACKAGES="yum-utils chkconfig" - # YAML module is used for generating custom master/minion configs - if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then - __PACKAGES="${__PACKAGES} python26-PyYAML" - else - __PACKAGES="${__PACKAGES} PyYAML" - fi + __PACKAGES="yum-utils chkconfig PyYAML" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 @@ -3759,11 +3735,7 @@ install_centos_git_deps() { install_centos_stable_deps || return 1 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 + __yum_install_noinput ca-certificates || return 1 fi if ! __check_command_exists git; then @@ -3772,15 +3744,7 @@ install_centos_git_deps() { __git_clone_and_checkout || return 1 - __PACKAGES="" - - if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then - __PACKAGES="${__PACKAGES} python26 python26-crypto python26-jinja2 python26-msgpack python26-requests" - __PACKAGES="${__PACKAGES} python26-tornado python26-zmq" - else - __PACKAGES="${__PACKAGES} python-crypto python-futures python-msgpack python-zmq python-jinja2" - __PACKAGES="${__PACKAGES} python-requests python-tornado" - fi + __PACKAGES="python-crypto python-futures python-msgpack python-zmq python-jinja2 python-requests python-tornado" if [ "$DISTRO_MAJOR_VERSION" -ge 7 ]; then __PACKAGES="${__PACKAGES} systemd-python" @@ -3807,13 +3771,11 @@ install_centos_git_deps() { } install_centos_git() { - if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then - _PYEXE=python2.6 - elif [ "${_PY_EXE}" != "" ]; then + if [ "${_PY_EXE}" != "" ]; then _PYEXE=${_PY_EXE} echoinfo "Using the following python version: ${_PY_EXE} to install salt" else - _PYEXE=python2 + _PYEXE='python2' fi if [ -f "${_SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then From a99dcc058e474c5165c93b0dc0823257c22444a2 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Mon, 22 May 2017 09:56:00 -0400 Subject: [PATCH 71/77] Allow amazon to work with python2.7 on installs over 2016.11 --- bootstrap-salt.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 3f7a769..1384dfc 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4461,7 +4461,11 @@ install_amazon_linux_ami_deps() { # Shim to figure out if we're using old (rhel) or new (aws) rpms. _USEAWS=$BS_FALSE - repo_rev="$(echo "${GIT_REV:-$STABLE_REV}" | sed 's|.*\/||g')" + if [ "$ITYPE" = "stable" ]; then + repo_rev="$(echo "${STABLE_REV}" | sed 's|.*\/||g')" + else + repo_rev="latest" + fi if echo "$repo_rev" | egrep -q '^(latest|2016\.11)$'; then _USEAWS=$BS_TRUE @@ -4538,6 +4542,13 @@ install_amazon_linux_ami_git_deps() { yum -y install ca-certificates || return 1 fi + PIP_EXE='pip' + if [ "$(echo "$GIT_REV" | egrep -o '2[0-9]{3}')" -ge 2016 ]; then + [ $(which pip2.7) ] || /usr/bin/easy_install-2.7 pip || echoerror "Could not install pip2.7" + PIP_EXE='/usr/local/bin/pip2.7' + _PY_EXE='python2.7' + fi + install_amazon_linux_ami_deps || return 1 ENABLE_EPEL_CMD="" @@ -4564,7 +4575,7 @@ install_amazon_linux_ami_git_deps() { # 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-tornado" + __PACKAGES="${__PACKAGES} ${pkg_append}-tornado" fi fi @@ -4575,7 +4586,7 @@ install_amazon_linux_ami_git_deps() { if [ "${__PIP_PACKAGES}" != "" ]; then # shellcheck disable=SC2086 - pip-python install ${__PIP_PACKAGES} || return 1 + ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 fi # Let's trigger config_salt() From c86b42e150f111a862fa5b58f4d712622861cc5b Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Mon, 22 May 2017 16:16:15 -0400 Subject: [PATCH 72/77] ensure sles12 enables services with stable installs --- bootstrap-salt.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 3f7a769..f710bec 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5889,7 +5889,6 @@ install_suse_12_stable_post() { # shellcheck disable=SC2086 curl $_CURL_ARGS -L "https://github.com/saltstack/salt/raw/develop/pkg/salt-$fname.service" \ -o "/usr/lib/systemd/system/salt-$fname.service" || return 1 - continue fi # Skip salt-api since the service should be opt-in and not necessarily started on boot From 273ee661a976c83f7cc77a2071a106c0c6dfa2b8 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Tue, 23 May 2017 10:02:38 -0400 Subject: [PATCH 73/77] move logic to python2.7 and fix repo_rev --- bootstrap-salt.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 1384dfc..5aa4f09 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4461,11 +4461,7 @@ install_amazon_linux_ami_deps() { # Shim to figure out if we're using old (rhel) or new (aws) rpms. _USEAWS=$BS_FALSE - if [ "$ITYPE" = "stable" ]; then - repo_rev="$(echo "${STABLE_REV}" | sed 's|.*\/||g')" - else - repo_rev="latest" - fi + repo_rev="$(echo "${STABLE_REV}" | sed 's|.*\/||g')" if echo "$repo_rev" | egrep -q '^(latest|2016\.11)$'; then _USEAWS=$BS_TRUE @@ -4543,8 +4539,8 @@ install_amazon_linux_ami_git_deps() { fi PIP_EXE='pip' - if [ "$(echo "$GIT_REV" | egrep -o '2[0-9]{3}')" -ge 2016 ]; then - [ $(which pip2.7) ] || /usr/bin/easy_install-2.7 pip || echoerror "Could not install pip2.7" + if [ $(command -v python2.7) ]; then + [ $(which pip2.7) ] || /usr/bin/easy_install-2.7 pip || return 1 PIP_EXE='/usr/local/bin/pip2.7' _PY_EXE='python2.7' fi From 19d88386a1db120d44377c79cd2dd7e065f2c3dc Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Tue, 23 May 2017 12:32:50 -0400 Subject: [PATCH 74/77] use __check_command_exists to check if cmd exists --- bootstrap-salt.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5aa4f09..076dff5 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4539,8 +4539,10 @@ install_amazon_linux_ami_git_deps() { fi PIP_EXE='pip' - if [ $(command -v python2.7) ]; then - [ $(which pip2.7) ] || /usr/bin/easy_install-2.7 pip || return 1 + if __check_command_exists python2.7; then + if ! __check_command_exists pip2.7; then + /usr/bin/easy_install-2.7 pip || return 1 + fi PIP_EXE='/usr/local/bin/pip2.7' _PY_EXE='python2.7' fi From 25e58532aabd47bf1adce4eedd3b8e5902b306ab Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Tue, 23 May 2017 11:51:39 -0400 Subject: [PATCH 75/77] use freebsd repo to query for salt dependencies --- bootstrap-salt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b5406ec..21dc87d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4909,6 +4909,8 @@ __configure_freebsd_pkg_details() { ## ensure future ports builds use pkgng echo "WITH_PKGNG= yes" >> /etc/make.conf + + /usr/local/sbin/pkg update -f || return 1 } install_freebsd_9_stable_deps() { @@ -4965,7 +4967,7 @@ install_freebsd_git_deps() { install_freebsd_9_stable_deps || return 1 # shellcheck disable=SC2086 - SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search ${FROM_SALTSTACK} -R -d sysutils/py-salt | grep -i origin | sed -e 's/^[[:space:]]*//' | tail -n +2 | awk -F\" '{print $2}' | tr '\n' ' ') + SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search ${FROM_FREEBSD} -R -d sysutils/py-salt | grep -i origin | sed -e 's/^[[:space:]]*//' | tail -n +2 | awk -F\" '{print $2}' | tr '\n' ' ') # shellcheck disable=SC2086 /usr/local/sbin/pkg install ${FROM_FREEBSD} -y ${SALT_DEPENDENCIES} || return 1 From 244c72d2bc416c51f1a19a0f9b76cc636a3e74e5 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Wed, 24 May 2017 11:55:00 -0400 Subject: [PATCH 76/77] Update AUTHORS.rst with new contributors --- AUTHORS.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index fe59f7c..790a2ed 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -13,17 +13,22 @@ Alec Koumjian akoumjian akoumjian@gmail.com Alex Van't Hof alexvh Alexander Krasnukhin themalkolm the.malkolm@gmail.com Alexey dmitrievav +Andrew Dean ndrwdn ndrwdn@gmail.com +Andy Boff caelor github@plek.me.uk Angelo Gründler plueschopath angelo.gruendler@w1r3.net Ari Aosved devaos ari.aosved@gmail.com +Ashok Raja R ashokrajar ashokrajar@users.noreply.github.com Beau Hargis beaucephus beau@customermobile.com Boris Feld Lothiraldan Brad Thurber bradthurber Brandon Clifford brandon099 brandon.clifford@vivint.com Bret Fisher BretFisher bret@fishbrains.com +Brian Kruger bkruger99 brian.kruger@elliemae.com bruce-one bruce-one Вячеслав Спиридонов sp1r C. R. Oldham cro cr@saltstack.com Cam camereonsparr +Megan Wilhite Ch3LL megan.wilhite@gmail.com Chris Rebert cvrebert chris.rebert@hulu.com Chris Buechler cbuechler cmb@pfsense.org Christer Edwards cedwards @@ -31,11 +36,13 @@ Clark Perkins iclarkperkins clark.perkins@digitalreasonin Dag Viggo Lokøen dagvl dag.viggo@lokoen.org Dan Mick dmick dan.mick@inktank.com Daniel Poelzleithner poelzi +Daniel Wallace gtmanfred danielwallace@gtmanfred.com David J. Felix DavidJFelix denmat denmat Denys Havrysh vutny denys.gavrysh@gmail.com deployboy deployboy Diego Woitasen diegows diego@flugel.it +EHJ-52n EHJ-52n EHJ-52n@users.noreply.github.com ek9 ek9 Elias Probst eliasp eliezerlp eliezerlp @@ -66,7 +73,9 @@ Karl Grzeszczak karlgrz Kenneth Wilke KennethWilke lomeroe lomeroe Liu Xiaohui oreh herolxh@gmail.com +Lorenzo Perone lopezio lorenzo.perone@yellowspace.net Lubomir Host lhost +luthes luthes steve.luther@gmail.com Marc Vieira-Cardinal marccadinal Marco Molteni marco-m Marcus Furlong furlongm furlongm@gmail.com From 583001932c03288e634bb5fcbbd1f579776adeb2 Mon Sep 17 00:00:00 2001 From: Ch3LL Date: Wed, 24 May 2017 13:06:48 -0400 Subject: [PATCH 77/77] Update version and changelog for v2017.05.24 --- ChangeLog | 43 +++++++++++++++++++++++++++++++++++++++++++ bootstrap-salt.sh | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7e35cb9..3471899 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,46 @@ +Version 2017.05.24: + * Use freebsd repo to query for salt dependencies (Ch3LL) #1076 + * Allow amazon to work with python2.7 on installs over 2016.11 (Ch3LL) #1073 + * ensure sles12 enables services with stable installs (Ch3LL) #1075 + * Declare End-of-Life for RHEL 5 and its variants (vutny) #1070 + * Fix configuring SaltStack's repo URL for RHEL variants (vutny) #1068 + * Add Manjaro as Arch derivative (luthes) #1063 + * Add "unmarkComment" option to probot-stale config (rallytime) #1064 + * Properly detect all supported Debian GNU/Linux derivatives (vutny) #1062 + * Archlinux must always update (gtmanfred) #1060 + * Alpine: fix adding, checking and running Salt Syndic in stable mode (vutny) #1059 + * Add KDE neon... (EHJ-52n) #1058 + * Update probot-stale message formatting. (rallytime) #1057 + * Fix `git` bootstrap mode for CentOS (vutny) #1054 + * update install_freebsd_10_stable to use FreeBSD repo (bytesatwork-xx) #1053 + * Support OpenBSD 6.1 (eradman) #1048 + * Update daysUntilStale value in probot-stale config (rallytime) #1055 + * Add ability to install and use a different python version when installing salt (Ch3LL) #1049 + * Add non-LTS type support for Ubuntu 17.04 (rallytime) #1051 + * Allow -R option to work for Debian/Ubuntu (rallytime) #1045 + * Adjust "daysUntilStale" variable to 190 days. #1047 + * Reduce the number of days an issue is considered "stale" (rallytime) #1046 + * Alpine: fix bootstrapping from Git -- install OpenRC initscripts (vutny) #1044 + * Add probot-stale config file (rallytime) #1042 + * Shallow cloning and Python setup fix for BSD (amontalban) #1040 + * Fix not needed quoting for salt/salt-bootstrap#1026 (amontalban) #1039 + * Update README file with supported release documentation (rallytime) #1034 + * Remove <<< bashism (The-Loeki) #1032 + * [-R option] Fix logic error where we trying to enable epel with -R (rallytime) #1033 + * Alpine: check Salt services have been enabled to start on boot (vutny) #1031 + * AWS Linux Native Support (bkruger99) #1022 + * Correct package name for FreeBSD installation (amontalban) #1030 + * README: describe architectures support for Salt deps on Linux distros (vutny) #1029 + * This commit addresses some of the issues in salt/salt-bootstrap#996 (amontalban) #1026 + * Add support for stable installation on Alpine Linux release 3.5 (vutny) #1028 + * Alpine Linux: fix installation of multiple pkgs ("stable" bootstrap) (vutny) #1027 + * Add Void Linux support (ndrwdn) #1025 + * RHEL6: disable stdin to fix shell session hang on killing tee pipe (vutny) #1018 + * Adding 2016.11 to stable version (ashokrajar) #1017 + * Update bootstrap-salt.sh (caelor) #1015 + * Alpine Linux support #1009 (ek9) #1010 + * Add Table of Contents in README (vutny) #1014 + Version 2017.01.10: * Update AUTHORS.rst with new contributors (rallytime) #1011 * fix bootstrap in Arch Linux by updating package name from salt-zmq to salt (ek9) #1007 diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 21dc87d..da15f6c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -18,7 +18,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2017.01.10" +__ScriptVersion="2017.05.24" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0"