Skip to content

Commit 50de0fd

Browse files
committed
Merge branch 'develop' into stable for v2014.10.21
2 parents 322f438 + adee423 commit 50de0fd

3 files changed

Lines changed: 56 additions & 11 deletions

File tree

AUTHORS.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ Gregory Meno GregMeno gregory.meno@inktank.com
2727
Guillaume Derval GuillaumeDerval guillaume@guillaumederval.be
2828
gweis gweis
2929
Henrik Holmboe holmboe
30+
Howard Mei HowardMei howardleomei@gmail.com
3031
Jeff Hui jeffh jeff@jeffhui.net
3132
Jeff Strunk jstrunk
3233
Juan A. Moyano wincus wincus.public@gmail.com
3334
Karl Grzeszczak karlgrz
3435
Kenneth Wilke KennethWilke
3536
Liu Xiaohui oreh herolxh@gmail.com
37+
markgaylard markgaylard
3638
Matthew Garrett cingeyedog matt@clemson.edu
3739
Matthew Mead-Briggs mattmb
3840
Matthew Willson ixela
@@ -41,6 +43,7 @@ Mike Carlson m87carlson mike@bayphoto.com
4143
nevins-b nevins-b
4244
Niels Abspoel aboe76
4345
Paul Brian lifeisstillgood paul@mikadosoftware.com
46+
Pavel Snagovsky paha
4447
Pedro Algarvio s0undt3ch pedro@algarvio.me
4548
Pedro Paulo pedropaulovc
4649
Raymond Barbiero visualphoenix

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Version 2014.10.21:
2+
* Fix path to python on FreeBSD. Thanks Pavel Snagovsky(paha)
3+
* Fix syndic installation on RHEL based installations. Thanks markgaylard
4+
* Properly detect the git checkout `basename` directory instead of hard coding it. Thanks
5+
Howard Mei(HowardMei).
6+
* Allow installing ZMQ for SaltStack's COPR repository.
7+
* Allow installing ZMQ4/PyZMQ14 from Chris Lea's PPA repository.
8+
19
Version 2014.10.14:
210
* Fixed a regex issue with matching Salt's tags. Match v2014.7 but not 2014.7 as a valid tag
311
* Distro Support Added:

bootstrap-salt.sh

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
# CREATED: 10/15/2012 09:49:37 PM WEST
1818
#======================================================================================================================
1919
set -o nounset # Treat unset variables as an error
20-
__ScriptVersion="2014.10.14"
20+
21+
__ScriptVersion="2014.10.21"
2122
__ScriptName="bootstrap-salt.sh"
2223

2324
#======================================================================================================================
@@ -202,6 +203,7 @@ _INSECURE_DL=${BS_INSECURE_DL:-$BS_FALSE}
202203
_WGET_ARGS=${BS_WGET_ARGS:-}
203204
_CURL_ARGS=${BS_CURL_ARGS:-}
204205
_FETCH_ARGS=${BS_FETCH_ARGS:-}
206+
_ENABLE_EXTERNAL_ZMQ_REPOS=${BS_ENABLE_EXTERNAL_ZMQ_REPOS:-$BS_FALSE}
205207
_SALT_MASTER_ADDRESS=${BS_SALT_MASTER_ADDRESS:-null}
206208
_SALT_MINION_ID="null"
207209
# __SIMPLIFY_VERSION is mostly used in Solaris based distributions
@@ -271,12 +273,13 @@ usage() {
271273
-p Extra-package to install while installing salt dependencies. One package
272274
per -p flag. You're responsible for providing the proper package name.
273275
-H Use the specified http proxy for the installation
276+
-Z Enable external software source for newer ZeroMQ(Only available for RHEL/CentOS/Fedora based distributions)
274277
275278
EOT
276279
} # ---------- end of function usage ----------
277280

278281

