From 9216b4850c9d8841987b39e3c31ebe17ab4ef936 Mon Sep 17 00:00:00 2001 From: Twangboy Date: Wed, 26 Oct 2022 09:14:49 -0600 Subject: [PATCH] Better summary, show all bad urls at the end --- .cicd/tests.py | 82 ++++++++++++++--------- 7zip.sls | 15 +++-- adobeair.sls | 13 +--- advancedlogging.sls | 15 ----- audacity.sls | 61 ++++++++++++++--- nsis.sls | 4 +- rubyinstaller_x64.sls | 10 ++- rubyinstaller_x86.sls | 13 +++- salt-minion-py2.sls | 92 -------------------------- salt-minion-py3.sls => salt-minion.sls | 0 10 files changed, 134 insertions(+), 171 deletions(-) delete mode 100644 advancedlogging.sls delete mode 100644 salt-minion-py2.sls rename salt-minion-py3.sls => salt-minion.sls (100%) diff --git a/.cicd/tests.py b/.cicd/tests.py index 8892b4f39..317b2df8c 100644 --- a/.cicd/tests.py +++ b/.cicd/tests.py @@ -89,6 +89,12 @@ def process_each(softwares): # unreachable urls... they may be pointing to salt:// for example if version.get("skip_urltest", False): count_status["skipped"] += 1 + msg = "SKIPPED : %s -- %s" % (s, v) + print(msg) + continue + if not version.get("installer", ""): + msg = "SKIPPED (No URL) : %s -- %s" % (s, v) + print(msg) continue # Testing each non-salt URL for availability scheme = urlparse(version.get("installer", "")).scheme @@ -202,49 +208,65 @@ def process_each(softwares): label_rev = {"AMD64": "x86", "x86": "AMD64"} for file in our_files: -# try: - label = " ( {} ) ".format(file) - count = 80 - len(label) - count = count - count % 2 - count = round( count / 2) - label = ">" * count + label + "<" * count - print(label + "<" * (80 - len(label))) - with open(file, "r") as stream: - template = stream.read() - if "cpuarch" in template: - for cpuarch in ["AMD64", "x86"]: - label = " ( arch: {} ) ".format(label_rev[cpuarch]) - count = 80 - len(label) - count = count - count % 2 - count = round( count / 2) - label = "-" * count + label + "-" * count - print(label + "-" * (80 - len(label))) + try: + label = " ( {} ) ".format(file) + count = 80 - len(label) + count = count - count % 2 + count = round( count / 2) + label = ">" * count + label + "<" * count + print(label + "<" * (80 - len(label))) + with open(file, "r") as stream: + template = stream.read() + if "cpuarch" in template: + for cpuarch in ["AMD64", "x86"]: + label = " ( arch: {} ) ".format(label_rev[cpuarch]) + count = 80 - len(label) + count = count - count % 2 + count = round( count / 2) + label = "-" * count + label + "-" * count + print(label + "-" * (80 - len(label))) + caller = salt.client.Caller(".cicd/minion") + caller.cmd("grains.set", "cpuarch", cpuarch) + data = caller.cmd("winrepo.show_sls", file) + process_each(data) + else: caller = salt.client.Caller(".cicd/minion") - caller.cmd("grains.set", "cpuarch", cpuarch) data = caller.cmd("winrepo.show_sls", file) process_each(data) - else: - caller = salt.client.Caller(".cicd/minion") - data = caller.cmd("winrepo.show_sls", file) - process_each(data) -# except Exception: -# exc = sys.exc_info()[0] -# print("[EXCEPTION] " + str(exc)) -# traceback.print_exc() -# count_status["exceptions"] += 1 -# pass + except Exception: + exc = sys.exc_info()[0] + print("[EXCEPTION] " + str(exc)) + traceback.print_exc() + count_status["exceptions"] += 1 + pass + print("-" * 80 + "\n") +if not TEST_STATUS: + print("URLs With Failures:") + print("*" * 80) + print("\n".join(TEST_FAILURES)) + print("*" * 80) + +print("") +print("Content Type:") +print("=============") print(tabulate(count_c_types.most_common(), ["Total", sum(count_c_types.values())]) + "\n") +print("") +print("HTTP Codes:") +print("===========") print(tabulate(count_http_codes.most_common(), ["Total", sum(count_http_codes.values())]) + "\n") +print("") +print("Test Summary:") +print("=============") print(tabulate(count_status.most_common(), ["Total", sum(count_status.values())]) + "\n") if not TEST_STATUS: - print("*" * 80) - print("\n".join(TEST_FAILURES)) print("*" * 80) print("BUILD FAILING. You can grep for 'PROBLEM HERE' to find out how to fix this.") print("*" * 80) exit(1) +print("*" * 80) print("Everything went smoothly. No errors were found. Happy deployment!") +print("*" * 80) diff --git a/7zip.sls b/7zip.sls index 0ec372fb7..c12229154 100644 --- a/7zip.sls +++ b/7zip.sls @@ -24,25 +24,26 @@ reboot: False {% endfor %} {% endfor %} -# -# + + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Below are versions of 7-zip that have had the installer assets removed from the web. -# An uninstall only definition will remain here so the packages will show up -# correctly in `pkg.list_pkgs` and to allow for removal using `pkg.remove` +# Below are versions of 7-zip that have had the installer assets removed from +# the normal website. The binaries are still available on sourceforge. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +{% set source_path = 'https://downloads.sourceforge.net/project/sevenzip/7-Zip/' %} + {% set versions = { '18':['06', '05', '03', '01'], '16':['04', '03', '02', '00']} %} {% for major, subversions in versions.items() %} {% for minor in subversions %} '{{major}}.{{minor}}.00.0': {% if grains['cpuarch'] == 'AMD64' %} full_name: '7-Zip {{major}}.{{minor}} (x64 edition)' - installer: '{{ source_path }}7z{{major}}{{minor}}-x64.msi' + installer: '{{ source_path }}{{ major }}.{{ minor }}/7z{{major}}{{minor}}-x64.msi' uninstaller: '{{ source_path }}7z{{major}}{{minor}}-x64.msi' arch: x64 {% else %} full_name: '7-Zip {{major}}.{{minor}}' - installer: '{{ source_path }}7z{{major}}{{minor}}.msi' + installer: '{{ source_path }}{{ major }}.{{ minor }}/7z{{major}}{{minor}}.msi' uninstaller: '{{ source_path }}7z{{major}}{{minor}}.msi' arch: x86 {% endif %} diff --git a/adobeair.sls b/adobeair.sls index 2ce1111f3..436c88d4d 100644 --- a/adobeair.sls +++ b/adobeair.sls @@ -1,18 +1,9 @@ adobeair: latest: full_name: 'Adobe AIR' - installer: 'http://airdownload.adobe.com/air/win/download/30.0/AdobeAIRInstaller.exe' + installer: https://airsdk.harman.com/assets/downloads/AdobeAIR.exe install_flags: '-silent -eulaAccepted' - uninstaller: 'c:\salt\var\cache\salt\minion\extrn_files\base\airdownload.adobe.com\air\win\download\30.0\AdobeAIRInstaller.exe' - uninstall_flags: '-uninstall' - msiexec: False - locale: en_US - reboot: False - '30.0.0.107': - full_name: 'Adobe AIR' - installer: 'http://airdownload.adobe.com/air/win/download/30.0/AdobeAIRInstaller.exe' - install_flags: '-silent -eulaAccepted' - uninstaller: 'c:\salt\var\cache\salt\minion\extrn_files\base\airdownload.adobe.com\air\win\download\30.0\AdobeAIRInstaller.exe' + uninstaller: 'c:\salt\var\cache\salt\minion\extrn_files\base\airsdk.harmon.com\assets\downloads\AdobeAIR.exe' uninstall_flags: '-uninstall' msiexec: False locale: en_US diff --git a/advancedlogging.sls b/advancedlogging.sls deleted file mode 100644 index 14acf18c8..000000000 --- a/advancedlogging.sls +++ /dev/null @@ -1,15 +0,0 @@ -advancedlogging: - '1.0.0625.10': - full_name: 'IIS Advanced Logging 1.0' - {% if grains['cpuarch'] == 'AMD64' %} - installer: 'https://download.microsoft.com/download/9/6/5/96594C39-9918-466C-AFE0-920737351987/AdvancedLogging64.msi' - uninstaller: 'https://download.microsoft.com/download/9/6/5/96594C39-9918-466C-AFE0-920737351987/AdvancedLogging64.msi' - {% else %} - installer: 'https://download.microsoft.com/download/D/8/B/D8B7664B-3F60-4A26-8307-B35FB926EF49/AdvancedLogging32.msi' - uninstaller: 'https://download.microsoft.com/download/D/8/B/D8B7664B-3F60-4A26-8307-B35FB926EF49/AdvancedLogging32.msi' - {% endif %} - install_flags: '/qn /norestart' - uninstall_flags: '/qn /norestart' - msiexec: True - locale: en_US - reboot: False diff --git a/audacity.sls b/audacity.sls index b78aa395a..974415f00 100644 --- a/audacity.sls +++ b/audacity.sls @@ -1,16 +1,45 @@ -{% set versions = ['3.0.0'] %} +{% set versions = [ + '3.2.1', + '3.2.0', + '3.1.3', + '3.1.2', + '3.1.1', + '3.1.0', + '3.0.5', + '3.0.3', +] %} {% if grains['cpuarch'] == 'AMD64' %} {% set PROGRAM_FILES = "%ProgramFiles(x86)%" %} + {% set ARCH = "64bit" %} {% else %} {% set PROGRAM_FILES = "%ProgramFiles%" %} + {% set ARCH = "32bit" %} {% endif %} +{% set source_path = 'https://github.com/audacity/audacity/releases/download/' %} audacity: {% for version in versions %} '{{ version }}': full_name: 'Audacity {{ version }}' - # official page has counter measures for automaitc downloads - #installer: 'https://www.fosshub.com/Audacity.html?dwl=audacity-win-{{ version }}.exe' - installer: 'https://fossies.org/windows/misc/audacity-win-{{ version }}.exe' + installer: {{ source_path }}Audacity-{{ version }}/audacity-win-{{ version }}-{{ ARCH }}.exe + install_flags: '/SP- /verysilent /norestart' + uninstaller: '%ProgramFiles%\Audacity\unins000.exe' + uninstall_flags: '/SP- /verysilent /norestart' + msiexec: False + locale: en_US + reboot: False + {% endfor %} + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# These have a different filename format +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +{% set versions = [ + '3.0.2', + '3.0.0', +] %} + {% for version in versions %} + '{{ version }}': + full_name: 'Audacity {{ version }}' + installer: {{ source_path }}Audacity-{{ version }}/audacity-win-{{ version }}.exe install_flags: '/SP- /verysilent /norestart' uninstaller: '{{ PROGRAM_FILES }}\Audacity\unins000.exe' uninstall_flags: '/SP- /verysilent /norestart' @@ -18,17 +47,31 @@ audacity: locale: en_US reboot: False {% endfor %} -# -# + + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Below are versions of Audacity that have had the installer assets moved to the legacy page. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - {% for version in ['2.4.2', '2.4.1', '2.3.3', '2.3.2', '2.3.1', '2.3.0', '2.2.2', '2.2.0-rc1', '2.2.1','2.1.3', '2.1.1', '2.1.0', '2.0.6', '2.0'] %} +{% set versions = [ + '2.4.2', + '2.4.1', + '2.3.3', + '2.3.2', + '2.3.1', + '2.3.0', + '2.2.2', + '2.2.0-rc1', + '2.2.1', + '2.1.3', + '2.1.1', + '2.1.0', + '2.0.6', + '2.0', +] %} + {% for version in versions %} '{{ version }}': skip_urltest: True full_name: 'Audacity {{ version }}' - # official page has counter measures for automaitc downloads - no alternative like fossies archive found as yet - #installer: "https://www.fosshub.com/Audacity-old.html?dwl=audacity-win-{{ version }}.exe" uninstaller: '{{ PROGRAM_FILES }}\Audacity\unins000.exe' uninstall_flags: '/SP- /verysilent /norestart' msiexec: False diff --git a/nsis.sls b/nsis.sls index 593d72066..db198bcb7 100644 --- a/nsis.sls +++ b/nsis.sls @@ -1,5 +1,5 @@ # Define versions -{% set versions = {'3': ['03', '02.1', '02', '01', '0'], +{% set versions = {'3': ['08', '07', '06.1', '06', '05', '04', '03', '02.1', '02', '01', '0'], '3%20Pre-release': ['0b2', '0b1'], '2': ['51', '50', '49', '48', '47', '46']} %} @@ -8,7 +8,7 @@ nsis: {% for minor in subversions %} '{{major|first}}.{{minor}}': full_name: 'Nullsoft Install System' - installer: 'https://iweb.dl.sourceforge.net/project/nsis/NSIS%20{{major}}/{{major|first}}.{{minor}}/nsis-{{major|first}}.{{minor}}-setup.exe' + installer: 'https://downloads.sourceforge.net/project/nsis/NSIS%20{{major}}/{{major|first}}.{{minor}}/nsis-{{major|first}}.{{minor}}-setup.exe' install_flags: '/S' {% if grains['cpuarch'] == 'AMD64' %} uninstaller: '%PROGRAMFILES(x86)%\NSIS\uninst-nsis.exe' diff --git a/rubyinstaller_x64.sls b/rubyinstaller_x64.sls index 94febee8e..98244d2df 100644 --- a/rubyinstaller_x64.sls +++ b/rubyinstaller_x64.sls @@ -1,8 +1,14 @@ +{% set base_url = "https://github.com/oneclick/rubyinstaller/releases/download/" %} +{% set versions = ( + ('2.2.3-p173', '2.2.3', '22'), + ('2.1.7-p400', '2.1.7', '21'), + ('2.0.0-p647', '2.0.0-p647', '200'), +) %} rubyinstaller_x64: - {% for version, dl_version, dsk_version in (('2.2.3-p173', '2.2.3', '22'), ('2.1.7-p400', '2.1.7', '21'), ('2.0.0-p647', '2.0.0-p647', '200')) %} +{% for version, dl_version, dsk_version in versions %} '{{ version }}': full_name: 'Ruby {{ version }}-x64' - installer: 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-{{ dl_version }}-x64.exe' + installer: {{ base_url }}ruby-{{ dl_version }}/rubyinstaller-{{ dl_version }}-x64.exe install_flags: '/verysilent' uninstaller: 'C:\Ruby{{ dsk_version }}-x64\unins000.exe' uninstall_flags: '/verysilent' diff --git a/rubyinstaller_x86.sls b/rubyinstaller_x86.sls index 1b9ed5f87..7c040411c 100644 --- a/rubyinstaller_x86.sls +++ b/rubyinstaller_x86.sls @@ -1,12 +1,19 @@ +{% set base_url = "https://github.com/oneclick/rubyinstaller/releases/download/" %} +{% set versions = ( + ('2.2.3-p173', '2.2.3', '22'), + ('2.1.7-p400', '2.1.7', '21'), + ('2.0.0-p647', '2.0.0-p647', '200'), + ('1.9.3-p551', '1.9.3-p551', '193'), +) %} rubyinstaller_x86: - {% for version, dl_version, dsk_version in (('2.2.3-p173', '2.2.3', '22'), ('2.1.7-p400', '2.1.7', '21'), ('2.0.0-p647', '2.0.0-p647', '200'), ('1.9.3-p551', '1.9.3-p551', '193')) %} +{% for version, dl_version, dsk_version in versions %} '{{ version }}': full_name: 'Ruby {{ version }}' - installer: 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-{{ dl_version }}.exe' + installer: '{{ base_url }}ruby-{{ dl_version }}/rubyinstaller-{{ dl_version }}.exe' install_flags: '/verysilent' uninstaller: 'C:\Ruby{{ dsk_version }}\unins000.exe' uninstall_flags: '/verysilent' msiexec: False locale: en_US reboot: False - {% endfor %} +{% endfor %} diff --git a/salt-minion-py2.sls b/salt-minion-py2.sls deleted file mode 100644 index 1074d434c..000000000 --- a/salt-minion-py2.sls +++ /dev/null @@ -1,92 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# This software definition will only work in versions of Salt newer than -# 2015.8.2. In version 2015.8.2 we added the `use_scheduler` option which -# allowed us to launch the installer using the Windows task manager. -# This option is not available in earlier versions of Salt. So, while this -# software definition will allow you to install versions of Salt older than -# 2015.8.2 you will not be able to use pkg.install to upgrade Salt again. You -# will have to upgrade Salt through another means. -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -salt-minion: - {% - for version in [ - '3000.9', - '3000.8', - '3000.7', - ] - %} - '{{ version }}': - full_name: 'Salt Minion {{ version }}' - {% if grains['cpuarch'] == 'AMD64' %} - installer: 'https://repo.saltstack.com/windows/Salt-Minion-{{ version }}-Py2-AMD64-Setup.exe' - {% else %} - installer: 'https://repo.saltstack.com/windows/Salt-Minion-{{ version }}-Py2-x86-Setup.exe' - {% endif %} - {% raw %} - # install_flags: "/S /master={{ salt['pillar.get']('salt:master', 'salt.domain.tld') }} /minion-id={{ salt['pillar.get']('salt:minion:ids:' ~ grains['host'] }}" - {% endraw %} - install_flags: '/S' - uninstaller: 'C:\salt\uninst.exe' - uninstall_flags: '/S' - msiexec: False - use_scheduler: True - reboot: False - {% endfor %} -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Versions of Salt that contain CVE's have been moved to an archive at: -# archive.repo.saltstack.com/windows. The ability to install those versions -# using winrepo has been removed. -# An uninstall only definition will remain here so the packages will show up -# correctly in `pkg.list_pkgs` and to allow for removal using `pkg.remove` -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - {% - for version in [ - '3000.6', - '3000.4', - '3000.3', - '3000.2', - '3000.1', - '3000', - '2019.2.8', - '2019.2.6', - '2019.2.5', - '2019.2.4', - '2019.2.3', - '2019.2.2', - '2019.2.1', - '2019.2.0', - '2018.3.5', - '2018.3.4', - '2018.3.3', - '2018.3.2', - '2018.3.1', - '2018.3.0', - '2017.7.8', - '2017.7.7', - '2017.7.6', - '2017.7.5', - '2017.7.4', - '2017.7.3', - '2017.7.2', - '2017.7.1', - '2017.7.0', - '2016.11.10', - '2016.11.9', - '2016.11.8', - '2016.11.7', - '2016.11.6', - '2016.11.5', - '2016.11.4', - '2016.11.3', - '2016.11.2', - '2016.11.1', - '2016.11.0', - ] - %} - '{{ version }}': - skip_urltest: True - full_name: 'Salt Minion {{ version }}' - uninstaller: 'C:\salt\uninst.exe' - uninstall_flags: '/S' - use_scheduler: True - {% endfor %} diff --git a/salt-minion-py3.sls b/salt-minion.sls similarity index 100% rename from salt-minion-py3.sls rename to salt-minion.sls