diff --git a/.drone.jsonnet b/.drone.jsonnet index 1e5c1ae..e7145b5 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -1,28 +1,36 @@ local git_suites = [ - { name: 'Py2 2017.7(Git)', slug: 'py2-git-2017-7', depends: [] }, - { name: 'Py2 2018.3(Git)', slug: 'py2-git-2018-3', depends: ['Py2 2017.7(Git)'] }, + { name: 'Py2 2018.3(Git)', slug: 'py2-git-2018-3', depends: [] }, { name: 'Py2 2019.2(Git)', slug: 'py2-git-2019-2', depends: ['Py2 2018.3(Git)'] }, // {name: 'Py2 develop(Stable)', slug: 'py2-git-develop'}, // Don't test against Salt's develop branch. Stability is not assured. ]; +local git_py3_suites = [ + { name: 'Py3 2018.3(Git)', slug: 'py3-git-2018-3', depends: [] }, + { name: 'Py3 2019.2(Git)', slug: 'py3-git-2019-2', depends: ['Py3 2018.3(Git)'] }, +]; + local stable_suites = [ - { name: 'Py2 2017.7(Stable)', slug: 'py2-stable-2017-7', depends: ['Py2 2017.7(Git)'] }, { name: 'Py2 2018.3(Stable)', slug: 'py2-stable-2018-3', depends: ['Py2 2018.3(Git)'] }, { name: 'Py2 2019.2(Stable)', slug: 'py2-stable-2019-2', depends: ['Py2 2019.2(Git)'] }, ]; +local stable_py3_suites = [ + { name: 'Py3 2018.3(Stable)', slug: 'py3-stable-2018-3', depends: ['Py3 2018.3(Git)'] }, + { name: 'Py3 2019.2(Stable)', slug: 'py3-stable-2019-2', depends: ['Py3 2019.2(Git)'] }, +]; + local distros = [ { name: 'Arch', slug: 'arch', multiplier: 0, depends: [] }, // { name: 'Amazon 1', slug: 'amazon-1', multiplier: 1, depends: [] }, // { name: 'Amazon 2', slug: 'amazon-2', multiplier: 2, depends: [] }, { name: 'CentOS 6', slug: 'centos-6', multiplier: 3, depends: [] }, { name: 'CentOS 7', slug: 'centos-7', multiplier: 4, depends: [] }, + { name: 'CentOS 8', slug: 'centos-8', multiplier: 4, depends: [] }, { name: 'Debian 8', slug: 'debian-8', multiplier: 5, depends: [] }, { name: 'Debian 9', slug: 'debian-9', multiplier: 6, depends: [] }, - { name: 'Fedora 28', slug: 'fedora-28', multiplier: 6, depends: [] }, - { name: 'Fedora 29', slug: 'fedora-29', multiplier: 5, depends: [] }, + { name: 'Debian 10', slug: 'debian-10', multiplier: 6, depends: [] }, + { name: 'Fedora 30', slug: 'fedora-30', multiplier: 6, depends: [] }, { name: 'Opensuse 15.0', slug: 'opensuse-15', multiplier: 4, depends: [] }, - { name: 'Opensuse 42.3', slug: 'opensuse-42', multiplier: 3, depends: [] }, { name: 'Ubuntu 16.04', slug: 'ubuntu-1604', multiplier: 1, depends: [] }, { name: 'Ubuntu 18.04', slug: 'ubuntu-1804', multiplier: 0, depends: [] }, ]; @@ -32,12 +40,35 @@ local stable_distros = [ 'amazon-2', 'centos-6', 'centos-7', + 'centos-8', 'debian-8', 'debian-9', + 'debian-10', 'ubuntu-1604', 'ubuntu-1804', ]; +local py3_distros = [ + 'amazon-2', + 'centos-7', + 'centos-8', + 'debian-9', + 'debian-10', + 'ubuntu-1604', + 'ubuntu-1804', + 'fedora-30', +]; + +local py2_blacklist = [ + 'centos-8', + 'debian-10', +]; + +local blacklist_2018 = [ + 'centos-8', + 'debian-10', +]; + local Shellcheck() = { kind: 'pipeline', name: 'Lint', @@ -61,7 +92,17 @@ local Build(distro) = { project: 'open', }, - local suites = if std.count(stable_distros, distro.slug) > 0 then git_suites + stable_suites else git_suites, + local suite = + if std.count(py2_blacklist, distro.slug) > 0 then + [] + else if std.count(stable_distros, distro.slug) > 0 then + git_suites + stable_suites + else git_suites, + local suites = suite + if std.count(blacklist_2018, distro.slug) > 0 then + git_py3_suites + stable_py3_suites[1:] + else if std.count(py3_distros, distro.slug) > 0 then + git_py3_suites + stable_py3_suites + else [], steps: [ { diff --git a/.drone.yml b/.drone.yml index 521bd89..f7d4ecf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,13 +24,13 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=0; echo Sleeping 0 seconds; sleep 0'" + - sh -c 't=0; echo Sleeping 0 seconds; sleep 0' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - bundle exec kitchen create arch @@ -39,19 +39,6 @@ steps: depends_on: - throttle-build -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-arch - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -103,13 +90,13 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=90; echo Sleeping 90 seconds; sleep 90'" + - sh -c 't=60; echo Sleeping 60 seconds; sleep 60' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - bundle exec kitchen create centos-6 @@ -118,19 +105,6 @@ steps: depends_on: - throttle-build -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-centos-6 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -157,19 +131,6 @@ steps: - throttle-build - create -- name: Py2 2017.7(Stable) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-stable-2017-7-centos-6 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Stable) image: saltstack/drone-salt-bootstrap-testing commands: @@ -221,13 +182,13 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=120; echo Sleeping 120 seconds; sleep 120'" + - sh -c 't=160; echo Sleeping 160 seconds; sleep 160' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - bundle exec kitchen create centos-7 @@ -236,19 +197,6 @@ steps: depends_on: - throttle-build -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-centos-7 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -275,19 +223,6 @@ steps: - throttle-build - create -- name: Py2 2017.7(Stable) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-stable-2017-7-centos-7 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Stable) image: saltstack/drone-salt-bootstrap-testing commands: @@ -314,6 +249,137 @@ steps: - throttle-build - create +- name: Py3 2018.3(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2018-3-centos-7 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2019-2-centos-7 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2018.3(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2018-3-centos-7 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2019-2-centos-7 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +services: +- name: docker + image: saltstack/drone-salt-bootstrap-testing + command: + - --storage-driver=overlay2 + privileged: true + +node: + project: open + +depends_on: +- Lint + +--- +kind: pipeline +name: CentOS 8 + +platform: + os: linux + arch: amd64 + +steps: +- name: throttle-build + image: alpine + commands: + - sh -c 't=60; echo Sleeping 60 seconds; sleep 60' + +- name: create + image: saltstack/drone-salt-bootstrap-testing + commands: + - bundle install --with docker --without opennebula ec2 windows vagrant + - echo 'Waiting for docker to start' + - sleep 10 + - docker ps -a + - bundle exec kitchen create centos-8 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + +- name: Py3 2018.3(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2018-3-centos-8 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2019-2-centos-8 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2019-2-centos-8 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + services: - name: docker image: saltstack/drone-salt-bootstrap-testing @@ -339,13 +405,13 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=150; echo Sleeping 150 seconds; sleep 150'" + - sh -c 't=100; echo Sleeping 100 seconds; sleep 100' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - bundle exec kitchen create debian-8 @@ -354,19 +420,6 @@ steps: depends_on: - throttle-build -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-debian-8 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -393,19 +446,6 @@ steps: - throttle-build - create -- name: Py2 2017.7(Stable) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-stable-2017-7-debian-8 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Stable) image: saltstack/drone-salt-bootstrap-testing commands: @@ -457,13 +497,13 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=180; echo Sleeping 180 seconds; sleep 180'" + - sh -c 't=240; echo Sleeping 240 seconds; sleep 240' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - bundle exec kitchen create debian-9 @@ -472,19 +512,6 @@ steps: depends_on: - throttle-build -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-debian-9 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -511,19 +538,6 @@ steps: - throttle-build - create -- name: Py2 2017.7(Stable) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-stable-2017-7-debian-9 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Stable) image: saltstack/drone-salt-bootstrap-testing commands: @@ -550,79 +564,52 @@ steps: - throttle-build - create -services: -- name: docker - image: saltstack/drone-salt-bootstrap-testing - command: - - --storage-driver=overlay2 - privileged: true - -node: - project: open - -depends_on: -- Lint - ---- -kind: pipeline -name: Fedora 28 - -platform: - os: linux - arch: amd64 - -steps: -- name: throttle-build - image: alpine - commands: - - "sh -c 't=90; echo Sleeping 90 seconds; sleep 90'" - -- name: create - image: saltstack/drone-salt-bootstrap-testing - commands: - - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" - - sleep 10 - - docker ps -a - - bundle exec kitchen create fedora-28 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - -- name: Py2 2017.7(Git) +- name: Py3 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: - pip install -U pip - pip install -r tests/requirements.txt - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-fedora-28 + - bundle exec kitchen test py3-git-2018-3-debian-9 environment: DOCKER_HOST: tcp://docker:2375 depends_on: - throttle-build - create -- name: Py2 2018.3(Git) +- name: Py3 2019.2(Git) image: saltstack/drone-salt-bootstrap-testing commands: - pip install -U pip - pip install -r tests/requirements.txt - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2018-3-fedora-28 + - bundle exec kitchen test py3-git-2019-2-debian-9 environment: DOCKER_HOST: tcp://docker:2375 depends_on: - throttle-build - create -- name: Py2 2019.2(Git) +- name: Py3 2018.3(Stable) image: saltstack/drone-salt-bootstrap-testing commands: - pip install -U pip - pip install -r tests/requirements.txt - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2019-2-fedora-28 + - bundle exec kitchen test py3-stable-2018-3-debian-9 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2019-2-debian-9 environment: DOCKER_HOST: tcp://docker:2375 depends_on: @@ -644,7 +631,7 @@ depends_on: --- kind: pipeline -name: Fedora 29 +name: Debian 10 platform: os: linux @@ -654,41 +641,107 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=75; echo Sleeping 75 seconds; sleep 75'" + - sh -c 't=90; echo Sleeping 90 seconds; sleep 90' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - - bundle exec kitchen create fedora-29 + - bundle exec kitchen create debian-10 environment: DOCKER_HOST: tcp://docker:2375 depends_on: - throttle-build -- name: Py2 2017.7(Git) +- name: Py3 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: - pip install -U pip - pip install -r tests/requirements.txt - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-fedora-29 + - bundle exec kitchen test py3-git-2018-3-debian-10 environment: DOCKER_HOST: tcp://docker:2375 depends_on: - throttle-build - create +- name: Py3 2019.2(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2019-2-debian-10 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2019-2-debian-10 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +services: +- name: docker + image: saltstack/drone-salt-bootstrap-testing + command: + - --storage-driver=overlay2 + privileged: true + +node: + project: open + +depends_on: +- Lint + +--- +kind: pipeline +name: Fedora 30 + +platform: + os: linux + arch: amd64 + +steps: +- name: throttle-build + image: alpine + commands: + - sh -c 't=180; echo Sleeping 180 seconds; sleep 180' + +- name: create + image: saltstack/drone-salt-bootstrap-testing + commands: + - bundle install --with docker --without opennebula ec2 windows vagrant + - echo 'Waiting for docker to start' + - sleep 10 + - docker ps -a + - bundle exec kitchen create fedora-30 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: - pip install -U pip - pip install -r tests/requirements.txt - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2018-3-fedora-29 + - bundle exec kitchen test py2-git-2018-3-fedora-30 environment: DOCKER_HOST: tcp://docker:2375 depends_on: @@ -701,7 +754,59 @@ steps: - pip install -U pip - pip install -r tests/requirements.txt - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2019-2-fedora-29 + - bundle exec kitchen test py2-git-2019-2-fedora-30 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2018.3(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2018-3-fedora-30 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2019-2-fedora-30 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2018.3(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2018-3-fedora-30 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2019-2-fedora-30 environment: DOCKER_HOST: tcp://docker:2375 depends_on: @@ -733,13 +838,13 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=60; echo Sleeping 60 seconds; sleep 60'" + - sh -c 't=40; echo Sleeping 40 seconds; sleep 40' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - bundle exec kitchen create opensuse-15 @@ -748,19 +853,6 @@ steps: depends_on: - throttle-build -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-opensuse-15 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -800,85 +892,6 @@ node: depends_on: - Lint ---- -kind: pipeline -name: Opensuse 42.3 - -platform: - os: linux - arch: amd64 - -steps: -- name: throttle-build - image: alpine - commands: - - "sh -c 't=45; echo Sleeping 45 seconds; sleep 45'" - -- name: create - image: saltstack/drone-salt-bootstrap-testing - commands: - - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" - - sleep 10 - - docker ps -a - - bundle exec kitchen create opensuse-42 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-opensuse-42 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - -- name: Py2 2018.3(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2018-3-opensuse-42 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - -- name: Py2 2019.2(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2019-2-opensuse-42 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - -services: -- name: docker - image: saltstack/drone-salt-bootstrap-testing - command: - - --storage-driver=overlay2 - privileged: true - -node: - project: open - -depends_on: -- Lint - --- kind: pipeline name: Ubuntu 16.04 @@ -891,13 +904,13 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=30; echo Sleeping 30 seconds; sleep 30'" + - sh -c 't=40; echo Sleeping 40 seconds; sleep 40' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - bundle exec kitchen create ubuntu-1604 @@ -906,19 +919,6 @@ steps: depends_on: - throttle-build -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-ubuntu-1604 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -945,19 +945,6 @@ steps: - throttle-build - create -- name: Py2 2017.7(Stable) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-stable-2017-7-ubuntu-1604 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Stable) image: saltstack/drone-salt-bootstrap-testing commands: @@ -984,6 +971,58 @@ steps: - throttle-build - create +- name: Py3 2018.3(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2018-3-ubuntu-1604 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2019-2-ubuntu-1604 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2018.3(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2018-3-ubuntu-1604 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2019-2-ubuntu-1604 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + services: - name: docker image: saltstack/drone-salt-bootstrap-testing @@ -1009,13 +1048,13 @@ steps: - name: throttle-build image: alpine commands: - - "sh -c 't=0; echo Sleeping 0 seconds; sleep 0'" + - sh -c 't=0; echo Sleeping 0 seconds; sleep 0' - name: create image: saltstack/drone-salt-bootstrap-testing commands: - bundle install --with docker --without opennebula ec2 windows vagrant - - "echo 'Waiting for docker to start'" + - echo 'Waiting for docker to start' - sleep 10 - docker ps -a - bundle exec kitchen create ubuntu-1804 @@ -1024,19 +1063,6 @@ steps: depends_on: - throttle-build -- name: Py2 2017.7(Git) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-git-2017-7-ubuntu-1804 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Git) image: saltstack/drone-salt-bootstrap-testing commands: @@ -1063,19 +1089,6 @@ steps: - throttle-build - create -- name: Py2 2017.7(Stable) - image: saltstack/drone-salt-bootstrap-testing - commands: - - pip install -U pip - - pip install -r tests/requirements.txt - - bundle install --with docker --without opennebula ec2 windows vagrant - - bundle exec kitchen test py2-stable-2017-7-ubuntu-1804 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - - name: Py2 2018.3(Stable) image: saltstack/drone-salt-bootstrap-testing commands: @@ -1102,6 +1115,58 @@ steps: - throttle-build - create +- name: Py3 2018.3(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2018-3-ubuntu-1804 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Git) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-git-2019-2-ubuntu-1804 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2018.3(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2018-3-ubuntu-1804 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + +- name: Py3 2019.2(Stable) + image: saltstack/drone-salt-bootstrap-testing + commands: + - pip install -U pip + - pip install -r tests/requirements.txt + - bundle install --with docker --without opennebula ec2 windows vagrant + - bundle exec kitchen test py3-stable-2019-2-ubuntu-1804 + environment: + DOCKER_HOST: tcp://docker:2375 + depends_on: + - throttle-build + - create + services: - name: docker image: saltstack/drone-salt-bootstrap-testing @@ -1117,6 +1182,6 @@ depends_on: --- kind: signature -hmac: b7e8b81af5c37f4432730a739032d9bbfb32d125b7e55ca8e94d0c08f8e40e59 +hmac: 906ceab2f0ec44b6e9c99f698feeb4874c503fd9db2a8525ed2916445069c403 ... diff --git a/.gitignore b/.gitignore index 0d8af35..48d9908 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ .idea # test-kitchen +.kitchen .bundle Gemfile.lock diff --git a/.kitchen.yml b/.kitchen.yml index d8c5217..3fd2af7 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -47,6 +47,9 @@ platforms: provision_command: - pacman -Syu --noconfirm --needed systemd grep awk procps which - systemctl enable sshd + - name: centos-8 + driver_config: + run_command: /usr/lib/systemd/systemd - name: centos-7 driver_config: run_command: /usr/lib/systemd/systemd @@ -65,13 +68,16 @@ platforms: - name: debian-9 driver_config: run_command: /lib/systemd/systemd - - name: fedora-28 + - name: debian-10 driver_config: - image: fedora:28 + run_command: /lib/systemd/systemd + - name: fedora-30 + driver_config: + image: fedora:30 run_command: /usr/lib/systemd/systemd - - name: fedora-29 + - name: fedora-31 driver_config: - image: fedora:29 + image: fedora:31 run_command: /usr/lib/systemd/systemd - name: opensuse-15 driver_config: @@ -82,13 +88,6 @@ platforms: - systemctl enable sshd.service provisioner: salt_bootstrap_options: -MPfq -y -x python2 git %s - - name: opensuse-42 - driver_config: - image: opensuse/leap:42.3 - run_command: /usr/lib/systemd/systemd - provision_command: - - zypper --non-interactive install --auto-agree-with-licenses dbus-1 - - systemctl enable sshd.service - name: ubuntu-18.04 driver_config: run_command: /lib/systemd/systemd @@ -97,45 +96,66 @@ platforms: run_command: /lib/systemd/systemd suites: - - name: py2-git-2017-7 - provisioner: - salt_version: 2017.7 - name: py2-git-2018-3 provisioner: salt_version: 2018.3 - name: py2-git-2019-2 provisioner: salt_version: 2019.2 - - name: py2-stable-2017-7 + - name: py2-git-master provisioner: - salt_version: 2017.7 - salt_bootstrap_options: -MP stable %s - excludes: - - arch - - fedora-28 - - fedora-29 - - opensuse-15 - - opensuse-42 + salt_version: master - name: py2-stable-2018-3 provisioner: salt_version: 2018.3 salt_bootstrap_options: -MP stable %s excludes: - arch - - fedora-28 - - fedora-29 - opensuse-15 - - opensuse-42 - name: py2-stable-2019-2 provisioner: salt_version: 2019.2 salt_bootstrap_options: -MP stable %s excludes: - arch - - fedora-28 - - fedora-29 - opensuse-15 - - opensuse-42 + - name: py3-git-2018-3 + provisioner: + salt_version: 2018.3 + salt_bootstrap_options: -x python3 -MPfq git %s + excludes: + - amazon-1 + - centos-6 + - debian-8 + - opensuse-15 + - name: py3-git-2019-2 + provisioner: + salt_version: 2019.2 + salt_bootstrap_options: -x python3 -MPfq git %s + excludes: + - amazon-1 + - centos-6 + - debian-8 + - opensuse-15 + - name: py3-stable-2018-3 + provisioner: + salt_version: 2018.3 + salt_bootstrap_options: -x python3 -MP stable %s + excludes: + - amazon-1 + - centos-6 + - debian-8 + - opensuse-15 + - name: py3-stable-2019-2 + provisioner: + salt_version: 2019.2 + salt_bootstrap_options: -x python3 -MP stable %s + excludes: + - amazon-1 + - centos-6 + - debian-8 + - opensuse-15 + - arch verifier: name: shell diff --git a/AUTHORS.rst b/AUTHORS.rst index 1f824bd..3fc7c87 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -89,6 +89,7 @@ Justin Findlay jfindlay jfindlay@gmail.com Karl Grzeszczak karlgrz Kenneth Wilke KennethWilke Kevin Quinn kevinquinnyo kevin.quinn@totalserversolutions.com +kiemlicz kiemlicz Ky-Anh Huynh icy Liu Xiaohui oreh herolxh@gmail.com lomeroe lomeroe @@ -150,6 +151,7 @@ Shane Lee twangboy slee@saltstack.com Shawn Butts shawnbutts Skyler Berg skylerberg skylertheberg@gmail.com Stanislav B stanislavb +stanzgy stanzgy stanzgy@gmail.com Steve Groesz wolfpackmars2 wolfpackmars2@yahoo.com Sven R hackacad admin@hackacad.net sybix sybix diff --git a/ChangeLog b/ChangeLog index 8002196..dd36fa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ Version TBD (In Progress on the Develop Branch): +Version 2019.11.04: + * Fix busybox mktemp compatibility (stanzgy) #1369 + * Install debian 10 packages on debian 10 instead of 9 (kiemlicz) #1375 + * move centos to python36, use python specified by -x (Ch3LL,bryceml) #1380 + * Add debian 10 git install support (Ch3LL) #1378 + Version 2019.10.03: * Fix possible typo with `gnupg-curl` vs `gnupg curl` (zahiar) * Install only python3 packges if requested on ubuntu (noelmcloughlin) #1356 diff --git a/README.rst b/README.rst index ce512eb..776473c 100644 --- a/README.rst +++ b/README.rst @@ -28,6 +28,7 @@ sum** of the downloaded ``bootstrap-salt.sh`` file. The SHA256 sum of the ``bootstrap-salt.sh`` file, per release, is: +- 2019.10.03: ``34f196f06d586ce9e1b9907660ea6e67caf57abcecfea66e0343697e3fd0d17d`` - 2019.05.20: ``46fb5e4b7815efafd69fd703f033fe86e7b584b6770f7e0b936995bcae1cedd8`` - 2019.02.27: ``23728e4b5e54f564062070e3be53c5602b55c24c9a76671968abbf3d609258cb`` - 2019.01.08: ``ab7f29b75711da4bb79aff98d46654f910d569ebe3e908753a3c5119017bb163`` diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7855448..4e197ab 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -23,7 +23,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2019.10.03" +__ScriptVersion="2019.11.04" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0" @@ -499,7 +499,7 @@ exec 2>"$LOGPIPE" # 14 SIGALRM # 15 SIGTERM #---------------------------------------------------------------------------------------------------------------------- -APT_ERR=$(mktemp /tmp/apt_error.XXXX) +APT_ERR=$(mktemp /tmp/apt_error.XXXXXX) __exit_cleanup() { EXIT_CODE=$? @@ -891,7 +891,6 @@ __derive_debian_numeric_version() { elif [ "$INPUT_VERSION" = "stretch/sid" ]; then NUMERIC_VERSION=$(__parse_version_string "9.0") elif [ "$INPUT_VERSION" = "buster/sid" ]; then - # Let's start detecting the upcoming Debian 10 (Buster) release NUMERIC_VERSION=$(__parse_version_string "10.0") else echowarn "Unable to parse the Debian Version (codename: '$INPUT_VERSION')" @@ -1791,7 +1790,7 @@ elif [ "${DISTRO_NAME_L}" = "debian" ]; then __debian_codename_translation fi -if [ "$(echo "${DISTRO_NAME_L}" | grep -E '(debian|ubuntu|centos|red_hat|oracle|scientific|amazon)')" = "" ] && [ "$ITYPE" = "stable" ] && [ "$STABLE_REV" != "latest" ]; then +if [ "$(echo "${DISTRO_NAME_L}" | grep -E '(debian|ubuntu|centos|red_hat|oracle|scientific|amazon|fedora)')" = "" ] && [ "$ITYPE" = "stable" ] && [ "$STABLE_REV" != "latest" ]; then echoerror "${DISTRO_NAME} does not have major version pegged packages support" exit 1 fi @@ -2276,8 +2275,10 @@ __overwriteconfig() { tempfile="/tmp/salt-config-$$" fi + if [ -n "$_PY_EXE" ]; then + good_python="$_PY_EXE" # If python does not have yaml installed we're on Arch and should use python2 - if python -c "import yaml" 2> /dev/null; then + elif python -c "import yaml" 2> /dev/null; then good_python=python else good_python=python2 @@ -2517,9 +2518,16 @@ __install_pip_pkgs() { # Install pip and pip dependencies if ! __check_command_exists "${_pip_cmd} --version"; then - __PACKAGES="${_py_pkg}-setuptools ${_py_pkg}-pip gcc ${_py_pkg}-devel" + __PACKAGES="${_py_pkg}-setuptools ${_py_pkg}-pip gcc" # shellcheck disable=SC2086 - __yum_install_noinput ${__PACKAGES} || return 1 + if [ "$DISTRO_NAME_L" = "debian" ];then + __PACKAGES="${__PACKAGES} ${_py_pkg}-dev" + __apt_get_install_noinput ${__PACKAGES} || return 1 + else + __PACKAGES="${__PACKAGES} ${_py_pkg}-devel" + __yum_install_noinput ${__PACKAGES} || return 1 + fi + fi echoinfo "Installing pip packages: ${_pip_pkgs} using ${_py_exe}" @@ -2527,6 +2535,18 @@ __install_pip_pkgs() { ${_pip_cmd} install ${_pip_pkgs} || return 1 } +#--- FUNCTION ------------------------------------------------------------------------------------------------------- +# NAME: __install_tornado_pip +# PARAMETERS: python executable +# DESCRIPTION: Return 0 or 1 if successfully able to install tornado<5.0 +#---------------------------------------------------------------------------------------------------------------------- +__install_tornado_pip() { + # OS needs tornado <5.0 from pip + __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt on Python 3" + ## install pip if its not installed and install tornado + __install_pip_pkgs "tornado<5.0" "${1}" || return 1 +} + #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __install_pip_deps # DESCRIPTION: Return 0 or 1 if successfully able to install pip packages via requirements file @@ -3059,17 +3079,8 @@ install_ubuntu_check_services() { # Debian Install Functions # __install_saltstack_debian_repository() { - if [ "$DISTRO_MAJOR_VERSION" -eq 10 ]; then - # Packages for Debian 10 at repo.saltstack.com are not yet available - # Set up repository for Debian 9 for Debian 10 for now until support - # is available at repo.saltstack.com for Debian 10. - echowarn "Debian 10 distribution detected, but stable packages requested. Trying packages from Debian 9. You may experience problems." - DEBIAN_RELEASE="9" - DEBIAN_CODENAME="stretch" - else - DEBIAN_RELEASE="$DISTRO_MAJOR_VERSION" - DEBIAN_CODENAME="$DISTRO_CODENAME" - fi + DEBIAN_RELEASE="$DISTRO_MAJOR_VERSION" + DEBIAN_CODENAME="$DISTRO_CODENAME" __PY_VERSION_REPO="apt" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then @@ -3150,6 +3161,24 @@ install_debian_deps() { return 0 } +install_debian_git_pre() { + if ! __check_command_exists git; then + __apt_get_install_noinput git || return 1 + fi + + if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then + __apt_get_install_noinput ca-certificates + fi + + __git_clone_and_checkout || return 1 + + # Let's trigger config_salt() + if [ "$_TEMP_CONFIG_DIR" = "null" ]; then + _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" + CONFIG_SALT_FUNC="config_salt" + fi +} + install_debian_git_deps() { if ! __check_command_exists git; then __apt_get_install_noinput git || return 1 @@ -3299,7 +3328,25 @@ install_debian_9_git_deps() { } install_debian_10_git_deps() { - install_debian_9_git_deps || return 1 + install_debian_git_pre || return 1 + + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + _py=${_PY_EXE} + PY_PKG_VER=3 + __PACKAGES="python${PY_PKG_VER}-distutils" + else + _py="python" + PY_PKG_VER="" + __PACKAGES="" + fi + + __install_tornado_pip ${_py}|| return 1 + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-jinja2" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-yaml python${PY_PKG_VER}-zmq" + + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 + return 0 } @@ -3751,13 +3798,33 @@ install_centos_stable_deps() { __install_saltstack_rhel_repository || return 1 fi - __PACKAGES="yum-utils chkconfig" - - # YAML module is used for generating custom master/minion configs - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - __PACKAGES="${__PACKAGES} python34-PyYAML" + if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then + __PACKAGES="dnf-utils chkconfig" else - __PACKAGES="${__PACKAGES} PyYAML" + __PACKAGES="yum-utils chkconfig" + fi + + if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then + # YAML module is used for generating custom master/minion configs + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __PACKAGES="${__PACKAGES} python3-pyyaml" + else + __PACKAGES="${__PACKAGES} python2-pyyaml" + fi + elif [ "$DISTRO_MAJOR_VERSION" -eq 7 ]; then + # YAML module is used for generating custom master/minion configs + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __PACKAGES="${__PACKAGES} python36-PyYAML" + else + __PACKAGES="${__PACKAGES} PyYAML" + fi + else + # YAML module is used for generating custom master/minion configs + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __PACKAGES="${__PACKAGES} python34-PyYAML" + else + __PACKAGES="${__PACKAGES} PyYAML" + fi fi # shellcheck disable=SC2086 @@ -3839,12 +3906,26 @@ install_centos_git_deps() { __git_clone_and_checkout || return 1 - __PACKAGES="m2crypto" + __PACKAGES="" + _install_m2crypto_req=false if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - # Packages are named python34- - PY_PKG_VER=34 + _py=${_PY_EXE} + if [ "$DISTRO_MAJOR_VERSION" -gt 6 ]; then + _install_m2crypto_req=true + fi + if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then + # Packages are named python3- + PY_PKG_VER=3 + else + # Packages are named python36- + PY_PKG_VER=36 + fi else + if [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then + _install_m2crypto_req=true + fi + _py="python" PY_PKG_VER="" # Only Py2 needs python-futures @@ -3856,7 +3937,14 @@ install_centos_git_deps() { fi fi - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" + if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then + __install_tornado_pip ${_py} || return 1 + __PACKAGES="${__PACKAGES} python3-m2crypto" + else + __PACKAGES="${__PACKAGES} m2crypto python${PY_PKG_VER}-crypto" + fi + + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-jinja2" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado python${PY_PKG_VER}-zmq" @@ -3874,7 +3962,7 @@ install_centos_git_deps() { _PIP_PACKAGES="m2crypto!=0.33.0 jinja2 msgpack-python pycrypto PyYAML tornado<5.0 zmq futures>=2.0" # install swig and openssl on cent6 - if [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then + if $_install_m2crypto_req; then __yum_install_noinput openssl-devel swig || return 1 fi