From 1460db5d232f2483e0c513c7a709f1a1067dad11 Mon Sep 17 00:00:00 2001 From: Paul Tonelli Date: Tue, 9 Dec 2014 14:18:41 +0100 Subject: [PATCH 01/20] Force install of wget in debian --- bootstrap-salt.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index c9a1f78cf..13f5dd53c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1993,6 +1993,9 @@ install_debian_6_deps() { apt-get update + # Make sure wget is available + __apt_get_install_noinput wget + # Install Keys __apt_get_install_noinput debian-archive-keyring && apt-get update @@ -2090,6 +2093,10 @@ install_debian_7_deps() { export DEBIAN_FRONTEND=noninteractive apt-get update + + # Make sure wget is available + __apt_get_install_noinput wget + # Install Keys __apt_get_install_noinput debian-archive-keyring && apt-get update From 352f419db9fba12ec5d168676c8e1bf5bc73f868 Mon Sep 17 00:00:00 2001 From: William Date: Sun, 14 Dec 2014 10:36:56 -0800 Subject: [PATCH 02/20] Make -U work for FreeBSD When using http://files.wunki.org/freebsd-9.2-amd64-wunki.box or http://files.wunki.org/freebsd-10.0-amd64-wunki.box with Vagrant, bootstrap would succeed, but a number of states would fail without a package upgrade prior to running highstate. The -U switch currently does not trigger an upgrade when bootstraping FreeBSD. This patch adds a package upgrade to the end of the FreeBSD dependency install function. --- bootstrap-salt.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index bd20267eb..456f9e562 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3623,6 +3623,10 @@ install_freebsd_9_stable_deps() { /usr/local/sbin/pkg install ${SALT_PKG_FLAGS} -y ${_EXTRA_PACKAGES} || return 1 fi + if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then + pkg upgrade -y || return 1 + fi + return 0 } From c805e81f5782a7aade985f696059180b2e044c6e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 16 Dec 2014 14:34:03 +0000 Subject: [PATCH 03/20] Only try to install and/or start systemd services if `/bin/systemctl` exists Fixes #515 Fixes #521 Closes #520 --- bootstrap-salt.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index bd20267eb..a7a7b5edd 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2729,15 +2729,19 @@ install_centos_git_post() { [ $fname = "api" ] && ([ "$_INSTALL_MASTER" -eq $BS_FALSE ] || [ "$(which salt-${fname} 2>/dev/null)" = "" ]) && continue [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue - if [ ! -f /usr/lib/systemd/system/salt-${fname}.service ] || ([ -f /usr/lib/systemd/system/salt-${fname}.service ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then - copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" /usr/lib/systemd/system/ + if [ -f /bin/systemctl ]; then + if [ ! -f /usr/lib/systemd/system/salt-${fname}.service ] || ([ -f /usr/lib/systemd/system/salt-${fname}.service ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then + copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" /usr/lib/systemd/system/ - # Skip salt-api since the service should be opt-in and not necessarily started on boot - [ $fname = "api" ] && continue + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + + /bin/systemctl enable salt-${fname}.service + SYSTEMD_RELOAD=$BS_TRUE + fi + continue - /bin/systemctl enable salt-${fname}.service - SYSTEMD_RELOAD=$BS_TRUE - elif [ ! -f /usr/lib/systemd/system/salt-${fname}.service ] && [ ! -f /etc/init.d/salt-$fname ] || ([ -f /etc/init.d/salt-$fname ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then + elif [ ! -f /etc/init.d/salt-$fname ] || ([ -f /etc/init.d/salt-$fname ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}" /etc/init.d/ chmod +x /etc/init.d/salt-${fname} From 70cb7f82d65ceaed61b57abb135d727a838801c1 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 16 Dec 2014 14:39:56 +0000 Subject: [PATCH 04/20] Better scope --- bootstrap-salt.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a7a7b5edd..bc6c5eb93 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2732,14 +2732,13 @@ install_centos_git_post() { if [ -f /bin/systemctl ]; then if [ ! -f /usr/lib/systemd/system/salt-${fname}.service ] || ([ -f /usr/lib/systemd/system/salt-${fname}.service ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" /usr/lib/systemd/system/ + fi - # Skip salt-api since the service should be opt-in and not necessarily started on boot - [ $fname = "api" ] && continue + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue - /bin/systemctl enable salt-${fname}.service - SYSTEMD_RELOAD=$BS_TRUE - fi - continue + /bin/systemctl enable salt-${fname}.service + SYSTEMD_RELOAD=$BS_TRUE elif [ ! -f /etc/init.d/salt-$fname ] || ([ -f /etc/init.d/salt-$fname ] && [ $_FORCE_OVERWRITE -eq $BS_TRUE ]); then copyfile "${__SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}" /etc/init.d/ From a9fea1fd1428681abc96895a87732b6af526f079 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 24 Dec 2014 01:54:41 +0000 Subject: [PATCH 05/20] Update changes log --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index dfa52004c..5af080d2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Version 2014.xx.xx: + * Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl). + Version 2014.12.11: * Enable binary installations on CentOS 7. Thanks ggillies * Updated the URL for EPEL 7 From 23db04eb09ba9de502f1bb796b9213d6bfb34333 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 26 Dec 2014 21:06:59 +0000 Subject: [PATCH 06/20] Add information regarding FreeBSD SSL issues. --- README.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.rst b/README.rst index 0584e914a..53752965a 100644 --- a/README.rst +++ b/README.rst @@ -86,6 +86,12 @@ have ``fetch`` available though: fetch -o install_salt.sh https://bootstrap.saltstack.com sudo sh install_salt.sh +If you have any SSL issues install ``ca_root_nssp``: + +..code:: console + + pkg install ca_root_nssp + If all you want is to install a ``salt-master`` using latest git: From c3859abdb6a7cab40998864c3f8494ebb91a83bc Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 27 Dec 2014 01:11:10 +0000 Subject: [PATCH 07/20] Add the remaining certificates information, `cp` or `ln` --- README.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.rst b/README.rst index 53752965a..7f0795335 100644 --- a/README.rst +++ b/README.rst @@ -92,6 +92,18 @@ If you have any SSL issues install ``ca_root_nssp``: pkg install ca_root_nssp +And either copy the certificates to the place where fetch can find them: + +..code:: console + + cp /usr/local/share/certs/ca-root-nss.crt /etc/ssl/cert.pem + +Or link them to the right place: + +..code:: console + + ln -s /usr/local/share/certs/ca-root-nss.crt /etc/ssl/cert.pem + If all you want is to install a ``salt-master`` using latest git: From 0b63844ec3d21889d19e07d59d53c4f7d97de46b Mon Sep 17 00:00:00 2001 From: Callum Macdonald Date: Mon, 29 Dec 2014 21:15:10 +0100 Subject: [PATCH 08/20] Minr grammar typo --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 7f0795335..bb05bf7e5 100644 --- a/README.rst +++ b/README.rst @@ -11,7 +11,7 @@ install the `Salt`_ binaries using the appropriate methods. .. Note:: - This ``README`` file is not the absolute truth to what the bootstrap script is capable to do, for + 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`_. From 3ffdb8d05dd062beec7e2784c3dbe01b9df74afd Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 31 Dec 2014 00:59:45 +0000 Subject: [PATCH 09/20] Add @ptonelli to AUTHORS --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index abd417b83..5c6becce0 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -48,6 +48,7 @@ Paul Brian lifeisstillgood paul@mikadosoftware.com Pavel Snagovsky paha Pedro Algarvio s0undt3ch pedro@algarvio.me Pedro Paulo pedropaulovc +ptonelli ptonelli Raymond Barbiero visualphoenix Roberto Aguilar rca roberto@baremetal.io Skyler Berg skylerberg skylertheberg@gmail.com From 7ef3a40bcf4a1ea068cbcf52c25ff16b9b496580 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 6 Jan 2015 11:31:37 -0700 Subject: [PATCH 10/20] Do a pacman db upgrade before installing deps --- bootstrap-salt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 92b6d678a..d14ffe992 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3372,6 +3372,8 @@ install_amazon_linux_ami_testing_post() { # install_arch_linux_stable_deps() { + pacman-db-upgrade + if [ ! -f /etc/pacman.d/gnupg ]; then pacman-key --init && pacman-key --populate archlinux || return 1 fi From 5b5733a537a0bf4d34086281d3e606713f20f108 Mon Sep 17 00:00:00 2001 From: Mike Place Date: Tue, 6 Jan 2015 12:05:10 -0700 Subject: [PATCH 11/20] We need python-hashlib to use the copr repos on old centos --- bootstrap-salt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 92b6d678a..84f5c433e 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2577,6 +2577,7 @@ install_centos_stable_deps() { __install_epel_repository || return 1 if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]; then + yum -y install python-hashlib || return 1 __install_saltstack_copr_zeromq_repository || return 1 fi From ccf97c442c03d6a40cadde076f6dffa1e7b949d1 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 7 Jan 2015 00:58:53 +0000 Subject: [PATCH 12/20] Add Mike Place(@cachedout) to AUTHORS --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index 5c6becce0..3dc80c8bd 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -42,6 +42,7 @@ Matthew Mead-Briggs mattmb Matthew Willson ixela Matthieu Guegan mguegan Mike Carlson m87carlson mike@bayphoto.com +Mike Place cachedout mp@saltstack.com nevins-b nevins-b Niels Abspoel aboe76 Paul Brian lifeisstillgood paul@mikadosoftware.com From 5f20164e99af0c4c848e87713e9640b2aea89f63 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 7 Jan 2015 00:59:23 +0000 Subject: [PATCH 13/20] Update changes log --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5af080d2b..d196d8e2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ Version 2014.xx.xx: * Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl). + * Make sure wget is installed on debian bare systems. + * Make sure the Arch pacman database is up to date Version 2014.12.11: * Enable binary installations on CentOS 7. Thanks ggillies From 52736d496ba8fcf241cd3414ff52e03382206f5d Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 7 Jan 2015 01:04:52 +0000 Subject: [PATCH 14/20] Minor checks agains the pacman db upgrade --- bootstrap-salt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 005bd21e0..b0c489e1b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3380,7 +3380,9 @@ install_amazon_linux_ami_testing_post() { # install_arch_linux_stable_deps() { - pacman-db-upgrade + if [ "$(which pacman-db-upgrade)" != "" ]; then + pacman-db-upgrade || return 1 + fi if [ ! -f /etc/pacman.d/gnupg ]; then pacman-key --init && pacman-key --populate archlinux || return 1 From 20cbbcafc7da6f9e477c705744dc0bafc991d709 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 7 Jan 2015 01:11:31 +0000 Subject: [PATCH 15/20] Update changes log --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index d196d8e2f..90fd8a763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Version 2014.xx.xx: * Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl). * Make sure wget is installed on debian bare systems. * Make sure the Arch pacman database is up to date + * Install `python-hashlib` in CentOS 5 in order to use the COPR repository Version 2014.12.11: * Enable binary installations on CentOS 7. Thanks ggillies From b8244d24ea3503980241b0aa8d1a2e83abe85650 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 7 Jan 2015 01:28:32 +0000 Subject: [PATCH 16/20] The DB upgrade must be done after key initialization --- bootstrap-salt.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b0c489e1b..18ddbd172 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3380,14 +3380,14 @@ install_amazon_linux_ami_testing_post() { # install_arch_linux_stable_deps() { - if [ "$(which pacman-db-upgrade)" != "" ]; then - pacman-db-upgrade || return 1 - fi - if [ ! -f /etc/pacman.d/gnupg ]; then pacman-key --init && pacman-key --populate archlinux || return 1 fi + if [ "$(which pacman-db-upgrade)" != "" ]; then + pacman-db-upgrade || return 1 + fi + if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then pacman -Syyu --noconfirm --needed || return 1 fi From 945d397de433d034e54af9e2f043e1b42a60de1a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 7 Jan 2015 02:36:36 +0000 Subject: [PATCH 17/20] Remove invalid option --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 18ddbd172..33907903c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3409,7 +3409,7 @@ install_arch_linux_git_deps() { pacman -Sy --noconfirm --needed pacman || return 1 # Don't fail if un-installing python2-distribute threw an error - pacman -R --noconfirm --needed python2-distribute + pacman -R --noconfirm python2-distribute pacman -Sy --noconfirm --needed git python2-crypto python2-setuptools python2-jinja \ python2-m2crypto python2-markupsafe python2-msgpack python2-psutil python2-yaml \ python2-pyzmq zeromq python2-requests python2-systemd || return 1 From d842386d27525e4aac834809b5d8ef939976b92e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 7 Jan 2015 02:37:26 +0000 Subject: [PATCH 18/20] Update pacman if needed for stable bootstraps --- bootstrap-salt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 33907903c..d58fbf601 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3388,6 +3388,8 @@ install_arch_linux_stable_deps() { pacman-db-upgrade || return 1 fi + pacman -Sy --noconfirm --needed pacman || return 1 + if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then pacman -Syyu --noconfirm --needed || return 1 fi @@ -3407,7 +3409,6 @@ install_arch_linux_stable_deps() { install_arch_linux_git_deps() { install_arch_linux_stable_deps - pacman -Sy --noconfirm --needed pacman || return 1 # Don't fail if un-installing python2-distribute threw an error pacman -R --noconfirm python2-distribute pacman -Sy --noconfirm --needed git python2-crypto python2-setuptools python2-jinja \ From e489010c3da805df4cc14e0d346d1286f361de2e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 7 Jan 2015 03:01:23 +0000 Subject: [PATCH 19/20] Upgrade the database after upgrading pacman --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index d58fbf601..75e63f5fc 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3384,12 +3384,12 @@ install_arch_linux_stable_deps() { pacman-key --init && pacman-key --populate archlinux || return 1 fi + pacman -Sy --noconfirm --needed pacman || return 1 + if [ "$(which pacman-db-upgrade)" != "" ]; then pacman-db-upgrade || return 1 fi - pacman -Sy --noconfirm --needed pacman || return 1 - if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then pacman -Syyu --noconfirm --needed || return 1 fi From e95f1a37260bfdfa86743259d9df4e817d909350 Mon Sep 17 00:00:00 2001 From: rallytime Date: Mon, 12 Jan 2015 15:09:00 -0700 Subject: [PATCH 20/20] Update version number for stable release --- ChangeLog | 2 +- bootstrap-salt.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90fd8a763..2d5bab309 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Version 2014.xx.xx: +Version 2015.01.12: * Add package upgrades support to FreeBSD. Thanks William Eshagh(eshagl). * Make sure wget is installed on debian bare systems. * Make sure the Arch pacman database is up to date diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 75e63f5fc..24975f11f 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="2014.12.11" +__ScriptVersion="2015.01.12" __ScriptName="bootstrap-salt.sh" #======================================================================================================================