Also support Salt's setup.py global options

This commit is contained in:
Pedro Algarvio 2015-07-16 21:13:20 +01:00
parent 8a9772efe0
commit 78bea9a2f2

View file

@ -1910,7 +1910,8 @@ install_ubuntu_daily() {
install_ubuntu_git() {
if [ -f "${__SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then
python setup.py install --install-layout=deb --salt-config-dir="$_SALT_ETC_DIR" || return 1
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
else
python setup.py install --install-layout=deb || return 1
fi
@ -2476,7 +2477,8 @@ 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" || return 1
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
else
python setup.py install --install-layout=deb || return 1
fi
@ -2521,7 +2523,7 @@ install_debian_git_post() {
if [ -f "${__SALT_GIT_CHECKOUT_DIR}/debian/salt-$fname.init" ]; then
copyfile "${__SALT_GIT_CHECKOUT_DIR}/debian/salt-$fname.init" "/etc/init.d/salt-$fname"
else
__fetch_url "/etc/init.d/salt-$fname" "http://anonscm.debian.org/cgit/pkg-salt/salt.git/plain/debian/salt-${fname}.init"
__fetch_url "/etc/init.d/salt-$fname" "http://anonscm.debian.org/cgit/pkg-salt/salt.git/plain/debian/salt-${fname}.init"
fi
if [ ! -f "/etc/init.d/salt-$fname" ]; then
echowarn "The init script for salt-$fname was not found, skipping it..."
@ -2678,7 +2680,8 @@ install_fedora_git_deps() {
install_fedora_git() {
if [ -f "${__SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then
python setup.py install --salt-config-dir="$_SALT_ETC_DIR" || return 1
python setup.py install --salt-config-dir="$_SALT_ETC_DIR" || \
python setup.py --salt-config-dir="$_SALT_ETC_DIR" install || return 1
else
python setup.py install || return 1
fi
@ -3002,7 +3005,8 @@ install_centos_git() {
_PYEXE=python2
fi
if [ -f "${__SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then
$_PYEXE setup.py install --salt-config-dir="$_SALT_ETC_DIR" || return 1
$_PYEXE setup.py install --salt-config-dir="$_SALT_ETC_DIR" || \
$_PYEXE setup.py --salt-config-dir="$_SALT_ETC_DIR" install || return 1
else
$_PYEXE setup.py install || return 1
fi
@ -3765,7 +3769,8 @@ install_arch_linux_stable() {
install_arch_linux_git() {
if [ -f "${__SALT_GIT_CHECKOUT_DIR}/salt/syspaths.py" ]; then
python2 setup.py install --salt-config-dir="$_SALT_ETC_DIR" || return 1
python2 setup.py install --salt-config-dir="$_SALT_ETC_DIR" || \
python2 setup.py --salt-config-dir="$_SALT_ETC_DIR" install || return 1
else
python2 setup.py install || return 1
fi
@ -4079,6 +4084,17 @@ install_freebsd_git() {
--salt-base-master-roots-dir="${_SALT_ETC_DIR}/salt-master" \
--salt-logs-dir=/var/log/salt \
--salt-pidfile-dir=/var/run \
|| /usr/local/bin/python2 setup.py \
--salt-root-dir=/usr/local \
--salt-config-dir="${_SALT_ETC_DIR}" \
--salt-cache-dir=/var/cache/salt \
--salt-sock-dir=/var/run/salt \
--salt-srv-root-dir=/srv \
--salt-base-file-roots-dir="${_SALT_ETC_DIR}/states" \
--salt-base-pillar-roots-dir="${_SALT_ETC_DIR}/pillar" \
--salt-base-master-roots-dir="${_SALT_ETC_DIR}/salt-master" \
--salt-logs-dir=/var/log/salt \
--salt-pidfile-dir=/var/run install \
|| return 1
fi
@ -4231,7 +4247,8 @@ install_smartos_stable() {
install_smartos_git() {
# Use setuptools in order to also install dependencies
# lets force our config path on the setup for now, since salt/syspaths.py only got fixed in 2015.5.0
+++ USE_SETUPTOOLS=1 /opt/local/bin/python setup.py install --salt-config-dir="$_SALT_ETC_DIR" || USE_SETUPTOOLS=1 /opt/local/bin/python setup.py --salt-config-dir="$_SALT_ETC_DIR" install || return 1
USE_SETUPTOOLS=1 /opt/local/bin/python setup.py install --salt-config-dir="$_SALT_ETC_DIR" || \
USE_SETUPTOOLS=1 /opt/local/bin/python setup.py --salt-config-dir="$_SALT_ETC_DIR" install || return 1
return 0
}