From 637b30237c5adb6b819989ba8b22f31445ca6033 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 29 Jan 2020 17:21:46 +0000 Subject: [PATCH 01/27] Add sha256sum for the latest release, v2020.01.29 --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index eb3f315..5ba5089 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: +- 2020.01.29: ``e9afdfa877998c1c7f0e141a6728b33d0d24348e197aab2b9bde4fe6bc6db1b2`` - 2020.01.21: ``53299aa0dfbf7ab381f3856bb7babfc04a1d6525be11db0b9466277b1e4d0c1a`` - 2019.11.04: ``905924fccd4ebf168d19ba598bf10af53efe02302b792aeb15433e73fd3ad1d2`` - 2019.10.03: ``34f196f06d586ce9e1b9907660ea6e67caf57abcecfea66e0343697e3fd0d17d`` From 115af9b004d07cc845d4ffb662367771a7e317fe Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 30 Jan 2020 11:09:46 +0000 Subject: [PATCH 02/27] Set Linux jobs timeout to 10 minutes --- .github/.workflows/main.yml | 90 ++++++++++++++++++++++++++ .github/.workflows/templates/linux.yml | 1 + 2 files changed, 91 insertions(+) diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index ed6b914..6cfff83 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -47,6 +47,7 @@ jobs: py2-stable-2019-2-amazon-2: name: Amazon 2 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -92,6 +93,7 @@ jobs: py2-git-2019-2-amazon-2: name: Amazon 2 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -137,6 +139,7 @@ jobs: py3-stable-2019-2-amazon-2: name: Amazon 2 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -182,6 +185,7 @@ jobs: py3-git-2019-2-amazon-2: name: Amazon 2 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -227,6 +231,7 @@ jobs: py2-git-3000-amazon-2: name: Amazon 2 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -272,6 +277,7 @@ jobs: py3-git-3000-amazon-2: name: Amazon 2 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -317,6 +323,7 @@ jobs: latest-amazon-2: name: Amazon 2 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -362,6 +369,7 @@ jobs: py2-git-2018-3-arch: name: Arch v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -407,6 +415,7 @@ jobs: py3-git-2018-3-arch: name: Arch v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -452,6 +461,7 @@ jobs: py2-git-2019-2-arch: name: Arch v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -497,6 +507,7 @@ jobs: py3-git-2019-2-arch: name: Arch v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -542,6 +553,7 @@ jobs: py2-git-3000-arch: name: Arch v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -587,6 +599,7 @@ jobs: py3-git-3000-arch: name: Arch v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -632,6 +645,7 @@ jobs: py2-stable-2018-3-centos-6: name: CentOS 6 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -677,6 +691,7 @@ jobs: py2-git-2018-3-centos-6: name: CentOS 6 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -722,6 +737,7 @@ jobs: py2-stable-2019-2-centos-6: name: CentOS 6 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -767,6 +783,7 @@ jobs: py2-git-2019-2-centos-6: name: CentOS 6 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -812,6 +829,7 @@ jobs: py2-git-3000-centos-6: name: CentOS 6 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -857,6 +875,7 @@ jobs: latest-centos-6: name: CentOS 6 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -902,6 +921,7 @@ jobs: py2-stable-2018-3-centos-7: name: CentOS 7 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -947,6 +967,7 @@ jobs: py2-git-2018-3-centos-7: name: CentOS 7 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -992,6 +1013,7 @@ jobs: py3-stable-2018-3-centos-7: name: CentOS 7 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1037,6 +1059,7 @@ jobs: py3-git-2018-3-centos-7: name: CentOS 7 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1082,6 +1105,7 @@ jobs: py2-stable-2019-2-centos-7: name: CentOS 7 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1127,6 +1151,7 @@ jobs: py2-git-2019-2-centos-7: name: CentOS 7 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1172,6 +1197,7 @@ jobs: py3-stable-2019-2-centos-7: name: CentOS 7 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1217,6 +1243,7 @@ jobs: py3-git-2019-2-centos-7: name: CentOS 7 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1262,6 +1289,7 @@ jobs: py2-git-3000-centos-7: name: CentOS 7 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1307,6 +1335,7 @@ jobs: py3-git-3000-centos-7: name: CentOS 7 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1352,6 +1381,7 @@ jobs: latest-centos-7: name: CentOS 7 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1397,6 +1427,7 @@ jobs: py3-stable-2019-2-centos-8: name: CentOS 8 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1442,6 +1473,7 @@ jobs: py3-git-2019-2-centos-8: name: CentOS 8 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1487,6 +1519,7 @@ jobs: py3-git-3000-centos-8: name: CentOS 8 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1532,6 +1565,7 @@ jobs: py3-stable-2019-2-debian-10: name: Debian 10 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1577,6 +1611,7 @@ jobs: py3-git-2019-2-debian-10: name: Debian 10 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1622,6 +1657,7 @@ jobs: py3-git-3000-debian-10: name: Debian 10 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1667,6 +1703,7 @@ jobs: py2-stable-2018-3-debian-8: name: Debian 8 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1712,6 +1749,7 @@ jobs: py2-git-2018-3-debian-8: name: Debian 8 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1757,6 +1795,7 @@ jobs: py2-stable-2019-2-debian-8: name: Debian 8 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1802,6 +1841,7 @@ jobs: py2-git-2019-2-debian-8: name: Debian 8 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1847,6 +1887,7 @@ jobs: py2-git-3000-debian-8: name: Debian 8 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1892,6 +1933,7 @@ jobs: latest-debian-8: name: Debian 8 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1937,6 +1979,7 @@ jobs: py2-stable-2018-3-debian-9: name: Debian 9 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -1982,6 +2025,7 @@ jobs: py2-git-2018-3-debian-9: name: Debian 9 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2027,6 +2071,7 @@ jobs: py3-stable-2018-3-debian-9: name: Debian 9 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2072,6 +2117,7 @@ jobs: py3-git-2018-3-debian-9: name: Debian 9 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2117,6 +2163,7 @@ jobs: py2-stable-2019-2-debian-9: name: Debian 9 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2162,6 +2209,7 @@ jobs: py2-git-2019-2-debian-9: name: Debian 9 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2207,6 +2255,7 @@ jobs: py3-stable-2019-2-debian-9: name: Debian 9 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2252,6 +2301,7 @@ jobs: py3-git-2019-2-debian-9: name: Debian 9 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2297,6 +2347,7 @@ jobs: py2-git-3000-debian-9: name: Debian 9 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2342,6 +2393,7 @@ jobs: py3-git-3000-debian-9: name: Debian 9 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2387,6 +2439,7 @@ jobs: latest-debian-9: name: Debian 9 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2432,6 +2485,7 @@ jobs: py2-stable-2018-3-fedora-30: name: Fedora 30 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2477,6 +2531,7 @@ jobs: py2-git-2018-3-fedora-30: name: Fedora 30 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2522,6 +2577,7 @@ jobs: py3-stable-2018-3-fedora-30: name: Fedora 30 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2567,6 +2623,7 @@ jobs: py3-git-2018-3-fedora-30: name: Fedora 30 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2612,6 +2669,7 @@ jobs: py2-stable-2019-2-fedora-30: name: Fedora 30 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2657,6 +2715,7 @@ jobs: py2-git-2019-2-fedora-30: name: Fedora 30 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2702,6 +2761,7 @@ jobs: py3-stable-2019-2-fedora-30: name: Fedora 30 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2747,6 +2807,7 @@ jobs: py3-git-2019-2-fedora-30: name: Fedora 30 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2792,6 +2853,7 @@ jobs: py2-git-3000-fedora-30: name: Fedora 30 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2837,6 +2899,7 @@ jobs: py3-git-3000-fedora-30: name: Fedora 30 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2882,6 +2945,7 @@ jobs: latest-fedora-30: name: Fedora 30 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2927,6 +2991,7 @@ jobs: py2-git-2018-3-opensuse-15: name: Opensuse 15 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -2972,6 +3037,7 @@ jobs: py2-git-2019-2-opensuse-15: name: Opensuse 15 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3017,6 +3083,7 @@ jobs: py2-git-3000-opensuse-15: name: Opensuse 15 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3062,6 +3129,7 @@ jobs: latest-opensuse-15: name: Opensuse 15 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3107,6 +3175,7 @@ jobs: py2-stable-2018-3-ubuntu-1604: name: Ubuntu 16.04 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3152,6 +3221,7 @@ jobs: py2-git-2018-3-ubuntu-1604: name: Ubuntu 16.04 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3197,6 +3267,7 @@ jobs: py3-stable-2018-3-ubuntu-1604: name: Ubuntu 16.04 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3242,6 +3313,7 @@ jobs: py3-git-2018-3-ubuntu-1604: name: Ubuntu 16.04 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3287,6 +3359,7 @@ jobs: py2-stable-2019-2-ubuntu-1604: name: Ubuntu 16.04 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3332,6 +3405,7 @@ jobs: py2-git-2019-2-ubuntu-1604: name: Ubuntu 16.04 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3377,6 +3451,7 @@ jobs: py3-stable-2019-2-ubuntu-1604: name: Ubuntu 16.04 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3422,6 +3497,7 @@ jobs: py3-git-2019-2-ubuntu-1604: name: Ubuntu 16.04 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3467,6 +3543,7 @@ jobs: py2-git-3000-ubuntu-1604: name: Ubuntu 16.04 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3512,6 +3589,7 @@ jobs: py3-git-3000-ubuntu-1604: name: Ubuntu 16.04 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3557,6 +3635,7 @@ jobs: latest-ubuntu-1604: name: Ubuntu 16.04 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3602,6 +3681,7 @@ jobs: py2-stable-2018-3-ubuntu-1804: name: Ubuntu 18.04 v2018.3 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3647,6 +3727,7 @@ jobs: py2-git-2018-3-ubuntu-1804: name: Ubuntu 18.04 v2018.3 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3692,6 +3773,7 @@ jobs: py3-stable-2018-3-ubuntu-1804: name: Ubuntu 18.04 v2018.3 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3737,6 +3819,7 @@ jobs: py3-git-2018-3-ubuntu-1804: name: Ubuntu 18.04 v2018.3 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3782,6 +3865,7 @@ jobs: py2-stable-2019-2-ubuntu-1804: name: Ubuntu 18.04 v2019.2 Py2 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3827,6 +3911,7 @@ jobs: py2-git-2019-2-ubuntu-1804: name: Ubuntu 18.04 v2019.2 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3872,6 +3957,7 @@ jobs: py3-stable-2019-2-ubuntu-1804: name: Ubuntu 18.04 v2019.2 Py3 Stable runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3917,6 +4003,7 @@ jobs: py3-git-2019-2-ubuntu-1804: name: Ubuntu 18.04 v2019.2 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -3962,6 +4049,7 @@ jobs: py2-git-3000-ubuntu-1804: name: Ubuntu 18.04 v3000 Py2 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -4007,6 +4095,7 @@ jobs: py3-git-3000-ubuntu-1804: name: Ubuntu 18.04 v3000 Py3 Git runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint @@ -4052,6 +4141,7 @@ jobs: latest-ubuntu-1804: name: Ubuntu 18.04 Latest packaged release runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint diff --git a/.github/.workflows/templates/linux.yml b/.github/.workflows/templates/linux.yml index ae066bf..90379bb 100644 --- a/.github/.workflows/templates/linux.yml +++ b/.github/.workflows/templates/linux.yml @@ -1,6 +1,7 @@ {python_version}-{bootstrap_type}-{branch}-{distro}: name: {display_name} runs-on: ubuntu-latest + timeout-minutes: 10 needs: lint From bb9ef0eb3eea14935092d45ec219d611824b3bf7 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 30 Jan 2020 13:33:16 +0000 Subject: [PATCH 03/27] Arch is now on Py3.8 which salt doesn't yet support --- .github/.workflows/main.yml | 138 ----------------------- .github/.workflows/templates/generate.py | 1 + .kitchen.yml | 3 + 3 files changed, 4 insertions(+), 138 deletions(-) diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index 6cfff83..5c370bd 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -412,52 +412,6 @@ jobs: bundle exec kitchen destroy py2-git-2018-3-arch - py3-git-2018-3-arch: - name: Arch v2018.3 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 10 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-2018-3-arch || bundle exec kitchen create py3-git-2018-3-arch - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-2018-3-arch - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-2018-3-arch - - py2-git-2019-2-arch: name: Arch v2019.2 Py2 Git runs-on: ubuntu-latest @@ -504,52 +458,6 @@ jobs: bundle exec kitchen destroy py2-git-2019-2-arch - py3-git-2019-2-arch: - name: Arch v2019.2 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 10 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-2019-2-arch || bundle exec kitchen create py3-git-2019-2-arch - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-2019-2-arch - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-2019-2-arch - - py2-git-3000-arch: name: Arch v3000 Py2 Git runs-on: ubuntu-latest @@ -596,52 +504,6 @@ jobs: bundle exec kitchen destroy py2-git-3000-arch - py3-git-3000-arch: - name: Arch v3000 Py3 Git - runs-on: ubuntu-latest - timeout-minutes: 10 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py3-git-3000-arch || bundle exec kitchen create py3-git-3000-arch - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py3-git-3000-arch - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py3-git-3000-arch - - py2-stable-2018-3-centos-6: name: CentOS 6 v2018.3 Py2 Stable runs-on: ubuntu-latest diff --git a/.github/.workflows/templates/generate.py b/.github/.workflows/templates/generate.py index a912db8..4b66391 100755 --- a/.github/.workflows/templates/generate.py +++ b/.github/.workflows/templates/generate.py @@ -45,6 +45,7 @@ PY2_BLACKLIST = [ ] PY3_BLACKLIST = [ + 'arch', 'amazon-1', 'centos-6', 'debian-8', diff --git a/.kitchen.yml b/.kitchen.yml index a4a369e..ec0a54d 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -49,6 +49,8 @@ platforms: provision_command: - pacman -Syu --noconfirm --needed systemd grep awk procps which - systemctl enable sshd + provisioner: + salt_bootstrap_options: -MPfq -D -y -x python2 git %s - name: centos-8 driver_config: run_command: /usr/lib/systemd/systemd @@ -141,6 +143,7 @@ suites: salt_version: 3000 salt_bootstrap_options: -x python3 -MPfq git %s excludes: + - arch - amazon-1 - centos-6 - debian-8 From 26aa5438f5edfc4e0b23d6c04a82637e2c428684 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 30 Jan 2020 15:15:20 +0000 Subject: [PATCH 04/27] Switch to TTY format --- .github/.workflows/main.yml | 2 +- .github/.workflows/templates/lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index 5c370bd..bc71177 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v1 - name: ShellCheck run: | - shellcheck -s sh -f checkstyle bootstrap-salt.sh + shellcheck -s sh -f tty bootstrap-salt.sh py2-stable-2019-2-amazon-2: diff --git a/.github/.workflows/templates/lint.yml b/.github/.workflows/templates/lint.yml index 204056c..273e115 100644 --- a/.github/.workflows/templates/lint.yml +++ b/.github/.workflows/templates/lint.yml @@ -9,4 +9,4 @@ - uses: actions/checkout@v1 - name: ShellCheck run: | - shellcheck -s sh -f checkstyle bootstrap-salt.sh + shellcheck -s sh -f tty bootstrap-salt.sh From cab2c4afaadf3a2fff92c6a6f5cd11da7055031a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 31 Jan 2020 15:42:26 +0000 Subject: [PATCH 05/27] We can also install Salt under Py3 on Opensuse 15 --- .github/.workflows/main.yml | 138 +++++++++++++++++++++++ .github/.workflows/templates/generate.py | 1 - .kitchen.yml | 3 - 3 files changed, 138 insertions(+), 4 deletions(-) diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index bc71177..8d04116 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -2896,6 +2896,52 @@ jobs: bundle exec kitchen destroy py2-git-2018-3-opensuse-15 + py3-git-2018-3-opensuse-15: + name: Opensuse 15 v2018.3 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-2018-3-opensuse-15 || bundle exec kitchen create py3-git-2018-3-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-2018-3-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-2018-3-opensuse-15 + + py2-git-2019-2-opensuse-15: name: Opensuse 15 v2019.2 Py2 Git runs-on: ubuntu-latest @@ -2942,6 +2988,52 @@ jobs: bundle exec kitchen destroy py2-git-2019-2-opensuse-15 + py3-git-2019-2-opensuse-15: + name: Opensuse 15 v2019.2 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-2019-2-opensuse-15 || bundle exec kitchen create py3-git-2019-2-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-2019-2-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-2019-2-opensuse-15 + + py2-git-3000-opensuse-15: name: Opensuse 15 v3000 Py2 Git runs-on: ubuntu-latest @@ -2988,6 +3080,52 @@ jobs: bundle exec kitchen destroy py2-git-3000-opensuse-15 + py3-git-3000-opensuse-15: + name: Opensuse 15 v3000 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-opensuse-15 || bundle exec kitchen create py3-git-3000-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-opensuse-15 + + latest-opensuse-15: name: Opensuse 15 Latest packaged release runs-on: ubuntu-latest diff --git a/.github/.workflows/templates/generate.py b/.github/.workflows/templates/generate.py index 4b66391..3a21710 100755 --- a/.github/.workflows/templates/generate.py +++ b/.github/.workflows/templates/generate.py @@ -49,7 +49,6 @@ PY3_BLACKLIST = [ 'amazon-1', 'centos-6', 'debian-8', - 'opensuse-15' ] BLACKLIST_2018 = [ diff --git a/.kitchen.yml b/.kitchen.yml index ec0a54d..843b4fe 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -136,7 +136,6 @@ suites: - amazon-1 - centos-6 - debian-8 - - opensuse-15 - amazon-2 - name: py3-git-3000 provisioner: @@ -147,7 +146,6 @@ suites: - amazon-1 - centos-6 - debian-8 - - opensuse-15 - name: py3-git-2019-2 provisioner: salt_version: 2019.2 @@ -156,7 +154,6 @@ suites: - amazon-1 - centos-6 - debian-8 - - opensuse-15 - name: py3-stable-2018-3 provisioner: salt_version: 2018.3 From 024a40f33fb24e19d3bc5c4a5395a4a3abf85d30 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 30 Jan 2020 13:14:47 +0000 Subject: [PATCH 06/27] There's no `zypper` command on the `zypper` CLI --- bootstrap-salt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 43d3ea1..7203017 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5968,8 +5968,8 @@ __check_and_refresh_suse_pkg_repo() { __version_lte() { if ! __check_command_exists python; then - zypper zypper --non-interactive install --replacefiles --auto-agree-with-licenses python || \ - zypper zypper --non-interactive install --auto-agree-with-licenses python || return 1 + zypper --non-interactive install --replacefiles --auto-agree-with-licenses python || \ + zypper --non-interactive install --auto-agree-with-licenses python || return 1 fi if [ "$(python -c 'import sys; V1=tuple([int(i) for i in sys.argv[1].split(".")]); V2=tuple([int(i) for i in sys.argv[2].split(".")]); print V1<=V2' "$1" "$2")" = "True" ]; then From 80d68e37aa625aacd9dfac61100083f397a4c089 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 30 Jan 2020 12:36:56 +0000 Subject: [PATCH 07/27] Fix Neon support --- bootstrap-salt.sh | 931 +++++++++++++++++++++++++++------------------- 1 file changed, 557 insertions(+), 374 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 7203017..1c8239a 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -272,6 +272,9 @@ _PY_EXE="" _INSTALL_PY="$BS_FALSE" _TORNADO_MAX_PY3_VERSION="5.0" _POST_NEON_INSTALL=$BS_FALSE +_MINIMUM_PIP_VERSION="8.0.0" +_MINIMUM_SETUPTOOLS_VERSION="9.1" +_POST_NEON_PIP_INSTALL_ARGS="--prefix=/usr" # Defaults for install arguments ITYPE="stable" @@ -512,6 +515,7 @@ __exit_cleanup() { # shellcheck disable=SC2164 cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}" rm -rf "${_SALT_GIT_CHECKOUT_DIR}" + #rm -rf "${_SALT_GIT_CHECKOUT_DIR}/deps" else echowarn "Not cleaning up the Salt Temporary git repository on request" echowarn "Note that if you intend to re-run this script using the git approach, you might encounter some issues" @@ -1859,16 +1863,15 @@ if [ "$ITYPE" = "git" ]; then if [ "$_POST_NEON_INSTALL" -eq $BS_TRUE ]; then echo - echowarn "Post Neon git based installations will always install salt and it's dependencies using pip" - echowarn "You have 10 seconds to cancel and stop the bootstrap process" + echowarn "Post Neon git based installations will always install salt" + echowarn "and it's dependencies using pip which will be upgraded to" + echowarn "at least v${_MINIMUM_PIP_VERSION}, and, in case the setuptools version is also" + echowarn "too old, it will be upgraded to at least v${_MINIMUM_SETUPTOOLS_VERSION}" + echo + echowarn "You have 10 seconds to cancel and stop the bootstrap process..." echo sleep 10 _PIP_ALLOWED=$BS_TRUE - # 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 fi fi @@ -2644,31 +2647,119 @@ __install_salt_from_repo_post_neon() { echodebug "__install_salt_from_repo_post_neon py_exe=$_py_exe" - _py_pkg=$(echo "$_py_exe" | sed -E "s/\\.//g") - _pip_cmd="${_py_exe} -m pip" + _py_version=$(${_py_exe} -c "import sys; print('{0}.{1}'.format(*sys.version_info))") + _pip_cmd="pip${_py_version}" + if ! __check_command_exists "${_pip_cmd}"; then + echodebug "The pip binary '${_pip_cmd}' was not found in PATH" + _pip_cmd="pip$(echo "${_py_version}" | cut -c -1)" + if ! __check_command_exists "${_pip_cmd}"; then + echodebug "The pip binary '${_pip_cmd}' was not found in PATH" + _pip_cmd="pip" + if ! __check_command_exists "${_pip_cmd}"; then + echoerror "Unable to find a pip binary" + return 1 + fi + fi + fi __check_pip_allowed - # Install pip and pip dependencies - if ! __check_command_exists "${_pip_cmd} --version"; then - __PACKAGES="${_py_pkg}-pip gcc" - # shellcheck disable=SC2086 - 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 + echodebug "Installed pip version: $(${_pip_cmd} --version)" + CHECK_PIP_VERSION_SCRIPT=$(cat << EOM +import sys +try: + import pip + installed_pip_version=tuple([int(part.strip()) for part in pip.__version__.split('.') if part.isdigit()]) + desired_pip_version=($(echo ${_MINIMUM_PIP_VERSION} | sed 's/\./, /g' )) + if installed_pip_version < desired_pip_version: + print('Desired pip version {!r} > Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) + sys.exit(1) + print('Desired pip version {!r} < Installed pip version {!r}'.format('.'.join(map(str, desired_pip_version)), '.'.join(map(str, installed_pip_version)))) + sys.exit(0) +except ImportError: + print('Failed to import pip') + sys.exit(1) +EOM +) + if ! ${_py_exe} -c "$CHECK_PIP_VERSION_SCRIPT"; then + # Upgrade pip to at least 1.2 which is when we can start using "python -m pip" + echodebug "Running '${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} pip>=${_MINIMUM_PIP_VERSION}'" + ${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} -v "pip>=${_MINIMUM_PIP_VERSION}" + sleep 1 + echodebug "PATH: ${PATH}" + _pip_cmd="pip${_py_version}" + if ! __check_command_exists "${_pip_cmd}"; then + echodebug "The pip binary '${_pip_cmd}' was not found in PATH" + _pip_cmd="pip$(echo "${_py_version}" | cut -c -1)" + if ! __check_command_exists "${_pip_cmd}"; then + echodebug "The pip binary '${_pip_cmd}' was not found in PATH" + _pip_cmd="pip" + if ! __check_command_exists "${_pip_cmd}"; then + echoerror "Unable to find a pip binary" + return 1 + fi + fi + fi + echodebug "Installed pip version: $(${_pip_cmd} --version)" fi - ${_pip_cmd} install -U pip + # We also lock setuptools to <45 which is the latest release to support both py2 and py3 + echodebug "Running '${_pip_cmd} install wheel setuptools>=${_MINIMUM_SETUPTOOLS_VERSION},<45'" + ${_pip_cmd} install ${_POST_NEON_PIP_INSTALL_ARGS} wheel "setuptools>=${_MINIMUM_SETUPTOOLS_VERSION},<45" echoinfo "Installing salt using ${_py_exe}" cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 - ${_pip_cmd} install . || return 1 + mkdir /tmp/git/deps + echoinfo "Downloading Salt Dependencies from PyPi" + echodebug "Running '${_pip_cmd} download -d /tmp/git/deps .'" + ${_pip_cmd} download -d /tmp/git/deps . || (echo "Failed to download salt dependencies" && return 1) + + echoinfo "Installing Downloaded Salt Dependencies" + echodebug "Running '${_pip_cmd} install --ignore-installed ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/*'" + ${_pip_cmd} install --ignore-installed ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/* || return 1 + rm -f /tmp/git/deps/* + + echoinfo "Building Salt Python Wheel" + + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + SETUP_PY_INSTALL_ARGS="-v" + fi + + echodebug "Running '${_py_exe} setup.py --salt-config-dir=$_SALT_ETC_DIR --salt-cache-dir=${_SALT_CACHE_DIR} ${SETUP_PY_INSTALL_ARGS} bdist_wheel'" + ${_py_exe} setup.py --salt-config-dir="$_SALT_ETC_DIR" --salt-cache-dir="${_SALT_CACHE_DIR}" ${SETUP_PY_INSTALL_ARGS} bdist_wheel || return 1 + mv dist/salt*.whl /tmp/git/deps/ || return 1 + + cd "${__SALT_GIT_CHECKOUT_PARENT_DIR}" || return 1 + + echoinfo "Installing Built Salt Wheel" + ${_pip_cmd} uninstall --yes salt 2>/dev/null || true + echodebug "Running '${_pip_cmd} install --no-deps --force-reinstall ${_POST_NEON_PIP_INSTALL_ARGS} /tmp/git/deps/salt*.whl'" + ${_pip_cmd} install --no-deps --force-reinstall \ + ${_POST_NEON_PIP_INSTALL_ARGS} \ + --global-option="--salt-config-dir=$_SALT_ETC_DIR --salt-cache-dir=${_SALT_CACHE_DIR} ${SETUP_PY_INSTALL_ARGS}" \ + /tmp/git/deps/salt*.whl || return 1 + + echoinfo "Checking if Salt can be imported using ${_py_exe}" + CHECK_SALT_SCRIPT=$(cat << EOM +import os +import sys +try: + import salt + import salt.version + print('\nInstalled Salt Version: {}'.format(salt.version.__version__)) + print('Installed Salt Package Path: {}\n'.format(os.path.dirname(salt.__file__))) + sys.exit(0) +except ImportError: + print('\nFailed to import salt\n') + sys.exit(1) +EOM +) + if ! ${_py_exe} -c "$CHECK_SALT_SCRIPT"; then + return 1 + fi + return 0 } # ---------- end of function __install_salt_from_repo_post_neon ---------- @@ -2912,50 +3003,55 @@ install_ubuntu_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + PY_PKG_VER=3 + else + PY_PKG_VER="" fi - __PACKAGES="" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - # See how we are installing packages - if [ "${_PIP_ALL}" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python-dev swig libssl-dev libzmq3 libzmq3-dev" + __PACKAGES="" - if ! __check_command_exists pip; then - __PACKAGES="${__PACKAGES} python-setuptools python-pip" - fi + # See how we are installing packages + if [ "${_PIP_ALL}" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python-dev swig libssl-dev libzmq3 libzmq3-dev" - # Get just the apt packages that are required to build all the pythons - # shellcheck disable=SC2086 - __apt_get_install_noinput ${__PACKAGES} || return 1 - # Install the pythons from requirements (only zmq for now) - __install_pip_deps "${_SALT_GIT_CHECKOUT_DIR}/requirements/zeromq.txt" || return 1 - else - install_ubuntu_stable_deps || return 1 + if ! __check_command_exists pip; then + __PACKAGES="${__PACKAGES} python-setuptools python-pip" + fi - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - PY_PKG_VER=3 - - __PACKAGES="${__PACKAGES} python3-setuptools" + # Get just the apt packages that are required to build all the pythons + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 + # Install the pythons from requirements (only zmq for now) + __install_pip_deps "${_SALT_GIT_CHECKOUT_DIR}/requirements/zeromq.txt" || return 1 else - PY_PKG_VER="" + install_ubuntu_stable_deps || return 1 - # There is no m2crypto package for Py3 at this time - only install for Py2 - __PACKAGES="${__PACKAGES} python-m2crypto" + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + __PACKAGES="${__PACKAGES} python3-setuptools" + else + # There is no m2crypto package for Py3 at this time - only install for Py2 + __PACKAGES="${__PACKAGES} python-m2crypto" + fi + + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto 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}-yaml" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-zmq" + __PACKAGES="${__PACKAGES} python-concurrent.futures" + + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + # Install python-libcloud if asked to + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud" + fi + + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 fi - - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-crypto 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}-yaml" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-zmq" - __PACKAGES="${__PACKAGES} python-concurrent.futures" - - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - # Install python-libcloud if asked to - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud" - fi - + else + __PACKAGES="python${PY_PKG_VER}-dev python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || return 1 fi @@ -3004,7 +3100,16 @@ install_ubuntu_git() { fi if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + # We can use --prefix on debian based ditributions + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + _POST_NEON_PIP_INSTALL_ARGS="--target=/usr/lib/python3/dist-packages --install-option=--install-scripts=/usr/bin" + else + _POST_NEON_PIP_INSTALL_ARGS="--target=/usr/lib/python2.7/dist-packages --install-option=--install-scripts=/usr/bin" + fi + _POST_NEON_PIP_INSTALL_ARGS="" + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 + sed -i 's:/usr/bin:/usr/local/bin:g' pkg/*.service return 0 fi @@ -3122,6 +3227,10 @@ install_ubuntu_restart_daemons() { systemctl start salt-$fname.service && continue # We failed to start the service, let's test the SysV code below echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi fi if [ -f /sbin/initctl ]; then @@ -3280,36 +3389,32 @@ install_debian_git_pre() { } install_debian_git_deps() { - if ! __check_command_exists git; then - __apt_get_install_noinput git || return 1 + install_debian_deps || return 1 + install_debian_git_pre || return 1 + + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + PY_PKG_VER=3 + else + PY_PKG_VER="" fi - if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then - __apt_get_install_noinput ca-certificates - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-backports.ssl-match-hostname" + __PACKAGES="${__PACKAGES} python-crypto python-jinja2 python-msgpack python-m2crypto" + __PACKAGES="${__PACKAGES} python-requests python-tornado python-yaml python-zmq" - __git_clone_and_checkout || return 1 + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + # Install python-libcloud if asked to + __PACKAGES="${__PACKAGES} python-libcloud" + fi - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - - __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-backports.ssl-match-hostname" - __PACKAGES="${__PACKAGES} python-crypto python-jinja2 python-msgpack python-m2crypto" - __PACKAGES="${__PACKAGES} python-requests python-tornado python-yaml python-zmq" - - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - # Install python-libcloud if asked to - __PACKAGES="${__PACKAGES} python-libcloud" - fi - - # shellcheck disable=SC2086 - __apt_get_install_noinput ${__PACKAGES} || 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" + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 + else + __PACKAGES="python${PY_PKG_VER}-dev python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" + echodebug "install_debian_git_deps() Installing ${__PACKAGES}" + # shellcheck disable=SC2086 + __apt_get_install_noinput ${__PACKAGES} || return 1 fi return 0 @@ -3323,6 +3428,13 @@ install_debian_7_git_deps() { } 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 + fi + install_debian_deps || return 1 if ! __check_command_exists git; then @@ -3335,10 +3447,6 @@ install_debian_8_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - __PACKAGES="libzmq3 libzmq3-dev lsb-release python-apt python-crypto python-jinja2" __PACKAGES="${__PACKAGES} python-m2crypto python-msgpack python-requests python-systemd" __PACKAGES="${__PACKAGES} python-yaml python-zmq python-concurrent.futures" @@ -3391,22 +3499,15 @@ install_debian_8_git_deps() { } install_debian_9_git_deps() { - install_debian_deps || return 1 - - 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 if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + install_debian_git_deps || return 1 return 0 fi + install_debian_deps || return 1 + install_debian_git_pre || return 1 + __PACKAGES="libzmq5 lsb-release" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then @@ -3430,22 +3531,19 @@ install_debian_9_git_deps() { # shellcheck disable=SC2086 __apt_get_install_noinput ${__PACKAGES} || 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 - return 0 } install_debian_10_git_deps() { - install_debian_git_pre || return 1 if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + install_debian_git_deps || return 1 return 0 fi + install_debian_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 @@ -3511,7 +3609,16 @@ install_debian_git() { fi if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + # We can use --prefix on debian based ditributions + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + _POST_NEON_PIP_INSTALL_ARGS="--target=/usr/lib/python3/dist-packages --install-option=--install-scripts=/usr/bin" + else + _POST_NEON_PIP_INSTALL_ARGS="--target=/usr/lib/python2.7/dist-packages --install-option=--install-scripts=/usr/bin" + fi + _POST_NEON_PIP_INSTALL_ARGS="" + __install_salt_from_repo_post_neon "${_PY_EXE}" || return 1 + cd "${_SALT_GIT_CHECKOUT_DIR}" || return 1 + sed -i 's:/usr/bin:/usr/local/bin:g' pkg/*.service return 0 fi @@ -3604,7 +3711,11 @@ install_debian_restart_daemons() { if [ -f /bin/systemctl ]; then # Debian 8 uses systemd /bin/systemctl stop salt-$fname > /dev/null 2>&1 - /bin/systemctl start salt-$fname.service + /bin/systemctl start salt-$fname.service && continue + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi elif [ -f /etc/init.d/salt-$fname ]; then # Still in SysV init /etc/init.d/salt-$fname stop > /dev/null 2>&1 @@ -3646,28 +3757,30 @@ install_fedora_deps() { dnf -y update || return 1 fi - __PACKAGES="${__PACKAGES:=}" - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - # Packages are named python3- - PY_PKG_VER=3 - __PACKAGES="${__PACKAGES} python3-m2crypto python3-PyYAML" - else - PY_PKG_VER=2 - __PACKAGES="${__PACKAGES} m2crypto" - if [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then - __PACKAGES="${__PACKAGES} python2-pyyaml" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __PACKAGES="${__PACKAGES:=}" + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + # Packages are named python3- + PY_PKG_VER=3 + __PACKAGES="${__PACKAGES} python3-m2crypto python3-PyYAML" else - __PACKAGES="${__PACKAGES} PyYAML" - fi - fi - __PACKAGES="${__PACKAGES} dnf-utils libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq" - if [ "${_EXTRA_PACKAGES}" != "" ]; then - echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" - fi + PY_PKG_VER=2 + __PACKAGES="${__PACKAGES} m2crypto" + if [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then + __PACKAGES="${__PACKAGES} python2-pyyaml" + else + __PACKAGES="${__PACKAGES} PyYAML" + fi + fi + __PACKAGES="${__PACKAGES} dnf-utils libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq" + if [ "${_EXTRA_PACKAGES}" != "" ]; then + echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" + fi - # shellcheck disable=SC2086 - dnf install -y ${__PACKAGES} ${_EXTRA_PACKAGES} || return 1 + # shellcheck disable=SC2086 + dnf install -y ${__PACKAGES} ${_EXTRA_PACKAGES} || return 1 + fi return 0 } @@ -3726,35 +3839,36 @@ install_fedora_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - __PACKAGES="${__PACKAGES:=}" - if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then - __PACKAGES="${__PACKAGES} ca-certificates" - fi - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud python${PY_PKG_VER}-netaddr" - fi - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd" + __PACKAGES="${__PACKAGES:=}" + if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then + __PACKAGES="${__PACKAGES} ca-certificates" + fi + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud python${PY_PKG_VER}-netaddr" + fi + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd" - # Fedora 28+ ships with tornado 5.0+ which is broken for salt on py3 - # https://github.com/saltstack/salt-bootstrap/issues/1220 - if [ "${PY_PKG_VER}" -lt 3 ] || [ "$DISTRO_MAJOR_VERSION" -lt 28 ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado" - fi + # Fedora 28+ ships with tornado 5.0+ which is broken for salt on py3 + # https://github.com/saltstack/salt-bootstrap/issues/1220 + if [ "${PY_PKG_VER}" -lt 3 ] || [ "$DISTRO_MAJOR_VERSION" -lt 28 ]; then + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado" + fi - install_fedora_deps || return 1 - - # Fedora 28+ needs tornado <5.0 from pip - # https://github.com/saltstack/salt-bootstrap/issues/1220 - if [ "${PY_PKG_VER}" -eq 3 ] && [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then - __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt on Python 3" - grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" | while IFS=' -' read -r dep; do - "${_PY_EXE}" -m pip install "${dep}" || return 1 - done + # Fedora 28+ needs tornado <5.0 from pip + # https://github.com/saltstack/salt-bootstrap/issues/1220 + if [ "${PY_PKG_VER}" -eq 3 ] && [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then + __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt on Python 3" + grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" | while IFS=' + ' read -r dep; do + "${_PY_EXE}" -m pip install "${dep}" || return 1 + done + fi + else + __PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" + # shellcheck disable=SC2086 + dnf install -y ${__PACKAGES} || return 1 fi # Let's trigger config_salt() @@ -3820,7 +3934,12 @@ install_fedora_restart_daemons() { [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue systemctl stop salt-$fname > /dev/null 2>&1 - systemctl start salt-$fname.service + systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi done } @@ -4043,86 +4162,107 @@ install_centos_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - __PACKAGES="" - _install_m2crypto_req=false + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - _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 + __PACKAGES="${__PACKAGES} python3" else # Packages are named python36- PY_PKG_VER=36 + __PACKAGES="${__PACKAGES} python36" fi else - if [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then - _install_m2crypto_req=true - fi - _py="python" PY_PKG_VER="" - - # Only Py2 needs python-futures - __PACKAGES="${__PACKAGES} python-futures" - - # There is no systemd-python3 package as of this writing - if [ "$DISTRO_MAJOR_VERSION" -ge 7 ]; then - __PACKAGES="${__PACKAGES} systemd-python" + if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then + __PACKAGES="${__PACKAGES} python2" + elif [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then + PY_PKG_VER=27 + __PACKAGES="${__PACKAGES} python27" + else + __PACKAGES="${__PACKAGES} python" fi fi - if [ "$DISTRO_MAJOR_VERSION" -ge 8 ]; then - __install_tornado_pip ${_py} || return 1 - __PACKAGES="${__PACKAGES} python3-m2crypto" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + _install_m2crypto_req=false + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + _py=${_PY_EXE} + if [ "$DISTRO_MAJOR_VERSION" -gt 6 ]; then + _install_m2crypto_req=true + fi + else + if [ "$DISTRO_MAJOR_VERSION" -eq 6 ]; then + _install_m2crypto_req=true + fi + _py="python" + + # Only Py2 needs python-futures + __PACKAGES="${__PACKAGES} python-futures" + + # There is no systemd-python3 package as of this writing + if [ "$DISTRO_MAJOR_VERSION" -ge 7 ]; then + __PACKAGES="${__PACKAGES} systemd-python" + fi + fi + + 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" + + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud" + fi + + if [ "${_INSTALL_PY}" -eq "${BS_TRUE}" ]; then + # Install Python if "-y" was passed in. + __install_python || return 1 + fi + + if [ "${_PY_EXE}" != "" ] && [ "$_PIP_ALLOWED" -eq "$BS_TRUE" ]; then + # If "-x" is defined, install dependencies with pip based on the Python version given. + _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 $_install_m2crypto_req; then + __yum_install_noinput openssl-devel swig || return 1 + fi + + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # Filter out any commented lines from the requirements file + _REQ_LINES="$(grep '^[^#]' "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + for SINGLE_PACKAGE in ${_PIP_PACKAGES}; do + __REQUIRED_VERSION="$(grep "${SINGLE_PACKAGE}" "${_REQ_LINES}")" + if [ "${__REQUIRED_VERSION}" != "" ]; then + _PIP_PACKAGES=$(echo "$_PIP_PACKAGES" | sed "s/${SINGLE_PACKAGE}/${__REQUIRED_VERSION}/") + fi + done + fi + + if [ "$_INSTALL_CLOUD" -eq "${BS_TRUE}" ]; then + _PIP_PACKAGES="${_PIP_PACKAGES} apache-libcloud" + fi + + __install_pip_pkgs "${_PIP_PACKAGES}" "${_PY_EXE}" || return 1 + else + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi 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" - - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud" - fi - - if [ "${_INSTALL_PY}" -eq "${BS_TRUE}" ]; then - # Install Python if "-y" was passed in. - __install_python || return 1 - fi - - if [ "${_PY_EXE}" != "" ] && [ "$_PIP_ALLOWED" -eq "$BS_TRUE" ]; then - # If "-x" is defined, install dependencies with pip based on the Python version given. - _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 $_install_m2crypto_req; then - __yum_install_noinput openssl-devel swig || return 1 + if [ "${_INSTALL_PY}" -eq "${BS_TRUE}" ] && [ "$DISTRO_MAJOR_VERSION" -lt 8 ]; then + # Install Python if "-y" was passed in. + __install_python || return 1 fi - - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # Filter out any commented lines from the requirements file - _REQ_LINES="$(grep '^[^#]' "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - for SINGLE_PACKAGE in ${_PIP_PACKAGES}; do - __REQUIRED_VERSION="$(grep "${SINGLE_PACKAGE}" "${_REQ_LINES}")" - if [ "${__REQUIRED_VERSION}" != "" ]; then - _PIP_PACKAGES=$(echo "$_PIP_PACKAGES" | sed "s/${SINGLE_PACKAGE}/${__REQUIRED_VERSION}/") - fi - done - fi - - if [ "$_INSTALL_CLOUD" -eq "${BS_TRUE}" ]; then - _PIP_PACKAGES="${_PIP_PACKAGES} apache-libcloud" - fi - - __install_pip_pkgs "${_PIP_PACKAGES}" "${_PY_EXE}" || return 1 - else + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 fi @@ -4227,7 +4367,12 @@ install_centos_restart_daemons() { elif [ -f /usr/bin/systemctl ]; then # CentOS 7 uses systemd /usr/bin/systemctl stop salt-$fname > /dev/null 2>&1 - /usr/bin/systemctl start salt-$fname.service + /usr/bin/systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi fi done } @@ -4686,24 +4831,24 @@ install_alpine_linux_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - apk -U add python2 py2-pip || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + apk -U add python2 py-virtualenv py2-crypto py2-m2crypto py2-setuptools \ + py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ + py2-zmq zeromq py2-requests || return 1 + + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # We're on the master branch, install whichever tornado is on the requirements file + __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + if [ "${__REQUIRED_TORNADO}" != "" ]; then + apk -U add py2-tornado || return 1 + fi + fi + else + apk -U add python2 py2-pip py2-setuptools || return 1 _PY_EXE=python2 return 0 fi - apk -U add python2 py-virtualenv py2-crypto py2-m2crypto py2-setuptools \ - py2-jinja2 py2-yaml py2-markupsafe py2-msgpack py2-psutil \ - py2-zmq zeromq py2-requests || return 1 - - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # We're on the master branch, install whichever tornado is on the requirements file - __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - if [ "${__REQUIRED_TORNADO}" != "" ]; then - apk -U add py2-tornado || return 1 - fi - fi - # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -4947,37 +5092,39 @@ install_amazon_linux_ami_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __PACKAGES="" + __PIP_PACKAGES="" - __PACKAGES="" - __PIP_PACKAGES="" - - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" - __PACKAGES="${__PACKAGES} python27-pip" - __PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION" - fi - - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # We're on the master branch, install whichever tornado is on the requirements file - __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - if [ "${__REQUIRED_TORNADO}" != "" ]; then - __PACKAGES="${__PACKAGES} ${pkg_append}-tornado" + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" + __PACKAGES="${__PACKAGES} python27-pip" + __PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION" fi - fi - if [ "${__PACKAGES}" != "" ]; then - # shellcheck disable=SC2086 + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # We're on the master branch, install whichever tornado is on the requirements file + __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + if [ "${__REQUIRED_TORNADO}" != "" ]; then + __PACKAGES="${__PACKAGES} ${pkg_append}-tornado" + fi + fi + + if [ "${__PACKAGES}" != "" ]; then + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi + + if [ "${__PIP_PACKAGES}" != "" ]; then + # shellcheck disable=SC2086 + ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 + fi + else + __PACKAGES="python27-pip python27-setuptools python27-devel gcc" + # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 fi - if [ "${__PIP_PACKAGES}" != "" ]; then - # shellcheck disable=SC2086 - ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 - fi - # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -4999,6 +5146,7 @@ install_amazon_linux_ami_2_git_deps() { fi PIP_EXE='/bin/pip3' _PY_EXE='python3' + PY_PKG_VER=3 else PIP_EXE='pip' if __check_command_exists python2.7; then @@ -5007,6 +5155,7 @@ install_amazon_linux_ami_2_git_deps() { fi PIP_EXE='/bin/pip' _PY_EXE='python2.7' + PY_PKG_VER=2 fi fi @@ -5016,46 +5165,49 @@ install_amazon_linux_ami_2_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - __PACKAGES="" - __PIP_PACKAGES="" + __PACKAGES="" + __PIP_PACKAGES="" - if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then - __check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" - if [ "$PARSED_VERSION" -eq "2" ]; then - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq "3" ]; then - __PACKAGES="${__PACKAGES} python3-pip" - __PIP_PACKAGES="${__PIP_PACKAGES} tornado<$_TORNADO_MAX_PY3_VERSION" + if [ "$_INSTALL_CLOUD" -eq "$BS_TRUE" ]; then + __check_pip_allowed "You need to allow pip based installations (-P) in order to install apache-libcloud" + if [ "$PARSED_VERSION" -eq "2" ]; then + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq "3" ]; then + __PACKAGES="${__PACKAGES} python3-pip" + __PIP_PACKAGES="${__PIP_PACKAGES} tornado<$_TORNADO_MAX_PY3_VERSION" + else + __PACKAGES="${__PACKAGES} python2-pip" + fi else - __PACKAGES="${__PACKAGES} python2-pip" + __PACKAGES="${__PACKAGES} python27-pip" fi - else - __PACKAGES="${__PACKAGES} python27-pip" + __PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION" fi - __PIP_PACKAGES="${__PIP_PACKAGES} apache-libcloud>=$_LIBCLOUD_MIN_VERSION" - fi - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # We're on the master branch, install whichever tornado is on the requirements file - __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - if [ "${__REQUIRED_TORNADO}" != "" ]; then - __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-tornado" + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # We're on the master branch, install whichever tornado is on the requirements file + __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + if [ "${__REQUIRED_TORNADO}" != "" ]; then + __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-tornado" + fi fi - fi - if [ "${__PACKAGES}" != "" ]; then + if [ "${__PACKAGES}" != "" ]; then + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi + + if [ "${__PIP_PACKAGES}" != "" ]; then + # shellcheck disable=SC2086 + ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 + fi + else + __PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools python${PY_PKG_VER}-devel gcc" # shellcheck disable=SC2086 __yum_install_noinput ${__PACKAGES} || return 1 fi - if [ "${__PIP_PACKAGES}" != "" ]; then - # shellcheck disable=SC2086 - ${PIP_EXE} install ${__PIP_PACKAGES} || return 1 - fi - # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -5281,24 +5433,30 @@ install_arch_linux_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + pacman -R --noconfirm python2-distribute + pacman -Su --noconfirm --needed python2-crypto python2-setuptools python2-jinja \ + python2-m2crypto python2-futures python2-markupsafe python2-msgpack python2-psutil \ + python2-pyzmq zeromq python2-requests python2-systemd || return 1 - pacman -R --noconfirm python2-distribute - pacman -Su --noconfirm --needed python2-crypto python2-setuptools python2-jinja \ - python2-m2crypto python2-futures python2-markupsafe python2-msgpack python2-psutil \ - python2-pyzmq zeromq python2-requests python2-systemd || return 1 - - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # We're on the master branch, install whichever tornado is on the requirements file - __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - if [ "${__REQUIRED_TORNADO}" != "" ]; then - pacman -Su --noconfirm --needed python2-tornado + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # We're on the master branch, install whichever tornado is on the requirements file + __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + if [ "${__REQUIRED_TORNADO}" != "" ]; then + pacman -Su --noconfirm --needed python2-tornado + fi fi + else + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then + PY_PKG_VER=2 + else + PY_PKG_VER="" + fi + __PACKAGES="python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" + # shellcheck disable=SC2086 + pacman -Su --noconfirm --needed ${__PACKAGES} fi - # Let's trigger config_salt() if [ "$_TEMP_CONFIG_DIR" = "null" ]; then _TEMP_CONFIG_DIR="${_SALT_GIT_CHECKOUT_DIR}/conf/" @@ -5418,8 +5576,12 @@ install_arch_linux_restart_daemons() { if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl stop salt-$fname.service > /dev/null 2>&1 - /usr/bin/systemctl start salt-$fname.service - continue + /usr/bin/systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi fi /etc/rc.d/salt-$fname stop > /dev/null 2>&1 @@ -5470,21 +5632,22 @@ install_freebsd_deps() { install_freebsd_git_deps() { install_freebsd_deps || return 1 - SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search -R -d py37-salt | grep 'origin:' \ - | tail -n +2 | awk -F\" '{print $2}') - # shellcheck disable=SC2086 - /usr/local/sbin/pkg install -y ${SALT_DEPENDENCIES} python || return 1 - if ! __check_command_exists git; then /usr/local/sbin/pkg install -y git || return 1 fi __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - /usr/local/sbin/pkg install -y py37-requests || return 1 + SALT_DEPENDENCIES=$(/usr/local/sbin/pkg search -R -d py37-salt | grep 'origin:' \ + | tail -n +2 | awk -F\" '{print $2}') + # shellcheck disable=SC2086 + /usr/local/sbin/pkg install -y ${SALT_DEPENDENCIES} python || return 1 + + /usr/local/sbin/pkg install -y py37-requests || return 1 + else + /usr/local/sbin/pkg install -y python python-pip python-setuptools || return 1 + fi echodebug "Adapting paths to FreeBSD" # The list of files was taken from Salt's BSD port Makefile @@ -5641,8 +5804,16 @@ install_openbsd_deps() { install_openbsd_git_deps() { install_openbsd_deps || return 1 - pkg_add -I -v git || return 1 + + if ! __check_command_exists git; then + pkg_add -I -v git || return 1 + fi __git_clone_and_checkout || return 1 + + if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then + pkg_add -I -v py-pip py-setuptools + fi + # # Let's trigger config_salt() # @@ -5651,10 +5822,6 @@ install_openbsd_git_deps() { CONFIG_SALT_FUNC="config_salt" fi - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - return 0 } @@ -5787,32 +5954,36 @@ install_smartos_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # Install whichever tornado is in the requirements file - __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - __check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'" + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # Install whichever tornado is in the requirements file + __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + __check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_TORNADO}'" - # Install whichever futures is in the requirements file - __REQUIRED_FUTURES="$(grep futures "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - __check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_FUTURES}'" + # Install whichever futures is in the requirements file + __REQUIRED_FUTURES="$(grep futures "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + __check_pip_allowed "You need to allow pip based installations (-P) in order to install the python package '${__REQUIRED_FUTURES}'" - if [ "${__REQUIRED_TORNADO}" != "" ]; then - if ! __check_command_exists pip; then - pkgin -y install py27-pip + if [ "${__REQUIRED_TORNADO}" != "" ]; then + if ! __check_command_exists pip; then + pkgin -y install py27-pip + fi + pip install -U "${__REQUIRED_TORNADO}" fi - pip install -U "${__REQUIRED_TORNADO}" - fi - if [ "${__REQUIRED_FUTURES}" != "" ]; then - if ! __check_command_exists pip; then - pkgin -y install py27-pip + if [ "${__REQUIRED_FUTURES}" != "" ]; then + if ! __check_command_exists pip; then + pkgin -y install py27-pip + fi + pip install -U "${__REQUIRED_FUTURES}" fi - pip install -U "${__REQUIRED_FUTURES}" fi + else + if ! __check_command_exists pip; then + pkgin -y install py27-pip + fi + pkgin -y install py27-setuptools fi # Let's trigger config_salt() @@ -6065,24 +6236,24 @@ install_opensuse_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __zypper_install patch || return 1 - __zypper_install patch || return 1 + __PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml python-futures" - __PACKAGES="libzmq5 python-Jinja2 python-m2crypto python-msgpack-python python-pycrypto python-pyzmq python-xml python-futures" - - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # We're on the master branch, install whichever tornado is on the requirements file - __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - if [ "${__REQUIRED_TORNADO}" != "" ]; then - __PACKAGES="${__PACKAGES} python-tornado" + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # We're on the master branch, install whichever tornado is on the requirements file + __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + if [ "${__REQUIRED_TORNADO}" != "" ]; then + __PACKAGES="${__PACKAGES} python-tornado" + fi fi - fi - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python-apache-libcloud" + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python-apache-libcloud" + fi + else + __PACKAGES="python-pip python-setuptools gcc" fi # shellcheck disable=SC2086 @@ -6206,8 +6377,12 @@ install_opensuse_restart_daemons() { if [ -f /bin/systemctl ]; then systemctl stop salt-$fname > /dev/null 2>&1 - systemctl start salt-$fname.service - continue + systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi fi service salt-$fname stop > /dev/null 2>&1 @@ -6282,36 +6457,39 @@ install_opensuse_15_git_deps() { __git_clone_and_checkout || return 1 - if [ "${_POST_NEON_INSTALL}" -eq $BS_TRUE ]; then - return 0 - fi - - # Py3 is the default bootstrap install for Leap 15 - # However, git installs might specify "-x python2" if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then PY_PKG_VER=2 - - # This is required by some of the python2 packages below - __PACKAGES="libpython2_7-1_0 python2-futures python-ipaddress" else PY_PKG_VER=3 - __PACKAGES="" fi - __PACKAGES="${__PACKAGES} libzmq5 python${PY_PKG_VER}-Jinja2 python${PY_PKG_VER}-msgpack" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pycrypto python${PY_PKG_VER}-pyzmq" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-xml" + __PACKAGES="python${PY_PKG_VER}-xml" - if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then - # We're on the master branch, install whichever tornado is on the requirements file - __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" - if [ "${__REQUIRED_TORNADO}" != "" ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + + # Py3 is the default bootstrap install for Leap 15 + # However, git installs might specify "-x python2" + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then + # This is required by some of the python2 packages below + __PACKAGES="${__PACKAGES} libpython2_7-1_0 python2-futures python-ipaddress" fi - fi - if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-apache-libcloud" + __PACKAGES="${__PACKAGES} libzmq5 python${PY_PKG_VER}-Jinja2 python${PY_PKG_VER}-msgpack" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pycrypto python${PY_PKG_VER}-pyzmq" + + if [ -f "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" ]; then + # We're on the master branch, install whichever tornado is on the requirements file + __REQUIRED_TORNADO="$(grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt")" + if [ "${__REQUIRED_TORNADO}" != "" ]; then + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado" + fi + fi + + if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-apache-libcloud" + fi + else + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" fi # shellcheck disable=SC2086 @@ -6706,7 +6884,12 @@ install_gentoo_restart_daemons() { if [ -d "/run/systemd/system" ]; then systemctl stop salt-$fname > /dev/null 2>&1 - systemctl start salt-$fname.service + systemctl start salt-$fname.service && continue + echodebug "Failed to start salt-$fname using systemd" + if [ "$_ECHO_DEBUG" -eq $BS_TRUE ]; then + systemctl status salt-$fname.service + journalctl -xe + fi else /etc/init.d/salt-$fname stop > /dev/null 2>&1 /etc/init.d/salt-$fname start From 5f8324add051eb73e12195bbb8debe1a5b0a95e7 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 3 Feb 2020 07:21:48 +0000 Subject: [PATCH 08/27] Fedora < 30 is now EOL Fixes #1400 --- README.rst | 3 ++- bootstrap-salt.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5ba5089..9533f69 100644 --- a/README.rst +++ b/README.rst @@ -364,7 +364,8 @@ this offering, while limited, is as follows: - Ubuntu 16.04 - Ubuntu 18.04 -On Fedora 28, PIP installation must be allowed (-P) due to incompatibility with the shipped Tornado library. +On Fedora, PIP installation must be allowed (-P) due to incompatibility with the shipped Tornado +library. Installing the Python 3 packages for Salt is done via the ``-x`` option: diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 1c8239a..ffeb69b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1622,7 +1622,7 @@ __check_end_of_life_versions() { fedora) # Fedora lower than 27 are no longer supported - if [ "$DISTRO_MAJOR_VERSION" -lt 27 ]; then + if [ "$DISTRO_MAJOR_VERSION" -lt 30 ]; then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " https://fedoraproject.org/wiki/Releases" From f2f061f3202912e3e9634e5d870e0efb5c7ab1ab Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 3 Feb 2020 07:27:46 +0000 Subject: [PATCH 09/27] Debian < 8 is now EOL --- README.rst | 1 + bootstrap-salt.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9533f69..b49384b 100644 --- a/README.rst +++ b/README.rst @@ -358,6 +358,7 @@ this offering, while limited, is as follows: - CentOS 7 - Centos 8 +- Debian 8 - Debian 9 - Debian 10 - Fedora (only git installations) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ffeb69b..5fa963c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1560,7 +1560,7 @@ __check_end_of_life_versions() { case "${DISTRO_NAME_L}" in debian) # Debian versions below 7 are not supported - if [ "$DISTRO_MAJOR_VERSION" -lt 7 ]; then + if [ "$DISTRO_MAJOR_VERSION" -lt 8 ]; then echoerror "End of life distributions are not supported." echoerror "Please consider upgrading to the next stable. See:" echoerror " https://wiki.debian.org/DebianReleases" From 4cccf6ce75886622edb4a81fdfd4e2853c896bf8 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 1 Feb 2020 16:47:26 +0000 Subject: [PATCH 10/27] We need procps-ng installed in Fedora --- .kitchen.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.kitchen.yml b/.kitchen.yml index 843b4fe..000790a 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -79,10 +79,14 @@ platforms: driver_config: image: fedora:30 run_command: /usr/lib/systemd/systemd + provision_command: + - dnf -y install procps-ng - name: fedora-31 driver_config: image: fedora:31 run_command: /usr/lib/systemd/systemd + provision_command: + - dnf -y install procps-ng - name: opensuse-15 driver_config: image: opensuse/leap:15.1 From 37d67c620a35b3cf56c4fd5178a2764aa6086201 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 1 Feb 2020 18:11:56 +0000 Subject: [PATCH 11/27] Tornado must be pip installed for Fedora >= 30, under Py2 or Py3. --- bootstrap-salt.sh | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5fa963c..ad388ba 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3831,40 +3831,57 @@ install_fedora_git_deps() { PY_PKG_VER=2 fi - __PACKAGES="${__PACKAGES:=}" + __PACKAGES="" + if ! __check_command_exists ps; then + __PACKAGES="${__PACKAGES} procps-ng" + fi if ! __check_command_exists git; then __PACKAGES="${__PACKAGES} git" fi - install_fedora_deps || return 1 + + # shellcheck disable=SC2086 + if [ -n "${__PACKAGES}" ]; then + dnf install -y ${__PACKAGES} || return 1 + __PACKAGES="" + fi __git_clone_and_checkout || return 1 if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - __PACKAGES="${__PACKAGES:=}" if [ "$_INSECURE_DL" -eq $BS_FALSE ] && [ "${_SALT_REPO_URL%%://*}" = "https" ]; then __PACKAGES="${__PACKAGES} ca-certificates" fi if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud python${PY_PKG_VER}-netaddr" fi - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd" + __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd python${PY_PKG_VER}-pip" - # Fedora 28+ ships with tornado 5.0+ which is broken for salt on py3 - # https://github.com/saltstack/salt-bootstrap/issues/1220 - if [ "${PY_PKG_VER}" -lt 3 ] || [ "$DISTRO_MAJOR_VERSION" -lt 28 ]; then - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-tornado" + install_fedora_deps || return 1 + + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + if __check_command_exists python3; then + __python="python3" + fi + elif [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then + if __check_command_exists python2; then + __python="python2" + fi + else + if ! __check_command_exists python; then + echoerror "Unable to find a python binary?!" + return 1 + fi + # Let's hope it's the right one + __python="python" fi - # Fedora 28+ needs tornado <5.0 from pip - # https://github.com/saltstack/salt-bootstrap/issues/1220 - if [ "${PY_PKG_VER}" -eq 3 ] && [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then - __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt on Python 3" - grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" | while IFS=' + grep tornado "${_SALT_GIT_CHECKOUT_DIR}/requirements/base.txt" | while IFS=' ' read -r dep; do - "${_PY_EXE}" -m pip install "${dep}" || return 1 + echodebug "Running '${__python}' -m pip install '${dep}'" + "${__python}" -m pip install "${dep}" || return 1 done - fi else __PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" # shellcheck disable=SC2086 From e4f8fe0dca5a0db95341bafd5b06c8be69bae6d6 Mon Sep 17 00:00:00 2001 From: ch3ll Date: Fri, 1 Nov 2019 16:25:24 -0400 Subject: [PATCH 12/27] Add fedora 31 git install support --- .drone.jsonnet | 7 +++-- .drone.yml | 74 ++++++++++++++++++++++++++++++++++++++++++++--- bootstrap-salt.sh | 3 ++ 3 files changed, 77 insertions(+), 7 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index a3dafff..cdbdfd0 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -27,9 +27,10 @@ local distros = [ { name: 'CentOS 7', slug: 'centos-7', multiplier: 4, depends: [] }, { name: 'CentOS 8', slug: 'centos-8', multiplier: 5, depends: [] }, { name: 'Debian 8', slug: 'debian-8', multiplier: 6, depends: [] }, - { name: 'Debian 9', slug: 'debian-9', multiplier: 5, depends: [] }, - { name: 'Debian 10', slug: 'debian-10', multiplier: 4, depends: [] }, - { name: 'Fedora 30', slug: 'fedora-30', multiplier: 3, depends: [] }, + { name: 'Debian 9', slug: 'debian-9', multiplier: 7, depends: [] }, + { name: 'Debian 10', slug: 'debian-10', multiplier: 5, depends: [] }, + { name: 'Fedora 30', slug: 'fedora-30', multiplier: 4, depends: [] }, + { name: 'Fedora 31', slug: 'fedora-31', multiplier: 3, depends: [] }, { name: 'Opensuse 15.1', slug: 'opensuse-15', multiplier: 2, depends: [] }, { name: 'Ubuntu 16.04', slug: 'ubuntu-1604', multiplier: 1, depends: [] }, { name: 'Ubuntu 18.04', slug: 'ubuntu-1804', multiplier: 0, depends: [] }, diff --git a/.drone.yml b/.drone.yml index 20eddb9..e04a7c5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -628,7 +628,7 @@ steps: - name: throttle-build image: alpine commands: - - sh -c 't=240; echo Sleeping 240 seconds; sleep 240' + - sh -c 't=336; echo Sleeping 336 seconds; sleep 336' - name: create image: saltstack/drone-salt-bootstrap-testing @@ -772,7 +772,7 @@ steps: - name: throttle-build image: alpine commands: - - sh -c 't=48; echo Sleeping 48 seconds; sleep 48' + - sh -c 't=60; echo Sleeping 60 seconds; sleep 60' - name: create image: saltstack/drone-salt-bootstrap-testing @@ -838,7 +838,7 @@ steps: - name: throttle-build image: alpine commands: - - sh -c 't=144; echo Sleeping 144 seconds; sleep 144' + - sh -c 't=192; echo Sleeping 192 seconds; sleep 192' - name: create image: saltstack/drone-salt-bootstrap-testing @@ -970,6 +970,72 @@ node: depends_on: - Lint +--- +kind: pipeline +name: Fedora 31 + +platform: + os: linux + arch: amd64 + +steps: +- name: throttle-build + image: alpine + commands: + - sh -c 't=36; echo Sleeping 36 seconds; sleep 36' + +- 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 20 + - docker ps -a + - bundle exec kitchen create fedora-31 + 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-31 + 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-fedora-31 + 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: Opensuse 15.1 @@ -1326,6 +1392,6 @@ depends_on: --- kind: signature -hmac: 9c01a5f3f8d8fe0b09aad2cc73976678a432edf3c81aafdff0d17e52ce4cc7f8 +hmac: fae909d28bd67c6bfcee0f01f05540c9683aa1a19b7436c5f0a65c5505701db1 ... diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index ad388ba..5cdca51 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3825,6 +3825,9 @@ install_fedora_stable_post() { install_fedora_git_deps() { if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + if [ "$DISTRO_MAJOR_VERSION" -eq 31 ]; then + __install_tornado_pip $_PY_EXE + fi # Packages are named python3- PY_PKG_VER=3 else From cad861f87491e1ba294f93bb81c5b318333f577f Mon Sep 17 00:00:00 2001 From: ch3ll Date: Fri, 1 Nov 2019 17:15:39 -0400 Subject: [PATCH 13/27] Fix shellcheck errors --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 5cdca51..539c46c 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3826,7 +3826,7 @@ install_fedora_stable_post() { install_fedora_git_deps() { if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then if [ "$DISTRO_MAJOR_VERSION" -eq 31 ]; then - __install_tornado_pip $_PY_EXE + __install_tornado_pip "${_PY_EXE}"|| return 1 fi # Packages are named python3- PY_PKG_VER=3 From 96df3ddbd29171aa3056d487b20480f17a27223d Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Mon, 4 Nov 2019 13:43:43 -0700 Subject: [PATCH 14/27] fix logic for jsonnet --- .drone.jsonnet | 2 ++ .drone.yml | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index cdbdfd0..808dc33 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -60,11 +60,13 @@ local py3_distros = [ 'ubuntu-1604', 'ubuntu-1804', 'fedora-30', + 'fedora-31', ]; local py2_blacklist = [ 'centos-8', 'debian-10', + 'fedora-31', ]; local blacklist_2018 = [ diff --git a/.drone.yml b/.drone.yml index e04a7c5..58bf8b6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -997,26 +997,26 @@ steps: depends_on: - throttle-build -- name: Py2 2018.3(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-2018-3-fedora-31 + - bundle exec kitchen test py3-git-2018-3-fedora-31 environment: DOCKER_HOST: tcp://docker:2375 depends_on: - throttle-build - create -- name: Py2 2019.2(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-2019-2-fedora-31 + - bundle exec kitchen test py3-git-2019-2-fedora-31 environment: DOCKER_HOST: tcp://docker:2375 depends_on: @@ -1392,6 +1392,6 @@ depends_on: --- kind: signature -hmac: fae909d28bd67c6bfcee0f01f05540c9683aa1a19b7436c5f0a65c5505701db1 +hmac: b84d3ddb4ecabcdf7d454cb6552acf79dfa777d7f9453f0b329ae02980c9f3cd ... From 4c6dbce946f66eb0ce1e261f8c4a06510cc52bbf Mon Sep 17 00:00:00 2001 From: Bryce Larson Date: Tue, 10 Dec 2019 16:44:48 -0700 Subject: [PATCH 15/27] add documentation on updating the .drone.yml file --- README.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.rst b/README.rst index b49384b..b2ed30c 100644 --- a/README.rst +++ b/README.rst @@ -437,6 +437,18 @@ The ``Dockerfile`` here inherits the Ubuntu 14.04 public image with Upstart conf system. Use it as an example or starting point of how to make your own Docker images with suitable Salt components, custom configurations, and even `pre-accepted Minion keys`_ already installed. +Updating Drone Pipelines +======================== + +You should install and configure the drone-cli as shown here: https://docs.drone.io/cli/install/ + +Make edits to .drone.jsonnet and then save them into the .drone.yml by doing the following: + +.. code:: console + + drone jsonnet --format --stream + drone sign saltstack/salt-bootstrap --save + .. _Contributing Guidelines: https://github.com/saltstack/salt-bootstrap/blob/develop/CONTRIBUTING.md .. _Docker: https://www.docker.com/ .. _`pre-accepted Minion keys`: https://docs.saltstack.com/en/latest/topics/tutorials/preseed_key.html From d3029c28b316f5e0b9ff40bdb4c3fa555c0fd2a3 Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Tue, 17 Dec 2019 09:31:23 -0800 Subject: [PATCH 16/27] Adding fixes to support Fedora 31. --- bootstrap-salt.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 539c46c..8b1595b 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -2025,6 +2025,14 @@ __yum_install_noinput() { fi } # ---------- end of function __yum_install_noinput ---------- +#--- FUNCTION ------------------------------------------------------------------------------------------------------- +# NAME: __dnf_install_noinput +# DESCRIPTION: (DRY) dnf install with noinput options +#---------------------------------------------------------------------------------------------------------------------- +__dnf_install_noinput() { + + dnf -y install "${@}" || return $? +} # ---------- end of function __dnf_install_noinput ---------- #--- FUNCTION ------------------------------------------------------------------------------------------------------- # NAME: __git_clone_and_checkout @@ -2575,7 +2583,11 @@ __install_pip_pkgs() { __apt_get_install_noinput ${__PACKAGES} || return 1 else __PACKAGES="${__PACKAGES} ${_py_pkg}-devel" - __yum_install_noinput ${__PACKAGES} || return 1 + if [ "$DISTRO_NAME_L" = "fedora" ];then + __dnf_install_noinput ${__PACKAGES} || return 1 + else + __yum_install_noinput ${__PACKAGES} || return 1 + fi fi fi From ed16bf2888a3fdab633d579a9733e1a59db63997 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 3 Feb 2020 10:59:30 +0000 Subject: [PATCH 17/27] Enable Fedora 31 for the github actions testing workflow --- .github/.workflows/main.yml | 276 +++++++++++++++++++++++ .github/.workflows/templates/generate.py | 2 +- 2 files changed, 277 insertions(+), 1 deletion(-) diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index 8d04116..a17c0af 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -2850,6 +2850,282 @@ jobs: bundle exec kitchen destroy latest-fedora-30 + py3-stable-2018-3-fedora-31: + name: Fedora 31 v2018.3 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-2018-3-fedora-31 || bundle exec kitchen create py3-stable-2018-3-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-2018-3-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-2018-3-fedora-31 + + + py3-git-2018-3-fedora-31: + name: Fedora 31 v2018.3 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-2018-3-fedora-31 || bundle exec kitchen create py3-git-2018-3-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-2018-3-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-2018-3-fedora-31 + + + py3-stable-2019-2-fedora-31: + name: Fedora 31 v2019.2 Py3 Stable + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-stable-2019-2-fedora-31 || bundle exec kitchen create py3-stable-2019-2-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-stable-2019-2-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-stable-2019-2-fedora-31 + + + py3-git-2019-2-fedora-31: + name: Fedora 31 v2019.2 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-2019-2-fedora-31 || bundle exec kitchen create py3-git-2019-2-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-2019-2-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-2019-2-fedora-31 + + + py3-git-3000-fedora-31: + name: Fedora 31 v3000 Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-3000-fedora-31 || bundle exec kitchen create py3-git-3000-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-3000-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-3000-fedora-31 + + + latest-fedora-31: + name: Fedora 31 Latest packaged release + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create latest-fedora-31 || bundle exec kitchen create latest-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify latest-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy latest-fedora-31 + + py2-git-2018-3-opensuse-15: name: Opensuse 15 v2018.3 Py2 Git runs-on: ubuntu-latest diff --git a/.github/.workflows/templates/generate.py b/.github/.workflows/templates/generate.py index 3a21710..f295076 100755 --- a/.github/.workflows/templates/generate.py +++ b/.github/.workflows/templates/generate.py @@ -16,7 +16,7 @@ LINUX_DISTROS = [ 'debian-8', 'debian-9', 'fedora-30', - #'fedora-31', + 'fedora-31', 'opensuse-15', 'ubuntu-1604', 'ubuntu-1804' From f77631a87f358e96db184696646013b541b45552 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 3 Feb 2020 15:58:04 +0000 Subject: [PATCH 18/27] Even stable installs on Fedora must downgrade tornado --- bootstrap-salt.sh | 80 ++++++++++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 32 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 8b1595b..c56c3a8 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3769,31 +3769,25 @@ install_fedora_deps() { dnf -y update || return 1 fi - if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then - __PACKAGES="${__PACKAGES:=}" - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - # Packages are named python3- - PY_PKG_VER=3 - __PACKAGES="${__PACKAGES} python3-m2crypto python3-PyYAML" - else - PY_PKG_VER=2 - __PACKAGES="${__PACKAGES} m2crypto" - if [ "$DISTRO_MAJOR_VERSION" -ge 28 ]; then - __PACKAGES="${__PACKAGES} python2-pyyaml" - else - __PACKAGES="${__PACKAGES} PyYAML" - fi - fi - __PACKAGES="${__PACKAGES} dnf-utils libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq" - if [ "${_EXTRA_PACKAGES}" != "" ]; then - echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" - fi - - # shellcheck disable=SC2086 - dnf install -y ${__PACKAGES} ${_EXTRA_PACKAGES} || return 1 + __PACKAGES="${__PACKAGES:=}" + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + # Packages are named python3- + PY_PKG_VER=3 + else + PY_PKG_VER=2 fi + __PACKAGES="${__PACKAGES} dnf-utils libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pip python${PY_PKG_VER}-m2crypto python${PY_PKG_VER}-pyyaml" + __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd" + if [ "${_EXTRA_PACKAGES}" != "" ]; then + echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" + fi + + # shellcheck disable=SC2086 + __dnf_install_noinput ${__PACKAGES} ${_EXTRA_PACKAGES} || return 1 + return 0 } @@ -3814,7 +3808,34 @@ install_fedora_stable() { fi # shellcheck disable=SC2086 - dnf install -y ${__PACKAGES} || return 1 + __dnf_install_noinput ${__PACKAGES} || return 1 + + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then + if __check_command_exists python3; then + __python="python3" + fi + elif [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then + if __check_command_exists python2; then + __python="python2" + fi + else + if ! __check_command_exists python; then + echoerror "Unable to find a python binary?!" + return 1 + fi + # Let's hope it's the right one + __python="python" + fi + + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt" + __installed_tornado_rpm=$(rpm -qa | grep python${PY_PKG_VER}-tornado) + if [ -n "${__installed_tornado_rpm}" ]; then + rpm -e --nodeps "${__installed_tornado_rpm}" || return 1 + fi + echodebug "Running '${__python}' -m pip install 'tornado<5.0'" + "${__python}" -m pip install --target /usr/lib/python3.7/site-packages "tornado<5" || return 1 + fi return 0 } @@ -3837,9 +3858,6 @@ install_fedora_stable_post() { install_fedora_git_deps() { if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - if [ "$DISTRO_MAJOR_VERSION" -eq 31 ]; then - __install_tornado_pip "${_PY_EXE}"|| return 1 - fi # Packages are named python3- PY_PKG_VER=3 else @@ -3854,9 +3872,9 @@ install_fedora_git_deps() { __PACKAGES="${__PACKAGES} git" fi - # shellcheck disable=SC2086 if [ -n "${__PACKAGES}" ]; then - dnf install -y ${__PACKAGES} || return 1 + # shellcheck disable=SC2086 + __dnf_install_noinput ${__PACKAGES} || return 1 __PACKAGES="" fi @@ -3870,8 +3888,6 @@ install_fedora_git_deps() { if [ "$_INSTALL_CLOUD" -eq $BS_TRUE ]; then __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-libcloud python${PY_PKG_VER}-netaddr" fi - __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt" - __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-systemd python${PY_PKG_VER}-pip" install_fedora_deps || return 1 @@ -3900,7 +3916,7 @@ install_fedora_git_deps() { else __PACKAGES="python${PY_PKG_VER}-devel python${PY_PKG_VER}-pip python${PY_PKG_VER}-setuptools gcc" # shellcheck disable=SC2086 - dnf install -y ${__PACKAGES} || return 1 + __dnf_install_noinput ${__PACKAGES} || return 1 fi # Let's trigger config_salt() From 743209efc6859d14b2a24a1d9746f71c76c673ad Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 3 Feb 2020 17:19:12 +0000 Subject: [PATCH 19/27] Add Fedora 32 support(disabled since it's py3.8) --- .github/.workflows/main.yml | 276 ++++------------------- .github/.workflows/templates/generate.py | 7 +- .kitchen.yml | 12 + 3 files changed, 64 insertions(+), 231 deletions(-) diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index a17c0af..4dc15be 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -2344,98 +2344,6 @@ jobs: bundle exec kitchen destroy latest-debian-9 - py2-stable-2018-3-fedora-30: - name: Fedora 30 v2018.3 Py2 Stable - runs-on: ubuntu-latest - timeout-minutes: 10 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-stable-2018-3-fedora-30 || bundle exec kitchen create py2-stable-2018-3-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-stable-2018-3-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-stable-2018-3-fedora-30 - - - py2-git-2018-3-fedora-30: - name: Fedora 30 v2018.3 Py2 Git - runs-on: ubuntu-latest - timeout-minutes: 10 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-git-2018-3-fedora-30 || bundle exec kitchen create py2-git-2018-3-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-git-2018-3-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-git-2018-3-fedora-30 - - py3-stable-2018-3-fedora-30: name: Fedora 30 v2018.3 Py3 Stable runs-on: ubuntu-latest @@ -2528,98 +2436,6 @@ jobs: bundle exec kitchen destroy py3-git-2018-3-fedora-30 - py2-stable-2019-2-fedora-30: - name: Fedora 30 v2019.2 Py2 Stable - runs-on: ubuntu-latest - timeout-minutes: 10 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-stable-2019-2-fedora-30 || bundle exec kitchen create py2-stable-2019-2-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-stable-2019-2-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-stable-2019-2-fedora-30 - - - py2-git-2019-2-fedora-30: - name: Fedora 30 v2019.2 Py2 Git - runs-on: ubuntu-latest - timeout-minutes: 10 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-git-2019-2-fedora-30 || bundle exec kitchen create py2-git-2019-2-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-git-2019-2-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-git-2019-2-fedora-30 - - py3-stable-2019-2-fedora-30: name: Fedora 30 v2019.2 Py3 Stable runs-on: ubuntu-latest @@ -2712,52 +2528,6 @@ jobs: bundle exec kitchen destroy py3-git-2019-2-fedora-30 - py2-git-3000-fedora-30: - name: Fedora 30 v3000 Py2 Git - runs-on: ubuntu-latest - timeout-minutes: 10 - - needs: lint - - steps: - - uses: actions/checkout@v1 - - name: Setup Ruby - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - - name: Install Bundler - run: | - gem install bundler - - - name: Setup Bundle - run: | - bundle install --with docker --without opennebula ec2 windows vagrant - - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install Python Dependencies - run: | - pip install -U pip - pip install -r tests/requirements.txt - - - name: Create Test Container - run: | - bundle exec kitchen create py2-git-3000-fedora-30 || bundle exec kitchen create py2-git-3000-fedora-30 - - - name: Test Bootstrap In Test Container - run: | - bundle exec kitchen verify py2-git-3000-fedora-30 - - - name: Destroy Test Container - if: always() - run: | - bundle exec kitchen destroy py2-git-3000-fedora-30 - - py3-git-3000-fedora-30: name: Fedora 30 v3000 Py3 Git runs-on: ubuntu-latest @@ -3126,6 +2896,52 @@ jobs: bundle exec kitchen destroy latest-fedora-31 + latest-fedora-32: + name: Fedora 32 Latest packaged release + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create latest-fedora-32 || bundle exec kitchen create latest-fedora-32 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify latest-fedora-32 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy latest-fedora-32 + + py2-git-2018-3-opensuse-15: name: Opensuse 15 v2018.3 Py2 Git runs-on: ubuntu-latest diff --git a/.github/.workflows/templates/generate.py b/.github/.workflows/templates/generate.py index f295076..9f0fc36 100755 --- a/.github/.workflows/templates/generate.py +++ b/.github/.workflows/templates/generate.py @@ -17,6 +17,7 @@ LINUX_DISTROS = [ 'debian-9', 'fedora-30', 'fedora-31', + 'fedora-32', 'opensuse-15', 'ubuntu-1604', 'ubuntu-1804' @@ -41,14 +42,17 @@ STABLE_DISTROS = [ PY2_BLACKLIST = [ 'centos-8', 'debian-10', + 'fedora-30', 'fedora-31', + 'fedora-32' ] PY3_BLACKLIST = [ - 'arch', + 'arch', # Defaults to Py3.8 'amazon-1', 'centos-6', 'debian-8', + 'fedora-32' # Defaults to Py3.8 ] BLACKLIST_2018 = [ @@ -93,6 +97,7 @@ DISTRO_DISPLAY_NAMES = { 'debian-9': 'Debian 9', 'fedora-30': 'Fedora 30', 'fedora-31': 'Fedora 31', + 'fedora-32': 'Fedora 32', 'opensuse-15': 'Opensuse 15', 'ubuntu-1604': 'Ubuntu 16.04', 'ubuntu-1804': 'Ubuntu 18.04' diff --git a/.kitchen.yml b/.kitchen.yml index 000790a..d2c5d66 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -87,6 +87,12 @@ platforms: run_command: /usr/lib/systemd/systemd provision_command: - dnf -y install procps-ng + - name: fedora-32 + driver_config: + image: fedora:32 + run_command: /usr/lib/systemd/systemd + provision_command: + - dnf -y install procps-ng - name: opensuse-15 driver_config: image: opensuse/leap:15.1 @@ -124,6 +130,9 @@ suites: excludes: - arch - opensuse-15 + - fedora-30 + - fedora-31 + - fedora-32 - name: py2-stable-2019-2 provisioner: salt_version: 2019.2 @@ -131,6 +140,9 @@ suites: excludes: - arch - opensuse-15 + - fedora-30 + - fedora-31 + - fedora-32 - name: py3-git-2018-3 provisioner: From 63992be26c441f0a4c494761595ff1c4ce3d6822 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 3 Feb 2020 17:21:30 +0000 Subject: [PATCH 20/27] Fedora stable installs are Py3 only --- bootstrap-salt.sh | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index c56c3a8..e9bcc07 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -3770,13 +3770,14 @@ install_fedora_deps() { fi __PACKAGES="${__PACKAGES:=}" - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - # Packages are named python3- - PY_PKG_VER=3 - else - PY_PKG_VER=2 + if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -lt 3 ]; then + echoerror "There are no Python 2 stable packages for Fedora, only Py3 packages" + return 1 fi + # Salt on Fedora is Py3 + PY_PKG_VER=3 + __PACKAGES="${__PACKAGES} dnf-utils libyaml procps-ng python${PY_PKG_VER}-crypto python${PY_PKG_VER}-jinja2" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-msgpack python${PY_PKG_VER}-requests python${PY_PKG_VER}-zmq" __PACKAGES="${__PACKAGES} python${PY_PKG_VER}-pip python${PY_PKG_VER}-m2crypto python${PY_PKG_VER}-pyyaml" @@ -3810,31 +3811,27 @@ install_fedora_stable() { # shellcheck disable=SC2086 __dnf_install_noinput ${__PACKAGES} || return 1 - if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 3 ]; then - if __check_command_exists python3; then - __python="python3" - fi - elif [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -eq 2 ]; then - if __check_command_exists python2; then - __python="python2" - fi - else - if ! __check_command_exists python; then - echoerror "Unable to find a python binary?!" - return 1 - fi - # Let's hope it's the right one - __python="python" + __python="python3" + if ! __check_command_exists python3; then + echoerror "Could not find a python3 binary?!" + return 1 fi if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then __check_pip_allowed "You need to allow pip based installations (-P) for Tornado <5.0 in order to install Salt" __installed_tornado_rpm=$(rpm -qa | grep python${PY_PKG_VER}-tornado) if [ -n "${__installed_tornado_rpm}" ]; then + echodebug "Removing system package ${__installed_tornado_rpm}" rpm -e --nodeps "${__installed_tornado_rpm}" || return 1 fi - echodebug "Running '${__python}' -m pip install 'tornado<5.0'" - "${__python}" -m pip install --target /usr/lib/python3.7/site-packages "tornado<5" || return 1 + __get_site_packages_dir_code=$(cat << EOM +import site +print([d for d in site.getsitepackages() if d.startswith('/usr/lib/python')][0]) +EOM +) + __target_path=$(${__python} -c "${__get_site_packages_dir_code}") + echodebug "Running '${__python}' -m pip install --target ${__target_path} 'tornado<5.0'" + "${__python}" -m pip install --target "${__target_path}" "tornado<5" || return 1 fi return 0 From 775782305e9c4ecd44e3eab77ca188061aaa8060 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 3 Feb 2020 18:57:32 +0000 Subject: [PATCH 21/27] Py2 on fedora is now blacklisted. --- .drone.jsonnet | 1 + .drone.yml | 56 ++------------------------------------------------ 2 files changed, 3 insertions(+), 54 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 808dc33..40f1c94 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -66,6 +66,7 @@ local py3_distros = [ local py2_blacklist = [ 'centos-8', 'debian-10', + 'fedora-30', 'fedora-31', ]; diff --git a/.drone.yml b/.drone.yml index 58bf8b6..ee3cba3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -838,7 +838,7 @@ steps: - name: throttle-build image: alpine commands: - - sh -c 't=192; echo Sleeping 192 seconds; sleep 192' + - sh -c 't=96; echo Sleeping 96 seconds; sleep 96' - name: create image: saltstack/drone-salt-bootstrap-testing @@ -853,58 +853,6 @@ steps: 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-30 - 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-fedora-30 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - -- name: Py2 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-stable-2018-3-fedora-30 - environment: - DOCKER_HOST: tcp://docker:2375 - depends_on: - - throttle-build - - create - -- name: Py2 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 py2-stable-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: @@ -1392,6 +1340,6 @@ depends_on: --- kind: signature -hmac: b84d3ddb4ecabcdf7d454cb6552acf79dfa777d7f9453f0b329ae02980c9f3cd +hmac: 08cacaea37ae92bd156f41af4af3c80da1f2aa535bc41a9efe2f2922c7b51e99 ... From 344bd6b5bf8e8687c484d347e2ffe51d67555d5c Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 3 Feb 2020 18:56:14 +0000 Subject: [PATCH 22/27] Update changes log --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1304dd1..0300e93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ Version TBD (In Progress on the Develop Branch): + * Add support for the Salt Neon(3000) release (s0undt3ch) #1424 + * Drop support for Fedora < 30 (s0undt3ch) #1424 + * Drop support for Debian < 8 (s0undt3ch) #1424 Version 2020.01.29: * FreeBSD fixes (cedwards) #1413 From bd0607b2a117329e188bb70f1bcac9a9c382d48e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 4 Feb 2020 12:35:45 +0000 Subject: [PATCH 23/27] Add py3-git-master kitchen buidls support --- .kitchen.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.kitchen.yml b/.kitchen.yml index d2c5d66..7f75ee6 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -190,6 +190,17 @@ suites: - debian-8 - opensuse-15 - arch + - name: py3-git-master + provisioner: + salt_version: master + salt_bootstrap_options: -x python3 -MPfq -D git %s + excludes: + - arch + - amazon-1 + - centos-6 + - debian-8 + - fedora-32 + - opensuse-15 - name: latest provisioner: From e970777d5f17dfba3494830c05b54e7b350fad99 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 4 Feb 2020 10:02:43 +0000 Subject: [PATCH 24/27] Also test boostrapping the master branch --- .github/.workflows/main.yml | 874 +++++++++++++++++++++++ .github/.workflows/templates/generate.py | 4 + 2 files changed, 878 insertions(+) diff --git a/.github/.workflows/main.yml b/.github/.workflows/main.yml index 4dc15be..c92f9cf 100644 --- a/.github/.workflows/main.yml +++ b/.github/.workflows/main.yml @@ -320,6 +320,98 @@ jobs: bundle exec kitchen destroy py3-git-3000-amazon-2 + py2-git-master-amazon-2: + name: Amazon 2 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-amazon-2 || bundle exec kitchen create py2-git-master-amazon-2 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-amazon-2 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-amazon-2 + + + py3-git-master-amazon-2: + name: Amazon 2 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-amazon-2 || bundle exec kitchen create py3-git-master-amazon-2 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-amazon-2 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-amazon-2 + + latest-amazon-2: name: Amazon 2 Latest packaged release runs-on: ubuntu-latest @@ -504,6 +596,52 @@ jobs: bundle exec kitchen destroy py2-git-3000-arch + py2-git-master-arch: + name: Arch Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-arch || bundle exec kitchen create py2-git-master-arch + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-arch + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-arch + + py2-stable-2018-3-centos-6: name: CentOS 6 v2018.3 Py2 Stable runs-on: ubuntu-latest @@ -734,6 +872,52 @@ jobs: bundle exec kitchen destroy py2-git-3000-centos-6 + py2-git-master-centos-6: + name: CentOS 6 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-centos-6 || bundle exec kitchen create py2-git-master-centos-6 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-centos-6 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-centos-6 + + latest-centos-6: name: CentOS 6 Latest packaged release runs-on: ubuntu-latest @@ -1240,6 +1424,98 @@ jobs: bundle exec kitchen destroy py3-git-3000-centos-7 + py2-git-master-centos-7: + name: CentOS 7 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-centos-7 || bundle exec kitchen create py2-git-master-centos-7 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-centos-7 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-centos-7 + + + py3-git-master-centos-7: + name: CentOS 7 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-centos-7 || bundle exec kitchen create py3-git-master-centos-7 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-centos-7 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-centos-7 + + latest-centos-7: name: CentOS 7 Latest packaged release runs-on: ubuntu-latest @@ -1424,6 +1700,52 @@ jobs: bundle exec kitchen destroy py3-git-3000-centos-8 + py3-git-master-centos-8: + name: CentOS 8 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-centos-8 || bundle exec kitchen create py3-git-master-centos-8 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-centos-8 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-centos-8 + + py3-stable-2019-2-debian-10: name: Debian 10 v2019.2 Py3 Stable runs-on: ubuntu-latest @@ -1562,6 +1884,52 @@ jobs: bundle exec kitchen destroy py3-git-3000-debian-10 + py3-git-master-debian-10: + name: Debian 10 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-debian-10 || bundle exec kitchen create py3-git-master-debian-10 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-debian-10 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-debian-10 + + py2-stable-2018-3-debian-8: name: Debian 8 v2018.3 Py2 Stable runs-on: ubuntu-latest @@ -1792,6 +2160,52 @@ jobs: bundle exec kitchen destroy py2-git-3000-debian-8 + py2-git-master-debian-8: + name: Debian 8 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-debian-8 || bundle exec kitchen create py2-git-master-debian-8 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-debian-8 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-debian-8 + + latest-debian-8: name: Debian 8 Latest packaged release runs-on: ubuntu-latest @@ -2298,6 +2712,98 @@ jobs: bundle exec kitchen destroy py3-git-3000-debian-9 + py2-git-master-debian-9: + name: Debian 9 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-debian-9 || bundle exec kitchen create py2-git-master-debian-9 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-debian-9 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-debian-9 + + + py3-git-master-debian-9: + name: Debian 9 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-debian-9 || bundle exec kitchen create py3-git-master-debian-9 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-debian-9 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-debian-9 + + latest-debian-9: name: Debian 9 Latest packaged release runs-on: ubuntu-latest @@ -2574,6 +3080,52 @@ jobs: bundle exec kitchen destroy py3-git-3000-fedora-30 + py3-git-master-fedora-30: + name: Fedora 30 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-fedora-30 || bundle exec kitchen create py3-git-master-fedora-30 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-fedora-30 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-fedora-30 + + latest-fedora-30: name: Fedora 30 Latest packaged release runs-on: ubuntu-latest @@ -2850,6 +3402,52 @@ jobs: bundle exec kitchen destroy py3-git-3000-fedora-31 + py3-git-master-fedora-31: + name: Fedora 31 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-fedora-31 || bundle exec kitchen create py3-git-master-fedora-31 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-fedora-31 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-fedora-31 + + latest-fedora-31: name: Fedora 31 Latest packaged release runs-on: ubuntu-latest @@ -3218,6 +3816,98 @@ jobs: bundle exec kitchen destroy py3-git-3000-opensuse-15 + py2-git-master-opensuse-15: + name: Opensuse 15 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-opensuse-15 || bundle exec kitchen create py2-git-master-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-opensuse-15 + + + py3-git-master-opensuse-15: + name: Opensuse 15 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-opensuse-15 || bundle exec kitchen create py3-git-master-opensuse-15 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-opensuse-15 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-opensuse-15 + + latest-opensuse-15: name: Opensuse 15 Latest packaged release runs-on: ubuntu-latest @@ -3724,6 +4414,98 @@ jobs: bundle exec kitchen destroy py3-git-3000-ubuntu-1604 + py2-git-master-ubuntu-1604: + name: Ubuntu 16.04 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-ubuntu-1604 || bundle exec kitchen create py2-git-master-ubuntu-1604 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-ubuntu-1604 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-ubuntu-1604 + + + py3-git-master-ubuntu-1604: + name: Ubuntu 16.04 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-ubuntu-1604 || bundle exec kitchen create py3-git-master-ubuntu-1604 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-ubuntu-1604 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-ubuntu-1604 + + latest-ubuntu-1604: name: Ubuntu 16.04 Latest packaged release runs-on: ubuntu-latest @@ -4230,6 +5012,98 @@ jobs: bundle exec kitchen destroy py3-git-3000-ubuntu-1804 + py2-git-master-ubuntu-1804: + name: Ubuntu 18.04 Master Py2 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py2-git-master-ubuntu-1804 || bundle exec kitchen create py2-git-master-ubuntu-1804 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py2-git-master-ubuntu-1804 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py2-git-master-ubuntu-1804 + + + py3-git-master-ubuntu-1804: + name: Ubuntu 18.04 Master Py3 Git + runs-on: ubuntu-latest + timeout-minutes: 10 + + needs: lint + + steps: + - uses: actions/checkout@v1 + - name: Setup Ruby + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + + - name: Install Bundler + run: | + gem install bundler + + - name: Setup Bundle + run: | + bundle install --with docker --without opennebula ec2 windows vagrant + + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install Python Dependencies + run: | + pip install -U pip + pip install -r tests/requirements.txt + + - name: Create Test Container + run: | + bundle exec kitchen create py3-git-master-ubuntu-1804 || bundle exec kitchen create py3-git-master-ubuntu-1804 + + - name: Test Bootstrap In Test Container + run: | + bundle exec kitchen verify py3-git-master-ubuntu-1804 + + - name: Destroy Test Container + if: always() + run: | + bundle exec kitchen destroy py3-git-master-ubuntu-1804 + + latest-ubuntu-1804: name: Ubuntu 18.04 Latest packaged release runs-on: ubuntu-latest diff --git a/.github/.workflows/templates/generate.py b/.github/.workflows/templates/generate.py index 9f0fc36..c9fda1f 100755 --- a/.github/.workflows/templates/generate.py +++ b/.github/.workflows/templates/generate.py @@ -65,6 +65,7 @@ SALT_BRANCHES = [ '2018-3', '2019-2', '3000', + 'master', 'latest' ] @@ -72,6 +73,7 @@ BRANCH_DISPLAY_NAMES = { '2018-3': 'v2018.3', '2019-2': 'v2019.2', '3000': 'v3000', + 'master': 'Master', 'latest': 'Latest' } @@ -138,6 +140,8 @@ def generate_test_jobs(): for python_version in ('py2', 'py3'): for bootstrap_type in ('stable', 'git'): + if bootstrap_type == 'stable' and branch == 'master': + continue if bootstrap_type == 'stable' and distro not in STABLE_DISTROS: continue From b219dc62fbfb8d4c8b3041405e4855fdcacb0f5e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 4 Feb 2020 12:15:47 +0000 Subject: [PATCH 25/27] First check for non empty string --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index e9bcc07..a495d4f 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5334,7 +5334,7 @@ _eof # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 # which is already installed - if [ "${PY_PKG_VER}" -eq 3 ]; then + if [ -n "${PY_PKG_VER}" ] && [ "${PY_PKG_VER}" -eq 3 ]; then __PACKAGES="${pkg_append}${PY_PKG_VER}-m2crypto ${pkg_append}${PY_PKG_VER}-pyyaml" else __PACKAGES="m2crypto PyYAML ${pkg_append}-futures" From 1692446cd230a25c1efca7f1d9b796d645b15c6a Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 4 Feb 2020 12:28:09 +0000 Subject: [PATCH 26/27] Don't install system packages POST Neon release on git installs --- bootstrap-salt.sh | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index a495d4f..8d70ec4 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -5096,14 +5096,15 @@ _eof fi - # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 - # which is already installed - __PACKAGES="m2crypto ${pkg_append}-crypto ${pkg_append}-jinja2 ${pkg_append}-PyYAML" - __PACKAGES="${__PACKAGES} ${pkg_append}-msgpack ${pkg_append}-requests ${pkg_append}-zmq" - __PACKAGES="${__PACKAGES} ${pkg_append}-futures" - - # shellcheck disable=SC2086 - __yum_install_noinput ${__PACKAGES} || return 1 + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 + # which is already installed + __PACKAGES="m2crypto ${pkg_append}-crypto ${pkg_append}-jinja2 ${pkg_append}-PyYAML" + __PACKAGES="${__PACKAGES} ${pkg_append}-msgpack ${pkg_append}-requests ${pkg_append}-zmq" + __PACKAGES="${__PACKAGES} ${pkg_append}-futures" + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 + fi if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" @@ -5332,20 +5333,22 @@ _eof fi - # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 - # which is already installed - if [ -n "${PY_PKG_VER}" ] && [ "${PY_PKG_VER}" -eq 3 ]; then - __PACKAGES="${pkg_append}${PY_PKG_VER}-m2crypto ${pkg_append}${PY_PKG_VER}-pyyaml" - else - __PACKAGES="m2crypto PyYAML ${pkg_append}-futures" + if [ "${_POST_NEON_INSTALL}" -eq $BS_FALSE ]; then + # Package python-ordereddict-1.1-2.el6.noarch is obsoleted by python26-2.6.9-2.88.amzn1.x86_64 + # which is already installed + if [ -n "${PY_PKG_VER}" ] && [ "${PY_PKG_VER}" -eq 3 ]; then + __PACKAGES="${pkg_append}${PY_PKG_VER}-m2crypto ${pkg_append}${PY_PKG_VER}-pyyaml" + else + __PACKAGES="m2crypto PyYAML ${pkg_append}-futures" + fi + + __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-crypto ${pkg_append}${PY_PKG_VER}-jinja2 procps-ng" + __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-msgpack ${pkg_append}${PY_PKG_VER}-requests ${pkg_append}${PY_PKG_VER}-zmq" + + # shellcheck disable=SC2086 + __yum_install_noinput ${__PACKAGES} || return 1 fi - __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-crypto ${pkg_append}${PY_PKG_VER}-jinja2 procps-ng" - __PACKAGES="${__PACKAGES} ${pkg_append}${PY_PKG_VER}-msgpack ${pkg_append}${PY_PKG_VER}-requests ${pkg_append}${PY_PKG_VER}-zmq" - - # shellcheck disable=SC2086 - __yum_install_noinput ${__PACKAGES} || return 1 - if [ "${_EXTRA_PACKAGES}" != "" ]; then echoinfo "Installing the following extra packages as requested: ${_EXTRA_PACKAGES}" # shellcheck disable=SC2086 From 03b814b3dfea97d877afc3cffc3dd6abab25818b Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 4 Feb 2020 17:29:28 +0000 Subject: [PATCH 27/27] Bump version for stable release --- ChangeLog | 2 ++ bootstrap-salt.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0300e93..d17d3d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ Version TBD (In Progress on the Develop Branch): + +Version 2020.02.04: * Add support for the Salt Neon(3000) release (s0undt3ch) #1424 * Drop support for Fedora < 30 (s0undt3ch) #1424 * Drop support for Debian < 8 (s0undt3ch) #1424 diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 8d70ec4..6fb3de3 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -23,7 +23,7 @@ #====================================================================================================================== set -o nounset # Treat unset variables as an error -__ScriptVersion="2020.01.29" +__ScriptVersion="2020.02.04" __ScriptName="bootstrap-salt.sh" __ScriptFullName="$0"