From 6a2ca0d4d7840fd197d8c4ef832e8b1fcedfa251 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Mon, 10 Feb 2025 12:16:27 +0000 Subject: [PATCH 1/3] Prevent /msys64/bin from being prepended to PATH (cherry picked from commit 5573cd320cd80f6ed9d44aa6129570380280f0fd) --- src/ci/scripts/install-mingw.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ci/scripts/install-mingw.sh b/src/ci/scripts/install-mingw.sh index 91eab2e7a0816..c8c501e646a9d 100755 --- a/src/ci/scripts/install-mingw.sh +++ b/src/ci/scripts/install-mingw.sh @@ -32,6 +32,12 @@ if isWindows && isKnownToBeMingwBuild; then ;; esac + # Stop /msys64/bin from being prepended to PATH by adding the bin directory manually. + # Note that this intentionally uses a Windows style path instead of the msys2 path to + # avoid being auto-translated into `/usr/bin`, which will not have the desired effect. + msys2Path="c:/msys64" + ciCommandAddPath "${msys2Path}/usr/bin" + mingw_dir="mingw${bits}" curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}" From 2c0e146d6d4fd67c7b27c6eb2e9bacd346751371 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Mon, 10 Feb 2025 15:06:41 +0000 Subject: [PATCH 2/3] Print the environment a second time (cherry picked from commit ec8ec41d9ee8b03bbddf815217452e37656e2d0b) --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c11984742107..59d5f779d68d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,6 +187,11 @@ jobs: Remove-Item -Force -Recurse $kits\$kind\$sdk_version -ErrorAction Continue } + # Show the environment just before we run the build + # This makes it easier to diagnose problems with the above install scripts. + - name: show the current environment + run: src/ci/scripts/dump-environment.sh + - name: run the build # Redirect stderr to stdout to avoid reordering the two streams in the GHA logs. run: src/ci/scripts/run-build-from-ci.sh 2>&1 From 7fc74cdd8bb2737003f18e0a4711703f0d984bbd Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 12 Mar 2025 08:43:21 -0700 Subject: [PATCH 3/3] Install licenses into `share/doc/rust/licenses` This changes the path from "licences" to "licenses" for consistency across the repo, including the usage directly around this line. This is a US/UK spelling difference, but I believe the US spelling is also more common in open source in general. (cherry picked from commit d183da6331addfc69dfb157ef8ffc051ff0508bd) --- src/bootstrap/src/core/build_steps/dist.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index c33f11f684f4d..f9ff133b6517d 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -515,7 +515,7 @@ impl Step for Rustc { // The REUSE-managed license files let license = |path: &Path| { - builder.install(path, &image.join("share/doc/rust/licences"), 0o644); + builder.install(path, &image.join("share/doc/rust/licenses"), 0o644); }; for entry in t!(std::fs::read_dir(builder.src.join("LICENSES"))).flatten() { license(&entry.path());