From 2f6d42b56f5477c7954fb803b3bd8fb5268a9d26 Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Tue, 28 Oct 2014 11:14:27 +0100 Subject: [PATCH 1/6] added suport for linux mint with debian base --- bootstrap-salt.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7c38971..73444fe 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -243,7 +243,6 @@ usage() { -D Show debug output. -c Temporary configuration directory -g Salt repository URL. (default: git://github.com/saltstack/salt.git) - -G Insteady of cloning from git://github.com/saltstack/salt.git, clone from https://github.com/saltstack/salt.git (Usually necessary on systems which have the regular git protocol port blocked, where https usualy is not) -k Temporary directory holding the minion keys which will pre-seed the master. -s Sleep time used when waiting for daemons to start, restart and when checking @@ -279,7 +278,7 @@ EOT } # ---------- end of function usage ---------- -while getopts ":hvnDc:Gg:k:MSNXCPFUKIA:i:Lp:H:Z" opt +while getopts ":hvnDc:g:k:MSNXCPFUKIA:i:Lp:H:Z" opt do case "${opt}" in @@ -300,8 +299,6 @@ do fi ;; g ) _SALT_REPO_URL=$OPTARG ;; - G ) _SALTSTACK_REPO_URL="https://github.com/saltstack/salt.git" - ;; k ) _TEMP_KEYS_DIR="$OPTARG" # If the configuration directory does not exist, error out if [ ! -d "$_TEMP_KEYS_DIR" ]; then @@ -982,9 +979,10 @@ __debian_derivatives_translation() { # If the file does not exist, return [ ! -f /etc/os-release ] && return - DEBIAN_DERIVATIVES="(kali)" + DEBIAN_DERIVATIVES="(kali|linuxmint)" # Mappings kali_1_debian_base="7.0" + linuxmint_17_debian_base="8.0" # Detect derivates, Kali *only* for now rv=$(grep ^ID= /etc/os-release | sed -e 's/.*=//') @@ -998,6 +996,10 @@ __debian_derivatives_translation() { _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="kali" ;; + linuxmint) + _major=17 + _debian_derivative="linuxmint" + ;; esac _debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base") @@ -1133,7 +1135,7 @@ __git_clone_and_checkout() { local __SALT_GIT_CHECKOUT_PARENT_DIR=$(dirname "${__SALT_GIT_CHECKOUT_DIR}" 2>/dev/null) __SALT_GIT_CHECKOUT_PARENT_DIR="${__SALT_GIT_CHECKOUT_PARENT_DIR:-/tmp/git}" local __SALT_CHECKOUT_REPONAME="$(basename "${__SALT_GIT_CHECKOUT_DIR}" 2>/dev/null)" - __SALT_CHECKOUT_REPONAME="${__SALT_CHECKOUT_REPONAME:-salt}" + __SALT_CHECKOUT_REPONAME="${__SALT_CHECKOUT_REPONAME:-salt}" [ -d "${__SALT_GIT_CHECKOUT_PARENT_DIR}" ] || mkdir "${__SALT_GIT_CHECKOUT_PARENT_DIR}" cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}" if [ -d "${__SALT_GIT_CHECKOUT_DIR}" ]; then @@ -2432,7 +2434,7 @@ install_fedora_stable_post() { install_fedora_git_deps() { install_fedora_deps || return 1 - yum install -y git systemd-python || return 1 + yum install -y git || return 1 __git_clone_and_checkout || return 1 @@ -3576,7 +3578,7 @@ __configure_freebsd_pkg_details() { copyfile $conf_file /etc/pkg/FreeBSD.conf SALT_PKG_FLAGS="-r FreeBSD" ## ensure future ports builds use pkgng - echo "WITH_PKGNG= yes" >> /etc/make.conf + echo "WITH_PKGNG= yes" >> /etc/make.conf } install_freebsd_9_stable_deps() { From c8197636ad1f41b5313fd450d711192bdcd2e828 Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Tue, 28 Oct 2014 13:19:56 +0100 Subject: [PATCH 2/6] fixed major version of linuxmint debian --- bootstrap-salt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 73444fe..ff89d91 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -982,9 +982,9 @@ __debian_derivatives_translation() { DEBIAN_DERIVATIVES="(kali|linuxmint)" # Mappings kali_1_debian_base="7.0" - linuxmint_17_debian_base="8.0" + linuxmint_1_debian_base="8.0" - # Detect derivates, Kali *only* for now + # Detect derivates, Kali and Linux Mint *only* for now rv=$(grep ^ID= /etc/os-release | sed -e 's/.*=//') # Translate Debian derivatives to their base Debian version @@ -997,7 +997,7 @@ __debian_derivatives_translation() { _debian_derivative="kali" ;; linuxmint) - _major=17 + _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="linuxmint" ;; esac From 91e0542daacba4a1548025a6168864cf0aa01753 Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Tue, 28 Oct 2014 17:03:29 +0100 Subject: [PATCH 3/6] reset boostrap-salt.sh to latest of develop --- bootstrap-salt.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ff89d91..7c38971 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -243,6 +243,7 @@ usage() { -D Show debug output. -c Temporary configuration directory -g Salt repository URL. (default: git://github.com/saltstack/salt.git) + -G Insteady of cloning from git://github.com/saltstack/salt.git, clone from https://github.com/saltstack/salt.git (Usually necessary on systems which have the regular git protocol port blocked, where https usualy is not) -k Temporary directory holding the minion keys which will pre-seed the master. -s Sleep time used when waiting for daemons to start, restart and when checking @@ -278,7 +279,7 @@ EOT } # ---------- end of function usage ---------- -while getopts ":hvnDc:g:k:MSNXCPFUKIA:i:Lp:H:Z" opt +while getopts ":hvnDc:Gg:k:MSNXCPFUKIA:i:Lp:H:Z" opt do case "${opt}" in @@ -299,6 +300,8 @@ do fi ;; g ) _SALT_REPO_URL=$OPTARG ;; + G ) _SALTSTACK_REPO_URL="https://github.com/saltstack/salt.git" + ;; k ) _TEMP_KEYS_DIR="$OPTARG" # If the configuration directory does not exist, error out if [ ! -d "$_TEMP_KEYS_DIR" ]; then @@ -979,12 +982,11 @@ __debian_derivatives_translation() { # If the file does not exist, return [ ! -f /etc/os-release ] && return - DEBIAN_DERIVATIVES="(kali|linuxmint)" + DEBIAN_DERIVATIVES="(kali)" # Mappings kali_1_debian_base="7.0" - linuxmint_1_debian_base="8.0" - # Detect derivates, Kali and Linux Mint *only* for now + # Detect derivates, Kali *only* for now rv=$(grep ^ID= /etc/os-release | sed -e 's/.*=//') # Translate Debian derivatives to their base Debian version @@ -996,10 +998,6 @@ __debian_derivatives_translation() { _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="kali" ;; - linuxmint) - _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') - _debian_derivative="linuxmint" - ;; esac _debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base") @@ -1135,7 +1133,7 @@ __git_clone_and_checkout() { local __SALT_GIT_CHECKOUT_PARENT_DIR=$(dirname "${__SALT_GIT_CHECKOUT_DIR}" 2>/dev/null) __SALT_GIT_CHECKOUT_PARENT_DIR="${__SALT_GIT_CHECKOUT_PARENT_DIR:-/tmp/git}" local __SALT_CHECKOUT_REPONAME="$(basename "${__SALT_GIT_CHECKOUT_DIR}" 2>/dev/null)" - __SALT_CHECKOUT_REPONAME="${__SALT_CHECKOUT_REPONAME:-salt}" + __SALT_CHECKOUT_REPONAME="${__SALT_CHECKOUT_REPONAME:-salt}" [ -d "${__SALT_GIT_CHECKOUT_PARENT_DIR}" ] || mkdir "${__SALT_GIT_CHECKOUT_PARENT_DIR}" cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}" if [ -d "${__SALT_GIT_CHECKOUT_DIR}" ]; then @@ -2434,7 +2432,7 @@ install_fedora_stable_post() { install_fedora_git_deps() { install_fedora_deps || return 1 - yum install -y git || return 1 + yum install -y git systemd-python || return 1 __git_clone_and_checkout || return 1 @@ -3578,7 +3576,7 @@ __configure_freebsd_pkg_details() { copyfile $conf_file /etc/pkg/FreeBSD.conf SALT_PKG_FLAGS="-r FreeBSD" ## ensure future ports builds use pkgng - echo "WITH_PKGNG= yes" >> /etc/make.conf + echo "WITH_PKGNG= yes" >> /etc/make.conf } install_freebsd_9_stable_deps() { From 2e098666d104d4a9f523525e629c2c110adce3f0 Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Tue, 28 Oct 2014 17:28:45 +0100 Subject: [PATCH 4/6] added suport for linuxmint with debian base again --- bootstrap-salt.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7c38971..b5a3bdd 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -982,11 +982,12 @@ __debian_derivatives_translation() { # If the file does not exist, return [ ! -f /etc/os-release ] && return - DEBIAN_DERIVATIVES="(kali)" + DEBIAN_DERIVATIVES="(kali|linuxmint)" # Mappings kali_1_debian_base="7.0" + linuxmint_1_debian_base="8.0" - # Detect derivates, Kali *only* for now + # Detect derivates, Kali and LinuxMint *only* for now rv=$(grep ^ID= /etc/os-release | sed -e 's/.*=//') # Translate Debian derivatives to their base Debian version @@ -998,6 +999,10 @@ __debian_derivatives_translation() { _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') _debian_derivative="kali" ;; + linuxmint) + _major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g') + _debian_derivative="linuxmint" + ;; esac _debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base") @@ -3576,7 +3581,7 @@ __configure_freebsd_pkg_details() { copyfile $conf_file /etc/pkg/FreeBSD.conf SALT_PKG_FLAGS="-r FreeBSD" ## ensure future ports builds use pkgng - echo "WITH_PKGNG= yes" >> /etc/make.conf + echo "WITH_PKGNG= yes" >> /etc/make.conf } install_freebsd_9_stable_deps() { From 554526107294dc21d89ac011bef139d0c418641c Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Tue, 28 Oct 2014 19:02:42 +0100 Subject: [PATCH 5/6] reverting whitespace change ... --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index b5a3bdd..ec7272b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3581,7 +3581,7 @@ __configure_freebsd_pkg_details() { copyfile $conf_file /etc/pkg/FreeBSD.conf SALT_PKG_FLAGS="-r FreeBSD" ## ensure future ports builds use pkgng - echo "WITH_PKGNG= yes" >> /etc/make.conf + echo "WITH_PKGNG= yes" >> /etc/make.conf } install_freebsd_9_stable_deps() { From 4d14a77e043dd3cc3dbaa89a10cb2681596180cf Mon Sep 17 00:00:00 2001 From: Graeme Gillies Date: Fri, 7 Nov 2014 14:33:25 +1000 Subject: [PATCH 6/6] Enabled binary installation on RHEL 7 RHEL 7 is now available and the packages in EPEL 7 for salt work correctly. We can now do epel installs onto RHEL 7 --- bootstrap-salt.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ec7272b..e89e377 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2921,11 +2921,6 @@ install_red_hat_linux_git_deps() { return 0 } -install_red_hat_enterprise_linux_7_stable_deps() { - echoerror "Stable version is not available on RHEL 7 Beta/RC. Please set installation type to git." - return 1 -} - install_red_hat_enterprise_linux_stable_deps() { install_red_hat_linux_stable_deps || return 1 return 0