Merge remote-tracking branch 'refs/remotes/saltstack/2015.8' into winrepo_typo

This commit is contained in:
Gunther Stengl 2015-12-27 15:17:54 +01:00
commit e47db1a076
33 changed files with 2298 additions and 1138 deletions

View file

@ -4,7 +4,7 @@
Full list of builtin serializers
================================
.. currentmodule:: salt.output
.. currentmodule:: salt.serializers
.. autosummary::
:toctree:

183
pkg/osx/build.sh Normal file → Executable file
View file

@ -1,10 +1,64 @@
#!/bin/bash
############################################################################
#
# Title: Build Salt Script for OSX
# Authors: CR Oldham, Shane Lee
# Date: December 2015
#
# Description: This script downloads and installs all dependencies and build
# tools required to create a .pkg file for installation on OSX.
# Salt and all dependencies will be installed to /opt/salt. A
# .pkg file will then be created based on the contents of
# /opt/salt
#
# Requirements:
# - XCode Command Line Tools (xcode-select --install)
#
# Usage:
# This script can be passed 3 parameters
# $1 : <package dir> : the staging area for the package
# defaults to /tmp/salt-pkg
# $2 : <version> : the version of salt to build
# (a git tag, not a branch)
# (defaults to git-repo state)
#
# Example:
# The following will build Salt v2015.8.3 and stage all files
# in /tmp/pkg:
#
# ./build.sh /tmp/pkg v2015.8.3
#
############################################################################
# Usage
# ./build.sh <package dir> <version to build> <git tag>
echo -n -e "\033]0;Build: Variables\007"
SRCDIR=`pwd`
############################################################################
# Check passed parameters, set defaults
############################################################################
if [ "$1" == "" ]; then
PKGDIR=/tmp/pkg
else
PKGDIR=$1
fi
if [ "$2" == "" ]; then
VERSION=`git describe`
else
VERSION=$2
fi
############################################################################
# Additional Parameters Required for the script to function properly
############################################################################
SRCDIR=`git rev-parse --show-toplevel`
PKGRESOURCES=$SRCDIR/pkg/osx
############################################################################
# Make sure this is the Salt Repository
############################################################################
if [[ ! -e "$SRCDIR/.git" ]] && [[ ! -e "$SRCDIR/scripts/salt" ]]; then
echo "This directory doesn't appear to be a git repository."
echo "The OS X build process needs some files from a Git checkout of Salt."
@ -12,116 +66,23 @@ if [[ ! -e "$SRCDIR/.git" ]] && [[ ! -e "$SRCDIR/scripts/salt" ]]; then
exit -1
fi
PKGDIR=$1
rm -rf build
mkdir -p build
BUILDDIR=`pwd`/build
PKGRESOURCES=$SRCDIR/pkg/osx
mkdir -p /opt/salt/python
cd $BUILDDIR
echo "-------- Retrieving libsodium"
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.2.tar.gz
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.2.tar.gz.sig
echo "-------- Verifying PGP signature"
gpg --keyserver pgp.mit.edu --recv-key 2B6F76DA
gpg --verify libsodium-1.0.2.tar.gz.sig
echo "-------- Building libsodium"
tar -xvf libsodium-1.0.2.tar.gz
cd libsodium-1.0.2
./configure --prefix=/opt/salt/python
make
make check
make install
cd $BUILDDIR
echo "-------- Retrieving zeromq"
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
wget http://download.zeromq.org/SHA1SUMS
echo "-------- Building zeromq"
tar -zxvf zeromq-4.0.5.tar.gz
cd zeromq-4.0.5
./configure --prefix=/opt/salt/python
make
make check
make install
cd $BUILDDIR
echo "-------- Retrieving SWIG 3.0.4"
# SWIG
wget http://downloads.sourceforge.net/project/swig/swig/swig-3.0.4/swig-3.0.4.tar.gz
echo "-------- Building SWIG 3.0.4"
tar -zxvf swig-3.0.4.tar.gz
cd swig-3.0.4
./configure --prefix=/opt/salt/python
make
make install
export PATH=/opt/salt/python/bin:$PATH
echo "-------- Installing Salt dependencies with pip"
pip install -r $PKGRESOURCES/requirements.txt
# if $3 exists it will be a git reference, install with pip install git+
# otherwise install with pip install salt==
echo "-------- Installing Salt into the virtualenv"
if [ "$3" == "" ]; then
pip install salt==$2
else
e pip install $3
fi
cd /opt/salt/python/bin
mkdir -p /opt/salt/bin
for f in /opt/salt/python/bin/salt-* do
ln -s $f /opt/salt/bin
done
cp $PKGRESOURCES/scripts/start-*.sh /opt/salt/bin
mkdir -p $PKGDIR/opt
cp -r /opt/salt $PKGDIR/opt
mkdir -p $PKGDIR/Library/LaunchDaemons $PKGDIR/etc
cp $PKGRESOURCES/scripts/com.saltstack.salt.minion.plist $PKGDIR/Library/LaunchDaemons
cp $PKGRESOURCES/scripts/com.saltstack.salt.master.plist $PKGDIR/Library/LaunchDaemons
cp $PKGRESOURCES/scripts/com.saltstack.salt.syndic.plist $PKGDIR/Library/LaunchDaemons
cp $PKGRESOURCES/scripts/com.saltstack.salt.api.plist $PKGDIR/Library/LaunchDaemons
cp $SRCDIR/conf/minion $PKGDIR/etc/salt/minion.dist
cp $SRCDIR/conf/master $PKGDIR/etc/salt/master.dist
cd $PKGRESOURCES
cp distribution.xml.dist distribution.xml
SEDSTR="s/@VERSION@/$2/"
echo $SEDSTR
sed -i '' $SEDSTR distribution.xml
pkgbuild --root $PKGDIR --identifier=com.saltstack.salt --version=$2 --ownership=recommended salt-src-$2.pkg
productbuild --resources=$PKGDIR --distribution=distribution.xml --package-path=salt-src-$2.pkg --version=$2 salt-$2.pkg
############################################################################
# Create the Build Environment
############################################################################
echo -n -e "\033]0;Build: Build Environment\007"
source $PKGRESOURCES/build_env.sh
# copy the wrapper script to /opt/salt/bin
# ln -s all the different wrapper names to that script
# Copy the launchd plists to $1/Library/LaunchDaemons
# Copy the sample config files to $1/etc
# pkgbuild and productbuild will use $2 to name files.
#pkgbuild
#productbuild
# Q.E.D.
############################################################################
# Install Salt
############################################################################
echo -n -e "\033]0;Build: Install Salt\007"
sudo /opt/salt/bin/python $SRCDIR/setup.py install
############################################################################
# Build Package
############################################################################
echo -n -e "\033]0;Build: Package Salt\007"
source $PKGRESOURCES/build_pkg.sh $PKGDIR $VERSION

