From 6afe9cbf9fb4346d4eacbc95c24e4e6f62a9c209 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 19 Mar 2025 10:34:31 -0700 Subject: [PATCH 1/5] Linux-Bionic should build like Android, no rootfs --- eng/pipelines/templates/stages/vmr-verticals.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/eng/pipelines/templates/stages/vmr-verticals.yml b/eng/pipelines/templates/stages/vmr-verticals.yml index c93ee9bf5a08..59cb53867216 100644 --- a/eng/pipelines/templates/stages/vmr-verticals.yml +++ b/eng/pipelines/templates/stages/vmr-verticals.yml @@ -530,7 +530,6 @@ stages: container: name: ${{ variables.linuxBionicCrossContainerName }} image: ${{ variables.linuxBionicCrossContainerImage }} - crossRootFs: '/crossrootfs/x64' targetOS: linux-bionic targetArchitecture: arm64 @@ -544,7 +543,6 @@ stages: container: name: ${{ variables.linuxBionicCrossContainerName }} image: ${{ variables.linuxBionicCrossContainerImage }} - crossRootFs: '/crossrootfs/x64' targetOS: linux-bionic targetArchitecture: arm @@ -558,7 +556,6 @@ stages: container: name: ${{ variables.linuxBionicCrossContainerName }} image: ${{ variables.linuxBionicCrossContainerImage }} - crossRootFs: '/crossrootfs/x64' targetOS: linux-bionic targetArchitecture: x64 From 60d5cce87503db41934538b659e7ee33571bce50 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 19 Mar 2025 11:19:53 -0700 Subject: [PATCH 2/5] Treat TargetOS and TargetRid as local properties in dotnet/runtime's DotNetBuild.props so we can correctly determine when we're building linux-bionic. --- ...-treat-targetos-and-rid-as-local-properties.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch diff --git a/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch b/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch new file mode 100644 index 000000000000..74be8b5524a5 --- /dev/null +++ b/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch @@ -0,0 +1,12 @@ +diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props +index 1631f76ce95..7b88a2177d0 100644 +--- a/eng/DotNetBuild.props ++++ b/eng/DotNetBuild.props +@@ -1,6 +1,6 @@ + + +- ++ + + + runtime From b0c8ae3429326c2b56cccbaf5eae22faa048c4ea Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 21 Mar 2025 09:11:25 -0700 Subject: [PATCH 3/5] Add patch header now that there's a PR --- ...0001-treat-targetos-and-rid-as-local-properties.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch b/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch index 74be8b5524a5..acaf2dc508cc 100644 --- a/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch +++ b/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch @@ -1,3 +1,12 @@ +From 9e230fef55109e2e16716136443d8fd5c83bdfae Mon Sep 17 00:00:00 2001 +From: Jeremy Koritzinsky +Date: Fri, 21 Mar 2025 09:09:52 -0700 +Subject: [PATCH] Allow TargetOS and TargetRid to be overridden in + DotNetBuild.props + +This is needed to fix the linux-bionic builds in the VMR +Backport: https://github.com/dotnet/runtime/pull/113765 +--- diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props index 1631f76ce95..7b88a2177d0 100644 --- a/eng/DotNetBuild.props From e5473608a2cf3d994ca6d5a362d2650841965816 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 21 Mar 2025 16:24:23 -0700 Subject: [PATCH 4/5] Add patch for OS --- ...-treat-targetos-and-rid-as-local-properties.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch b/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch index acaf2dc508cc..fb4f31d2e249 100644 --- a/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch +++ b/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch @@ -19,3 +19,15 @@ index 1631f76ce95..7b88a2177d0 100644 runtime +diff --git a/eng/DotNetBuild.props b/eng/DotNetBuild.props +index 7b88a2177d0deb..5403d38e544465 100644 +--- a/eng/DotNetBuild.props ++++ b/eng/DotNetBuild.props +@@ -16,6 +16,7 @@ + <_targetRidPlatformIndex>$(TargetRid.LastIndexOf('-')) + $(TargetRid.Substring($(_targetRidPlatformIndex)).TrimStart('-')) + $(TargetRid.Substring(0, $(_targetRidPlatformIndex))) ++ windows + + <_hostRidPlatformIndex>$(_hostRid.LastIndexOf('-')) + <_hostArch>$(_hostRid.Substring($(_hostRidPlatformIndex)).TrimStart('-')) \ No newline at end of file From 807a37b25307e3d9cc384d05f6d8d0790566449a Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 24 Mar 2025 10:05:14 -0700 Subject: [PATCH 5/5] Add trailing newline --- .../0001-treat-targetos-and-rid-as-local-properties.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch b/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch index fb4f31d2e249..0371dae42b4a 100644 --- a/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch +++ b/src/SourceBuild/patches/runtime/0001-treat-targetos-and-rid-as-local-properties.patch @@ -30,4 +30,4 @@ index 7b88a2177d0deb..5403d38e544465 100644 + windows <_hostRidPlatformIndex>$(_hostRid.LastIndexOf('-')) - <_hostArch>$(_hostRid.Substring($(_hostRidPlatformIndex)).TrimStart('-')) \ No newline at end of file + <_hostArch>$(_hostRid.Substring($(_hostRidPlatformIndex)).TrimStart('-'))