279-
while getopts ":hvnDc:g:k:MSNXCPFUKIA:i:Lp:H:" opt
282+
while getopts ":hvnDc:g:k:MSNXCPFUKIA:i:Lp:H:Z" opt
280283
do
281284
case "${opt}" in
282285

@@ -319,6 +322,7 @@ do
319322
L ) _INSTALL_CLOUD=$BS_TRUE ;;
320323
p ) _EXTRA_PACKAGES="$_EXTRA_PACKAGES $OPTARG" ;;
321324
H ) _HTTP_PROXY="$OPTARG" ;;
325+
Z) _ENABLE_EXTERNAL_ZMQ_REPOS=$BS_TRUE ;;
322326

323327

324328
\?) echo
@@ -1124,7 +1128,10 @@ __git_clone_and_checkout() {
11241128

11251129
echodebug "Installed git version: $(git --version | awk '{ print $3 }')"
11261130

1127-
__SALT_GIT_CHECKOUT_PARENT_DIR=$(dirname "${__SALT_GIT_CHECKOUT_DIR}")
1131+
local __SALT_GIT_CHECKOUT_PARENT_DIR=$(dirname "${__SALT_GIT_CHECKOUT_DIR}" 2>/dev/null)
1132+
__SALT_GIT_CHECKOUT_PARENT_DIR="${__SALT_GIT_CHECKOUT_PARENT_DIR:-/tmp/git}"
1133+
local __SALT_CHECKOUT_REPONAME="$(basename "${__SALT_GIT_CHECKOUT_DIR}" 2>/dev/null)"
1134+
__SALT_CHECKOUT_REPONAME="${__SALT_CHECKOUT_REPONAME:-salt}"
11281135
[ -d "${__SALT_GIT_CHECKOUT_PARENT_DIR}" ] || mkdir "${__SALT_GIT_CHECKOUT_PARENT_DIR}"
11291136
cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}"
11301137
if [ -d "${__SALT_GIT_CHECKOUT_DIR}" ]; then
@@ -1170,25 +1177,25 @@ __git_clone_and_checkout() {
11701177
if [ "$(git clone --help | grep 'single-branch')" != "" ]; then
11711178
# The "--single-branch" option is supported, attempt shallow cloning
11721179
echoinfo "Attempting to shallow clone $GIT_REV from Salt's repository ${_SALT_REPO_URL}"
1173-
git clone --depth 1 --branch "$GIT_REV" "$_SALT_REPO_URL"
1180+
git clone --depth 1 --branch "$GIT_REV" "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME"
11741181
if [ $? -eq 0 ]; then
11751182
cd "${__SALT_GIT_CHECKOUT_DIR}"
11761183
__SHALLOW_CLONE="${BS_TRUE}"
11771184
else
11781185
# Shallow clone above failed(missing upstream tags???), let's resume the old behaviour.
11791186
echowarn "Failed to shallow clone."
11801187
echoinfo "Resuming regular git clone and remote SaltStack repository addition procedure"
1181-
git clone "$_SALT_REPO_URL" || return 1
1188+
git clone "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME" || return 1
11821189
cd "${__SALT_GIT_CHECKOUT_DIR}"
11831190
fi
11841191
else
11851192
echodebug "Shallow cloning not possible. Required git version not met."
1186-
git clone "$_SALT_REPO_URL" || return 1
1193+
git clone "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME" || return 1
11871194
cd "${__SALT_GIT_CHECKOUT_DIR}"
11881195
fi
11891196
else
11901197
echowarn "The git revision being installed does not match a Salt version tag. Shallow cloning disabled"
1191-
git clone "$_SALT_REPO_URL" || return 1
1198+
git clone "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME" || return 1
11921199
cd "${__SALT_GIT_CHECKOUT_DIR}"
11931200
fi
11941201

@@ -1540,7 +1547,7 @@ __check_services_debian() {
15401547
servicename=$1
15411548
echodebug "Checking if service ${servicename} is enabled"
15421549

1543-
# shellcheck disable=SC2086,SC2046
1550+
# shellcheck disable=SC2086,SC2046,SC2144
15441551
if [ -f /etc/rc$(runlevel | awk '{ print $2 }').d/S*${servicename} ]; then
15451552
echodebug "Service ${servicename} is enabled"
15461553
return 0
@@ -1695,6 +1702,10 @@ install_ubuntu_deps() {
16951702
__apt_get_install_noinput python-apt
16961703

16971704
if [ "$DISTRO_MAJOR_VERSION" -gt 12 ] || ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -gt 03 ]); then
1705+
if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]; then
1706+
echoinfo "Installing ZMQ>=4/PyZMQ>=14 from Chris Lea's PPA repository"
1707+
add-apt-repository -y ppa:chris-lea/zeromq || return 1
1708+
fi
16981709
__apt_get_install_noinput python-requests
16991710
__PIP_PACKAGES=""
17001711
else
@@ -2360,6 +2371,10 @@ install_debian_check_services() {
23602371
# Fedora Install Functions
23612372
#
23622373
install_fedora_deps() {
2374+
if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]; then
2375+
__install_saltstack_copr_zeromq_repository || return 1
2376+
fi
2377+
23632378
__PACKAGES="yum-utils PyYAML libyaml m2crypto python-crypto python-jinja2 python-msgpack python-zmq python-requests"
23642379

23652380
if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then
@@ -2531,9 +2546,28 @@ __install_epel_repository() {
25312546
return 0
25322547
}
25332548

2549+
__install_saltstack_copr_zeromq_repository() {
2550+
echoinfo "Installing Zeromq >=4 and PyZMQ>=14 from SaltStack's COPR repository"
2551+
if [ ! -f /etc/yum.repos.d/saltstack-zeromq4.repo ]; then
2552+
if [ "${DISTRO_NAME_L}" = "fedora" ]; then
2553+
__REPOTYPE="${DISTRO_NAME_L}"
2554+
else
2555+
__REPOTYPE="epel"
2556+
fi
2557+
wget -O /etc/yum.repos.d/saltstack-zeromq4.repo \
2558+
"https://copr.fedoraproject.org/coprs/saltstack/zeromq4/repo/${__REPOTYPE}-${DISTRO_MAJOR_VERSION}/saltstack-zeromq4-${__REPOTYPE}-${DISTRO_MAJOR_VERSION}.repo" || return 1
2559+
fi
2560+
return 0
2561+
}
2562+
2563+
25342564
install_centos_stable_deps() {
25352565
__install_epel_repository || return 1
25362566

2567+
if [ "$_ENABLE_EXTERNAL_ZMQ_REPOS" -eq $BS_TRUE ]; then
2568+
__install_saltstack_copr_zeromq_repository || return 1
2569+
fi
2570+
25372571
if [ "$_UPGRADE_SYS" -eq $BS_TRUE ]; then
25382572
yum -y update || return 1
25392573
fi
@@ -2674,7 +2708,7 @@ install_centos_git() {
26742708
}
26752709

26762710
install_centos_git_post() {
2677-
for fname in minion master minion api; do
2711+
for fname in minion master syndic api; do
26782712

26792713
# Skip if not meant to be installed
26802714
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
@@ -3656,9 +3690,9 @@ install_freebsd_git() {
36563690
# Install from git
36573691
if [ ! -f salt/syspaths.py ]; then
36583692
# We still can't provide the system paths, salt 0.16.x
3659-
/usr/local/bin/python setup.py install || return 1
3693+
/usr/local/bin/python2 setup.py install || return 1
36603694
else
3661-
/usr/local/bin/python setup.py install \
3695+
/usr/local/bin/python2 setup.py install \
36623696
--salt-root-dir=/usr/local \
36633697
--salt-config-dir="${_SALT_ETC_DIR}" \
36643698
--salt-cache-dir=/var/cache/salt \

0 commit comments

Comments
 (0)