336
pkg/osx/build_env.sh Executable file
View file

@ -0,0 +1,336 @@
#!/bin/bash
############################################################################
#
# Title: Build Environment Script for OSX
# Authors: CR Oldham, Shane Lee
# Date: December 2015
#
# Description: This script sets up a build environment for salt on OSX.
#
# Requirements:
# - XCode Command Line Tools (xcode-select --install)
#
# Usage:
# This script is not passed any parameters
#
# Example:
# The following will set up a build environment for salt on OSX
#
# ./dev_env.sh
#
############################################################################
trap 'quit_on_error $LINENO $BASH_COMMAND' ERR
quit_on_error() {
echo "$(basename $0) caught error on line : $1 command was: $2"
exit -1
}
############################################################################
# Parameters Required for the script to function properly
############################################################################
echo -n -e "\033]0;Build_Evn: Variables\007"
# This is needed to allow the some test suites (zmq) to pass
ulimit -n 1200
SRCDIR=`git rev-parse --show-toplevel`
SCRIPTDIR=`pwd`
SHADIR=$SCRIPTDIR/shasums
PKG_CONFIG_PATH=/opt/salt/lib/pkgconfig
CFLAGS="-I/opt/salt/include"
LDFLAGS="-L/opt/salt/lib"
############################################################################
# Determine Which XCode is being used (XCode or XCode Command Line Tools)
############################################################################
# Prefer Xcode command line tools over any other gcc installed (e.g. MacPorts,
# Fink, Brew)
# Check for Xcode Commane Line Tools first
if [ -d '/Library/Developer/CommandLineTools/usr/bin' ]; then
PATH=/Library/Developer/CommandLineTools/usr/bin:/opt/salt/bin:$PATH
MAKE=/Library/Developer/CommandLineTools/usr/bin/make
else
PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/salt/bin:$PATH
MAKE=/Applications/Xcode.app/Contents/Developer/usr/bin/make
fi
export PATH
############################################################################
# Functions Required for the script
############################################################################
download(){
if [ -z "$1" ]; then
echo "Must pass a URL to the download function"
fi
URL=$1
PKGNAME=${URL##*/}
cd $BUILDDIR
echo "################################################################################"
echo "Retrieving $PKGNAME"
echo "################################################################################"
curl -O# $URL
echo "################################################################################"
echo "Comparing Sha512 Hash"
echo "################################################################################"
FILESHA=($(shasum -a 512 $PKGNAME))
EXPECTEDSHA=($(cat $SHADIR/$PKGNAME.sha512))
if [ "$FILESHA" != "$EXPECTEDSHA" ]; then
echo "ERROR: Sha Check Failed for $PKGNAME"
return 1
fi
echo "################################################################################"
echo "Unpacking $PKGNAME"
echo "################################################################################"
tar -zxvf $PKGNAME
return $?
}
############################################################################
# Ensure Paths are present and clean
############################################################################
echo -n -e "\033]0;Build_Evn: Clean\007"
# Make sure /opt/salt is clean
sudo rm -rf /opt/salt
sudo mkdir -p /opt/salt
sudo chown $USER:staff /opt/salt
# Make sure build staging is clean
rm -rf build
mkdir -p build
BUILDDIR=$SCRIPTDIR/build
############################################################################
# Download and install pkg-config
############################################################################
echo -n -e "\033]0;Build_Evn: pkg-config\007"
PKGURL="http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.tar.gz"
PKGDIR="pkg-config-0.29"
download $PKGURL
echo "################################################################################"
echo "Building pkg-config"
echo "################################################################################"
cd $PKGDIR
env LDFLAGS="-framework CoreFoundation -framework Carbon" ./configure --prefix=/opt/salt --with-internal-glib
$MAKE
$MAKE check
sudo $MAKE install
############################################################################
# Download and install libsodium
############################################################################
echo -n -e "\033]0;Build_Evn: libsodium\007"
PKGURL="https://download.libsodium.org/libsodium/releases/libsodium-1.0.7.tar.gz"
PKGDIR="libsodium-1.0.7"
download $PKGURL
echo "################################################################################"
echo "Building libsodium"
echo "################################################################################"
cd $PKGDIR
./configure --prefix=/opt/salt
$MAKE
$MAKE check
sudo $MAKE install
############################################################################
# Download and install zeromq
############################################################################
echo -n -e "\033]0;Build_Evn: zeromq\007"
PKGURL="http://download.zeromq.org/zeromq-4.1.3.tar.gz"
PKGDIR="zeromq-4.1.3"
download $PKGURL
echo "################################################################################"
echo "Building zeromq"
echo "################################################################################"
cd $PKGDIR
./configure --prefix=/opt/salt
$MAKE
$MAKE check
sudo $MAKE install
############################################################################
# Download and install OpenSSL
############################################################################
echo -n -e "\033]0;Build_Evn: OpenSSL\007"
PKGURL="http://openssl.org/source/openssl-1.0.2e.tar.gz"
PKGDIR="openssl-1.0.2e"
download $PKGURL
echo "################################################################################"
echo "Building OpenSSL 1.0.2e"
echo "################################################################################"
cd $PKGDIR
./Configure darwin64-x86_64-cc --prefix=/opt/salt --openssldir=/opt/salt/openssl
$MAKE
$MAKE test
sudo $MAKE install
############################################################################
# Download and install GDBM
############################################################################
echo -n -e "\033]0;Build_Evn: GDBM\007"
PKGURL="ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.11.tar.gz"
PKGDIR="gdbm-1.11"
download $PKGURL
echo "################################################################################"
echo "Building gdbm 1.11"
echo "################################################################################"
cd $PKGDIR
./configure --prefix=/opt/salt --enable-libgdbm-compat
$MAKE
$MAKE check
sudo $MAKE install
############################################################################
# Download and install Gnu Readline
############################################################################
echo -n -e "\033]0;Build_Evn: Gnu Readline\007"
PKGURL="ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz"
PKGDIR="readline-6.3"
download $PKGURL
curl -O# ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz
echo "################################################################################"
echo "Building GNU Readline 6.3"
echo "################################################################################"
cd $PKGDIR
./configure --prefix=/opt/salt
$MAKE
sudo $MAKE install
############################################################################
# Download and install Python
############################################################################
echo -n -e "\033]0;Build_Evn: Python\007"
PKGURL="https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tar.xz"
PKGDIR="Python-2.7.11"
download $PKGURL
echo "################################################################################"
echo "Building Python 2.7.11"
echo "################################################################################"
echo "Note there are some test failures"
cd $PKGDIR
./configure --prefix=/opt/salt --enable-shared --enable-toolbox-glue --with-ensurepip=install
$MAKE
# $MAKE test
sudo $MAKE install
############################################################################
# Download and install CMake
############################################################################
echo -n -e "\033]0;Build_Evn: CMake\007"
PKGURL="https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz"
PKGDIR="cmake-3.4.1"
download $PKGURL
echo "################################################################################"
echo "Building CMake 3.4.1"
echo "################################################################################"
cd $PKGDIR
./bootstrap
$MAKE
sudo $MAKE install
############################################################################
# Download and install libgit2
############################################################################
echo -n -e "\033]0;Build_Evn: libgit2\007"
PKGURL="https://codeload.github.com/libgit2/libgit2/tar.gz/v0.23.4"
PKGDIR="libgit2-0.23.4"
download $PKGURL
echo "################################################################################"
echo "Building libgit2 0.23.4"
echo "################################################################################"
cd $PKGDIR
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/salt
sudo cmake --build . --target install
############################################################################
# Download and install salt python dependencies
############################################################################
echo -n -e "\033]0;Build_Evn: PIP Dependencies\007"
cd $BUILDDIR
echo "################################################################################"
echo "Installing Salt Dependencies with pip (normal)"
echo "################################################################################"
sudo -H /opt/salt/bin/pip install \
-r $SRCDIR/pkg/osx/req.txt \
--no-cache-dir
echo "################################################################################"
echo "Installing Salt Dependencies with pip (build_ext)"
echo "################################################################################"
sudo -H /opt/salt/bin/pip install \
-r $SRCDIR/pkg/osx/req_ext.txt \
--global-option=build_ext \
--global-option="-I/opt/salt/include" \
--no-cache-dir
echo "--------------------------------------------------------------------------------"
echo "Create Symlink to certifi for openssl"
echo "--------------------------------------------------------------------------------"
ln -s /opt/salt/lib/python2.7/site-packages/certifi/cacert.pem /opt/salt/openssl/cert.pem
echo -n -e "\033]0;Build_Evn: Finished\007"
cd $BUILDDIR
echo "################################################################################"
echo "Build Environment Script Completed"
echo "################################################################################"

182
pkg/osx/build_pkg.sh Executable file
View file

@ -0,0 +1,182 @@
#!/bin/bash
############################################################################
#
# Title: Build Package Script for OSX
# Authors: CR Oldham, Shane Lee
# Date: December 2015
#
# Description: This creates an OSX package for Salt from the contents of
# /opt/salt
#
# Requirements:
# - XCode Command Line Tools (xcode-select --install)
#
# Usage:
# This script can be passed 2 parameters
# $1 : <package dir> : the staging area for the package defaults to
# /tmp/salt-pkg
# $2 : <version> : the version name to give the package (overrides
# version of the git repo) (Defaults to the git repo version)
#
# Example:
# The following will build Salt and stage all files in /tmp/pkg:
#
# ./build.sh /tmp/pkg
#
############################################################################
trap 'quit_on_error $LINENO $BASH_COMMAND' ERR
quit_on_error() {
echo "$(basename $0) caught error on line : $1 command was: $2"
exit -1
}
############################################################################
# Check passed parameters, set defaults
############################################################################
if [ "$1" == "" ]; then
PKGDIR=/tmp/pkg
else
PKGDIR=$1
fi
if [ "$2" == "" ]; then
VERSION=`git describe`
else
VERSION=$2
fi
############################################################################
# Additional Parameters Required for the script to function properly
############################################################################
echo -n -e "\033]0;Build_Pkg: Variables\007"
SRCDIR=`git rev-parse --show-toplevel`
############################################################################
# Make sure this is the Salt Repository
############################################################################
if [[ ! -e "$SRCDIR/.git" ]] && [[ ! -e "$SRCDIR/scripts/salt" ]]; then
echo "This directory doesn't appear to be a git repository."
echo "The OS X build process needs some files from a Git checkout of Salt."
echo "Run this script from the root of the Git checkout."
exit -1
fi
############################################################################
# Ensure Paths are present and clean
############################################################################
echo -n -e "\033]0;Build_Pkg: Clean Staging Area\007"
# Clean folder in the staging area
rm -rf $PKGDIR
mkdir -p $PKGDIR
PKGRESOURCES=$SRCDIR/pkg/osx
############################################################################
# Create Symbolic Links to Salt Binaries
############################################################################
echo -n -e "\033]0;Build_Pkg: Create Symbolic Links\007"
cd /opt/salt
for f in /opt/salt/bin/salt-*; do
if [ ! -f $f ]; then
ln -s $f /opt/salt
fi
done
if [ ! -f /opt/salt/bin/spm ]; then
ln -s /opt/salt/bin/spm /opt/salt
fi
if [ ! -f /opt/salt/bin/raetflo ]; then
ln -s /opt/salt/bin/raetflo /opt/salt
fi
if [ ! -f /opt/salt/bin/ioflo ]; then
ln -s /opt/salt/bin/ioflo /opt/salt
fi
if [ ! -f /opt/salt/bin/ioflo2 ]; then
ln -s /opt/salt/bin/ioflo2 /opt/salt
fi
############################################################################
# Copy Start Scripts from Salt Repo to /opt/salt
############################################################################
echo -n -e "\033]0;Build_Pkg: Copy Start Scripts\007"
cp $PKGRESOURCES/scripts/start-*.sh /opt/salt
############################################################################
# Copy Service Definitions from Salt Repo to the Package Directory
############################################################################
echo -n -e "\033]0;Build_Pkg: Copy Service Definitions\007"
mkdir -p $PKGDIR/opt
cp -r /opt/salt $PKGDIR/opt
mkdir -p $PKGDIR/Library/LaunchDaemons $PKGDIR/etc
cp $PKGRESOURCES/scripts/com.saltstack.salt.minion.plist $PKGDIR/Library/LaunchDaemons
cp $PKGRESOURCES/scripts/com.saltstack.salt.master.plist $PKGDIR/Library/LaunchDaemons
cp $PKGRESOURCES/scripts/com.saltstack.salt.syndic.plist $PKGDIR/Library/LaunchDaemons
cp $PKGRESOURCES/scripts/com.saltstack.salt.api.plist $PKGDIR/Library/LaunchDaemons
############################################################################
# Copy Additional Resources from Salt Repo to the Package Directory
############################################################################
echo -n -e "\033]0;Build_Pkg: Copy Additional Resources\007"
mkdir -p $PKGDIR/resources
cp $PKGRESOURCES/saltstack.png $PKGDIR/resources
cp $PKGRESOURCES/*.rtf $PKGDIR/resources
# I can't get this to work for some reason
mkdir -p $PKGDIR/scripts
cp $PKGRESOURCES/scripts/postflight.sh $PKGDIR/scripts
cp $PKGRESOURCES/scripts/preflight.sh $PKGDIR/scripts
############################################################################
# Copy Config Files from Salt Repo to the Package Directory
############################################################################
echo -n -e "\033]0;Build_Pkg: Copy Config Files\007"
mkdir -p $PKGDIR/etc/salt
cp $SRCDIR/conf/minion $PKGDIR/etc/salt/minion.dist
cp $SRCDIR/conf/master $PKGDIR/etc/salt/master.dist
############################################################################
# I don't know what this does, it doesn't look like the .xml file goes anywhere
############################################################################
echo -n -e "\033]0;Build_Pkg: Add Version to .xml\007"
cd $PKGRESOURCES
cp distribution.xml.dist distribution.xml
SEDSTR="s/@VERSION@/$VERSION/"
echo $SEDSTR
sed -i '' $SEDSTR distribution.xml
############################################################################
# Build the Package
############################################################################
echo -n -e "\033]0;Build_Pkg: Build Package\007"
pkgbuild --root $PKGDIR \
--identifier=com.saltstack.salt \
--version=$VERSION \
--ownership=recommended salt-src-$VERSION.pkg
productbuild --resources=$PKGDIR/resources \
--distribution=distribution.xml \
--package-path=salt-src-$VERSION.pkg \
--scripts $PKGDIR/scripts \
--version=$VERSION salt-$VERSION.pkg

53
pkg/osx/build_sig.sh Executable file
View file

@ -0,0 +1,53 @@
#!/bin/bash
############################################################################
#
# Title: Sign Package Script for OSX
# Authors: Shane Lee
# Date: December 2015
#
# Description: This signs an OSX Installer Package (.pkg)
# /opt/salt
#
# Requirements:
# - XCode Command Line Tools (xcode-select --install)
# - A valid signing certificate in the login.keychain. Signing Certificates
# can be optained from the Apple Developer site.
#
# Usage:
# This script must be passed 2 parameters
# $1 : <source package> : the package that will be signed
# $2 : <signed package> : the name to give the signed package (can't be
# the same as the source package)
#
# Example:
# The following will sign the 'salt-v2015.8.3.pkg' file and save it as
# 'salt-v2015.8.3.signed.pkg'
#
# ./build_sig.sh salt-v2015.8.3.pkg salt-v2015.8.3.signed.pkg
#
############################################################################
############################################################################
# Check input parameters
############################################################################
if [ "$1" == "" ]; then
echo "Must supply an source package"
else
INPUT=$1
fi
if [ "$2" == "" ]; then
echo "Must supply an signed package name"
else
OUTPUT=$2
fi
############################################################################
# Import the Salt Developer Signing certificate
############################################################################
security import "Developer ID Installer.p12" -k ~/Library/Keychains/login.keychain
############################################################################
# Signe the package
############################################################################
productsign --sign "Developer ID Installer: Salt Stack, Inc. (VK797BMMY4)" $INPUT $OUTPUT

View file

@ -1 +0,0 @@
<h1>Salt is Installed!</h1>

9
pkg/osx/conclusion.rtf Normal file
View file

@ -0,0 +1,9 @@
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf130
{\fonttbl\f0\froman\fcharset0 Times-Roman;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
\deftab720
\pard\pardeftab720\sl560\sa321\partightenfactor0
\f0\b\fs48 \cf2 \expnd0\expndtw0\kerning0
\outl0\strokewidth0 \strokec2 Salt is Installed!\
}

View file

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title>Salt 2015.5.2</title>
<organization>com.saltstack.salt</organization>
<domains enable_localSystem="true"/>
<options rootVolumeOnly="true" />
<!-- Define documents displayed at various steps -->
<welcome file="welcome.html" mime-type="text/html" />
<license file="license.html" mime-type="text/html" />
<conclusion file="conclusion.html" mime-type="text/html" />
<!-- List all component packages -->
<pkg-ref id="com.saltstack.salt"
version="2015.5.2"
auth="root">salt-src-2015.5.2.pkg</pkg-ref>
<!-- List them again here. They can now be organized
as a hierarchy if you want. -->
<choices-outline>
<line choice="com.saltstack.salt"/>
</choices-outline>
<!-- Define each choice above -->
<choice
id="com.saltstack.salt"
visible="false"
title="Salt 2015.5.2"
description="Salt 2015.5.2"
start_selected="true">
<pkg-ref id="com.saltstack.salt"/>
</choice>
</installer-gui-script>

View file

@ -5,10 +5,10 @@
<domains enable_localSystem="true"/>
<options rootVolumeOnly="true" />
<!-- Define documents displayed at various steps -->
<background file="saltstack.png" mime-type="image/png" scaling="tofit"/>
<welcome file="welcome.html" mime-type="text/html" />
<license file="license.html" mime-type="text/html" />
<conclusion file="conclusion.html" mime-type="text/html" />
<background file="saltstack.png" mime-type="image/png" scaling="proportional"/>
<welcome file="welcome.rtf" mime-type="text/rtf" />
<license file="license.rtf" mime-type="text/rtf" />
<conclusion file="conclusion.rtf" mime-type="text/rtf" />
<!-- List all component packages -->
<pkg-ref id="com.saltstack.salt"
version="@VERSION@"
@ -27,4 +27,4 @@
start_selected="true">
<pkg-ref id="com.saltstack.salt"/>
</choice>
</installer-gui-script>
</installer-gui-script>

View file

@ -1,14 +0,0 @@
<h1>Salt - Remote execution system</h1>
<p>Copyright 2014-2015 SaltStack Team</p>
<p>Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at</p>
<p> http://www.apache.org/licenses/LICENSE-2.0</p>
<p>Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</p>

15
pkg/osx/license.rtf Normal file
View file

@ -0,0 +1,15 @@
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf130
{\fonttbl\f0\froman\fcharset0 Times-Roman;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
\deftab720
\pard\pardeftab720\sl560\sa321\partightenfactor0
\f0\b\fs48 \cf2 \expnd0\expndtw0\kerning0
\outl0\strokewidth0 \strokec2 Salt - Remote execution system\
\pard\pardeftab720\sl280\sa240\partightenfactor0
\b0\fs24 \cf2 Copyright 2014-2015 SaltStack Team\
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\
http://www.apache.org/licenses/LICENSE-2.0\
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\
}

34
pkg/osx/req.txt Normal file
View file

@ -0,0 +1,34 @@
apache-libcloud==0.19.0
backports.ssl_match_hostname==3.4.0.2
backports_abc==0.4
certifi
cffi==1.3.1
CherryPy==3.2.3
click==4.1
enum34==1.1.1
gitdb==0.6.4
GitPython==1.0.1
idna==2.0
ioflo==1.4.9
ipaddress==1.0.15
Jinja2==2.8
libnacl==1.4.3
linode-python==1.1.1
Mako==1.0.3
MarkupSafe==0.23
msgpack-python==0.4.6
pyasn1==0.1.9
pycparser==2.14
pycrypto==2.6.1
python_dateutil==2.4.2
python-gnupg==0.3.8
PyYAML==3.11
pyzmq==15.1.0
raet==0.6.5
requests==2.9.0
singledispatch==3.4.0.3
six==1.10.0
smmap==0.9.0
timelib==0.2.4
tornado==4.3
vultr==0.1.2

4
pkg/osx/req_ext.txt Normal file
View file

@ -0,0 +1,4 @@
cryptography==1.1.2
pyOpenSSL==0.15.1
pygit2==0.23.2

View file

@ -1,16 +0,0 @@
pyopenssl
m2crypto
pycrypto
libnacl
raet
requests
cherrypy==3.2.3
jinja2
tornado
pyyaml
msgpack-python
apache-libcloud
linode-python
vultr
pyzmq
Mako

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 12 KiB

30
pkg/osx/scripts/postflight.sh Executable file
View file

@ -0,0 +1,30 @@
#!/bin/bash
###############################################################################
#
# Title: Post Script for Salt Installation
# Authors: Shane Lee
# Date: December 2015
#
# Description: This script copies the minion config file and starts the salt
# service
#
# Requirements:
# - None
#
# Usage:
# This script is run as a part of the OSX Salt Installation
#
###############################################################################
###############################################################################
# Check for existing minion config, copy if it doesn't exist
###############################################################################
if [ ! -f /etc/salt/minion ]; then
cp /etc/salt/minion.dist /etc/salt/minion
fi
###############################################################################
# Register Salt as a service
###############################################################################
set -e
launchctl load "/Library/LaunchDaemons/com.saltstack.salt.minion.plist"

25
pkg/osx/scripts/preflight.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/bash
###############################################################################
#
# Title: Pre Install Script for Salt Installation
# Authors: Shane Lee
# Date: December 2015
#
# Description: This script stops the salt minion service before attempting to
# install Salt on Mac OSX
#
# Requirements:
# - None
#
# Usage:
# This script is run as a part of the OSX Salt Installation
#
###############################################################################
###############################################################################
# Stop the service
###############################################################################
set -e
if /bin/launchctl list "com.saltstack.salt.minion" &> /dev/null; then
/bin/launchctl unload "/Library/LaunchDaemons/com.saltstack.salt.minion.plist"
fi

View file

@ -0,0 +1 @@
72166763a2fe6aab45ecf378f55a1efc7322d1742c4638bae84f4ed4b9fb4c01f2a0293733c64426ae2c70df24d95ff2b1e2a4f3c2715de00d8f320d4d939ea0 Python-2.7.11.tar.xz

View file

@ -0,0 +1 @@
072bbfc3ffe3a838945ce6e7c4bbce267362673c3b870886accdc5a5ee01dbd071604fca6aa519d077676423d37bfe987b71f22f14a194f8d6ec8fb9de0a6049 ./cmake-3.4.1.tar.gz

View file

@ -0,0 +1 @@
272fb65ab9ca0a21e9f0dcfb2c638457e87cbb938c65ee850123474d11f2858496f84d3fa9edca27cd91c7220160cfdb59f90bd46ddc45395514addc9fd4151c ./gdbm-1.11.tar.gz

View file

@ -0,0 +1 @@
21a2991010bc4e6e03d42c6df5443049c99f7622dc68a7bdc3d6d082621a165faab32612280526509d310ad1faefc00aa21c594a384a7fa8b05f4666e82e5e1d ./libsodium-1.0.7.tar.gz

View file

@ -0,0 +1 @@
b73f114a117ccab284cf5891dac050e3016d28e0b1fc71639442cdb42accef676115af90a12deff4bcc1f599cc0cbdeb38142cbf4570bd7d03634786ad32c95f ./openssl-1.0.2e.tar.gz

View file

@ -0,0 +1 @@
c2857cd67801c0db5d204912453ff6bdc7da3ea61f8b1c6b38983d48dffb958725e7723f909abbc057c7b34a85c27290eec6943808312a75909306076064aa63 ./pkg-config-0.29.tar.gz

View file

@ -0,0 +1 @@
f70efaf46d570b85c7637172b0ee2eb9a4aa73ba38a62bb45075e665929d9701b96fba0aea6c767fd9a2a0d39dfe8e70ab06da08f8524aee76a7c502f370a401 ./readline-6.3.tar.gz

View file

@ -0,0 +1 @@
f2f6244dfee4dab2dc5ef9607808404467a1f6baa684aa4e24b7116e7e7f63f396eef3282c1bcffbef47f19824731c2887deadbe3b2dad8a075b0639e5965d9e ./v0.23.4

View file

@ -0,0 +1 @@
2c993d18ea44e1cba890e024176af65b85b842ca4f8a22d319be4ace8388ab8828dd706b065f02754025bf271b1d7aa878c3f6655878248f7826452cb2a6134c ./zeromq-4.1.3.tar.gz

View file

@ -1,46 +0,0 @@
<p>
<a href="http://saltstack.com">SaltStack</a> is extremely fast and scalable
systems and configuration management software for predictive orchestration,
cloud and data center automation, server provisioning, application deployment
and more. </p>
<p>Documentation for Salt is available at
<a href="http://docs.saltstack.com">http://docs.saltstack.com</a>
</p>
<p> This package will install Salt on your Mac. Salt
installs into /opt/salt. You may want to add /opt/salt/bin to your
PATH environment variable.</p>
<p>LaunchD plist files will be installed in /Library/LaunchDaemons.
To enable startup of Salt processes on boot, run one or more of the following
as root:</p>
<table border=0 cellpadding='5'>
<tr><td>salt-minion</td>
<td>launchctl load /Library/LaunchDaemons/com.saltstack.salt.minion.plist</td></tr>
<tr><td>salt-master</td>
<td>launchctl load /Library/LaunchDaemons/com.saltstack.salt.master.plist</td></tr>
<tr><td>salt-syndic</td>
<td>launchctl load /Library/LaunchDaemons/com.saltstack.salt.syndic.plist</td></tr>
<tr><td>salt-api</td>
<td>launchctl load /Library/LaunchDaemons/com.saltstack.salt.api.plist</td></tr>
</table>
<p>Sample configuration files (master.dist and minion.dist) will be
installed to /etc/salt. Create copies of them without the '.dist' in
the filename and edit as you see fit.</p>
<p>This Salt package uses a custom-built Python. To install additional
Python modules for Salt, use the associated 'pip' binary. For example,
if you need LDAP support in Salt you will need the 'python-ldap' module.
Install it with
<blockquote>
/opt/salt/python/bin/pip install python-ldap
</blockquote>
<p>
Note that some Python modules need a compiler available. Installing
Apple's xCode command line tools should provide the necessary utilities.
Alternatively, <a href="http://macports.org">MacPorts</a>,
<a href="http://finkproject.org">Fink</a>, or <a href="http://brew.sh">
Homebrew</a> may provide what you need.

54
pkg/osx/welcome.rtf Normal file
View file

@ -0,0 +1,54 @@
{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf130
{\fonttbl\f0\froman\fcharset0 Times-Roman;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue233;\red0\green0\blue0;\red109\green109\blue109;
}
\deftab720
\pard\pardeftab720\sl280\sa240\partightenfactor0
{\field{\*\fldinst{HYPERLINK "http://saltstack.com/"}}{\fldrslt
\f0\fs24 \cf2 \expnd0\expndtw0\kerning0
\ul \ulc2 \outl0\strokewidth0 \strokec2 SaltStack}}
\f0\fs24 \cf3 \expnd0\expndtw0\kerning0
\outl0\strokewidth0 \strokec3 is extremely fast and scalable systems and configuration management software for predictive orchestration, cloud and data center automation, server provisioning, application deployment and more. \
Documentation for Salt is available at {\field{\*\fldinst{HYPERLINK "http://docs.saltstack.com/"}}{\fldrslt \cf2 \ul \ulc2 \strokec2 http://docs.saltstack.com}} \
This package will install Salt on your Mac. Salt installs into /opt/salt. You may want to add /opt/salt/bin to your PATH environment variable.\
LaunchD plist files will be installed in /Library/LaunchDaemons. To enable startup of Salt processes on boot, run one or more of the following as root:\
\itap1\trowd \taflags0 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil
\clvertalc \clshdrawnil \clwWidth1100\clftsWidth3 \clmart10 \clmarl10 \clmarb10 \clmarr10 \clbrdrt\brdrnil \clbrdrl\brdrnil \clbrdrb\brdrnil \clbrdrr\brdrnil \clpadt100 \clpadl100 \clpadb100 \clpadr100 \gaph\cellx4320
\clvertalc \clshdrawnil \clwWidth6880\clftsWidth3 \clmart10 \clmarl10 \clmarb10 \clmarr10 \clbrdrt\brdrnil \clbrdrl\brdrnil \clbrdrb\brdrnil \clbrdrr\brdrnil \clpadt100 \clpadl100 \clpadb100 \clpadr100 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\sl280\partightenfactor0
\cf3 salt-minion\cell
\pard\intbl\itap1\pardeftab720\sl280\partightenfactor0
\cf3 launchctl load /Library/LaunchDaemons/com.saltstack.salt.minion.plist\cell \row
\itap1\trowd \taflags0 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil
\clvertalc \clshdrawnil \clwWidth1100\clftsWidth3 \clmart10 \clmarl10 \clmarb10 \clmarr10 \clbrdrt\brdrnil \clbrdrl\brdrnil \clbrdrb\brdrnil \clbrdrr\brdrnil \clpadt100 \clpadl100 \clpadb100 \clpadr100 \gaph\cellx4320
\clvertalc \clshdrawnil \clwWidth6880\clftsWidth3 \clmart10 \clmarl10 \clmarb10 \clmarr10 \clbrdrt\brdrnil \clbrdrl\brdrnil \clbrdrb\brdrnil \clbrdrr\brdrnil \clpadt100 \clpadl100 \clpadb100 \clpadr100 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\sl280\partightenfactor0
\cf3 salt-master\cell
\pard\intbl\itap1\pardeftab720\sl280\partightenfactor0
\cf3 launchctl load /Library/LaunchDaemons/com.saltstack.salt.master.plist\cell \row
\itap1\trowd \taflags0 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrr\brdrnil
\clvertalc \clshdrawnil \clwWidth1100\clftsWidth3 \clmart10 \clmarl10 \clmarb10 \clmarr10 \clbrdrt\brdrnil \clbrdrl\brdrnil \clbrdrb\brdrnil \clbrdrr\brdrnil \clpadt100 \clpadl100 \clpadb100 \clpadr100 \gaph\cellx4320
\clvertalc \clshdrawnil \clwWidth6880\clftsWidth3 \clmart10 \clmarl10 \clmarb10 \clmarr10 \clbrdrt\brdrnil \clbrdrl\brdrnil \clbrdrb\brdrnil \clbrdrr\brdrnil \clpadt100 \clpadl100 \clpadb100 \clpadr100 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\sl280\partightenfactor0
\cf3 salt-syndic\cell
\pard\intbl\itap1\pardeftab720\sl280\partightenfactor0
\cf3 launchctl load /Library/LaunchDaemons/com.saltstack.salt.syndic.plist\cell \row
\itap1\trowd \taflags0 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil
\clvertalc \clshdrawnil \clwWidth1100\clftsWidth3 \clmart10 \clmarl10 \clmarb10 \clmarr10 \clbrdrt\brdrnil \clbrdrl\brdrnil \clbrdrb\brdrnil \clbrdrr\brdrnil \clpadt100 \clpadl100 \clpadb100 \clpadr100 \gaph\cellx4320
\clvertalc \clshdrawnil \clwWidth6880\clftsWidth3 \clmart10 \clmarl10 \clmarb10 \clmarr10 \clbrdrt\brdrnil \clbrdrl\brdrnil \clbrdrb\brdrnil \clbrdrr\brdrnil \clpadt100 \clpadl100 \clpadb100 \clpadr100 \gaph\cellx8640
\pard\intbl\itap1\pardeftab720\sl280\partightenfactor0
\cf3 salt-api\cell
\pard\intbl\itap1\pardeftab720\sl280\partightenfactor0
\cf3 launchctl load /Library/LaunchDaemons/com.saltstack.salt.api.plist\cell \lastrow\row
\pard\pardeftab720\sl280\sa240\partightenfactor0
\cf3 Sample configuration files (master.dist and minion.dist) will be installed to /etc/salt. Create copies of them without the '.dist' in the filename and edit as you see fit.\
This Salt package uses a custom-built Python. To install additional Python modules for Salt, use the associated 'pip' binary. For example, if you need LDAP support in Salt you will need the 'python-ldap' module. Install it with \
\pard\pardeftab720\sl280\partightenfactor0
\cf3 /opt/salt/python/bin/pip install python-ldap \
\pard\pardeftab720\sl280\sa240\partightenfactor0
\cf3 Note that some Python modules need a compiler available. Installing Apple's xCode command line tools should provide the necessary utilities. Alternatively, {\field{\*\fldinst{HYPERLINK "http://macports.org/"}}{\fldrslt \cf2 \ul \ulc2 \strokec2 MacPorts}}, {\field{\*\fldinst{HYPERLINK "http://finkproject.org/"}}{\fldrslt \cf2 \ul \ulc2 \strokec2 Fink}}, or {\field{\*\fldinst{HYPERLINK "http://brew.sh/"}}{\fldrslt \cf2 \ul \ulc2 \strokec2 Homebrew}} may provide what you need. \
}

File diff suppressed because it is too large Load diff

View file

@ -476,8 +476,8 @@ def remove_user_from_group(group_name, user_name, region=None, key=None, keyid=N
msg = 'Username : {0} does not exist.'
log.error(msg.format(user_name, group_name))
return False
if not user_exists_in_group(user_name, group_name, region=None, key=None, keyid=None,
profile=None):
if not user_exists_in_group(user_name, group_name, region=region, key=key,
keyid=keyid, profile=profile):
return True
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
try:

View file

@ -486,7 +486,7 @@ def delete(name, skip_final_snapshot=None, final_db_snapshot_identifier=None,
'''
conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
if not skip_final_snapshot or final_db_snapshot_identifier:
if not skip_final_snapshot and not final_db_snapshot_identifier:
raise SaltInvocationError('At least on of the following must'
' be specified: skip_final_snapshot'
' final_db_snapshot_identifier')

File diff suppressed because it is too large Load diff

View file

@ -135,7 +135,7 @@ except ImportError:
log = logging.getLogger(__name__)
__virtualname__ = 'boto_cfn'
__virtualname__ = 'boto_iam'
def __virtual__():
@ -179,7 +179,7 @@ def user_absent(name, delete_keys=None, region=None, key=None, keyid=None, profi
ret['result'] = True
ret['comment'] = 'IAM User {0} does not exist.'.format(name)
return ret
if 'true' == str(delete_keys).lower:
if 'true' == str(delete_keys).lower():
keys = __salt__['boto_iam.get_all_access_keys'](user_name=name, region=region, key=key,
keyid=keyid, profile=profile)
log.debug('Keys for user {0} are {1}.'.format(name, keys))
@ -190,9 +190,7 @@ def user_absent(name, delete_keys=None, region=None, key=None, keyid=None, profi
ret['comment'] = 'Access key {0} is set to be deleted.'.format(k['access_key_id'])
ret['result'] = None
return ret
if _delete_key(k['access_key_id'], name, region, key, keyid, profile):
ret['comment'] = os.linesep.join([ret['comment'], 'Key {0} has been deleted.'.format(k['access_key_id'])])
ret['changes'][k['access_key_id']] = 'deleted'
ret = _delete_key(ret, k['access_key_id'], name, region, key, keyid, profile)
if __opts__['test']:
ret['comment'] = 'IAM user {0} is set to be deleted.'.format(name)
ret['result'] = None
@ -587,7 +585,7 @@ def group_present(name, policies=None, policies_from_pillars=None, users=None, r
if not _ret['result']:
ret['result'] = _ret['result']
return ret
if users:
if users is not None:
log.debug('Users are : {0}.'.format(users))
group_result = __salt__['boto_iam.get_group'](group_name=name, region=region, key=key, keyid=keyid, profile=profile)
ret = _case_group(ret, users, name, group_result, region, key, keyid, profile)