From 7ae5bfbc0951f8937846edaec11b019a77021a8f Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Fri, 4 Sep 2015 21:38:31 -0500 Subject: [PATCH 01/37] Make bootstrap work with FreeBSD 11-CURRENT. --- bootstrap-salt.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index c13036e..96b258d 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4011,6 +4011,10 @@ install_freebsd_10_stable_deps() { install_freebsd_9_stable_deps } +install_freebsd_11_stable_deps() { + install_freebsd_9_stable_deps +} + config_freebsd_salt() { # Set _SALT_ETC_DIR to ports default _SALT_ETC_DIR=${BS_SALT_ETC_DIR:-/usr/local/etc/salt} @@ -4088,6 +4092,10 @@ install_freebsd_10_stable() { install_freebsd_9_stable } +install_freebsd_11_stable() { + install_freebsd_9_stable +} + install_freebsd_git() { # shellcheck disable=SC2086 /usr/local/sbin/pkg install ${SALT_PKG_FLAGS} -y sysutils/py-salt || return 1 @@ -4169,6 +4177,10 @@ install_freebsd_10_stable_post() { install_freebsd_9_stable_post } +install_freebsd_11_stable_post() { + install_freebsd_9_stable_post +} + install_freebsd_git_post() { install_freebsd_9_stable_post || return 1 return 0 From 5b4d5857ce7b64b64b5805d4bd6a66f187925b30 Mon Sep 17 00:00:00 2001 From: Rob Eden Date: Wed, 9 Sep 2015 18:59:43 -0400 Subject: [PATCH 02/37] Fixes error finding python-jinja2 in RHEL 7 The installer prints the following on RHEL 7 when the server optional package is not enabled: * INFO: Testing if packages usually on the optionals repository are available: * INFO: - python-jinja2 * ERROR: Failed to find an installable 'python-jinja2' package. The optional repository or its subscription might be missing. * INFO: Sleeping 10 seconds while waiting for the optional repository subscription to be externally configured This change fixes the name of the server-optional repo to be the correct name. The command `sudo subscription-manager repos --list` displays all available repos and their names. --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 96b258d..7f94d5e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3189,7 +3189,7 @@ __test_rhel_optionals_packages() { yum list installed yum-utils > /dev/null 2>&1 || yum -y install yum-utils --enablerepo=${_EPEL_REPO} || return 1 if [ "$DISTRO_MAJOR_VERSION" -ge 7 ]; then - yum-config-manager --enable \*server-optional || return 1 + yum-config-manager --enable \*server-optional-rpms || return 1 fi if [ "$DISTRO_MAJOR_VERSION" -ge 6 ]; then From 7d18269cff9d74f52792092a7ea480b46f372bd3 Mon Sep 17 00:00:00 2001 From: EYJ Date: Thu, 17 Sep 2015 17:12:16 +0200 Subject: [PATCH 03/37] Add bootstrap -b flag (don't install dependencies) --- bootstrap-salt.sh | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7f94d5e..b2ccbc6 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -17,7 +17,7 @@ # CREATED: 10/15/2012 09:49:37 PM WEST #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2015.08.06" +__ScriptVersion="2015.08.07" __ScriptName="bootstrap-salt.sh" #====================================================================================================================== @@ -213,6 +213,7 @@ _EXTRA_PACKAGES="" _HTTP_PROXY="" _DISABLE_SALT_CHECKS=$BS_FALSE __SALT_GIT_CHECKOUT_DIR=${BS_SALT_GIT_CHECKOUT_DIR:-/tmp/git/salt} +_NO_DEPS=$BS_FALSE #--- FUNCTION ------------------------------------------------------------------------------------------------------- @@ -283,12 +284,14 @@ usage() { touching /tmp/disable_salt_checks on the target host. Defaults \${BS_FALSE} -H Use the specified http proxy for the installation -Z Enable external software source for newer ZeroMQ(Only available for RHEL/CentOS/Fedora/Ubuntu based distributions) + -b Assume that dependencies are already installed and software sources are set up. + If git is selected, git tree is still checked out as dependency step. EOT } # ---------- end of function usage ---------- -while getopts ":hvnDc:Gg:k:MSNXCPFUKIA:i:Lp:dH:Z" opt +while getopts ":hvnDc:Gg:k:MSNXCPFUKIA:i:Lp:dH:Zb" opt do case "${opt}" in @@ -339,7 +342,8 @@ do p ) _EXTRA_PACKAGES="$_EXTRA_PACKAGES $OPTARG" ;; d ) _DISABLE_SALT_CHECKS=$BS_TRUE ;; H ) _HTTP_PROXY="$OPTARG" ;; - Z) _ENABLE_EXTERNAL_ZMQ_REPOS=$BS_TRUE ;; + Z ) _ENABLE_EXTERNAL_ZMQ_REPOS=$BS_TRUE ;; + b ) _NO_DEPS=$BS_TRUE ;; \?) echo @@ -5129,12 +5133,19 @@ daemons_running() { # LET'S PROCEED WITH OUR INSTALLATION #====================================================================================================================== # Let's get the dependencies install function -DEP_FUNC_NAMES="install_${DISTRO_NAME_L}${PREFIXED_DISTRO_MAJOR_VERSION}_${ITYPE}_deps" -DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}${PREFIXED_DISTRO_MAJOR_VERSION}${PREFIXED_DISTRO_MINOR_VERSION}_${ITYPE}_deps" -DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}${PREFIXED_DISTRO_MAJOR_VERSION}_deps" -DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}${PREFIXED_DISTRO_MAJOR_VERSION}${PREFIXED_DISTRO_MINOR_VERSION}_deps" -DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}_${ITYPE}_deps" -DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}_deps" + +if [ "$_NO_DEPS" -eq $BS_FALSE ]; then + DEP_FUNC_NAMES="install_${DISTRO_NAME_L}${PREFIXED_DISTRO_MAJOR_VERSION}_${ITYPE}_deps" + DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}${PREFIXED_DISTRO_MAJOR_VERSION}${PREFIXED_DISTRO_MINOR_VERSION}_${ITYPE}_deps" + DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}${PREFIXED_DISTRO_MAJOR_VERSION}_deps" + DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}${PREFIXED_DISTRO_MAJOR_VERSION}${PREFIXED_DISTRO_MINOR_VERSION}_deps" + DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}_${ITYPE}_deps" + DEP_FUNC_NAMES="$DEP_FUNC_NAMES install_${DISTRO_NAME_L}_deps" +elif [ "${ITYPE}" = "git" ]; then + DEP_FUNC_NAMES="__git_clone_and_checkout" +else + DEP_FUNC_NAMES="" +fi DEPS_INSTALL_FUNC="null" for FUNC_NAME in $(__strip_duplicates "$DEP_FUNC_NAMES"); do From 939ddcea0c323c8fde2ad6eb98ffff2d88a7caf1 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 18 Sep 2015 15:45:35 +0100 Subject: [PATCH 04/37] Don't update version --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b2ccbc6..81db4f5 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -17,7 +17,7 @@ # CREATED: 10/15/2012 09:49:37 PM WEST #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2015.08.07" +__ScriptVersion="2015.08.06" __ScriptName="bootstrap-salt.sh" #====================================================================================================================== From 8ef3391ae4bf71c4f090a8c6b3cc811cdcc3c4f0 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 18 Sep 2015 15:47:38 +0100 Subject: [PATCH 05/37] Update changes log --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 60c7cdc..d0a2fa1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Version 2015.xx.xx: + * Allow bypassing dependencies installation. Thanks EYJ. #656. + Version 2015.08.06: * Fix python-requests installations for Ubuntu >= 14.04 LTS. #631, #632, #633 * Install python-crypto from Chris Lea's PPA for Ubuntu < 14.04 From 5f7dcaa84cf66328317721773eeb9e53d4fea497 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 18 Sep 2015 15:49:57 +0100 Subject: [PATCH 06/37] Add EYJ(@eyj) to AUTHORS --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index b1464dc..c2e6bfe 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -28,6 +28,7 @@ Diego Woitasen diegows diego@flugel.it Elias Probst eliasp Erik Ankrom erikankrom Erik Johnson terminalmage erik@saltstack.com +EYJ eyj Forrest Alvarez gravyboat Fred Reimer freimer freimer@freimer.org Geoff Garside geoffgarside geoff@geoffgarside.co.uk From 712b2bf27660471e929302978df0268903681a93 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 31 Aug 2015 16:35:22 +0100 Subject: [PATCH 07/37] Switch to using SaltStack's repo.saltstack.com repositories for RHEL --- bootstrap-salt.sh | 51 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 81db4f5..5cc863f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2846,6 +2846,46 @@ __install_saltstack_copr_salt_el5_repository() { return 0 } +__install_saltstack_rhel5_repository() { + if [ ! -s /etc/yum.repos.d/repo-saltstack-el5.repo ]; then + cat <<_eof > /etc/yum.repos.d/repo-saltstack-el5.repo +[repo-saltstack-el5] +name=SaltStack EL5 Repo +baseurl=https://repo.saltstack.com/yum/rhel5/ +skip_if_unavailable=True +gpgcheck=1 +gpgkey=https://repo.saltstack.com/yum/rhel5/SALTSTACK-EL5-GPG-KEY.pub +enabled=1 +enabled_metadata=1 +_eof + + __fetch_url /tmp/repo-saltstack-el5.pub "https://repo.saltstack.com/yum/rhel5/SALTSTACK-EL5-GPG-KEY.pub" || return 1 + rpm --import /tmp/repo-saltstack-el5.pub || return 1 + rm /tmp/repo-saltstack-el5.pub + fi + return 0 +} + +__install_saltstack_rhel_repository() { + if [ ! -s "/etc/yum.repos.d/repo-saltstack-el${DISTRO_MAJOR_VERSION}.repo" ]; then + cat <<_eof > "/etc/yum.repos.d/repo-saltstack-el${DISTRO_MAJOR_VERSION}.repo" +[repo-saltstack-el${DISTRO_MAJOR_VERSION}] +name=SaltStack EL${DISTRO_MAJOR_VERSION} Repo +baseurl=https://repo.saltstack.com/yum/rhel${DISTRO_MAJOR_VERSION}/ +skip_if_unavailable=True +gpgcheck=1 +gpgkey=https://repo.saltstack.com/yum/rhel${DISTRO_MAJOR_VERSION}/SALTSTACK-GPG-KEY.pub +enabled=1 +enabled_metadata=1 +_eof + + __fetch_url /tmp/repo-saltstack.pub "https://repo.saltstack.com/yum/rhel${DISTRO_MAJOR_VERSION}/SALTSTACK-GPG-KEY.pub" || return 1 + rpm --import /tmp/repo-saltstack.pub || return 1 + rm /tmp/repo-saltstack.pub + fi + return 0 +} + __install_saltstack_copr_salt_repository() { echoinfo "Adding SaltStack's COPR repository" @@ -2867,14 +2907,9 @@ __install_saltstack_copr_salt_repository() { install_centos_stable_deps() { __install_epel_repository || return 1 if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then - __install_saltstack_copr_salt_el5_repository || return 1 - fi - - __install_saltstack_copr_salt_repository || return 1 - - if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ] && [ "$DISTRO_MAJOR_VERSION" -gt 5 ]; then - yum -y install python-hashlib || return 1 - __install_saltstack_copr_zeromq_repository || return 1 + __install_saltstack_rhel5_repository || return 1 + elif [ "$DISTRO_MAJOR_VERSION" -gt 5 ]; then + __install_saltstack_rhel_repository || return 1 fi if [ -f "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then From 2d5aded8c42e8d5e7514a30693487dcc4bfcdf4a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 31 Aug 2015 17:14:15 +0100 Subject: [PATCH 08/37] In RHEL5 the tornado pacakge is python26-tornado --- bootstrap-salt.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5cc863f..eca95f4 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2916,7 +2916,11 @@ install_centos_stable_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 - yum install -y python-tornado + if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then + yum install -y python26-tornado + else + yum install -y python-tornado + fi fi fi @@ -3055,7 +3059,11 @@ install_centos_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 - yum install -y python-tornado + if [ "$DISTRO_MAJOR_VERSION" -eq 5 ]; then + yum install -y python26-tornado + else + yum install -y python-tornado + fi fi fi From 43ccb81a869e216fbc5ef2e1d7b2d0a810bf7800 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 4 Sep 2015 13:35:38 +0100 Subject: [PATCH 09/37] Update SaltStack domain --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index eca95f4..859f18f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -13,7 +13,7 @@ # details. # # LICENSE: Apache 2.0 -# ORGANIZATION: SaltStack (saltstack.org) +# ORGANIZATION: SaltStack (saltstack.com) # CREATED: 10/15/2012 09:49:37 PM WEST #====================================================================================================================== set -o nounset # Treat unset variables as an error From 429116415e657edd4f42d3bdca6e561f22202333 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 4 Sep 2015 14:25:17 +0100 Subject: [PATCH 10/37] Move Debian 8 installation to use repo.saltstack.com --- bootstrap-salt.sh | 61 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 859f18f..babf24e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2330,39 +2330,31 @@ install_debian_8_deps() { apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010 || return 1 fi - # Debian Backports - if [ "$(grep -R 'jessie-backports' /etc/apt | grep -v "^#")" = "" ]; then - echo "deb http://httpredir.debian.org/debian jessie-backports main" >> \ - /etc/apt/sources.list.d/backports.list - fi - # Saltstack's Stable Debian repository - if [ "$(grep -R 'jessie-saltstack' /etc/apt)" = "" ]; then - echo "deb http://debian.saltstack.com/debian jessie-saltstack main" >> \ + if [ "$(grep -R 'deb8 jessie contrib' /etc/apt)" = "" ]; then + echo "deb http://repo.saltstack.com/apt/deb8 jessie contrib" >> \ /etc/apt/sources.list.d/saltstack.list fi # shellcheck disable=SC2086 - wget $_WGET_ARGS -q http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key -O - | apt-key add - || return 1 + wget $_WGET_ARGS -q https://repo.saltstack.com/apt/deb8/SALTSTACK-GPG-KEY.pub -O - | apt-key add - || return 1 apt-get update || return 1 - __apt_get_install_noinput -t jessie-backports libzmq3 libzmq3-dev python-zmq python-requests python-apt || return 1 + __PACKAGES="libzmq3 libzmq3-dev python-zmq python-requests python-apt" # Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813 __PACKAGES="procps pciutils" # Also install python-requests __PACKAGES="${__PACKAGES} python-requests" # shellcheck disable=SC2086 - __apt_get_install_noinput ${__PACKAGES} || return 1 if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" - __PACKAGES="build-essential python-dev python-pip" - # shellcheck disable=SC2086 - __apt_get_install_noinput ${__PACKAGES} || return 1 - pip install -U "apache-libcloud>=$_LIBCLOUD_MIN_VERSION" + # Install python-libcloud if asked to + __PACKAGES="${__PACKAGES} python-libcloud" fi + __apt_get_install_noinput ${__PACKAGES} || return 1 + if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then __apt_get_upgrade_noinput || return 1 fi @@ -2472,7 +2464,42 @@ install_debian_7_git_deps() { install_debian_8_git_deps() { install_debian_8_deps || return 1 - install_debian_git_deps || return 1 # Grab the actual deps + # No user interaction, libc6 restart services for example + export DEBIAN_FRONTEND=noninteractive + + if [ "$(which git)" = "" ]; then + __apt_get_install_noinput git || return 1 + fi + + __apt_get_install_noinput lsb-release python python-pkg-resources python-crypto \ + python-jinja2 python-m2crypto python-yaml msgpack-python python-pip || return 1 + + __git_clone_and_checkout || return 1 + + if [ -f "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # We're on the develop branch, install tornado + __REQUIRED_TORNADO="$(grep tornado "${__SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + if [ "${__REQUIRED_TORNADO}" != "" ]; then + __apt_get_install_noinput python-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 + + if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then + __apt_get_upgrade_noinput || return 1 + fi + + if [ "${_EXTRA_PACKAGES}" != "" ]; then + echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" + # shellcheck disable=SC2086 + __apt_get_install_noinput ${_EXTRA_PACKAGES} || return 1 + fi + return 0 } From e92a81fbe93f44c619423b5d402ee3bc0a8afb6c Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 4 Sep 2015 14:25:24 +0100 Subject: [PATCH 11/37] Update changes log --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index d0a2fa1..9d78537 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Version 2015.xx.xx: * Allow bypassing dependencies installation. Thanks EYJ. #656. + * Move RHEL installations to use repo.saltstack.com + * Move Debian 8 installation to use repo.saltstack.com + Version 2015.08.06: * Fix python-requests installations for Ubuntu >= 14.04 LTS. #631, #632, #633 From e7c5239c8ca9185e63b60845596b79361e540872 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 4 Sep 2015 17:24:42 +0100 Subject: [PATCH 12/37] Make sure that `initctl reload-configuration` is called after installing upstart file --- bootstrap-salt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index babf24e..b011ceb 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1979,6 +1979,7 @@ install_ubuntu_git_post() { echowarn "Upstart does not appear to know about salt-$fname" echodebug "Copying ${__SALT_GIT_CHECKOUT_DIR}/pkg/salt-$fname.upstart to $_upstart_conf" copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.upstart" $_upstart_conf + /sbin/initctl reload-configuration fi # No upstart support in Ubuntu!? elif [ -f "${__SALT_GIT_CHECKOUT_DIR}/debian/salt-${fname}.init" ]; then From e160c01d57922f7348990b180a7c44d26d067c6c Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 5 Sep 2015 11:11:44 +0100 Subject: [PATCH 13/37] Return show error on failure --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b011ceb..83f3759 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1979,7 +1979,7 @@ install_ubuntu_git_post() { echowarn "Upstart does not appear to know about salt-$fname" echodebug "Copying ${__SALT_GIT_CHECKOUT_DIR}/pkg/salt-$fname.upstart to $_upstart_conf" copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/salt-${fname}.upstart" $_upstart_conf - /sbin/initctl reload-configuration + /sbin/initctl reload-configuration || return 1 fi # No upstart support in Ubuntu!? elif [ -f "${__SALT_GIT_CHECKOUT_DIR}/debian/salt-${fname}.init" ]; then From 0b5281784528eeba401aef395f25b061c1afd634 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 5 Sep 2015 11:13:40 +0100 Subject: [PATCH 14/37] Add Chris Buechler(@cbuechler) to AUTHORS --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index c2e6bfe..deb4aa8 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -18,6 +18,7 @@ bruce-one bruce-one C. R. Oldham cro cr@saltstack.com Cam camereonsparr Chris Rebert cvrebert chris.rebert@hulu.com +Chris Buechler cbuechler cmb@pfsense.org Christer Edwards cedwards denmat denmat Dag Viggo Lokøen dagvl dag.viggo@lokoen.org From 4e6a297ec444794ec5034e434118ee6146368543 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 5 Sep 2015 11:14:45 +0100 Subject: [PATCH 15/37] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 9d78537..cb6b2d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ Version 2015.xx.xx: * Allow bypassing dependencies installation. Thanks EYJ. #656. + * Add FreeBSD 11 support. Thanks Chris Buechler(cbuechler). #653 * Move RHEL installations to use repo.saltstack.com * Move Debian 8 installation to use repo.saltstack.com From b17621b48b744f87683aad6d9ad2d9f058d0f0b6 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 10 Sep 2015 11:08:20 +0100 Subject: [PATCH 16/37] Restore the env var in favour of the default path in the help message --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 83f3759..51eeab2 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -273,9 +273,9 @@ usage() { -I If set, allow insecure connections while downloading any files. For example, pass '--no-check-certificate' to 'wget' or '--insecure' to 'curl' -A Pass the salt-master DNS name or IP. This will be stored under - ${_SALT_ETC_DIR}/minion.d/99-master-address.conf + \${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf -i Pass the salt-minion id. This will be stored under - ${_SALT_ETC_DIR}/minion_id + \${BS_SALT_ETC_DIR}/minion_id -L Install the Apache Libcloud package if possible(required for salt-cloud) -p Extra-package to install while installing salt dependencies. One package per -p flag. You're responsible for providing the proper package name. From af8dd98fd498c54a9bd64d68b972a9aad9a21162 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 10 Sep 2015 11:09:49 +0100 Subject: [PATCH 17/37] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index cb6b2d8..857f95c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ Version 2015.xx.xx: * Add FreeBSD 11 support. Thanks Chris Buechler(cbuechler). #653 * Move RHEL installations to use repo.saltstack.com * Move Debian 8 installation to use repo.saltstack.com + * Fix error finding python-jinja2 in RHEL 7. Thanks Rob Eden(hedinfaok). #654 Version 2015.08.06: From cea67a17d20a28479e60e4c96659f2e31511b9ce Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 10 Sep 2015 11:10:19 +0100 Subject: [PATCH 18/37] Add Rob Eden(@hedinfaok) to AUTHORS --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index deb4aa8..d508d73 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -68,6 +68,7 @@ Pedro Paulo pedropaulovc Peter Tripp notpeter ptonelli ptonelli Raymond Barbiero visualphoenix +Rob Eden hedinfaok Roberto Aguilar rca roberto@baremetal.io Roman Inflianskas rominf infroma@gmail.com Ronald van Zantvoort The-Loeki ronald@pcextreme.nl From 409e708befb1b54b5cc0e1ccd42404ec30270368 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 18 Sep 2015 15:53:35 +0100 Subject: [PATCH 19/37] Update debian repo path --- bootstrap-salt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 51eeab2..77d176a 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2332,13 +2332,13 @@ install_debian_8_deps() { fi # Saltstack's Stable Debian repository - if [ "$(grep -R 'deb8 jessie contrib' /etc/apt)" = "" ]; then - echo "deb http://repo.saltstack.com/apt/deb8 jessie contrib" >> \ + if [ "$(grep -R 'debian jessie contrib' /etc/apt)" = "" ]; then + echo "deb http://repo.saltstack.com/apt/debian jessie contrib" >> \ /etc/apt/sources.list.d/saltstack.list fi # shellcheck disable=SC2086 - wget $_WGET_ARGS -q https://repo.saltstack.com/apt/deb8/SALTSTACK-GPG-KEY.pub -O - | apt-key add - || return 1 + wget $_WGET_ARGS -q https://repo.saltstack.com/apt/debian/SALTSTACK-GPG-KEY.pub -O - | apt-key add - || return 1 apt-get update || return 1 __PACKAGES="libzmq3 libzmq3-dev python-zmq python-requests python-apt" From ca3561d69c9a5b39cebfa44d7ac31d3c2187cd22 Mon Sep 17 00:00:00 2001 From: Alex Jurkiewicz Date: Thu, 1 Oct 2015 17:03:07 +1000 Subject: [PATCH 20/37] Install stable version with the insecure example For anyone who does copy & paste the insecure one-liner, they probably should get the stable version rather than development. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 527b3fd..ddd64d5 100644 --- a/README.rst +++ b/README.rst @@ -149,7 +149,7 @@ Installing the latest develop branch of Salt: .. code:: console - curl -L https://bootstrap.saltstack.com | sudo sh -s -- git develop + curl -L https://bootstrap.saltstack.com | sudo sh -s -- stable Any of the example above which use two-lines can be made to run in a single-line configuration with minor modifications. From 5208ac6c8c70863eae274befae275c15d3088fd7 Mon Sep 17 00:00:00 2001 From: Michele Bologna Date: Thu, 1 Oct 2015 23:16:59 +0200 Subject: [PATCH 21/37] Change to 'dnf' as package manager for Fedora 22-> If you are installing Saltstack on Fedora 22 onwards, the default package manager is dnf (instead of yum). This patch decide which package manager to use based on Fedora version and the availability of dnf on the current system. If found, uses dnf to install packages needed by saltstack. Using this patch final user will not see yum deprecation warnings like: Yum command has been deprecated, redirecting to '/usr/bin/dnf install -y yum-utils.. See 'man dnf' and 'man yum2dnf' for more information. To transfer transaction metadata from yum to DNF, run: 'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate' --- bootstrap-salt.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 81db4f5..ad98d34 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2626,7 +2626,17 @@ install_debian_check_services() { # # Fedora Install Functions # + +FEDORA_PACKAGE_MANAGER="yum" + +fedora_get_package_manager() { + if [ "$DISTRO_MAJOR_VERSION" -lt 22 ] || [ "$(which dnf)" != "" ]; then + FEDORA_PACKAGE_MANAGER="dnf" + fi +} + install_fedora_deps() { + fedora_get_package_manager if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]; then __install_saltstack_copr_zeromq_repository || return 1 fi @@ -2640,22 +2650,23 @@ install_fedora_deps() { fi # shellcheck disable=SC2086 - yum install -y ${__PACKAGES} || return 1 + $FEDORA_PACKAGE_MANAGER install -y ${__PACKAGES} || return 1 if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then - yum -y update || return 1 + $FEDORA_PACKAGE_MANAGER -y update || return 1 fi if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" # shellcheck disable=SC2086 - yum install -y ${_EXTRA_PACKAGES} || return 1 + $FEDORA_PACKAGE_MANAGER install -y ${_EXTRA_PACKAGES} || return 1 fi return 0 } install_fedora_stable() { + fedora_get_package_manager __PACKAGES="" if [ "$_INSTALL_MINION" -eq $BS_TRUE ]; then __PACKAGES="${__PACKAGES} salt-minion" @@ -2664,7 +2675,7 @@ install_fedora_stable() { __PACKAGES="${__PACKAGES} salt-master" fi # shellcheck disable=SC2086 - yum install -y ${__PACKAGES} || return 1 + $FEDORA_PACKAGE_MANAGER install -y ${__PACKAGES} || return 1 return 0 } @@ -2686,13 +2697,14 @@ install_fedora_stable_post() { } install_fedora_git_deps() { + fedora_get_package_manager install_fedora_deps || return 1 if [ "$(which git)" = "" ]; then - yum install -y git || return 1 + $FEDORA_PACKAGE_MANAGER install -y git || return 1 fi - yum install -y systemd-python || return 1 + $FEDORA_PACKAGE_MANAGER install -y systemd-python || return 1 __git_clone_and_checkout || return 1 @@ -2700,7 +2712,7 @@ install_fedora_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 - yum install -y python-tornado + $FEDORA_PACKAGE_MANAGER install -y python-tornado fi fi From dc54322ca64b72e9927c524d9d605cc395f993b9 Mon Sep 17 00:00:00 2001 From: virtualguy Date: Mon, 12 Oct 2015 20:48:50 +1300 Subject: [PATCH 22/37] Update bootstrap-salt.sh --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 81db4f5..4f3c32b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -778,6 +778,8 @@ __gather_linux_system_info() { elif [ "${DISTRO_NAME}" = "Arch" ]; then DISTRO_NAME="Arch Linux" return + elif [ "${DISTRO_NAME}" = "Raspbian" ]; then + DISTRO_NAME="Debian" fi rv=$(lsb_release -sr) [ "${rv}" != "" ] && DISTRO_VERSION=$(__parse_version_string "$rv") From 6dd23163df281168aedde26e5842fbb3bc24d4aa Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Mon, 19 Oct 2015 17:50:47 -0600 Subject: [PATCH 23/37] minor cleanup --- bootstrap-salt.sh | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 81db4f5..0a54c7f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -9,7 +9,7 @@ # # BUGS: https://github.com/saltstack/salt-bootstrap/issues # -# COPYRIGHT: (c) 2012-2014 by the SaltStack Team, see AUTHORS.rst for more +# COPYRIGHT: (c) 2012-2015 by the SaltStack Team, see AUTHORS.rst for more # details. # # LICENSE: Apache 2.0 @@ -586,7 +586,6 @@ __fetch_url() { wget $_WGET_ARGS -q -O "$1" "$2" >/dev/null 2>&1 || fetch $_FETCH_ARGS -q -o "$1" "$2" >/dev/null 2>&1 || fetch -q -o "$1" "$2" >/dev/null 2>&1 # Pre FreeBSD 10 - } @@ -609,7 +608,6 @@ __gather_hardware_info() { CPU_VENDOR_ID_L=$( echo "$CPU_VENDOR_ID" | tr '[:upper:]' '[:lower:]' ) CPU_ARCH=$(uname -m 2>/dev/null || uname -p 2>/dev/null || echo "unknown") CPU_ARCH_L=$( echo "$CPU_ARCH" | tr '[:upper:]' '[:lower:]' ) - } __gather_hardware_info @@ -1316,7 +1314,6 @@ __apt_get_upgrade_noinput() { # DESCRIPTION: Check for end of life distribution versions #---------------------------------------------------------------------------------------------------------------------- __check_end_of_life_versions() { - case "${DISTRO_NAME_L}" in debian) # Debian versions bellow 6 are not supported @@ -1518,7 +1515,6 @@ movefile() { } - #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __check_services_systemd # DESCRIPTION: Return 0 or 1 in case the service is enabled or not @@ -2493,7 +2489,6 @@ __install_debian_stable() { return 0 } - install_debian_6_stable() { __install_debian_stable || return 1 return 0 @@ -2510,7 +2505,6 @@ install_debian_8_stable() { } install_debian_git() { - if [ -f "${__SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then python setup.py install --install-layout=deb --salt-config-dir="$_SALT_ETC_DIR" || \ python setup.py --salt-config-dir="$_SALT_ETC_DIR" install --install-layout=deb || return 1 @@ -3176,7 +3170,6 @@ install_centos_check_services() { done return 0 } - # # Ended CentOS Install Functions # @@ -3228,7 +3221,6 @@ __test_rhel_optionals_packages() { return 0 } - install_red_hat_linux_stable_deps() { if [ "${DISTRO_MAJOR_VERSION}" -ge 6 ]; then # Wait at most 60 seconds for the repository subscriptions to register @@ -3350,7 +3342,6 @@ install_red_hat_enterprise_workstation_git() { return 0 } - install_red_hat_linux_stable_post() { install_centos_stable_post || return 1 return 0 @@ -3411,7 +3402,6 @@ install_red_hat_enterprise_workstation_git_post() { return 0 } - install_red_hat_linux_testing_deps() { install_centos_testing_deps || return 1 return 0 @@ -3461,7 +3451,6 @@ install_red_hat_enterprise_workstation_testing_post() { # ####################################################################################################################### - ####################################################################################################################### # # Oracle Linux Install Functions @@ -3508,7 +3497,6 @@ install_oracle_linux_git_post() { return 0 } - install_oracle_linux_testing_post() { install_centos_testing_post || return 1 return 0 @@ -3528,7 +3516,6 @@ install_oracle_linux_check_services() { # ####################################################################################################################### - ####################################################################################################################### # # Scientific Linux Install Functions @@ -3573,7 +3560,6 @@ install_scientific_linux_git_post() { return 0 } - install_scientific_linux_testing_post() { install_centos_testing_post || return 1 return 0 @@ -3593,7 +3579,6 @@ install_scientific_linux_check_services() { # ####################################################################################################################### - ####################################################################################################################### # # Amazon Linux AMI Install Functions @@ -3656,7 +3641,6 @@ install_amazon_linux_ami_deps() { # shellcheck disable=SC2086 yum install -y ${_EXTRA_PACKAGES} --enablerepo=${_EPEL_REPO} || return 1 fi - } install_amazon_linux_ami_git_deps() { @@ -3720,7 +3704,6 @@ install_amazon_linux_ami_testing_post() { install_centos_testing_post || return 1 return 0 } - # # Ended Amazon Linux AMI Install Functions # @@ -3731,7 +3714,6 @@ install_amazon_linux_ami_testing_post() { # Arch Install Functions # install_arch_linux_stable_deps() { - if [ ! -f /etc/pacman.d/gnupg ]; then pacman-key --init && pacman-key --populate archlinux || return 1 fi @@ -3755,7 +3737,6 @@ install_arch_linux_stable_deps() { # shellcheck disable=SC2086 pacman -Sy --noconfirm --needed ${_EXTRA_PACKAGES} || return 1 fi - } install_arch_linux_git_deps() { @@ -3813,7 +3794,6 @@ install_arch_linux_git() { } install_arch_linux_post() { - for fname in minion master syndic api; do # Skip if not meant to be installed @@ -3956,7 +3936,6 @@ __freebsd_get_packagesite() { # Using a separate conf step to head for idempotent install... __configure_freebsd_pkg_details() { - ## pkg.conf is deprecated. ## We use conf files in /usr/local or /etc instead mkdir -p /usr/local/etc/pkg/repos/ @@ -3978,7 +3957,6 @@ __configure_freebsd_pkg_details() { } install_freebsd_9_stable_deps() { - #make variables available even if pkg already installed __freebsd_get_packagesite @@ -4254,7 +4232,6 @@ install_smartos_deps() { fi return 0 - } install_smartos_git_deps() { @@ -4384,7 +4361,6 @@ install_smartos_restart_daemons() { # # openSUSE Install Functions. # - __ZYPPER_REQUIRES_REPLACE_FILES=-1 __version_lte() { @@ -4616,7 +4592,6 @@ install_opensuse_check_services() { done return 0 } - # # End of openSUSE Install Functions. # @@ -4857,6 +4832,7 @@ __gentoo_pre_dep() { mkdir /etc/portage fi } + __gentoo_post_dep() { # ensures dev-lib/crypto++ compiles happily __emerge --oneshot 'sys-devel/libtool' @@ -4877,7 +4853,6 @@ __gentoo_post_dep() { # shellcheck disable=SC2086 __emerge -v ${_EXTRA_PACKAGES} || return 1 fi - } install_gentoo_deps() { @@ -4968,7 +4943,6 @@ install_gentoo_check_services() { # ####################################################################################################################### - ####################################################################################################################### # # Default minion configuration function. Matches ANY distribution as long as @@ -5055,7 +5029,6 @@ config_salt() { # ####################################################################################################################### - ####################################################################################################################### # # Default salt master minion keys pre-seed function. Matches ANY distribution @@ -5091,7 +5064,6 @@ preseed_master() { # ####################################################################################################################### - ####################################################################################################################### # # This function checks if all of the installed daemons are running or not. @@ -5128,7 +5100,6 @@ daemons_running() { # ####################################################################################################################### - #====================================================================================================================== # LET'S PROCEED WITH OUR INSTALLATION #====================================================================================================================== From 97b88e5644065ef200eaf16ba7e877e152a97762 Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Mon, 19 Oct 2015 17:50:47 -0600 Subject: [PATCH 24/37] minor cleanup --- bootstrap-salt.sh | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 77d176a..a6d3e00 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -9,7 +9,7 @@ # # BUGS: https://github.com/saltstack/salt-bootstrap/issues # -# COPYRIGHT: (c) 2012-2014 by the SaltStack Team, see AUTHORS.rst for more +# COPYRIGHT: (c) 2012-2015 by the SaltStack Team, see AUTHORS.rst for more # details. # # LICENSE: Apache 2.0 @@ -586,7 +586,6 @@ __fetch_url() { wget $_WGET_ARGS -q -O "$1" "$2" >/dev/null 2>&1 || fetch $_FETCH_ARGS -q -o "$1" "$2" >/dev/null 2>&1 || fetch -q -o "$1" "$2" >/dev/null 2>&1 # Pre FreeBSD 10 - } @@ -609,7 +608,6 @@ __gather_hardware_info() { CPU_VENDOR_ID_L=$( echo "$CPU_VENDOR_ID" | tr '[:upper:]' '[:lower:]' ) CPU_ARCH=$(uname -m 2>/dev/null || uname -p 2>/dev/null || echo "unknown") CPU_ARCH_L=$( echo "$CPU_ARCH" | tr '[:upper:]' '[:lower:]' ) - } __gather_hardware_info @@ -1316,7 +1314,6 @@ __apt_get_upgrade_noinput() { # DESCRIPTION: Check for end of life distribution versions #---------------------------------------------------------------------------------------------------------------------- __check_end_of_life_versions() { - case "${DISTRO_NAME_L}" in debian) # Debian versions bellow 6 are not supported @@ -1518,7 +1515,6 @@ movefile() { } - #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __check_services_systemd # DESCRIPTION: Return 0 or 1 in case the service is enabled or not @@ -2521,7 +2517,6 @@ __install_debian_stable() { return 0 } - install_debian_6_stable() { __install_debian_stable || return 1 return 0 @@ -2538,7 +2533,6 @@ install_debian_8_stable() { } install_debian_git() { - if [ -f "${__SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then python setup.py install --install-layout=deb --salt-config-dir="$_SALT_ETC_DIR" || \ python setup.py --salt-config-dir="$_SALT_ETC_DIR" install --install-layout=deb || return 1 @@ -3247,7 +3241,6 @@ install_centos_check_services() { done return 0 } - # # Ended CentOS Install Functions # @@ -3299,7 +3292,6 @@ __test_rhel_optionals_packages() { return 0 } - install_red_hat_linux_stable_deps() { if [ "${DISTRO_MAJOR_VERSION}" -ge 6 ]; then # Wait at most 60 seconds for the repository subscriptions to register @@ -3421,7 +3413,6 @@ install_red_hat_enterprise_workstation_git() { return 0 } - install_red_hat_linux_stable_post() { install_centos_stable_post || return 1 return 0 @@ -3482,7 +3473,6 @@ install_red_hat_enterprise_workstation_git_post() { return 0 } - install_red_hat_linux_testing_deps() { install_centos_testing_deps || return 1 return 0 @@ -3532,7 +3522,6 @@ install_red_hat_enterprise_workstation_testing_post() { # ####################################################################################################################### - ####################################################################################################################### # # Oracle Linux Install Functions @@ -3579,7 +3568,6 @@ install_oracle_linux_git_post() { return 0 } - install_oracle_linux_testing_post() { install_centos_testing_post || return 1 return 0 @@ -3599,7 +3587,6 @@ install_oracle_linux_check_services() { # ####################################################################################################################### - ####################################################################################################################### # # Scientific Linux Install Functions @@ -3644,7 +3631,6 @@ install_scientific_linux_git_post() { return 0 } - install_scientific_linux_testing_post() { install_centos_testing_post || return 1 return 0 @@ -3664,7 +3650,6 @@ install_scientific_linux_check_services() { # ####################################################################################################################### - ####################################################################################################################### # # Amazon Linux AMI Install Functions @@ -3727,7 +3712,6 @@ install_amazon_linux_ami_deps() { # shellcheck disable=SC2086 yum install -y ${_EXTRA_PACKAGES} --enablerepo=${_EPEL_REPO} || return 1 fi - } install_amazon_linux_ami_git_deps() { @@ -3791,7 +3775,6 @@ install_amazon_linux_ami_testing_post() { install_centos_testing_post || return 1 return 0 } - # # Ended Amazon Linux AMI Install Functions # @@ -3802,7 +3785,6 @@ install_amazon_linux_ami_testing_post() { # Arch Install Functions # install_arch_linux_stable_deps() { - if [ ! -f /etc/pacman.d/gnupg ]; then pacman-key --init && pacman-key --populate archlinux || return 1 fi @@ -3826,7 +3808,6 @@ install_arch_linux_stable_deps() { # shellcheck disable=SC2086 pacman -Sy --noconfirm --needed ${_EXTRA_PACKAGES} || return 1 fi - } install_arch_linux_git_deps() { @@ -3884,7 +3865,6 @@ install_arch_linux_git() { } install_arch_linux_post() { - for fname in minion master syndic api; do # Skip if not meant to be installed @@ -4027,7 +4007,6 @@ __freebsd_get_packagesite() { # Using a separate conf step to head for idempotent install... __configure_freebsd_pkg_details() { - ## pkg.conf is deprecated. ## We use conf files in /usr/local or /etc instead mkdir -p /usr/local/etc/pkg/repos/ @@ -4049,7 +4028,6 @@ __configure_freebsd_pkg_details() { } install_freebsd_9_stable_deps() { - #make variables available even if pkg already installed __freebsd_get_packagesite @@ -4325,7 +4303,6 @@ install_smartos_deps() { fi return 0 - } install_smartos_git_deps() { @@ -4455,7 +4432,6 @@ install_smartos_restart_daemons() { # # openSUSE Install Functions. # - __ZYPPER_REQUIRES_REPLACE_FILES=-1 __version_lte() { @@ -4687,7 +4663,6 @@ install_opensuse_check_services() { done return 0 } - # # End of openSUSE Install Functions. # @@ -4928,6 +4903,7 @@ __gentoo_pre_dep() { mkdir /etc/portage fi } + __gentoo_post_dep() { # ensures dev-lib/crypto++ compiles happily __emerge --oneshot 'sys-devel/libtool' @@ -4948,7 +4924,6 @@ __gentoo_post_dep() { # shellcheck disable=SC2086 __emerge -v ${_EXTRA_PACKAGES} || return 1 fi - } install_gentoo_deps() { @@ -5039,7 +5014,6 @@ install_gentoo_check_services() { # ####################################################################################################################### - ####################################################################################################################### # # Default minion configuration function. Matches ANY distribution as long as @@ -5126,7 +5100,6 @@ config_salt() { # ####################################################################################################################### - ####################################################################################################################### # # Default salt master minion keys pre-seed function. Matches ANY distribution @@ -5162,7 +5135,6 @@ preseed_master() { # ####################################################################################################################### - ####################################################################################################################### # # This function checks if all of the installed daemons are running or not. @@ -5199,7 +5171,6 @@ daemons_running() { # ####################################################################################################################### - #====================================================================================================================== # LET'S PROCEED WITH OUR INSTALLATION #====================================================================================================================== From 8ce970db06b744312d3af04381328349e1ff807c Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Tue, 20 Oct 2015 12:58:36 -0600 Subject: [PATCH 25/37] force remove repo key on redhat after import --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a6d3e00..641df54 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2883,7 +2883,7 @@ _eof __fetch_url /tmp/repo-saltstack-el5.pub "https://repo.saltstack.com/yum/rhel5/SALTSTACK-EL5-GPG-KEY.pub" || return 1 rpm --import /tmp/repo-saltstack-el5.pub || return 1 - rm /tmp/repo-saltstack-el5.pub + rm -f /tmp/repo-saltstack-el5.pub fi return 0 } @@ -2903,7 +2903,7 @@ _eof __fetch_url /tmp/repo-saltstack.pub "https://repo.saltstack.com/yum/rhel${DISTRO_MAJOR_VERSION}/SALTSTACK-GPG-KEY.pub" || return 1 rpm --import /tmp/repo-saltstack.pub || return 1 - rm /tmp/repo-saltstack.pub + rm -f /tmp/repo-saltstack.pub fi return 0 } From 48dea6199d09dedebde03ee7e9dd281b9df89194 Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Tue, 20 Oct 2015 13:04:41 -0600 Subject: [PATCH 26/37] update saltstack repo debian url --- bootstrap-salt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 641df54..a75d483 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2328,13 +2328,13 @@ install_debian_8_deps() { fi # Saltstack's Stable Debian repository - if [ "$(grep -R 'debian jessie contrib' /etc/apt)" = "" ]; then - echo "deb http://repo.saltstack.com/apt/debian jessie contrib" >> \ + if [ "$(grep -R 'latest jessie main' /etc/apt)" = "" ]; then + echo "deb http://repo.saltstack.com/apt/debian/latest jessie main" >> \ /etc/apt/sources.list.d/saltstack.list fi # shellcheck disable=SC2086 - wget $_WGET_ARGS -q https://repo.saltstack.com/apt/debian/SALTSTACK-GPG-KEY.pub -O - | apt-key add - || return 1 + wget $_WGET_ARGS -q https://repo.saltstack.com/apt/debian/latest/SALTSTACK-GPG-KEY.pub -O - | apt-key add - || return 1 apt-get update || return 1 __PACKAGES="libzmq3 libzmq3-dev python-zmq python-requests python-apt" From 26b82c94099f748ee42188d00096151cdbdf002f Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Tue, 20 Oct 2015 16:34:27 -0600 Subject: [PATCH 27/37] add repo.saltstack.com for ubuntu --- bootstrap-salt.sh | 142 ++++++++++++++++++++++++++++++---------------- 1 file changed, 94 insertions(+), 48 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a75d483..5768863 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1033,6 +1033,45 @@ __ubuntu_derivatives_translation() { fi } +#--- FUNCTION ------------------------------------------------------------------------------------------------------- +# NAME: __ubuntu_codename_translation +# DESCRIPTION: Map Ubuntu major versions to their corresponding codenames +#---------------------------------------------------------------------------------------------------------------------- +# shellcheck disable=SC2034 +__ubuntu_codename_translation() { + + case $DISTRO_MINOR_VERSION in + "04") + _april="yes" + ;; + "10") + _april="" + ;; + *) + _april="yes" + ;; + esac + + case $DISTRO_MAJOR_VERSION in + "12") + DISTRO_CODENAME="precise" + ;; + "14") + DISTRO_CODENAME="trusty" + ;; + "15") + if [ -n $_april ] ; then + DISTRO_CODENAME="vivid" + else + DISTRO_CODENAME="wily" + fi + ;; + *) + DISTRO_CODENAME="trusty" + ;; + esac +} + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __debian_derivatives_translation # DESCRIPTION: Map Debian derivatives to their Debian base versions. @@ -1157,6 +1196,9 @@ else fi fi +# For ubuntu versions, obtain the codename from the release version +__ubuntu_codename_translation + # Only Ubuntu has daily packages, let's let users know about that if ([ "${DISTRO_NAME_L}" != "ubuntu" ] && [ "$ITYPE" = "daily" ]); then echoerror "${DISTRO_NAME} does not have daily packages support" @@ -1753,6 +1795,32 @@ install_ubuntu_deps() { __enable_universe_repository || return 1 + # the latest version of 2015.5 and all versions of 2015.8 and beyond are hosted on repo.saltstack.com + if [ "$(echo "$STABLE_REV" | egrep '^(2015\.5|2015\.8|latest)$')" = "" ]; then + if [ "$DISTRO_MAJOR_VERSION" -lt 14 ]; then + echoinfo "Installing Python Requests/Chardet from Chris Lea's PPA repository" + if [ "$DISTRO_MAJOR_VERSION" -gt 11 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -gt 04 ]); then + # Above Ubuntu 11.04 add a -y flag + add-apt-repository -y "ppa:chris-lea/python-requests" || return 1 + add-apt-repository -y "ppa:chris-lea/python-chardet" || return 1 + add-apt-repository -y "ppa:chris-lea/python-urllib3" || return 1 + add-apt-repository -y "ppa:chris-lea/python-crypto" || return 1 + else + add-apt-repository "ppa:chris-lea/python-requests" || return 1 + add-apt-repository "ppa:chris-lea/python-chardet" || return 1 + add-apt-repository "ppa:chris-lea/python-urllib3" || return 1 + add-apt-repository "ppa:chris-lea/python-crypto" || return 1 + fi + fi + + if [ "$DISTRO_MAJOR_VERSION" -gt 12 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -gt 03 ]); then + if ([ "$DISTRO_MAJOR_VERSION" -lt 15 ] && [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]); then + echoinfo "Installing ZMQ>=4/PyZMQ>=14 from Chris Lea's PPA repository" + add-apt-repository -y ppa:chris-lea/zeromq || return 1 + fi + fi + fi + __PIP_PACKAGES="" # Minimal systems might not have upstart installed, install it @@ -1761,31 +1829,9 @@ install_ubuntu_deps() { # Need python-apt for managing packages via Salt __PACKAGES="${__PACKAGES} python-apt" - if [ "$DISTRO_MAJOR_VERSION" -lt 14 ]; then - echoinfo "Installing Python Requests/Chardet from Chris Lea's PPA repository" - if [ "$DISTRO_MAJOR_VERSION" -gt 11 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -gt 04 ]); then - # Above Ubuntu 11.04 add a -y flag - add-apt-repository -y "ppa:chris-lea/python-requests" || return 1 - add-apt-repository -y "ppa:chris-lea/python-chardet" || return 1 - add-apt-repository -y "ppa:chris-lea/python-urllib3" || return 1 - add-apt-repository -y "ppa:chris-lea/python-crypto" || return 1 - else - add-apt-repository "ppa:chris-lea/python-requests" || return 1 - add-apt-repository "ppa:chris-lea/python-chardet" || return 1 - add-apt-repository "ppa:chris-lea/python-urllib3" || return 1 - add-apt-repository "ppa:chris-lea/python-crypto" || return 1 - fi - fi - + # requests is still used by many salt modules __PACKAGES="${__PACKAGES} python-requests" - if [ "$DISTRO_MAJOR_VERSION" -gt 12 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -gt 03 ]); then - if ([ "$DISTRO_MAJOR_VERSION" -lt 15 ] && [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]); then - echoinfo "Installing ZMQ>=4/PyZMQ>=14 from Chris Lea's PPA repository" - add-apt-repository -y ppa:chris-lea/zeromq || return 1 - fi - fi - # Additionally install procps and pciutils which allows for Docker boostraps. See 366#issuecomment-39666813 __PACKAGES="${__PACKAGES} procps pciutils" @@ -1824,34 +1870,34 @@ install_ubuntu_deps() { install_ubuntu_stable_deps() { install_ubuntu_deps || return 1 - # Alternate PPAs: salt16, salt17, salt2014-1, salt2014-7 - if [ ! "$(echo "$STABLE_REV" | egrep '^(1\.6|1\.7)$')" = "" ]; then - STABLE_PPA="saltstack/salt$(echo "$STABLE_REV" | tr -d .)" - elif [ ! "$(echo "$STABLE_REV" | egrep '^(2014\.1|2014\.7|2015\.5)$')" = "" ]; then - STABLE_PPA="saltstack/salt$(echo "$STABLE_REV" | tr . -)" - else - STABLE_PPA="saltstack/salt" - fi + # the latest version of 2015.5 and all versions of 2015.8 and beyond are hosted on repo.saltstack.com + if [ "$(echo "$STABLE_REV" | egrep '^(2015\.5|2015\.8|latest)$')" != "" ]; then - if [ "$DISTRO_MAJOR_VERSION" -gt 11 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -gt 04 ]); then - # Above Ubuntu 11.04 add a -y flag - add-apt-repository -y "ppa:$STABLE_PPA" || return 1 - else - add-apt-repository "ppa:$STABLE_PPA" || return 1 - fi - - __PACKAGES="" - if [ ! "$(echo "$STABLE_REV" | egrep '^(2015\.8|latest)$')" = "" ]; then - # We need a recent tornado package - __REQUIRED_TORNADO="tornado >= 4.0" - check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'" - if [ "$(which pip)" = "" ]; then - __PACKAGES="${__PACKAGES} python-setuptools python-pip" + # Saltstack's Stable Ubuntu repository + if [ "$(grep -ER 'latest .+ main' /etc/apt)" = "" ]; then + echo "deb http://repo.saltstack.com/apt/ubuntu/ubuntu$DISTRO_MAJOR_VERSION/$STABLE_REV $DISTRO_CODENAME main" >> \ + /etc/apt/sources.list.d/saltstack.list fi - __PACKAGES="${__PACKAGES} python-dev" + # shellcheck disable=SC2086 - __apt_get_install_noinput $__PACKAGES - pip install -U "${__REQUIRED_TORNADO}" + wget $_WGET_ARGS -q http://repo.saltstack.com/apt/ubuntu/ubuntu$DISTRO_MAJOR_VERSION/$STABLE_REV/SALTSTACK-GPG-KEY.pub -O - | apt-key add - || return 1 + + else + # Alternate PPAs: salt16, salt17, salt2014-1, salt2014-7 + if [ ! "$(echo "$STABLE_REV" | egrep '^(1\.6|1\.7)$')" = "" ]; then + STABLE_PPA="saltstack/salt$(echo "$STABLE_REV" | tr -d .)" + elif [ ! "$(echo "$STABLE_REV" | egrep '^(2014\.1|2014\.7)$')" = "" ]; then + STABLE_PPA="saltstack/salt$(echo "$STABLE_REV" | tr . -)" + else + STABLE_PPA="saltstack/salt" + fi + + if [ "$DISTRO_MAJOR_VERSION" -gt 11 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$DISTRO_MINOR_VERSION" -gt 04 ]); then + # Above Ubuntu 11.04 add a -y flag + add-apt-repository -y "ppa:$STABLE_PPA" || return 1 + else + add-apt-repository "ppa:$STABLE_PPA" || return 1 + fi fi apt-get update From b17162d1482bfc367f6397225e085c813ea95b04 Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Thu, 22 Oct 2015 16:03:21 -0600 Subject: [PATCH 28/37] add repo.saltstack.com for freebsd --- bootstrap-salt.sh | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5768863..59a5b5f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -4046,6 +4046,7 @@ __freebsd_get_packagesite() { _PACKAGESITE="http://pkg.freebsd.org/${ABI}/latest" # Awkwardly, we want the `${ABI}` to be in conf file without escaping PKGCONFURL="pkg+http://pkg.freebsd.org/\${ABI}/latest" + SALTPKGCONFURL="http://repo.saltstack.com/freebsd/\${ABI}/" # Treat unset variables as errors once more set -o nounset @@ -4068,7 +4069,20 @@ __configure_freebsd_pkg_details() { echo "}" } > $conf_file copyfile $conf_file /etc/pkg/FreeBSD.conf - SALT_PKG_FLAGS="-r FreeBSD" + FROM_FREEBSD="-r FreeBSD" + + ## add saltstack freebsd repo + salt_conf_file=/usr/local/etc/pkg/repos/saltstack.conf + { + echo "SaltStack:{" + echo " url: \"${SALTPKGCONFURL}\"," + echo " mirror_type: \"http\"," + echo " enabled: true" + echo " prioroity: 10" + echo "}" + } > $salt_conf_file + FROM_SALTSTACK="-r SaltStack" + ## ensure future ports builds use pkgng echo "WITH_PKGNG= yes" >> /etc/make.conf } @@ -4091,12 +4105,12 @@ install_freebsd_9_stable_deps() { # Now install swig # shellcheck disable=SC2086 - /usr/local/sbin/pkg install ${SALT_PKG_FLAGS} -y swig || return 1 + /usr/local/sbin/pkg install ${FROM_FREEBSD} -y swig || return 1 if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" # shellcheck disable=SC2086 - /usr/local/sbin/pkg install ${SALT_PKG_FLAGS} -y ${_EXTRA_PACKAGES} || return 1 + /usr/local/sbin/pkg install ${FROM_FREEBSD} -y ${_EXTRA_PACKAGES} || return 1 fi if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then @@ -4183,7 +4197,7 @@ install_freebsd_git_deps() { install_freebsd_9_stable() { # shellcheck disable=SC2086 - /usr/local/sbin/pkg install ${SALT_PKG_FLAGS} -y sysutils/py-salt || return 1 + /usr/local/sbin/pkg install ${FROM_SALTSTACK} -y sysutils/py-salt || return 1 return 0 } @@ -4197,7 +4211,7 @@ install_freebsd_11_stable() { install_freebsd_git() { # shellcheck disable=SC2086 - /usr/local/sbin/pkg install ${SALT_PKG_FLAGS} -y sysutils/py-salt || return 1 + /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 From ffabd538822e279411b5b6cb3e0745f101075dab Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Thu, 22 Oct 2015 16:36:25 -0600 Subject: [PATCH 29/37] update changes log --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 857f95c..166b14d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ Version 2015.xx.xx: * Move RHEL installations to use repo.saltstack.com * Move Debian 8 installation to use repo.saltstack.com * Fix error finding python-jinja2 in RHEL 7. Thanks Rob Eden(hedinfaok). #654 + * Move Ubuntu 12 and 14 installations to use repo.saltstack.com + * Move FreeBSD installations to use repo.saltstack.com Version 2015.08.06: From a0994546f5dc8053ad580ccf69a6cd01b9dd768f Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Fri, 23 Oct 2015 12:07:49 -0600 Subject: [PATCH 30/37] add stable insecure one-line, minor reorganization --- README.rst | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index ddd64d5..f9a7349 100644 --- a/README.rst +++ b/README.rst @@ -27,7 +27,7 @@ Bootstrap --------- If you're looking for the *one-liner* to install salt, please scroll to the bottom and use the -instructions for `Installing via an Insecure One-Liner`_ +instructions for `Installing via an Insecure One-Liner`_. Examples @@ -132,6 +132,10 @@ To install a specific branch from a git fork: sudo sh install_salt.sh -g https://github.com/myuser/salt.git git mybranch +Any of the example above which use two-lines can be made to run in a single-line +configuration with minor modifications, see `Installing via an Insecure One-Liner`_. + + Installing via an Insecure One-Liner ------------------------------------ @@ -145,15 +149,23 @@ The following examples illustrate how to install Salt via a one-liner. Examples ~~~~~~~~ -Installing the latest develop branch of Salt: +Installing the latest stable release of Salt (default): .. code:: console curl -L https://bootstrap.saltstack.com | sudo sh -s -- stable -Any of the example above which use two-lines can be made to run in a single-line -configuration with minor modifications. +or +.. code:: console + + curl -L https://bootstrap.saltstack.com | sudo sh -s + +Installing the latest develop branch of Salt: + +.. code:: console + + curl -L https://bootstrap.saltstack.com | sudo sh -s -- git develop Adding support for other operating systems From 39913bed2ebe3abb17ef7d8e0fe792c1f24d8572 Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Fri, 23 Oct 2015 12:20:43 -0600 Subject: [PATCH 31/37] Note -> note in README.rst --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index f9a7349..f929413 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,7 @@ script runs through a series of checks to determine operating system type and ve install the `Salt`_ binaries using the appropriate methods. -.. Note:: +.. 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 @@ -33,7 +33,7 @@ instructions for `Installing via an Insecure One-Liner`_. Examples ~~~~~~~~ -.. Note:: +.. note:: In every two-step example, you would be well-served to examine the downloaded file and examine it to ensure that it does what you expect. @@ -141,7 +141,7 @@ Installing via an Insecure One-Liner The following examples illustrate how to install Salt via a one-liner. -.. Note:: +.. note:: Warning! These methods do not involve a verification step and assume that the delivered file is trustworthy. From f38fdc418cb89d66d9272ff231d80e22a87454f4 Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Fri, 23 Oct 2015 12:25:06 -0600 Subject: [PATCH 32/37] mention FreeBSD 11 in README.rst FreeBSD 11 support was added in #653. --- README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f929413..8287a4c 100644 --- a/README.rst +++ b/README.rst @@ -34,6 +34,7 @@ Examples ~~~~~~~~ .. note:: + In every two-step example, you would be well-served to examine the downloaded file and examine it to ensure that it does what you expect. @@ -142,6 +143,7 @@ Installing via an Insecure One-Liner 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. @@ -337,7 +339,7 @@ Supported Operating Systems - CentOS 5/6/7 - Debian 6/7/8 - Fedora 17/18/20/21/22 -- FreeBSD 9.1/9.2/10 +- FreeBSD 9.1/9.2/10/11 - Gentoo - Linaro - Linux Mint 13/14 From 10bdcf3b8e07b18b86d02c03db837eb5b5b56097 Mon Sep 17 00:00:00 2001 From: Michele Bologna Date: Sat, 24 Oct 2015 12:23:23 +0200 Subject: [PATCH 33/37] Renamed to __fedora_get_package_manager Renamed newly introduced fedora_get_package_manager() to __fedora_get_package_manager() --- bootstrap-salt.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ad98d34..db304d1 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2629,14 +2629,14 @@ install_debian_check_services() { FEDORA_PACKAGE_MANAGER="yum" -fedora_get_package_manager() { +__fedora_get_package_manager() { if [ "$DISTRO_MAJOR_VERSION" -lt 22 ] || [ "$(which dnf)" != "" ]; then FEDORA_PACKAGE_MANAGER="dnf" fi } install_fedora_deps() { - fedora_get_package_manager + __fedora_get_package_manager if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]; then __install_saltstack_copr_zeromq_repository || return 1 fi @@ -2666,7 +2666,7 @@ install_fedora_deps() { } install_fedora_stable() { - fedora_get_package_manager + __fedora_get_package_manager __PACKAGES="" if [ "$_INSTALL_MINION" -eq $BS_TRUE ]; then __PACKAGES="${__PACKAGES} salt-minion" @@ -2697,7 +2697,7 @@ install_fedora_stable_post() { } install_fedora_git_deps() { - fedora_get_package_manager + __fedora_get_package_manager install_fedora_deps || return 1 if [ "$(which git)" = "" ]; then From bde8f0e43a5574d15dd14a85b83192df4967a7af Mon Sep 17 00:00:00 2001 From: Michele Bologna Date: Tue, 27 Oct 2015 22:12:02 +0100 Subject: [PATCH 34/37] Correcting: from 22 onwards --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index db304d1..3dddf85 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2630,7 +2630,7 @@ install_debian_check_services() { FEDORA_PACKAGE_MANAGER="yum" __fedora_get_package_manager() { - if [ "$DISTRO_MAJOR_VERSION" -lt 22 ] || [ "$(which dnf)" != "" ]; then + if [ "$DISTRO_MAJOR_VERSION" -ge 22 ] || [ "$(which dnf)" != "" ]; then FEDORA_PACKAGE_MANAGER="dnf" fi } From ba4d370ca8cd2c2fd5df94a34e6309f469ae82c2 Mon Sep 17 00:00:00 2001 From: Justin Findlay Date: Tue, 27 Oct 2015 19:59:53 -0600 Subject: [PATCH 35/37] Add Michele Bologna (@mbologna) to AUTHORS --- AUTHORS.rst | 1 + ChangeLog | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index d508d73..aa19bcb 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -55,6 +55,7 @@ Matthew Mead-Briggs mattmb Matthew Willson ixela Matthieu Guegan mguegan Michael Scherer mscherer +Michele Bologna mbologna michele.bologna@gmail.com Mike Carlson m87carlson mike@bayphoto.com Mike Place cachedout mp@saltstack.com nevins-b nevins-b diff --git a/ChangeLog b/ChangeLog index 166b14d..c2189f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,12 @@ Version 2015.xx.xx: * Allow bypassing dependencies installation. Thanks EYJ. #656. * Add FreeBSD 11 support. Thanks Chris Buechler(cbuechler). #653 - * Move RHEL installations to use repo.saltstack.com - * Move Debian 8 installation to use repo.saltstack.com + * Move RHEL installations to use repo.saltstack.com #674 + * Move Debian 8 installation to use repo.saltstack.com #674 * Fix error finding python-jinja2 in RHEL 7. Thanks Rob Eden(hedinfaok). #654 - * Move Ubuntu 12 and 14 installations to use repo.saltstack.com - * Move FreeBSD installations to use repo.saltstack.com + * Move Ubuntu 12 and 14 installations to use repo.saltstack.com #674 + * Move FreeBSD installations to use repo.saltstack.com #674 + * Use dnf on Fedora 22 and later. Thanks Michele Bologna (mbologna). #665 Version 2015.08.06: From 54a389f15c553bd72aa8eabdb03cdb42896454a5 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 28 Oct 2015 15:39:12 +0000 Subject: [PATCH 36/37] Lint fixes --- bootstrap-salt.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 39a422f..e3033b5 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -654,7 +654,7 @@ __derive_debian_numeric_version() { INPUT_VERSION="$1" if echo "$INPUT_VERSION" | grep -q '^[0-9]'; then NUMERIC_VERSION="$INPUT_VERSION" - elif [ -z "$INPUT_VERSION" -a -f "/etc/debian_version" ]; then + elif [ -z "$INPUT_VERSION" ] && [ -f "/etc/debian_version" ]; then INPUT_VERSION="$(cat /etc/debian_version)" fi if [ -z "$NUMERIC_VERSION" ]; then @@ -1062,7 +1062,7 @@ __ubuntu_codename_translation() { DISTRO_CODENAME="trusty" ;; "15") - if [ -n $_april ] ; then + if [ -n "$_april" ]; then DISTRO_CODENAME="vivid" else DISTRO_CODENAME="wily" @@ -2391,13 +2391,13 @@ install_debian_8_deps() { __PACKAGES="procps pciutils" # Also install python-requests __PACKAGES="${__PACKAGES} python-requests" - # shellcheck disable=SC2086 if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then # Install python-libcloud if asked to __PACKAGES="${__PACKAGES} python-libcloud" fi + # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then @@ -5530,7 +5530,7 @@ if [ "$DAEMONS_RUNNING_FUNC" != "null" ] && [ $_START_DAEMONS -eq $BS_TRUE ]; th fi - [ ! "$_SALT_ETC_DIR/$fname" ] && [ $fname != "syndic" ] && echodebug "$_SALT_ETC_DIR/$fname does not exist" + [ ! -f "$_SALT_ETC_DIR/$fname" ] && [ $fname != "syndic" ] && echodebug "$_SALT_ETC_DIR/$fname does not exist" echodebug "Running salt-$fname by hand outputs: $(nohup salt-$fname -l debug)" From 35f39898a9e0b13dfffe2913e1db44f10bda08b6 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 4 Nov 2015 12:29:31 +0000 Subject: [PATCH 37/37] Bump version for stable release --- ChangeLog | 2 +- bootstrap-salt.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c2189f6..af9a9bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Version 2015.xx.xx: +Version 2015.11.04: * Allow bypassing dependencies installation. Thanks EYJ. #656. * Add FreeBSD 11 support. Thanks Chris Buechler(cbuechler). #653 * Move RHEL installations to use repo.saltstack.com #674 diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 50193f8..cb6d88b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -17,7 +17,7 @@ # CREATED: 10/15/2012 09:49:37 PM WEST #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2015.08.06" +__ScriptVersion="2015.11.04" __ScriptName="bootstrap-salt.sh" #======================================================================================================================