|
29 | 29 | register: cygwin_download |
30 | 30 | tags: cygwin |
31 | 31 |
|
32 | | -- name: Retrieve Cygwin Package Cache |
33 | | - win_get_url: |
34 | | - url: "https://ci.adoptium.net/userContent/cygwin/cygwin_cache_20240825.zip" |
35 | | - dest: "C:\\temp\\cygwin_cache.zip" |
36 | | - force: no |
37 | | - checksum: "a2ec4dfbc67272312817228afb2bbff6f4ffc44df6088169ac11f191af00ec21" |
38 | | - checksum_algorithm: sha256 |
39 | | - when: not cygwin_installed.stat.exists |
40 | | - register: cygwin_cache_download |
41 | | - tags: cygwin |
42 | | - |
43 | | -# Unzip Cygwin Cache |
44 | | -- name: Unzip Cygwin Cache |
45 | | - win_unzip: |
46 | | - src: C:\TEMP\cygwin_cache.zip |
47 | | - dest: "{{ Cygwin_CACHE_DIR }}" |
48 | | - when: not cygwin_installed.stat.exists |
49 | | - tags: cygwin |
50 | | - |
51 | | -# Install strictly from the local cache (NO internet) |
52 | | -# Change How The Args Are Parsed To Improve PS Interpretation |
53 | | -- name: Install Cygwin From The Package Cache |
| 32 | +# Note: Gawk is pinned due to this upstream bug : https://bugs.openjdk.org/browse/JDK-8314555 GAWK for cygwin must be <= 5.3.2-1 |
| 33 | +- name: Install Cygwin |
54 | 34 | win_shell: | |
55 | | - $setup = 'C:\temp\cygwin.exe' |
56 | | - $list = @( |
57 | | - '--quiet-mode', |
58 | | - '--local-install', |
59 | | - '--delete-orphans', |
60 | | - '--only-site', |
61 | | - '--no-verify', |
62 | | - '--no-version-check', |
63 | | - '--root', '{{ Cygwin_INST_DIR }}', |
64 | | - '--local-package-dir', '{{ Cygwin_CACHE_DIR }}', |
65 | | - '--site', 'file:///{{ Cygwin_CACHE_DIR_POSIX }}', |
66 | | - '--packages', 'autoconf,automake,bsdtar,cmake,cpio,curl,gcc-core,git,gnupg,gnupg2,grep,jq,libtool,make,mingw64-x86_64-gcc-core,perl,rsync,unzip,wget,zip' |
67 | | - ) | ForEach-Object { if ($_ -match '\s') { '"{0}"' -f $_ } else { $_ } } |
68 | | -
|
69 | | - $argString = $list -join ' ' |
70 | | - $p = Start-Process -FilePath $setup -ArgumentList $argString -NoNewWindow -Wait -PassThru |
71 | | - if ($p.ExitCode -ne 0) { throw "Cygwin install from cache failed (exit $($p.ExitCode))" } |
| 35 | + Start-Process -Wait -FilePath 'C:\temp\cygwin.exe' -ArgumentList '--packages autoconf,automake,bsdtar,cmake,cpio,curl,gawk=5.3.2-1,gcc-core,git,gnupg,gnupg2,grep,jq,libtool,make,mingw64-x86_64-gcc-core,perl,rsync,unzip,wget,zip --quiet-mode --download --local-install --delete-orphans --site https://mirrors.kernel.org/sourceware/cygwin/ --local-package-dir C:\cygwin_packages --root C:\cygwin64' |
72 | 36 | args: |
73 | 37 | executable: powershell |
74 | 38 | when: not cygwin_installed.stat.exists |
|
0 commit comments