user/dotnet8-stage0: upgrade to 8.0.100

This commit is contained in:
Antoine Martin 2023-11-27 10:40:09 -05:00
parent 1485bcf6bc
commit 883a51cf92
9 changed files with 142 additions and 315 deletions

View file

@ -2,24 +2,26 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=dotnet8-stage0
pkgver=8.0.0_pre7
pkgrel=2
pkgver=8.0.100
pkgrel=0
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
# Tag of tarball generator.
_gittag=v8.0.0-preview.7.23375.6
_gittag=v8.0.0
# Versions of prebuilt artifacts and bootstrap tar
_artifactsver="8.0.100-preview.7.23376.1.centos.8-x64"
_bootstrapver="8.0.100-preview.7.23376.3"
_bootstraprel=2
_installerver=${_gittag/v}
_artifactsver="8.0.100-rtm.23551.1.centos.8-x64"
_bootstrapver="8.0.100"
_bootstraprel=0
_installerver=8.0.100
# Patches to be used. String before '_' refers to repo to patch
# Look for patch notes within each patch for what they fix / where they come from
# build_* patches applies directly to $builddir
_patches="
build_fix-ga-versions.patch
installer_aspire-manifest-version-fix.patch
installer_set-crossgen2rid-using-buildarchitecture.patch
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
runtime_83682-specify-notext-on-linux-musl-x86.patch
@ -27,24 +29,20 @@ _patches="
runtime_more-clang-16-suppression.patch
runtime_remove-usage-of-off64-t.patch
"
_extra_nupkgs="
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-x64.7.0.2.nupkg
"
_pkgver_macro=${pkgver%.*}
_pkgver_prior=1
_pkgver_name="${_pkgver_macro//[.0]}"
_pkgver_sdk=${pkgver/0./0.10}
pkgdesc="The .NET Core stage0 bits for dotnet build"
# x86: blocked by https://github.com/dotnet/runtime/issues/83509
# armhf: blocked by https://github.com/dotnet/runtime/issues/77663
# riscv64: port WIP https://github.com/dotnet/runtime/issues/36748
# upgrade needed
#arch="all !x86 !armhf"
# riscv64: port WIP https://github.com/dotnet/runtime/issues/84834
# s390x | ppc64le: mono-based runtime still has issues on musl
arch="all !x86 !armhf !riscv64 !s390x !ppc64le"
_giturl=https://github.com/dotnet/dotnet
url=https://dotnet.microsoft.com
license="MIT"
options="!check" # Testsuite in main -build aport
options="!check net" # Testsuite in main -build aport
subpackages="
dotnet$_pkgver_name-stage0-artifacts:artifacts:noarch
dotnet$_pkgver_name-stage0-bootstrap
@ -52,14 +50,12 @@ subpackages="
source="
dotnet-tarball-$_gittag.tar.gz::https://github.com/dotnet/dotnet/archive/refs/tags/$_gittag.tar.gz
dotnet-release-$_gittag.json::https://github.com/dotnet/dotnet/releases/download/$_gittag/release.json
dotnet-sdk-$_bootstrapver-linux-musl-x64.noextract::https://dotnetbuilds.azureedge.net/public/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-x64.tar.gz
dotnet-sdk-$_bootstrapver-linux-musl-arm64.noextract::https://dotnetbuilds.azureedge.net/public/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-arm64.tar.gz
dotnet-sdk-$_bootstrapver-linux-musl-arm.noextract::https://dotnetbuilds.azureedge.net/public/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-arm.tar.gz
dotnet-sdk-$_bootstrapver-linux-musl-x64.noextract::https://dotnetcli.azureedge.net/dotnet/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-x64.tar.gz
dotnet-sdk-$_bootstrapver-linux-musl-arm64.noextract::https://dotnetcli.azureedge.net/dotnet/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-arm64.tar.gz
dotnet-sdk-$_bootstrapver-linux-musl-arm.noextract::https://dotnetcli.azureedge.net/dotnet/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-arm.tar.gz
dotnet-sdk-$_bootstrapver-r$_bootstraprel-linux-musl-s390x.noextract::https://lab.ilot.io/ayakael/dotnet-stage0/-/releases/$_bootstrapver-r$_bootstraprel/downloads/sdk/dotnet-sdk-$_bootstrapver-r$_bootstraprel-linux-musl-s390x.tar.xz
dotnet-sdk-$_bootstrapver-r$_bootstraprel-linux-musl-ppc64le.noextract::https://lab.ilot.io/ayakael/dotnet-stage0/-/releases/$_bootstrapver-r$_bootstraprel/downloads/sdk/dotnet-sdk-$_bootstrapver-r$_bootstraprel-linux-musl-ppc64le.tar.xz
dotnet-sdk-$_bootstrapver-r$_bootstraprel-linux-musl-riscv64.noextract::https://lab.ilot.io/ayakael/dotnet-stage0/-/releases/$_bootstrapver-r$_bootstraprel/downloads/sdk/dotnet-sdk-$_bootstrapver-r$_bootstraprel-linux-musl-riscv64.tar.xz
Private.SourceBuilt.Artifacts.$_artifactsver.noextract::https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_artifactsver.tar.gz
$_extra_nupkgs
$_patches
"
@ -164,12 +160,6 @@ prepare() {
tar -xf "$srcdir"/dotnet-sdk-$_pkgver_macro*$_dotnet_arch.noextract -C "$_cli_root" --no-same-owner
for i in $_extra_nupkgs; do
local filename=${i/::*}
local filename=${filename##*/}
$_nuget push "$srcdir"/$filename --source="$_packagesdir"
done
# adjusts sdk version and packagedir to expected
for i in runtime sdk installer aspnetcore roslyn; do
$_nuget add source $_packagesdir --name local --configfile "$builddir"/src/$i/NuGet.config
@ -374,14 +364,14 @@ bootstrap() {
local _iltoolsver=$(grep \<MicrosoftNETCoreILAsmVersion "$builddir"/PackageVersions.props | sed -E 's|</?MicrosoftNETCoreILAsmVersion>||g' | tr -d ' ')
install -dm 755 \
"$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/docs \
"$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/comp \
"$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/docs \
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/comp \
"$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver
# unpack build artifacts to bootstrap subdir for use by future builds
tar --use-compress-program="pigz" \
-xf "$_downloaddir"/installer/$_installerver/dotnet-sdk-$_pkgver_macro*.tar.gz \
-C "$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/ \
-C "$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/ \
--no-same-owner
local _iltoolsArray="
@ -403,18 +393,13 @@ bootstrap() {
"
# copies artifacts to artifacts dir for use by future dotnet builds
for i in $_nupkgsArray; do install -Dm644 "$_packagesdir"/$i "$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk/ || true; done
for i in $_extra_nupkgs; do
local filename=${i/::*}
local filename=${filename##*/}
install -Dm644 "$srcdir"/$filename "$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk/
done
for i in $_nupkgsArray; do install -Dm644 "$_packagesdir"/$i "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ || true; done
msg "Changing iltools version to $_iltoolsver"
# source-build expects a certain version of ilasm, ildasm and testhost
# following adjusts version
for i in $_iltoolsArray; do
local nupath="$subpkgdir"$_libdir/dotnet/artifacts/$_pkgver_sdk/$i
local nupath="$subpkgdir"$_libdir/dotnet/artifacts/$pkgver/$i
local nupath=$(find $nupath || true)
local nupkg="${nupath##*/}"
local nuname="${nupkg/.nupkg}"
@ -449,31 +434,31 @@ artifacts() {
# directory creation
install -dm 755 \
"$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk \
"$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver \
"$subpkgdir"/usr/share/licenses
# extract artifacts to artifacts dir for use by future dotnet builds
tar --use-compress-program="pigz" \
-xf "$srcdir"/Private.SourceBuilt.Artifacts.*.noextract \
-C "$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk/ \
-C "$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver/ \
--no-same-owner
}
sha512sums="
06cb81a5667153a7d6ae190d169dcafea88954d1d42f9f1ae0fffe7cb4787599d7cad5428f66a6ce10af24898bd4ffbe1b9e95f1d3b698641437298055ebd10f dotnet-tarball-v8.0.0-preview.7.23375.6.tar.gz
5598ae0b9044dd2d2b5eba10ce420cd14266bd25412b37e9766bbaf1b1ce79438a5c7db559431aa59c0b49f14187ca3f78a57065b7802df304910b00b6694bfa dotnet-release-v8.0.0-preview.7.23375.6.json
6b7bf38224573496eae08e3000792296de81e16a1bd5a253236427137de4a6a9d7950c99f08ad764e337aa33140db5160218f9ecea0bfbd60c6e6f301e6dd042 dotnet-sdk-8.0.100-preview.7.23376.3-linux-musl-x64.noextract
8e5bfb89b287f6ab478e6bd9f4ce1ec482ba4d00b2241f6b4d6081c5885ac0399233bfaf983994b485ea6541a4a2ab9b362cbd582012edb09a6785a7cd7fb292 dotnet-sdk-8.0.100-preview.7.23376.3-linux-musl-arm64.noextract
14a3c0aaedc787f9a05258138fb70effedb627cb46206bfdbb912936472b78cc3e24878b10b03e95339d3b7382b46a13a87783cb6a77a49243b75b31ecd94cb7 dotnet-sdk-8.0.100-preview.7.23376.3-linux-musl-arm.noextract
08b520d3e671e4e1d90ddf8e965dd50124f8216d03005bdc08497f0264f7a2767a99c67e6cf45464b8a9f206028cfe513433c5a585d188617523feae5eedf10e dotnet-sdk-8.0.100-preview.7.23376.3-r2-linux-musl-s390x.noextract
ad46d02742c4c605e30bfbee18eba0e491984e6986bd93fb78c9d9c95d2cdf5bfe17584b90582f783b1cb1b6b32bb7ef317ff63396fbcff9399800ecd5d09a94 dotnet-sdk-8.0.100-preview.7.23376.3-r2-linux-musl-ppc64le.noextract
cd2c4e1f3697f3679d37f76f7692389ce29d0fca92e0130a9f1241674150e78542ec1898568cf0b30d8599b954edcf5211823bf05f46b907aa58b79c677a0575 dotnet-sdk-8.0.100-preview.7.23376.3-r2-linux-musl-riscv64.noextract
554d02d10072b8ec9122a0877e86753ebf9875f69508fd18bae43fc9d6eed8655e7923af771d593f3c59ad49c0858cf88816934618d9e0b65bb614ebcdb360a2 Private.SourceBuilt.Artifacts.8.0.100-preview.7.23376.1.centos.8-x64.noextract
5c1fd9e250e7f08d996b7b335134973624a8d1afc331f7fda3a81eee7d2170e39905be20b8786e99078892b21d1582092aeee45d49c5feae3b2bd5374c306fec microsoft.netcore.app.host.linux-musl-x64.7.0.2.nupkg
094265462d66d97b51ebfbe5fb06d4a679b97881f1f5a07a87a282a96eeaabfe97ca42061d59aac71dd8861c07f07dda16a72e29ae03167407e51d3fd2767562 dotnet-tarball-v8.0.0.tar.gz
55f2c56f7fbed4137ebe5e81c7b86d199d7ff91c6e19fbc9a4af8cd5d0f0195273356ead8b80aedfff56a3d704a541a7c2a7395bec3fa5d6585f3afd056b1220 dotnet-release-v8.0.0.json
a904491cf1fe27603cfc21aa234b2f4da7517929fa9dad0eaa2233d010ef1e890339ca4b8e3c4c0d463f3015d7020a0c37ece97319b061cd92a5fc51cd8a7f4c dotnet-sdk-8.0.100-linux-musl-x64.noextract
1d8e54ab8d2b7b83972c1ecd7a23073bf83d39c258e993e54ab91a383ad2aa44276dfc28938f7b162cf79010187005e42a665933dff021ffa5e5d9cfadb5e2b6 dotnet-sdk-8.0.100-linux-musl-arm64.noextract
a8c08c4eaaa1ade3a1521750c62af92ab8fe91bfdd0f4767f8c0469ebfef091f3a68a443d4566bbfe53c49866d72a104c7aea309cabb36148f9aef9cb950ea64 dotnet-sdk-8.0.100-linux-musl-arm.noextract
d0bebb6179e679dea5704ca59acb2260a3dde2d22727b8116b57fbcfc3cba7b31581ed785279eec2836e3916608f39fa45a8e26dfa27063928355ccda83b3d09 dotnet-sdk-8.0.100-r0-linux-musl-s390x.noextract
14fdc6c8225010a6028609ed2b7c942abc770a50167429116ab9d5f0cabfe8038aedb89b7cc984d89c3366351302a86e10c2d5cfccd57399cc42b3c838bc37a0 dotnet-sdk-8.0.100-r0-linux-musl-ppc64le.noextract
a9933d8de614e914d42cf4953ac60a0a6e83e4276328b838fb369fb3036073fd08d2bcbcee07386f65f802f2f2374e45b44b8f8410396a7d93d20e53646d72f0 Private.SourceBuilt.Artifacts.8.0.100-rtm.23551.1.centos.8-x64.noextract
48d155f11c4594eeb72b2d80a6e110ab2b093fd2379e9ddcca755072f4a3e64990ef2620709e0b10ea4b979d8909de56d89f970c349c6fee58621a8f6b415a1c build_fix-ga-versions.patch
6f23b53b1408dc676434d3ee417b735af033f2717057589e93d26021ca2513d13f40ba7ea3312413f2ed79cda2991538f64b4c835e75f40f5a5e5a0e469c4ec0 installer_aspire-manifest-version-fix.patch
b6a2dfeccac329546f87f1019c1f2cf07e2f294dd33914449ad08d92269c8713b6fa1e330ef257c24e189023fd0b824df97688b0ba6e578a6d0292b07a72b4c1 installer_set-crossgen2rid-using-buildarchitecture.patch
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
c983a1ab7f06ac86691e0fa7a61fcad69a074d984ef4a4116bee43f20be918215963c7ec8ddd7edd70432b29b160ff78288183acc89fda15ce4a75bfdbf99ee3 runtime_83682-specify-notext-on-linux-musl-x86.patch
c1e8a51bca47f13e60cb28fa3c58c4bdc0fd8fa19177855b6cc9a767016fc239064aced57530e227c772e302671fc91e86c718a39aecb05eb7f601c8d931de81 runtime_90251-rename-mono-cmake-host-var.patch
3354fa721809f1b94c579408ee78004ff3ca2ba79212c1a0ecc424a9955bb5d5a80c115d4c30dd257526f356ea76f0562db6f83d8dd0b6135f8c689886b3348d runtime_90251-rename-mono-cmake-host-var.patch
887112eb2b103eadd6887529ebae7f9a75df2c2cb168e84fd40cc09f9bcd20917d428bbba06968b07b0a463890da82b1b2b1d033a3dd016e6494067464ae6f74 runtime_more-clang-16-suppression.patch
0c25319125ef5b0ad490b37a643c0c5257c796d5ed24f9ac404f698710b07de790bcbb0b6336d4a50025b94c3bff99b214951bd8f0a79a8d6f543ebaa300740f runtime_remove-usage-of-off64-t.patch
"

View file

@ -26,13 +26,16 @@ In summary, dotnet8 is built using three different aports.
* `community/dotnet8-stage0`
Builds minimum components for full build of dotnet8, and packages these in an initial
`dotnet8-stage0-bootstrap` package that `dotnet8-build` pulls.
* `community/dotnet8-build`
`dotnet8-stage0-bootstrap` package that `dotnet8-runtime` pulls.
* `community/dotnet8-runtime`
Builds full and packages dotnet8 fully using either stage0 or previoulsy built
dotnet8 build.
* `community/dotnet8-runtime`
* `community/dotnet8-sdk`
As abuild does not allow different versions for subpackages, a different aport
is required to package runtime bits from dotnet8-build.
is required to package runtime bits from dotnet8-runtime. dotnet8-runtime only
builds 8.0.1xx feature branch of SDK. Thus, when a new feature branch of sdk is
released, the updated components are to be built on dotnet8-sdk rather than
simply repackaging dotnet8-runtime artifacts.
## Crossbuilding with `stage0`
Crossbuilding `stage0` is a three step process:
@ -69,7 +72,7 @@ follow.
2. Checkout the forked repository.
- `git clone ssh://git@gitlab.alpinelinux.org/$USER/aports`
- `cd community/dotnet8-build`
- `cd community/dotnet8-runtime`
3. Make your changes. Don't forget to add a changelog.
@ -84,7 +87,7 @@ follow.
- `git checkout -b dotnet8/<name>`
- `git add` any new patches
- `git remove` any now-unnecessary patches
- `git commit -m 'community/dotnet8-build: descriptive description'`
- `git commit -m 'community/dotnet8-runtime: descriptive description'`
- `git push`
7. Create a merge request with your changes, tagging @ayakael for review.
@ -99,7 +102,7 @@ follow.
2. Checkout the forked repository.
- `git clone ssh://git@gitlab.alpinelinux.org/$USER/aports`
- `cd community/dotnet8-build`
- `cd community/dotnet8-runtime`
3. Build the new upstream source tarball. Update the versions in the
@ -123,7 +126,7 @@ follow.
- `git checkout -b dotnet8/<name>`
- `git add` any new patches
- `git remove` any now-unnecessary patches
- `git commit -m 'community/dotnet8-build: upgrade to <new-version>`
- `git commit -m 'community/dotnet8-runtime: upgrade to <new-version>`
- `git push`
8. Create a merge request with your changes, tagging @ayakael for review.

View file

@ -1,26 +0,0 @@
From 65613dc9cf76432dcbde3db3db1005c2aa902fee Mon Sep 17 00:00:00 2001
From: Antoine Martin <dev@ayakael.net>
Date: Tue, 21 Feb 2023 15:51:31 -0500
Subject: [PATCH 09/15] aspnetcore_use-linux-musl-crossgen
Line causes build of aspnetcore on arm to look for linux version of
CrossGen2 rather than linux-musl. This removes the line so that
BuildOsName is pulled from TargetOsName as expected
---
.../App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj b/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
index 326968018..fa1f72e62 100644
--- a/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
+++ b/src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.csproj
@@ -103,7 +103,6 @@ This package is an internal implementation of the .NET Core SDK and is not meant
Special case the crossgen2 package reference on Windows to avoid the x86 package when building in Visual Studio.
-->
<BuildOsName>$(TargetOsName)</BuildOsName>
- <BuildOsName Condition="'$(TargetOsName)' == 'linux-musl' and '$(TargetArchitecture)'!='x64'">linux</BuildOsName>
<BuildOsName Condition=" '$(PortableBuild)' == 'false' ">$(TargetRuntimeIdentifier.Substring(0,$(TargetRuntimeIdentifier.IndexOf('-'))))</BuildOsName>
<Crossgen2BuildArchitecture Condition=" '$(BuildOsName)' == 'win' ">x64</Crossgen2BuildArchitecture>
<Crossgen2BuildArchitecture Condition=" '$(Crossgen2BuildArchitecture)' == '' ">$(BuildArchitecture)</Crossgen2BuildArchitecture>
--
2.38.2

View file

@ -0,0 +1,32 @@
diff --git a/prereqs/git-info/runtime.props.orig b/prereqs/git-info/runtime.props
index f9dc4d6..093bd00 100644
--- a/prereqs/git-info/runtime.props.orig
+++ b/prereqs/git-info/runtime.props
@@ -3,8 +3,8 @@
<PropertyGroup>
<GitCommitHash>5535e31a712343a63f5d7d796cd874e563e5ac14</GitCommitHash>
<OfficialBuildId>20231031.3</OfficialBuildId>
- <OutputPackageVersion>8.0.0-rtm.23531.3</OutputPackageVersion>
+ <OutputPackageVersion>8.0.0</OutputPackageVersion>
<PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
<IsStable>false</IsStable>
</PropertyGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/prereqs/git-info/aspnetcore.props.orig b/prereqs/git-info/aspnetcore.props
index d1494e8..b83649d 100644
--- a/prereqs/git-info/aspnetcore.props.orig
+++ b/prereqs/git-info/aspnetcore.props
@@ -3,8 +3,8 @@
<PropertyGroup>
<GitCommitHash>3f1acb59718cadf111a0a796681e3d3509bb3381</GitCommitHash>
<OfficialBuildId>20231031.12</OfficialBuildId>
- <OutputPackageVersion>8.0.0-rtm.23531.12</OutputPackageVersion>
+ <OutputPackageVersion>8.0.0</OutputPackageVersion>
<PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
<IsStable>false</IsStable>
</PropertyGroup>
-</Project>
\ No newline at end of file
+</Project>

View file

@ -0,0 +1,26 @@
diff --git a/./src/installer/eng/Version.Details.xml.orig b/./src/installer/eng/Version.Details.xml
index a1cebfe..3f47a7f 100644
--- a/./src/installer/eng/Version.Details.xml.orig
+++ b/./src/installer/eng/Version.Details.xml
@@ -172,7 +172,7 @@
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>2406616d0e3a31d80b326e27c156955bfa41c791</Sha>
</Dependency>
- <Dependency Name="Microsoft.NET.Sdk.Aspire.Manifest-8.0.100" Version="8.0.0-preview.1.23551.7">
+ <Dependency Name="Microsoft.NET.Sdk.Aspire.Manifest-8.0.100" Version="8.0.0-preview.1.23557.2">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-aspire</Uri>
<Sha>4b00c57d7ccf9a4c7e2aef211ab6bd8af3ee2324</Sha>
<SourceBuild RepoName="aspire" ManagedOnly="true" />
diff --git a/./src/installer/eng/Versions.props.orig b/./src/installer/eng/Versions.props
index 329ab4e..897263d 100644
--- a/./src/installer/eng/Versions.props.orig
+++ b/./src/installer/eng/Versions.props
@@ -238,7 +238,7 @@
<!-- Workload manifest package versions -->
<PropertyGroup>
<AspireFeatureBand>8.0.100</AspireFeatureBand>
- <AspireWorkloadManifestVersion>8.0.0-preview.1.23551.7</AspireWorkloadManifestVersion>
+ <AspireWorkloadManifestVersion>8.0.0-preview.1.23557.2</AspireWorkloadManifestVersion>
<MauiFeatureBand>8.0.100-rc.2</MauiFeatureBand>
<MauiWorkloadManifestVersion>8.0.0-rc.2.9373</MauiWorkloadManifestVersion>
<XamarinAndroidWorkloadManifestVersion>34.0.0-rc.2.468</XamarinAndroidWorkloadManifestVersion>

View file

@ -1,174 +0,0 @@
From 50de22c7fa57c687a996bfdf6702871216881c0f Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/pull/79856
From: Antoine Martin <dev@ayakael.net>
Date: Sat, 25 Feb 2023 15:19:00 -0500
Subject: [PATCH 1/1] [threads] Save errno when using posix semaphores for
thread transitions
We already save/restore GetLastError on win32. Do it on posix
platforms, too.
If one thread is in a pinvoke wrapper, while another thread triggers a
STW, the pinvoke wrapper will self-suspend the thread and wait for a
notification to resume. Depending on the platform we can use win32
primitives, Mach semaphores or POSIX semaphores. win32 and posix can
both change the value of last error (errno, respectively) while the
thread is suspended.
That means that code like this (generated by the
LibraryImportAttribute source generator) cannot reliably retrieve the
error from the last pinvoke:
```csharp
__retVal = __PInvoke(__path_native, mode); // there is a pinvoke wrapper here, that transitions from GC Safe to GC Unsafe mode
__lastError = System.Runtime.InteropServices.Marshal.GetLastSystemError();
```
The solution is to explicitly preserve the value of GetLastError/errno
when exiting from GC Safe.
Fixes https://github.com/dotnet/runtime/issues/77364
---
.../src/mono/mono/utils/mono-threads-coop.c | 12 +++---
.../src/mono/mono/utils/mono-threads.c | 4 +-
.../src/mono/mono/utils/mono-threads.h | 43 ++++++++++++++++---
3 files changed, 45 insertions(+), 14 deletions(-)
diff --git a/src/runtime/src/mono/mono/utils/mono-threads-coop.c b/src/runtime/src/mono/mono/utils/mono-threads-coop.c
index 4ed659d66..c562ada67 100644
--- a/src/runtime/src/mono/mono/utils/mono-threads-coop.c
+++ b/src/runtime/src/mono/mono/utils/mono-threads-coop.c
@@ -337,10 +337,10 @@ mono_threads_exit_gc_safe_region_internal (gpointer cookie, MonoStackData *stack
return;
#ifdef ENABLE_CHECKED_BUILD_GC
- W32_DEFINE_LAST_ERROR_RESTORE_POINT;
+ MONO_DEFINE_LAST_ERROR_RESTORE_POINT;
if (mono_check_mode_enabled (MONO_CHECK_MODE_GC))
coop_tls_pop (cookie);
- W32_RESTORE_LAST_ERROR_FROM_RESTORE_POINT;
+ MONO_RESTORE_LAST_ERROR_FROM_RESTORE_POINT;
#endif
mono_threads_exit_gc_safe_region_unbalanced_internal (cookie, stackdata);
@@ -365,7 +365,7 @@ mono_threads_exit_gc_safe_region_unbalanced_internal (gpointer cookie, MonoStack
/* Common to use enter/exit gc safe around OS API's affecting last error. */
/* This method can call OS API's that will reset last error on some platforms. */
/* To reduce errors, we need to restore last error before exit gc safe. */
- W32_DEFINE_LAST_ERROR_RESTORE_POINT;
+ MONO_DEFINE_LAST_ERROR_RESTORE_POINT;
info = (MonoThreadInfo *)cookie;
@@ -398,7 +398,7 @@ mono_threads_exit_gc_safe_region_unbalanced_internal (gpointer cookie, MonoStack
info->user_data = NULL;
}
- W32_RESTORE_LAST_ERROR_FROM_RESTORE_POINT;
+ MONO_RESTORE_LAST_ERROR_FROM_RESTORE_POINT;
}
void
@@ -652,14 +652,14 @@ mono_threads_suspend_policy_init (void)
// otherwise if one of the old environment variables is set, use that.
// otherwise use full preemptive suspend.
- W32_DEFINE_LAST_ERROR_RESTORE_POINT;
+ MONO_DEFINE_LAST_ERROR_RESTORE_POINT;
(policy = threads_suspend_policy_getenv ())
|| (policy = threads_suspend_policy_default ())
|| (policy = threads_suspend_policy_getenv_compat ())
|| (policy = MONO_THREADS_SUSPEND_FULL_PREEMPTIVE);
- W32_RESTORE_LAST_ERROR_FROM_RESTORE_POINT;
+ MONO_RESTORE_LAST_ERROR_FROM_RESTORE_POINT;
g_assert (policy);
mono_threads_suspend_policy_hidden_dont_modify = (char)policy;
diff --git a/src/runtime/src/mono/mono/utils/mono-threads.c b/src/runtime/src/mono/mono/utils/mono-threads.c
index 2ef2fe45b..41dbf3032 100644
--- a/src/runtime/src/mono/mono/utils/mono-threads.c
+++ b/src/runtime/src/mono/mono/utils/mono-threads.c
@@ -1894,7 +1894,7 @@ mono_thread_info_uninstall_interrupt (gboolean *interrupted)
/* Common to uninstall interrupt handler around OS API's affecting last error. */
/* This method could call OS API's on some platforms that will reset last error so make sure to restore */
/* last error before exit. */
- W32_DEFINE_LAST_ERROR_RESTORE_POINT;
+ MONO_DEFINE_LAST_ERROR_RESTORE_POINT;
g_assert (interrupted);
*interrupted = FALSE;
@@ -1917,7 +1917,7 @@ mono_thread_info_uninstall_interrupt (gboolean *interrupted)
THREADS_INTERRUPT_DEBUG ("interrupt uninstall tid %p previous_token %p interrupted %s\n",
mono_thread_info_get_tid (info), previous_token, *interrupted ? "TRUE" : "FALSE");
- W32_RESTORE_LAST_ERROR_FROM_RESTORE_POINT;
+ MONO_RESTORE_LAST_ERROR_FROM_RESTORE_POINT;
}
static MonoThreadInfoInterruptToken*
diff --git a/src/runtime/src/mono/mono/utils/mono-threads.h b/src/runtime/src/mono/mono/utils/mono-threads.h
index 6a548b183..45353db4e 100644
--- a/src/runtime/src/mono/mono/utils/mono-threads.h
+++ b/src/runtime/src/mono/mono/utils/mono-threads.h
@@ -866,19 +866,50 @@ mono_win32_interrupt_wait (PVOID thread_info, HANDLE native_thread_handle, DWORD
void
mono_win32_abort_blocking_io_call (THREAD_INFO_TYPE *info);
-#define W32_DEFINE_LAST_ERROR_RESTORE_POINT \
+#else
+
+
+#endif
+
+#ifdef USE_WINDOWS_BACKEND
+
+/* APC calls can change GetLastError while a thread is suspended. Save/restore it when doing thread
+ state transitions (for example in m2n wrappers) in order to protect the result of the last
+ pinvoke */
+
+#define MONO_DEFINE_LAST_ERROR_RESTORE_POINT \
const DWORD _last_error_restore_point = GetLastError ();
-#define W32_RESTORE_LAST_ERROR_FROM_RESTORE_POINT \
+#define MONO_RESTORE_LAST_ERROR_FROM_RESTORE_POINT \
/* Only restore if changed to prevent unnecessary writes. */ \
if (GetLastError () != _last_error_restore_point) \
mono_SetLastError (_last_error_restore_point);
+#elif defined(USE_WASM_BACKEND) || defined (USE_POSIX_BACKEND)
+
+#define MONO_DEFINE_LAST_ERROR_RESTORE_POINT \
+ int _last_errno_restore_point = errno;
+
+#define MONO_RESTORE_LAST_ERROR_FROM_RESTORE_POINT \
+ if (errno != _last_errno_restore_point) \
+ errno = _last_errno_restore_point;
+
+/* Posix semaphores set errno on failure and sporadic wakeup. GC state transitions are done in n2m
+ * and m2n wrappers and may change the value of errno from the last pinvoke. Use these macros to
+ * save/restore errno when doing thread state transitions. */
+
+#elif defined(USE_MACH_BACKEND)
+
+/* Mach semaphores don't set errno on failure. Change this to be the same as POSIX if some other primitives used
+ in thread state transitions pollute errno. */
+
+#define MONO_DEFINE_LAST_ERROR_RESTORE_POINT /* nothing */
+#define MONO_RESTORE_LAST_ERROR_FROM_RESTORE_POINT /* nothing */
+
#else
-
-#define W32_DEFINE_LAST_ERROR_RESTORE_POINT /* nothing */
-#define W32_RESTORE_LAST_ERROR_FROM_RESTORE_POINT /* nothing */
-
+#error "unknown threads backend, not sure how to save/restore last error"
#endif
+
+
#endif /* __MONO_THREADS_H__ */
--
2.38.4

View file

@ -48,25 +48,23 @@ index e04d9e9d364..00e54a25d69 100644
# larger than the initial committed stack size.
add_definitions(-DENSURE_PRIMARY_STACK_SIZE)
endif()
diff --git a/src/runtime/src/mono/mono/mini/CMakeLists.txt b/src/runtime/src/mono/mono/mini/CMakeLists.txt
index d23b7985802..b5f63fc638c 100644
--- a/src/runtime/src/mono/mono/mini/CMakeLists.txt
diff --git a/src/runtime/src/mono/mono/mini/CMakeLists.txt.orig b/src/runtime/src/mono/mono/mini/CMakeLists.txt
index 5d6ef3d..c3e5414 100644
--- a/src/runtime/src/mono/mono/mini/CMakeLists.txt.orig
+++ b/src/runtime/src/mono/mono/mini/CMakeLists.txt
@@ -378,10 +378,10 @@ if(NOT DISABLE_SHARED_LIBS)
add_library(monosgen-shared SHARED $<TARGET_OBJECTS:monosgen-objects>)
target_compile_definitions(monosgen-objects PRIVATE -DMONO_DLL_EXPORT)
@@ -400,9 +400,9 @@ if(NOT DISABLE_SHARED_LIBS)
endif()
- # Alpine Linux implements ucontext in a different library
target_compile_definitions(monosgen-shared PRIVATE -DMONO_DLL_EXPORT)
# Alpine Linux implements ucontext in a different library
- if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
+ # musl-libc implements ucontext in a different library
+ if(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
target_link_libraries(monosgen-shared PRIVATE ucontext)
- endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
+ endif(CLR_CMAKE_TARGET_LINUX_MUSL TARGET_S390X)
+ endif(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
set_target_properties(monosgen-shared PROPERTIES OUTPUT_NAME ${MONO_SHARED_LIB_NAME})
if(MONO_SET_RPATH_ORIGIN)
set_target_properties(monosgen-shared PROPERTIES INSTALL_RPATH "$ORIGIN")
@@ -560,10 +560,10 @@ if(NOT DISABLE_EXECUTABLES)
@@ -601,10 +601,10 @@ if(NOT DISABLE_EXECUTABLES)
target_link_libraries(mono-sgen PRIVATE icu_shim_objects)
endif()
target_link_libraries(mono-sgen PRIVATE ${OS_LIBS} ${LLVM_LIBS} ${ICU_LIBS} ${Z_LIBS})
@ -80,8 +78,3 @@ index d23b7985802..b5f63fc638c 100644
if(NOT DISABLE_COMPONENTS AND STATIC_COMPONENTS AND NOT DISABLE_LINK_STATIC_COMPONENTS)
# if components are built statically, link them into runtime.
target_sources(mono-sgen PRIVATE "${mono-components-objects}")
diff --git a/src/runtime/src/coreclr/pgosupport.cmake.orig b/src/runtime/src/coreclr/pgosupport.cmake
index 719ac14..34a4278 100644
--- a/src/runtime/src/coreclr/pgosupport.cmake.orig
+++ b/src/runtime/src/coreclr/pgosupport.cmake

View file

@ -0,0 +1,30 @@
From a73b8bacfcc5819926bc05173ab2f7850eb00da3 Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/pull/91008
From: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date: Wed, 23 Aug 2023 21:11:37 +0200
Subject: [PATCH] [mono] Handle enum return type when inlining CreateInstance
Use underlying base type when deciding how to inline a
CreateInstance invocation in mini_emit_inst_for_method.
Fixes https://github.com/dotnet/runtime/issues/90292
(Mono abort causing .NET 8 msbuild regression).
---
src/mono/mono/mini/intrinsics.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/runtime/src/mono/mono/mini/intrinsics.c b/src/runtime/src/mono/mono/mini/intrinsics.c
index b1e5e76723147..ef77b7dc89f2e 100644
--- a/src/runtime/src/mono/mono/mini/intrinsics.c
+++ b/src/runtime/src/mono/mono/mini/intrinsics.c
@@ -2079,7 +2079,9 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
MonoType *t = method_context->method_inst->type_argv [0];
MonoClass *arg0 = mono_class_from_mono_type_internal (t);
if (m_class_is_valuetype (arg0) && !mono_class_has_default_constructor (arg0, FALSE)) {
- if (m_class_is_primitive (arg0)) {
+ if (m_class_is_primitive (arg0) || m_class_is_enumtype (arg0)) {
+ if (m_class_is_enumtype (arg0))
+ t = mono_class_enum_basetype_internal (arg0);
int dreg = alloc_dreg (cfg, mini_type_to_stack_type (cfg, t));
mini_emit_init_rvar (cfg, dreg, t);
ins = cfg->cbb->last_ins;

View file

@ -1,42 +0,0 @@
diff --git a/src/runtime/src/mono/CMakeLists.txt b/src/runtime/src/mono/CMakeLists.txt
index fad619577bf..91a4a545c42 100644
--- a/src/runtime/src/mono/CMakeLists.txt
+++ b/src/runtime/src/mono/CMakeLists.txt
@@ -943,7 +943,7 @@ else()
set(DISABLE_DLLMAP 1)
endif()
-if(CLR_CMAKE_HOST_ALPINE_LINUX)
+if(CLR_CMAKE_TARGET_LINUX_MUSL)
# Setting RLIMIT_NOFILE breaks debugging of coreclr on Alpine Linux for some reason
add_definitions(-DDONT_SET_RLIMIT_NOFILE)
# On Alpine Linux, we need to ensure that the reported stack range for the primary thread is
diff --git a/src/runtime/src/mono/mono/mini/CMakeLists.txt b/src/runtime/src/mono/mono/mini/CMakeLists.txt
index d23b7985802..da7563ac4d3 100644
--- a/src/runtime/src/mono/mono/mini/CMakeLists.txt
+++ b/src/runtime/src/mono/mono/mini/CMakeLists.txt
@@ -379,9 +379,9 @@ if(NOT DISABLE_SHARED_LIBS)
target_compile_definitions(monosgen-objects PRIVATE -DMONO_DLL_EXPORT)
endif()
# Alpine Linux implements ucontext in a different library
- if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
+ if(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
target_link_libraries(monosgen-shared PRIVATE ucontext)
- endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
+ endif(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
set_target_properties(monosgen-shared PROPERTIES OUTPUT_NAME ${MONO_SHARED_LIB_NAME})
if(MONO_SET_RPATH_ORIGIN)
set_target_properties(monosgen-shared PROPERTIES INSTALL_RPATH "$ORIGIN")
@@ -561,9 +561,9 @@ if(NOT DISABLE_EXECUTABLES)
endif()
target_link_libraries(mono-sgen PRIVATE ${OS_LIBS} ${LLVM_LIBS} ${ICU_LIBS} ${Z_LIBS})
# Alpine Linux implements ucontext in a different library
- if(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
+ if(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
target_link_libraries(mono-sgen PRIVATE ucontext)
- endif(CLR_CMAKE_HOST_ALPINE_LINUX AND TARGET_S390X)
+ endif(CLR_CMAKE_TARGET_LINUX_MUSL AND TARGET_S390X)
if(NOT DISABLE_COMPONENTS AND STATIC_COMPONENTS AND NOT DISABLE_LINK_STATIC_COMPONENTS)
# if components are built statically, link them into runtime.
target_sources(mono-sgen PRIVATE "${mono-components-objects}")