Skip to content

Commit 193591a

Browse files
authored
WinPB: Revert Cygwin Package Pin & Pin Gawk (adoptium#4348)
1 parent 72a6c52 commit 193591a

1 file changed

Lines changed: 3 additions & 39 deletions

File tree

  • ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/cygwin/tasks

ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/cygwin/tasks/main.yml

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,46 +29,10 @@
2929
register: cygwin_download
3030
tags: cygwin
3131

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
5434
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'
7236
args:
7337
executable: powershell
7438
when: not cygwin_installed.stat.exists

0 commit comments

Comments
 (0)