Switch to opam's --cygwin-internal-install to avoid cygwin.com 403 errors#1067
Merged
Switch to opam's --cygwin-internal-install to avoid cygwin.com 403 errors#1067
Conversation
…rors opam 2.4.0+ embeds setup-x86_64.exe and can manage Cygwin internally, eliminating the need to scrape cygwin.com for version information and download the installer separately. This resolves frequent 403 errors from Cygwin's DDoS protection blocking GitHub Actions cloud IPs (#1038). Key changes: - Replace --cygwin-local-install/--cygwin-location with --cygwin-internal-install and --cygwin-extra-packages in opam init - Derive CYGWIN_ROOT from OPAM_ROOT (.opam/.cygwin/root) so the Cygwin installation is automatically included in the opam cache - Remove separate Cygwin cache layer (composeCygwinCacheKeys, composeCygwinCachePaths, restoreCygwinCache, saveCygwinCache) - Remove setupCygwin(), getCygwinVersion(), and their dependencies (cheerio, @actions/http-client, @actions/io) - Move BASH_ENV/fixFstab/PATH configuration after setupOpam() since opam now installs Cygwin internally - Add regex no-match detection in fixFstab() to warn when the fstab format differs from expectations - Bump cache-prefix default from v1 to v3 to invalidate incompatible old caches
opam's --cygwin-internal-install generates fstab with noacl,binary,posix=0 by default, making the fixFstab() patch unnecessary. This also removes windows.ts entirely as it no longer contains any functions.
Merged
tahina-pro
added a commit
to tahina-pro/quackyducky
that referenced
this pull request
Mar 24, 2026
ocaml/setup-ocaml#1067 switched to opam's --cygwin-internal-install, moving Cygwin from C:\cygwin to C:\.opam\.cygwin\root. Update all Windows workflow shell references accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tahina-pro
added a commit
to project-everest/everparse
that referenced
this pull request
Mar 24, 2026
Windows CI: fix path to Cygwin wrt. ocaml/setup-ocaml#1067
a2line
added a commit
to a2line/geneweb
that referenced
this pull request
Mar 30, 2026
conf-perl-ipc-system-simple.4 and conf-perl-string-shellquote.4 (ocaml/opam-repository#29613) add native Cygwin/MSYS2 support, installing Perl modules via cpan automatically during opam dependency resolution — no manual step needed anymore. This removes the curl+cpanm and opam pin workaround introduced after setup-ocaml v3.5.0 broke conf-perl resolution on Windows by switching to --cygwin-internal-install (ocaml/setup-ocaml#1067).
a2line
added a commit
to a2line/geneweb
that referenced
this pull request
Mar 30, 2026
conf-perl-ipc-system-simple.4 and conf-perl-string-shellquote.4 (ocaml/opam-repository#29613) add native Cygwin/MSYS2 support, installing Perl modules via cpan automatically during opam dependency resolution — no manual step needed anymore. This removes the curl+cpanm and opam pin workaround introduced after setup-ocaml v3.5.0 broke conf-perl resolution on Windows by switching to --cygwin-internal-install (ocaml/setup-ocaml#1067).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--cygwin-internal-installflag, which embeds the Cygwin installer in the opam binaryOPAM_ROOT/.cygwin/rootand is automatically included in the opam cachecheerio,@actions/http-client, and@actions/iodependencies (only used for Cygwin setup)fixFstab()to warn when the fstab format differs from expectationscache-prefixdefault fromv1tov3to invalidate incompatible old cachesCloses #1038
Test plan
windows-latest(covered by.github/workflows/workflow.yml)opam init --cygwin-internal-installcompletes successfullymake,gcc, etc.) are available on PATH after setup