mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Updating changes to bootstrap
This commit is contained in:
parent
6f543b7a66
commit
69495e9ee0
4 changed files with 38 additions and 484 deletions
80
.github/workflows/ci.yml
vendored
80
.github/workflows/ci.yml
vendored
|
@ -115,51 +115,6 @@ jobs:
|
|||
path: exitstatus
|
||||
|
||||
|
||||
freebsd-131:
|
||||
name: FreeBSD 13.1
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-bsd.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: freebsd-131
|
||||
display-name: FreeBSD 13.1
|
||||
timeout: 20
|
||||
runs-on: macos-12
|
||||
instances: '["latest"]'
|
||||
|
||||
|
||||
freebsd-123:
|
||||
name: FreeBSD 12.3
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-bsd.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: freebsd-123
|
||||
display-name: FreeBSD 12.3
|
||||
timeout: 20
|
||||
runs-on: macos-12
|
||||
instances: '["latest"]'
|
||||
|
||||
|
||||
openbsd-7:
|
||||
name: OpenBSD 7
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-bsd.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: openbsd-7
|
||||
display-name: OpenBSD 7
|
||||
timeout: 20
|
||||
runs-on: macos-12
|
||||
instances: '["latest"]'
|
||||
|
||||
|
||||
|
||||
macos-12:
|
||||
name: macOS 12
|
||||
|
@ -293,20 +248,6 @@ jobs:
|
|||
instances: '["git-master", "latest", "default"]'
|
||||
|
||||
|
||||
centos-7:
|
||||
name: CentOS 7
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: centos-7
|
||||
display-name: CentOS 7
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]'
|
||||
|
||||
|
||||
centos-stream8:
|
||||
name: CentOS Stream 8
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
|
@ -335,20 +276,6 @@ jobs:
|
|||
instances: '["stable-3006", "onedir-3006", "stable-3006-6", "git-master", "latest", "default"]'
|
||||
|
||||
|
||||
debian-10:
|
||||
name: Debian 10
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
uses: ./.github/workflows/test-linux.yml
|
||||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
with:
|
||||
distro-slug: debian-10
|
||||
display-name: Debian 10
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]'
|
||||
|
||||
|
||||
debian-11:
|
||||
name: Debian 11
|
||||
if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'
|
||||
|
@ -402,7 +329,7 @@ jobs:
|
|||
distro-slug: fedora-40
|
||||
display-name: Fedora 40
|
||||
timeout: 20
|
||||
instances: '["stable-3006", "git-3006", "stable-3006-6", "git-master", "latest", "default"]'
|
||||
instances: '["stable-3006", "onedir-3006", "stable-3006-6", "latest", "default"]'
|
||||
|
||||
|
||||
gentoo:
|
||||
|
@ -609,9 +536,6 @@ jobs:
|
|||
needs:
|
||||
- lint
|
||||
- generate-actions-workflow
|
||||
- freebsd-131
|
||||
- freebsd-123
|
||||
- openbsd-7
|
||||
- macos-12
|
||||
- macos-13
|
||||
- windows-2019
|
||||
|
@ -621,10 +545,8 @@ jobs:
|
|||
- amazon-2
|
||||
- amazon-2023
|
||||
- arch
|
||||
- centos-7
|
||||
- centos-stream8
|
||||
- centos-stream9
|
||||
- debian-10
|
||||
- debian-11
|
||||
- debian-12
|
||||
- fedora-39
|
||||
|
|
91
.github/workflows/templates/generate.py
vendored
91
.github/workflows/templates/generate.py
vendored
|
@ -12,10 +12,8 @@ LINUX_DISTROS = [
|
|||
"amazon-2",
|
||||
"amazon-2023",
|
||||
"arch",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"fedora-39",
|
||||
|
@ -45,11 +43,6 @@ OSX = [
|
|||
"macos-13",
|
||||
]
|
||||
|
||||
BSD = [
|
||||
"freebsd-131",
|
||||
"freebsd-123",
|
||||
"openbsd-7",
|
||||
]
|
||||
|
||||
STABLE_DISTROS = [
|
||||
"almalinux-8",
|
||||
|
@ -57,10 +50,8 @@ STABLE_DISTROS = [
|
|||
"amazon-2",
|
||||
"amazon-2023",
|
||||
"arch",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"fedora-39",
|
||||
|
@ -84,14 +75,12 @@ ONEDIR_DISTROS = [
|
|||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"amazon-2023",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"fedora-38",
|
||||
"fedora-39",
|
||||
"fedora-40",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
"oraclelinux-9",
|
||||
|
@ -109,10 +98,8 @@ ONEDIR_RC_DISTROS = [
|
|||
"almalinux-9",
|
||||
"amazon-2",
|
||||
"amazon-2023",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"oraclelinux-7",
|
||||
|
@ -140,11 +127,10 @@ BLACKLIST_GIT_3006 = [
|
|||
"amazon-2",
|
||||
"arch",
|
||||
"centos-stream9",
|
||||
"debian-10",
|
||||
"debian-11",
|
||||
"debian-12",
|
||||
"fedora-38",
|
||||
"fedora-39",
|
||||
"fedora-40",
|
||||
"gentoo",
|
||||
"gentoo-systemd",
|
||||
"opensuse-15",
|
||||
|
@ -160,9 +146,6 @@ BLACKLIST_GIT_3006 = [
|
|||
|
||||
BLACKLIST_GIT_MASTER = [
|
||||
"amazon-2",
|
||||
"debian-10",
|
||||
"freebsd-131",
|
||||
"freebsd-123",
|
||||
]
|
||||
|
||||
SALT_VERSIONS = [
|
||||
|
@ -214,10 +197,9 @@ GIT_VERSION_BLACKLIST = [
|
|||
#
|
||||
GIT_DISTRO_BLACKLIST = [
|
||||
"almalinux-8",
|
||||
"centos-7",
|
||||
"centos-stream8",
|
||||
"fedora-38",
|
||||
"fedora-39",
|
||||
"fedora-40",
|
||||
"opensuse-15",
|
||||
"oraclelinux-7",
|
||||
"oraclelinux-8",
|
||||
|
@ -236,10 +218,8 @@ DISTRO_DISPLAY_NAMES = {
|
|||
"amazon-2": "Amazon 2",
|
||||
"amazon-2023": "Amazon 2023",
|
||||
"arch": "Arch",
|
||||
"centos-7": "CentOS 7",
|
||||
"centos-stream8": "CentOS Stream 8",
|
||||
"centos-stream9": "CentOS Stream 9",
|
||||
"debian-10": "Debian 10",
|
||||
"debian-11": "Debian 11",
|
||||
"debian-12": "Debian 12",
|
||||
"fedora-39": "Fedora 39",
|
||||
|
@ -260,9 +240,6 @@ DISTRO_DISPLAY_NAMES = {
|
|||
"ubuntu-2404": "Ubuntu 24.04",
|
||||
"macos-12": "macOS 12",
|
||||
"macos-13": "macOS 13",
|
||||
"freebsd-131": "FreeBSD 13.1",
|
||||
"freebsd-123": "FreeBSD 12.3",
|
||||
"openbsd-7": "OpenBSD 7",
|
||||
"windows-2019": "Windows 2019",
|
||||
"windows-2022": "Windows 2022",
|
||||
}
|
||||
|
@ -296,68 +273,6 @@ def generate_test_jobs():
|
|||
test_jobs = ""
|
||||
needs = ["lint", "generate-actions-workflow"]
|
||||
|
||||
for distro in BSD:
|
||||
test_jobs += "\n"
|
||||
runs_on = "macos-12"
|
||||
runs_on = f"\n runs-on: {runs_on}"
|
||||
ifcheck = "\n if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true'"
|
||||
uses = "./.github/workflows/test-bsd.yml"
|
||||
instances = []
|
||||
timeout_minutes = (
|
||||
TIMEOUT_OVERRIDES[distro]
|
||||
if distro in TIMEOUT_OVERRIDES
|
||||
else TIMEOUT_DEFAULT
|
||||
)
|
||||
for salt_version in SALT_VERSIONS:
|
||||
|
||||
if salt_version == "latest":
|
||||
if distro in LATEST_PKG_BLACKLIST:
|
||||
continue
|
||||
|
||||
instances.append(salt_version)
|
||||
continue
|
||||
|
||||
if distro == "openbsd-7":
|
||||
# Only test latest on OpenBSD 6
|
||||
continue
|
||||
|
||||
if salt_version != "master":
|
||||
# Only test the master branch on BSD's
|
||||
continue
|
||||
|
||||
# BSD's don't have a stable release, only use git
|
||||
for bootstrap_type in ["git"]:
|
||||
|
||||
BLACKLIST = {}
|
||||
if bootstrap_type == "git":
|
||||
BLACKLIST = {
|
||||
"master": BLACKLIST_GIT_MASTER,
|
||||
}
|
||||
|
||||
# .0 versions are a virtual version for pinning to the first
|
||||
# point release of a major release, such as 3006,
|
||||
# there is no git version.
|
||||
if salt_version.endswith("-0"):
|
||||
continue
|
||||
|
||||
if salt_version in ("master") and distro in BLACKLIST[salt_version]:
|
||||
continue
|
||||
|
||||
kitchen_target = f"{bootstrap_type}-{salt_version}"
|
||||
instances.append(kitchen_target)
|
||||
|
||||
if instances:
|
||||
needs.append(distro)
|
||||
test_jobs += TEMPLATE.format(
|
||||
distro=distro,
|
||||
runs_on=runs_on,
|
||||
uses=uses,
|
||||
ifcheck=ifcheck,
|
||||
instances=json.dumps(instances),
|
||||
display_name=DISTRO_DISPLAY_NAMES[distro],
|
||||
timeout_minutes=timeout_minutes,
|
||||
)
|
||||
|
||||
test_jobs += "\n"
|
||||
for distro in OSX:
|
||||
test_jobs += "\n"
|
||||
|
|
102
.github/workflows/test-bsd.yml
vendored
102
.github/workflows/test-bsd.yml
vendored
|
@ -1,102 +0,0 @@
|
|||
name: Test FreeBSD & OpenBSD
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
distro-slug:
|
||||
type: string
|
||||
required: true
|
||||
description: The Distribution Slug
|
||||
|
||||
display-name:
|
||||
type: string
|
||||
required: true
|
||||
description: The Display Name For The Job
|
||||
|
||||
runs-on:
|
||||
type: string
|
||||
required: true
|
||||
description: The GitHub MacOS Worker To Run Workflow On
|
||||
|
||||
instances:
|
||||
type: string
|
||||
required: true
|
||||
description: The Instances To Test
|
||||
|
||||
timeout:
|
||||
type: number
|
||||
required: false
|
||||
default: 20
|
||||
description: The timeout(in minutes) for the workflow
|
||||
|
||||
env:
|
||||
VAGRANT_HOME: '${{ github.workspace }}/.vagrant.d'
|
||||
KITCHEN_LOCAL_YAML: 'kitchen.bsd.yml'
|
||||
|
||||
jobs:
|
||||
Test:
|
||||
name: ${{ matrix.instance }}
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
timeout-minutes: ${{ inputs.timeout }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
instance: ${{ fromJSON(inputs.instances) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.2.3
|
||||
bundler-cache: true
|
||||
|
||||
- name: Update Vagrant
|
||||
run: |
|
||||
brew update
|
||||
brew upgrade vagrant || brew install vagrant
|
||||
|
||||
- name: Setup Vagrant Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/.kitchen
|
||||
${{ github.workspace }}/.vagrant.d/
|
||||
key: "${{ runner.os }}|vagrant|${{ inputs.distro-slug }}|${{ hashFiles('Gemfile', '.github/workflows/test-bsd.yml', 'kitchen.bsd.yml') }}"
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -U pip
|
||||
pip install -r tests/requirements.txt
|
||||
|
||||
- name: Create Test Instance
|
||||
run: |
|
||||
bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }} || \
|
||||
(sleep 10 && bundle exec kitchen create ${{ matrix.instance }}-${{ inputs.distro-slug }})
|
||||
|
||||
- name: Test Bootstrap
|
||||
run: |
|
||||
bundle exec kitchen verify ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Destroy Test Instance
|
||||
if: always()
|
||||
run: |
|
||||
bundle exec kitchen destroy ${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Set Exit Status
|
||||
if: always()
|
||||
run: |
|
||||
mkdir exitstatus
|
||||
echo "${{ job.status }}" > exitstatus/${{ github.job }}-${{ matrix.instance }}-${{ inputs.distro-slug }}
|
||||
|
||||
- name: Upload Exit Status
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: exitstatus
|
||||
path: exitstatus
|
|
@ -24,7 +24,7 @@
|
|||
#======================================================================================================================
|
||||
set -o nounset # Treat unset variables as an error
|
||||
|
||||
__ScriptVersion="2024.04.03"
|
||||
__ScriptVersion="2024.06.04"
|
||||
__ScriptName="bootstrap-salt.sh"
|
||||
|
||||
__ScriptFullName="$0"
|
||||
|
@ -1419,18 +1419,19 @@ __ubuntu_derivatives_translation() {
|
|||
# Mappings
|
||||
trisquel_10_ubuntu_base="20.04"
|
||||
trisquel_11_ubuntu_base="22.04"
|
||||
## DGM linaro_12_ubuntu_base="12.04"
|
||||
## DGM elementary_os_02_ubuntu_base="12.04"
|
||||
## DGM neon_16_ubuntu_base="16.04"
|
||||
## DGM neon_18_ubuntu_base="18.04"
|
||||
trisquel_12_ubuntu_base="24.04"
|
||||
neon_20_ubuntu_base="20.04"
|
||||
neon_22_ubuntu_base="22.04"
|
||||
neon_24_ubuntu_base="24.04"
|
||||
linuxmint_20_ubuntu_base="20.04"
|
||||
linuxmint_21_ubuntu_base="20.04"
|
||||
linuxmint_21_ubuntu_base="22.04"
|
||||
linuxmint_22_ubuntu_base="24.04"
|
||||
elementary_os_06_ubuntu_base="20.04"
|
||||
elementary_os_07_ubuntu_base="20.04"
|
||||
elementary_os_07_ubuntu_base="22.04"
|
||||
elementary_os_08_ubuntu_base="24.04"
|
||||
pop_20_ubuntu_base="22.04"
|
||||
pop_22_ubuntu_base="22.04"
|
||||
pop_24_ubuntu_base="24.04"
|
||||
|
||||
# Translate Ubuntu derivatives to their base Ubuntu version
|
||||
match=$(echo "$DISTRO_NAME_L" | grep -E ${UBUNTU_DERIVATIVES})
|
||||
|
@ -1592,21 +1593,21 @@ __debian_derivatives_translation() {
|
|||
|
||||
DEBIAN_DERIVATIVES="(cumulus|devuan|kali|linuxmint|raspbian|bunsenlabs|turnkey)"
|
||||
# Mappings
|
||||
cumulus_2_debian_base="7.0"
|
||||
cumulus_3_debian_base="8.0"
|
||||
cumulus_4_debian_base="10.0"
|
||||
devuan_1_debian_base="8.0"
|
||||
devuan_2_debian_base="9.0"
|
||||
cumulus_5_debian_base="11.0"
|
||||
cumulus_6_debian_base="12.0"
|
||||
devuan_4_debian_base="11.0"
|
||||
devuan_5_debian_base="12.0"
|
||||
kali_1_debian_base="7.0"
|
||||
kali_2021_debian_base="10.0"
|
||||
linuxmint_1_debian_base="8.0"
|
||||
raspbian_8_debian_base="8.0"
|
||||
raspbian_9_debian_base="9.0"
|
||||
raspbian_10_debian_base="10.0"
|
||||
linuxmint_4_debian_base="11.0"
|
||||
linuxmint_5_debian_base="12.0"
|
||||
raspbian_11_debian_base="11.0"
|
||||
raspbian_12_debian_base="12.0"
|
||||
bunsenlabs_9_debian_base="9.0"
|
||||
turnkey_9_debian_base="9.0"
|
||||
bunsenlabs_11_debian_base="11.0"
|
||||
bunsenlabs_12_debian_base="12.0"
|
||||
turnkey_11_debian_base="11.0"
|
||||
turnkey_12_debian_base="12.0"
|
||||
|
||||
# Translate Debian derivatives to their base Debian version
|
||||
match=$(echo "$DISTRO_NAME_L" | grep -E ${DEBIAN_DERIVATIVES})
|
||||
|
@ -3026,8 +3027,8 @@ __install_saltstack_ubuntu_repository() {
|
|||
{ [ "$DISTRO_MAJOR_VERSION" -eq 22 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]; } || \
|
||||
[ "$DISTRO_MAJOR_VERSION" -eq 21 ] || [ "$DISTRO_MAJOR_VERSION" -eq 23 ]; then
|
||||
echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages for previous LTS release. You may experience problems."
|
||||
UBUNTU_VERSION=22.04
|
||||
UBUNTU_CODENAME="jammy"
|
||||
UBUNTU_VERSION=24.04
|
||||
UBUNTU_CODENAME="noble"
|
||||
else
|
||||
UBUNTU_VERSION=${DISTRO_VERSION}
|
||||
UBUNTU_CODENAME=${DISTRO_CODENAME}
|
||||
|
@ -3071,8 +3072,8 @@ __install_saltstack_ubuntu_onedir_repository() {
|
|||
{ [ "$DISTRO_MAJOR_VERSION" -eq 22 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]; } || \
|
||||
[ "$DISTRO_MAJOR_VERSION" -eq 21 ] || [ "$DISTRO_MAJOR_VERSION" -eq 23 ]; then
|
||||
echowarn "Non-LTS Ubuntu detected, but stable packages requested. Trying packages for previous LTS release. You may experience problems."
|
||||
UBUNTU_VERSION=22.04
|
||||
UBUNTU_CODENAME="jammy"
|
||||
UBUNTU_VERSION=24.04
|
||||
UBUNTU_CODENAME="noble"
|
||||
else
|
||||
UBUNTU_VERSION=${DISTRO_VERSION}
|
||||
UBUNTU_CODENAME=${DISTRO_CODENAME}
|
||||
|
@ -3176,9 +3177,9 @@ install_ubuntu_stable_deps() {
|
|||
|
||||
if [ "${_UPGRADE_SYS}" -eq "$BS_TRUE" ]; then
|
||||
if [ "${_INSECURE_DL}" -eq "$BS_TRUE" ]; then
|
||||
## TBD DGM Need to understand what this code is doing, since '-ge 20' already covers '-ge 21' etc.
|
||||
## TBD DGM Need to understand what this code is doing, since '-ge 20' already covers '-ge 21' etc., added 23 & 24 to continue style
|
||||
## also apt-key is deprecated
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 20 ] || [ "$DISTRO_MAJOR_VERSION" -ge 21 ] || [ "$DISTRO_MAJOR_VERSION" -ge 22 ]; then
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 20 ] || [ "$DISTRO_MAJOR_VERSION" -ge 21 ] || [ "$DISTRO_MAJOR_VERSION" -ge 22 ] || [ "$DISTRO_MAJOR_VERSION" -ge 23 ] || [ "$DISTRO_MAJOR_VERSION" -ge 24 ]; then
|
||||
__apt_get_install_noinput --allow-unauthenticated debian-archive-keyring && apt-get update || return 1
|
||||
else
|
||||
__apt_get_install_noinput --allow-unauthenticated debian-archive-keyring &&
|
||||
|
@ -3490,12 +3491,11 @@ install_ubuntu_check_services() {
|
|||
[ "$fname" = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq "$BS_FALSE" ] && continue
|
||||
|
||||
if [ -f /bin/systemctl ] && [ "$DISTRO_MAJOR_VERSION" -ge 16 ]; then
|
||||
__check_services_systemd "salt-$fname" || return 1
|
||||
elif [ -f /sbin/initctl ] && [ -f "/etc/init/salt-${fname}.conf" ]; then
|
||||
__check_services_upstart "salt-$fname" || return 1
|
||||
elif [ -f "/etc/init.d/salt-$fname" ]; then
|
||||
__check_services_debian "salt-$fname" || return 1
|
||||
__check_services_systemd salt-$fname || return 1
|
||||
elif [ -f /etc/init.d/salt-$fname ]; then
|
||||
__check_services_debian salt-$fname || return 1
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
return 0
|
||||
|
@ -3726,158 +3726,7 @@ install_debian_git_deps() {
|
|||
return 0
|
||||
}
|
||||
|
||||
install_debian_7_git_deps() {
|
||||
install_debian_deps || return 1
|
||||
install_debian_git_deps || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
install_debian_8_git_deps() {
|
||||
|
||||
if [ "${_POST_NEON_INSTALL}" -eq "$BS_TRUE" ]; then
|
||||
echodebug "CALLING install_debian_git_deps"
|
||||
install_debian_git_deps || return 1
|
||||
return 0
|
||||
else
|
||||
echoerror "Python 2 is no longer supported, only Py3 packages"
|
||||
return 1
|
||||
fi
|
||||
|
||||
## DGM install_debian_deps || return 1
|
||||
|
||||
## DGM if ! __check_command_exists git; then
|
||||
## DGM __apt_get_install_noinput git || return 1
|
||||
## DGM fi
|
||||
|
||||
## DGM if [ "$_INSECURE_DL" -eq "$BS_FALSE" ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then
|
||||
## DGM __apt_get_install_noinput ca-certificates
|
||||
## DGM fi
|
||||
|
||||
## DGM __git_clone_and_checkout || return 1
|
||||
|
||||
## DGM __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-crypto python-jinja2"
|
||||
## DGM __PACKAGES="${__PACKAGES} python-m2crypto python-msgpack python-requests python-systemd"
|
||||
## DGM __PACKAGES="${__PACKAGES} python-yaml python-zmq python-concurrent.futures"
|
||||
|
||||
## DGM if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then
|
||||
## DGM # Install python-libcloud if asked to
|
||||
## DGM __PACKAGES="${__PACKAGES} python-libcloud"
|
||||
## DGM fi
|
||||
|
||||
## DGM __PIP_PACKAGES=''
|
||||
## DGM if (__check_pip_allowed >/dev/null 2>&1); then
|
||||
## DGM __PIP_PACKAGES='tornado<5.0'
|
||||
## DGM # Install development environment for building tornado Python module
|
||||
## DGM __PACKAGES="${__PACKAGES} build-essential python-dev"
|
||||
|
||||
## DGM if ! __check_command_exists pip; then
|
||||
## DGM __PACKAGES="${__PACKAGES} python-pip"
|
||||
## DGM fi
|
||||
## DGM # Attempt to configure backports repo on non-x86_64 system
|
||||
## DGM elif [ "$_DISABLE_REPOS" -eq "$BS_FALSE" ] && [ "$DPKG_ARCHITECTURE" != "amd64" ]; then
|
||||
## DGM # Check if Debian Backports repo already configured
|
||||
## DGM if ! apt-cache policy | grep -q 'Debian Backports'; then
|
||||
## DGM echo 'deb http://httpredir.debian.org/debian jessie-backports main' > \
|
||||
## DGM /etc/apt/sources.list.d/backports.list
|
||||
## DGM fi
|
||||
|
||||
## DGM __wait_for_apt apt-get update || return 1
|
||||
|
||||
## DGM # python-tornado package should be installed from backports repo
|
||||
## DGM __PACKAGES="${__PACKAGES} python-backports.ssl-match-hostname python-tornado/jessie-backports"
|
||||
## DGM else
|
||||
## DGM __PACKAGES="${__PACKAGES} python-backports.ssl-match-hostname python-tornado"
|
||||
## DGM fi
|
||||
|
||||
## DGM # shellcheck disable=SC2086
|
||||
## DGM __apt_get_install_noinput "${__PACKAGES}" || return 1
|
||||
|
||||
## DGM if [ "${__PIP_PACKAGES}" != "" ]; then
|
||||
## DGM # shellcheck disable=SC2086,SC2090
|
||||
## DGM pip install -U "${__PIP_PACKAGES}" || return 1
|
||||
## DGM fi
|
||||
|
||||
## DGM # Let's trigger config_salt()
|
||||
## DGM if [ "$_TEMP_CONFIG_DIR" = "null" ]; then
|
||||
## DGM _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/"
|
||||
## DGM CONFIG_SALT_FUNC="config_salt"
|
||||
## DGM fi
|
||||
|
||||
## DGM return 0
|
||||
}
|
||||
|
||||
install_debian_9_git_deps() {
|
||||
|
||||
if [ "${_POST_NEON_INSTALL}" -eq "$BS_TRUE" ]; then
|
||||
install_debian_git_deps || return 1
|
||||
return 0
|
||||
else
|
||||
echoerror "Python 2 is no longer supported, only Py3 packages"
|
||||
return 1
|
||||
fi
|
||||
|
||||
## DGM install_debian_deps || return 1
|
||||
## DGM install_debian_git_pre || return 1
|
||||
|
||||
## DGM __PACKAGES="libzmq5 lsb-release"
|
||||
|
||||
## DGM if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
|
||||
## DGM PY_PKG_VER=3
|
||||
## DGM else
|
||||
## DGM PY_PKG_VER=""
|
||||
|
||||
## DGM # These packages are PY2-ONLY
|
||||
## DGM __PACKAGES="${__PACKAGES} python-backports-abc python-m2crypto python-concurrent.futures"
|
||||
## DGM fi
|
||||
|
||||
## DGM __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-apt python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2"
|
||||
## DGM __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-systemd"
|
||||
## DGM __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-yaml python${PY_PKG_VER}-zmq"
|
||||
|
||||
## DGM if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then
|
||||
## DGM # Install python-libcloud if asked to
|
||||
## DGM __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud"
|
||||
## DGM fi
|
||||
|
||||
## DGM # shellcheck disable=SC2086
|
||||
## DGM __apt_get_install_noinput ${__PACKAGES} || return 1
|
||||
|
||||
## DGM return 0
|
||||
}
|
||||
|
||||
install_debian_10_git_deps() {
|
||||
|
||||
if [ "${_POST_NEON_INSTALL}" -eq "$BS_TRUE" ]; then
|
||||
install_debian_git_deps || return 1
|
||||
return 0
|
||||
else
|
||||
echoerror "Python 2 is no longer supported, only Py3 packages"
|
||||
return 1
|
||||
fi
|
||||
|
||||
## DGM install_debian_deps || return 1
|
||||
## DGM install_debian_git_pre || return 1
|
||||
|
||||
## DGM if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then
|
||||
## DGM _py=${_PY_EXE}
|
||||
## DGM PY_PKG_VER=3
|
||||
## DGM __PACKAGES="python${PY_PKG_VER}-distutils"
|
||||
## DGM else
|
||||
## DGM _py="python"
|
||||
## DGM PY_PKG_VER=""
|
||||
## DGM __PACKAGES=""
|
||||
## DGM fi
|
||||
|
||||
## DGM __install_tornado_pip "${_py}" || return 1
|
||||
## DGM __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-jinja2"
|
||||
## DGM __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-yaml python${PY_PKG_VER}-zmq"
|
||||
|
||||
## DGM # shellcheck disable=SC2086
|
||||
## DGM __apt_get_install_noinput "${__PACKAGES}" || return 1
|
||||
|
||||
## DGM return 0
|
||||
}
|
||||
|
||||
install_debian_stable() {
|
||||
__PACKAGES=""
|
||||
|
@ -3901,21 +3750,6 @@ install_debian_stable() {
|
|||
return 0
|
||||
}
|
||||
|
||||
install_debian_7_stable() {
|
||||
install_debian_stable || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_debian_8_stable() {
|
||||
install_debian_stable || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_debian_9_stable() {
|
||||
install_debian_stable || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_debian_git() {
|
||||
if [ -n "$_PY_EXE" ]; then
|
||||
_PYEXE=${_PY_EXE}
|
||||
|
@ -3959,21 +3793,6 @@ install_debian_git() {
|
|||
fi
|
||||
}
|
||||
|
||||
install_debian_7_git() {
|
||||
install_debian_git || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_debian_8_git() {
|
||||
install_debian_git || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_debian_9_git() {
|
||||
install_debian_git || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
install_debian_onedir() {
|
||||
__PACKAGES=""
|
||||
|
||||
|
@ -4462,6 +4281,8 @@ install_fedora_onedir_deps() {
|
|||
## DGM __PACKAGES="yum-utils chkconfig"
|
||||
## DGM fi
|
||||
|
||||
__PACKAGES=""
|
||||
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 9 ]; then
|
||||
__PACKAGES="chkconfig"
|
||||
elif [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then
|
||||
|
@ -4470,8 +4291,6 @@ install_fedora_onedir_deps() {
|
|||
__PACKAGES="yum-utils chkconfig procps"
|
||||
fi
|
||||
|
||||
__PACKAGES="${__PACKAGES}"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
__yum_install_noinput "${__PACKAGES}" || return 1
|
||||
|
||||
|
@ -4617,6 +4436,8 @@ install_centos_stable_deps() {
|
|||
## DGM __PACKAGES="yum-utils chkconfig"
|
||||
## DGM fi
|
||||
|
||||
__PACKAGES=""
|
||||
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 9 ]; then
|
||||
__PACKAGES="chkconfig"
|
||||
elif [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then
|
||||
|
@ -4625,8 +4446,6 @@ install_centos_stable_deps() {
|
|||
__PACKAGES="yum-utils chkconfig procps"
|
||||
fi
|
||||
|
||||
__PACKAGES="${__PACKAGES}"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
__yum_install_noinput "${__PACKAGES}" || return 1
|
||||
|
||||
|
@ -4843,6 +4662,8 @@ install_centos_onedir_deps() {
|
|||
## DGM __PACKAGES="yum-utils chkconfig"
|
||||
## DGM fi
|
||||
|
||||
__PACKAGES=""
|
||||
|
||||
if [ "$DISTRO_MAJOR_VERSION" -ge 9 ]; then
|
||||
__PACKAGES="chkconfig"
|
||||
elif [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then
|
||||
|
@ -4851,8 +4672,6 @@ install_centos_onedir_deps() {
|
|||
__PACKAGES="yum-utils chkconfig procps"
|
||||
fi
|
||||
|
||||
__PACKAGES="${__PACKAGES}"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
__yum_install_noinput "${__PACKAGES}" || return 1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue