user/dotnet8-stage0: upgrade to 8.0.100_pre4
This commit is contained in:
parent
24305d9fe8
commit
f2c5a232e7
2 changed files with 22 additions and 199 deletions
|
@ -2,23 +2,20 @@
|
||||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||||
|
|
||||||
pkgname=dotnet8-stage0
|
pkgname=dotnet8-stage0
|
||||||
pkgver=8.0.100_pre3
|
pkgver=8.0.100_pre4
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
|
|
||||||
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
||||||
|
|
||||||
# Tag of tarball generator.
|
# Tag of tarball generator.
|
||||||
_gittag=v8.0.100-preview.3.23178.7
|
_gittag=v8.0.0-preview.4.23259.5
|
||||||
|
|
||||||
# Versions of prebuilt artifacts and bootstrap tar
|
# Versions of prebuilt artifacts and bootstrap tar
|
||||||
_artifactsver=8.0.100-preview.2.centos.8-x64
|
_artifactsver=8.0.100-preview.3.23178.7.centos.8-x64
|
||||||
_prebuiltsver=0.1.0-8.0.100-17.centos.8-x64
|
_prebuiltsver=0.1.0-8.0.100-25.centos.8-x64
|
||||||
_bootstrapver="8.0.100-preview.3.23178.7"
|
_bootstrapver="8.0.100-preview.4.23260.5"
|
||||||
_bootstraprel=0
|
_bootstraprel=0
|
||||||
_installerver=${_gittag/v}
|
_installerver=$_bootstrapver
|
||||||
|
|
||||||
# Version of packages that aren't defined in git-info or badly defined
|
|
||||||
_iltoolsver=8.0.0-preview.2.23128.3
|
|
||||||
|
|
||||||
# Patches to be used. String before '_' refers to repo to patch
|
# 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
|
# Look for patch notes within each patch for what they fix / where they come from
|
||||||
|
@ -29,7 +26,6 @@ _patches="
|
||||||
runtime_79856-save-errno-when-using-posix-semaphores.patch
|
runtime_79856-save-errno-when-using-posix-semaphores.patch
|
||||||
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||||
runtime_83682-specify-notext-on-linux-musl-x86.patch
|
runtime_83682-specify-notext-on-linux-musl-x86.patch
|
||||||
runtime_84413-support-adding-rids-with-dash-in-base-part.patch
|
|
||||||
runtime_more-clang-16-suppression.patch
|
runtime_more-clang-16-suppression.patch
|
||||||
runtime_remove-usage-of-off64-t.patch
|
runtime_remove-usage-of-off64-t.patch
|
||||||
"
|
"
|
||||||
|
@ -37,11 +33,6 @@ _extra_nupkgs="
|
||||||
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-x64.7.0.2.nupkg
|
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-x64.7.0.2.nupkg
|
||||||
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-arm64.7.0.2.nupkg
|
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-arm64.7.0.2.nupkg
|
||||||
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-arm.7.0.2.nupkg
|
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-arm.7.0.2.nupkg
|
||||||
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-x64.5.0.17.nupkg
|
|
||||||
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-arm64.5.0.17.nupkg
|
|
||||||
https://globalcdn.nuget.org/packages/microsoft.netcore.app.host.linux-musl-arm.5.0.17.nupkg
|
|
||||||
microsoft.netcore.app.host.linux-musl-ppc64le.7.0.2.nupkg::https://lab.ilot.io/ayakael/dotnet-stage0/-/package_files/8120/download
|
|
||||||
microsoft.netcore.app.host.linux-musl-s390x.7.0.2.nupkg::https://lab.ilot.io/ayakael/dotnet-stage0/-/package_files/8077/download
|
|
||||||
"
|
"
|
||||||
|
|
||||||
_pkgver_macro=${pkgver%.*}
|
_pkgver_macro=${pkgver%.*}
|
||||||
|
@ -51,8 +42,7 @@ pkgdesc="The .NET Core stage0 bits for dotnet build"
|
||||||
# x86: blocked by https://github.com/dotnet/runtime/issues/83509
|
# x86: blocked by https://github.com/dotnet/runtime/issues/83509
|
||||||
# armhf: blocked by https://github.com/dotnet/runtime/issues/77663
|
# armhf: blocked by https://github.com/dotnet/runtime/issues/77663
|
||||||
# riscv64: port WIP https://github.com/dotnet/runtime/issues/36748
|
# riscv64: port WIP https://github.com/dotnet/runtime/issues/36748
|
||||||
# roslyn fails
|
arch="all !x86 !armhf !riscv64 !armv7"
|
||||||
#arch="all !x86 !armhf !riscv64"
|
|
||||||
_giturl=https://github.com/dotnet/dotnet
|
_giturl=https://github.com/dotnet/dotnet
|
||||||
url=https://dotnet.microsoft.com
|
url=https://dotnet.microsoft.com
|
||||||
license="MIT"
|
license="MIT"
|
||||||
|
@ -62,12 +52,11 @@ subpackages="
|
||||||
dotnet$_pkgver_name-stage0-bootstrap
|
dotnet$_pkgver_name-stage0-bootstrap
|
||||||
"
|
"
|
||||||
source="
|
source="
|
||||||
https://lab.ilot.io/dotnet/dotnet/-/releases/$_gittag/downloads/tarball/dotnet-$_gittag.tar.xz
|
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-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-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-arm.noextract::https://dotnetbuilds.azureedge.net/public/Sdk/$_bootstrapver/dotnet-sdk-$_bootstrapver-linux-musl-arm.tar.gz
|
||||||
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-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
|
|
||||||
Private.SourceBuilt.Artifacts.$_artifactsver.noextract::https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_artifactsver.tar.gz
|
Private.SourceBuilt.Artifacts.$_artifactsver.noextract::https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.$_artifactsver.tar.gz
|
||||||
Private.SourceBuilt.Prebuilts.$_prebuiltsver.noextract::https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Prebuilts.$_prebuiltsver.tar.gz
|
Private.SourceBuilt.Prebuilts.$_prebuiltsver.noextract::https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Prebuilts.$_prebuiltsver.tar.gz
|
||||||
$_extra_nupkgs
|
$_extra_nupkgs
|
||||||
|
@ -135,7 +124,7 @@ case $CTARGET_ARCH in
|
||||||
*) _dotnet_target=$CTARGET_ARCH;;
|
*) _dotnet_target=$CTARGET_ARCH;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
builddir="$srcdir"/dotnet-${_gittag/release\/}
|
builddir="$srcdir"/dotnet-${_gittag/v}
|
||||||
_packagesdir="$srcdir"/local-packages
|
_packagesdir="$srcdir"/local-packages
|
||||||
_libdir="/usr/lib"
|
_libdir="/usr/lib"
|
||||||
_nugetdir="$srcdir"/nuget
|
_nugetdir="$srcdir"/nuget
|
||||||
|
@ -211,6 +200,9 @@ prepare() {
|
||||||
tmp=$(mktemp)
|
tmp=$(mktemp)
|
||||||
jq ".sdk.version = \"$_bootstrapver\"" "$builddir"/src/$i/global.json > $tmp && mv $tmp "$builddir"/src/$i/global.json
|
jq ".sdk.version = \"$_bootstrapver\"" "$builddir"/src/$i/global.json > $tmp && mv $tmp "$builddir"/src/$i/global.json
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# extracting PackageVersions.props as some version information is there
|
||||||
|
tar -xzf "$srcdir"/Private.SourceBuilt.Artifacts.*.noextract PackageVersions.props
|
||||||
}
|
}
|
||||||
|
|
||||||
_runtime() {
|
_runtime() {
|
||||||
|
@ -422,6 +414,8 @@ bootstrap() {
|
||||||
provides="dotnet$_pkgver_name-bootstrap"
|
provides="dotnet$_pkgver_name-bootstrap"
|
||||||
provider_priority=$_pkgver_prior
|
provider_priority=$_pkgver_prior
|
||||||
|
|
||||||
|
local _iltoolsver=$(grep \<MicrosoftNETCoreILAsmVersion "$builddir"/PackageVersions.props | sed -E 's|</?MicrosoftNETCoreILAsmVersion>||g' | tr -d ' ')
|
||||||
|
|
||||||
install -dm 755 \
|
install -dm 755 \
|
||||||
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/docs \
|
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/docs \
|
||||||
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/comp \
|
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/comp \
|
||||||
|
@ -513,28 +507,21 @@ artifacts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
sha512sums="
|
||||||
4bc1cbe52fef05e6e343a0b2cc759e6fdbf4479540694676eb095d02fd3a542fc6807bda8ecdbd11f1b60e65180afa217e25c8f47b2c5e7beb53ee2e90118053 dotnet-v8.0.100-preview.3.23178.7.tar.xz
|
54aa23b5ea2c9ef5565f57bfbc2882ee904c4d4a4af551b63d47b7a5f648325ceaa28f6673f0f9dc4e21508a0ec79446e6edcb7c4768094e11df363df0075ea3 dotnet-tarball-v8.0.0-preview.4.23259.5.tar.gz
|
||||||
c4cbdeff8efb4f2b6f2842067ed92edb2c323d31df8c9ca7c5aeb4eb95320d2628977c20163c9c21bfb97f6a585f81bd5abce9d553d3c64c20389e3ef90ac838 dotnet-sdk-8.0.100-preview.3.23178.7-linux-musl-x64.noextract
|
360978837353828032e562b72f07d3fd4d08a772c9c1a0e20f2a41cd0dfa390a7d3972384bf22fb67e1dfa49fbdb216c2fc09827430cc7c95ad9ddf85eaa9ed0 dotnet-release-v8.0.0-preview.4.23259.5.json
|
||||||
85f9ed71e81f753bd1d96752d568671009641ef75a9f6fb27fe38315cd159da4581739c121a69969361843d9429f04dc67c3a20969ad7e85b2d4a59308972923 dotnet-sdk-8.0.100-preview.3.23178.7-linux-musl-arm64.noextract
|
bac2e657b22a79c0182f9b5b627b1da73495a0f80013d54b5f8fe34882411ecf72a13bda3397a2917d505dd9f1035aa6e441d5a0aa83205e7a47916c37f34fc3 dotnet-sdk-8.0.100-preview.4.23260.5-linux-musl-x64.noextract
|
||||||
74cf6a2c79cb2c0ab5058330d8d07a84fa220d68089d0f2a6165cc2a2250477f092efed54738af3271db06b5a67df07ad39e30cc6e30bd3acb8916575be5a99b dotnet-sdk-8.0.100-preview.3.23178.7-linux-musl-arm.noextract
|
89f83b097fcaaeffb246c71a08252a2e13bfff8a09f336fb8f994a6b7e3dcae3e69b8b516a2bc4b6e8a73a25d0dab4f283c1bab1cfdf070f5adda3186907d407 dotnet-sdk-8.0.100-preview.4.23260.5-linux-musl-arm64.noextract
|
||||||
e6f2b692b0f112770274a500a80204a59e36f0b49b5e6d12aa5e31d15af3fd643b70811d9f9db54004a07ff749541fb527d8f88c765f7dbd2f4680482315b5e3 dotnet-sdk-8.0.100-preview.3.23178.7-r0-linux-musl-ppc64le.noextract
|
78baacf48697910adff90fe1d9227926daaeb71365dbb6170f0a5d716ad474b3cf56bad08d8c78f5ffb8538e54171855eafc0a92cb2c8b9b7d30ee25c012866f dotnet-sdk-8.0.100-preview.4.23260.5-linux-musl-arm.noextract
|
||||||
e044c0f711b1934bc93ef87f489c1e055003be8b33b3fce66de7c6c8b1f7ace7315b1b82d11ca371aab293e0ca68554fc0e18de8b102cc8f5cd953c14c83ce03 dotnet-sdk-8.0.100-preview.3.23178.7-r0-linux-musl-s390x.noextract
|
48ea4da46b6dd1608468f6d29da9ff7ab9ec01e84880ed2c76e323997d2bf24faa1eb0e83aea97a4a2ae447d7910a23192c4a650686fe7aa88c86d6717d227ee Private.SourceBuilt.Artifacts.8.0.100-preview.3.23178.7.centos.8-x64.noextract
|
||||||
f3964c455f5351310c1176fa9fe15b5a2ce7a7ee43fa8da3336fe2a83bd4a3214472e70331a012c64a687329cb5507e0a459260f72397c39bd6605ab9557ee17 Private.SourceBuilt.Artifacts.8.0.100-preview.2.centos.8-x64.noextract
|
2685f18de3b88dbd89059cef8de25c4e00f740ac92ea8a276d2cfda45c1b74e5efd90a5b5a4aad44a78cf6e30f76da01d4205a04da3e6601a6b184861e1bb102 Private.SourceBuilt.Prebuilts.0.1.0-8.0.100-25.centos.8-x64.noextract
|
||||||
c79a7ba0cc85fe23322ce12970d8c87c20fe833618ca84576843f93eb50fd3e67c8616c205bb297e4d32c13ee1ee499f433c7f29c3a97bd0a2097de5dab66b05 Private.SourceBuilt.Prebuilts.0.1.0-8.0.100-17.centos.8-x64.noextract
|
|
||||||
5c1fd9e250e7f08d996b7b335134973624a8d1afc331f7fda3a81eee7d2170e39905be20b8786e99078892b21d1582092aeee45d49c5feae3b2bd5374c306fec microsoft.netcore.app.host.linux-musl-x64.7.0.2.nupkg
|
5c1fd9e250e7f08d996b7b335134973624a8d1afc331f7fda3a81eee7d2170e39905be20b8786e99078892b21d1582092aeee45d49c5feae3b2bd5374c306fec microsoft.netcore.app.host.linux-musl-x64.7.0.2.nupkg
|
||||||
c5bb986179b4789a24cc4552fa33bee2015acba1c9775ff8fe2295797dd7114f244df2c133e8cee8a3de392c5c47530ba9ef87939cc55660f8c937146b98e1fb microsoft.netcore.app.host.linux-musl-arm64.7.0.2.nupkg
|
c5bb986179b4789a24cc4552fa33bee2015acba1c9775ff8fe2295797dd7114f244df2c133e8cee8a3de392c5c47530ba9ef87939cc55660f8c937146b98e1fb microsoft.netcore.app.host.linux-musl-arm64.7.0.2.nupkg
|
||||||
2f35742d74255dd6e7a39e48f29e01cead2b410dabd9e4192d724186a8bd2e04f970b5015229045c732e6c7bcd89a8e9787d19fc50f09fcaab8cd94516f5a0ce microsoft.netcore.app.host.linux-musl-arm.7.0.2.nupkg
|
2f35742d74255dd6e7a39e48f29e01cead2b410dabd9e4192d724186a8bd2e04f970b5015229045c732e6c7bcd89a8e9787d19fc50f09fcaab8cd94516f5a0ce microsoft.netcore.app.host.linux-musl-arm.7.0.2.nupkg
|
||||||
2d8e9eddd9cd7c4924ee6ac33b1c74258eb7b22a08db1b24b2d1f00b53b64ad349e908d5584e62df10cf265eacd4389d0024ef66f9b5e970cfaa747f7084cd2e microsoft.netcore.app.host.linux-musl-x64.5.0.17.nupkg
|
|
||||||
1fd728e989e06278997f3cfc5c447cee6910d37876475791f0d60a3592f58c4567150607bcf459a8dea9121221195c7e4622a12831067473911556435614c56f microsoft.netcore.app.host.linux-musl-arm64.5.0.17.nupkg
|
|
||||||
38cc760ef765a265afb97a24885ae7800acc120cdc7f89d45a49090c681eddfad2c8dd19742623be506594a6726d99497bdf72c90daa077b208355044002ec1e microsoft.netcore.app.host.linux-musl-arm.5.0.17.nupkg
|
|
||||||
f3296b92c91ff76d3238af8414e5e1b4729f641b7c9d25539e5399a472c828b23851fb3241b7c3ba9fc691be0ac2dacd3f7efefc66207920574eda066d76cb9d microsoft.netcore.app.host.linux-musl-ppc64le.7.0.2.nupkg
|
|
||||||
8e8dfc7184516f3e4ef4e43540fb403ec6066237e0596953cff5c49accaa811ad72f0286c52b2f03871adb9b24194cf4922bbcce05c2bb5caa8bcbd790013dde microsoft.netcore.app.host.linux-musl-s390x.7.0.2.nupkg
|
|
||||||
b6a2dfeccac329546f87f1019c1f2cf07e2f294dd33914449ad08d92269c8713b6fa1e330ef257c24e189023fd0b824df97688b0ba6e578a6d0292b07a72b4c1 installer_set-crossgen2rid-using-buildarchitecture.patch
|
b6a2dfeccac329546f87f1019c1f2cf07e2f294dd33914449ad08d92269c8713b6fa1e330ef257c24e189023fd0b824df97688b0ba6e578a6d0292b07a72b4c1 installer_set-crossgen2rid-using-buildarchitecture.patch
|
||||||
ba9c66b5bb8b8d2de87922717b8a7a6f880eed2a38b5208a554ebd64841c6053658692463471a26442c85cb9adb94043a9d91190786d46c0f45ff4e7cc9c707e runtime_76500-properly-set-toolchain-for-alpine.patch
|
ba9c66b5bb8b8d2de87922717b8a7a6f880eed2a38b5208a554ebd64841c6053658692463471a26442c85cb9adb94043a9d91190786d46c0f45ff4e7cc9c707e runtime_76500-properly-set-toolchain-for-alpine.patch
|
||||||
77fa6d9987a7c43725582c9c493e9d4d5965a611a1d795dad4e3d46cd730caced095f994d93f91a131df7fa4b6a7277bcd3d915bae2dcd869559f22076fbc575 runtime_79856-save-errno-when-using-posix-semaphores.patch
|
77fa6d9987a7c43725582c9c493e9d4d5965a611a1d795dad4e3d46cd730caced095f994d93f91a131df7fa4b6a7277bcd3d915bae2dcd869559f22076fbc575 runtime_79856-save-errno-when-using-posix-semaphores.patch
|
||||||
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
d732df247c721c9f677baabdd7f36dbf4b564814ff64164361065bb1c196b767494a1d39f634eadf01a23032c7b3e64102614b7213065c81096bbf3f8022e6a0 runtime_82269-mono-thread-coop-undefine-fortify-source.patch
|
||||||
c983a1ab7f06ac86691e0fa7a61fcad69a074d984ef4a4116bee43f20be918215963c7ec8ddd7edd70432b29b160ff78288183acc89fda15ce4a75bfdbf99ee3 runtime_83682-specify-notext-on-linux-musl-x86.patch
|
c983a1ab7f06ac86691e0fa7a61fcad69a074d984ef4a4116bee43f20be918215963c7ec8ddd7edd70432b29b160ff78288183acc89fda15ce4a75bfdbf99ee3 runtime_83682-specify-notext-on-linux-musl-x86.patch
|
||||||
2ed962096eb9d8ae61831d224ceb05b8f77f5692f38a3457048d1b4abef705e8e4f676b81bb1a833e338e75ac8dc80b0631b1a45ad9a15c5597740b7320bfbb5 runtime_84413-support-adding-rids-with-dash-in-base-part.patch
|
|
||||||
887112eb2b103eadd6887529ebae7f9a75df2c2cb168e84fd40cc09f9bcd20917d428bbba06968b07b0a463890da82b1b2b1d033a3dd016e6494067464ae6f74 runtime_more-clang-16-suppression.patch
|
887112eb2b103eadd6887529ebae7f9a75df2c2cb168e84fd40cc09f9bcd20917d428bbba06968b07b0a463890da82b1b2b1d033a3dd016e6494067464ae6f74 runtime_more-clang-16-suppression.patch
|
||||||
0c25319125ef5b0ad490b37a643c0c5257c796d5ed24f9ac404f698710b07de790bcbb0b6336d4a50025b94c3bff99b214951bd8f0a79a8d6f543ebaa300740f runtime_remove-usage-of-off64-t.patch
|
0c25319125ef5b0ad490b37a643c0c5257c796d5ed24f9ac404f698710b07de790bcbb0b6336d4a50025b94c3bff99b214951bd8f0a79a8d6f543ebaa300740f runtime_remove-usage-of-off64-t.patch
|
||||||
"
|
"
|
||||||
|
|
|
@ -1,164 +0,0 @@
|
||||||
From abc761c2c5694e4029fea1a60dc1934951c66e26 Mon Sep 17 00:00:00 2001
|
|
||||||
Patch-Source: https://github.com/dotnet/runtime/pull/84413
|
|
||||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
|
||||||
Date: Thu, 6 Apr 2023 13:18:11 +0200
|
|
||||||
Subject: [PATCH 1/2] Microsoft.NETCore.Platforms: support adding rids with '-'
|
|
||||||
in the base part.
|
|
||||||
|
|
||||||
Currently when trying to add a rid like 'linux-musl-x64'
|
|
||||||
the rid is not understood to be base = 'linux-musl', arch = 'x64'.
|
|
||||||
|
|
||||||
Instead the parser considers a potential optional qualifier.
|
|
||||||
This causes the rid to be parsed as base = 'linux', arch = 'musl',
|
|
||||||
and qualifier = 'x64'.
|
|
||||||
|
|
||||||
We know the rids being added won't have a qualifier. If we take
|
|
||||||
this into account while parsing, we can parse the rid correctly.
|
|
||||||
---
|
|
||||||
.../Microsoft.NETCore.Platforms/src/RID.cs | 11 +++-
|
|
||||||
.../src/RuntimeGroupCollection.cs | 2 +-
|
|
||||||
.../tests/RidTests.cs | 50 +++++++++++++------
|
|
||||||
3 files changed, 47 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
|
||||||
index 6457fd29cadf0..b464d5f0f54e3 100644
|
|
||||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
|
||||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RID.cs
|
|
||||||
@@ -56,7 +56,7 @@ private enum RIDPart : int
|
|
||||||
Max = Qualifier
|
|
||||||
}
|
|
||||||
|
|
||||||
- public static RID Parse(string runtimeIdentifier)
|
|
||||||
+ public static RID Parse(string runtimeIdentifier, bool noQualifier)
|
|
||||||
{
|
|
||||||
string[] parts = new string[(int)RIDPart.Max + 1];
|
|
||||||
bool omitVersionDelimiter = true;
|
|
||||||
@@ -90,6 +90,15 @@ public static RID Parse(string runtimeIdentifier)
|
|
||||||
// version might be omitted
|
|
||||||
else if (current == ArchitectureDelimiter)
|
|
||||||
{
|
|
||||||
+ // The qualifier delimiter and architecture delimiter are the same.
|
|
||||||
+ // When there is no qualifier, there will be one delimiter past the base part
|
|
||||||
+ // for the architecture.
|
|
||||||
+ // So if we see another delimiter later in the string (for the architecture),
|
|
||||||
+ // extend the base part instead of starting the architecture part.
|
|
||||||
+ if (noQualifier && runtimeIdentifier.IndexOf(ArchitectureDelimiter, i + 1) != -1)
|
|
||||||
+ {
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
// ensure there's no version later in the string
|
|
||||||
if (runtimeIdentifier.IndexOf(VersionDelimiter, i) != -1)
|
|
||||||
{
|
|
||||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
|
||||||
index e069508053105..31009a8d28e5e 100644
|
|
||||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
|
||||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
|
||||||
@@ -34,7 +34,7 @@ public RuntimeGroupCollection(ICollection<RuntimeGroup> runtimeGroups)
|
|
||||||
/// <param name="parent"></param>
|
|
||||||
public void AddRuntimeIdentifier(string runtimeIdentifier, string parent)
|
|
||||||
{
|
|
||||||
- RID rid = RID.Parse(runtimeIdentifier);
|
|
||||||
+ RID rid = RID.Parse(runtimeIdentifier, noQualifier: true);
|
|
||||||
|
|
||||||
AddRuntimeIdentifier(rid, parent);
|
|
||||||
}
|
|
||||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
|
||||||
index 227bcbdd10d4d..8dee0ebeda17a 100644
|
|
||||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
|
||||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/tests/RidTests.cs
|
|
||||||
@@ -10,35 +10,57 @@ public class RidTests
|
|
||||||
{
|
|
||||||
public static IEnumerable<object[]> ValidRIDData()
|
|
||||||
{
|
|
||||||
- yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" } };
|
|
||||||
- yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")} };
|
|
||||||
- yield return new object[] { "linux", new RID() { BaseRID = "linux" } };
|
|
||||||
- yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" } };
|
|
||||||
- yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" } };
|
|
||||||
- yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" } };
|
|
||||||
- yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" } };
|
|
||||||
- yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" } };
|
|
||||||
- yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" } };
|
|
||||||
- yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" } }; // demonstrates ambiguity, avoid using `-` in base
|
|
||||||
- yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" } }; // yes, we already have ambiguous RIDs
|
|
||||||
+ yield return new object[] { "win10-x64", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10"), Architecture = "x64" }, null };
|
|
||||||
+ yield return new object[] { "win10", new RID() { BaseRID = "win", OmitVersionDelimiter = true, Version = new RuntimeVersion("10")}, null };
|
|
||||||
+ yield return new object[] { "linux", new RID() { BaseRID = "linux" }, null };
|
|
||||||
+ yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null };
|
|
||||||
+ yield return new object[] { "linux-x64", new RID() { BaseRID = "linux", Architecture = "x64" }, null };
|
|
||||||
+ yield return new object[] { "debian.10-x64", new RID() { BaseRID = "debian", Version = new RuntimeVersion("10"), Architecture = "x64" }, null };
|
|
||||||
+ yield return new object[] { "linuxmint.19.2-x64", new RID() { BaseRID = "linuxmint", Version = new RuntimeVersion("19.2"), Architecture = "x64" }, null };
|
|
||||||
+ yield return new object[] { "ubuntu.14.04-x64", new RID() { BaseRID = "ubuntu", Version = new RuntimeVersion("14.04"), Architecture = "x64" }, null };
|
|
||||||
+ yield return new object[] { "foo-bar.42-arm", new RID() { BaseRID = "foo-bar", Version = new RuntimeVersion("42"), Architecture = "arm" }, null };
|
|
||||||
+ yield return new object[] { "foo-bar-arm", new RID() { BaseRID = "foo", Architecture = "bar", Qualifier = "arm" }, // demonstrates ambiguity, avoid using `-` in base
|
|
||||||
+ new RID() { BaseRID = "foo-bar", Architecture = "arm" } };
|
|
||||||
+ yield return new object[] { "linux-musl-x64", new RID() { BaseRID = "linux", Architecture = "musl", Qualifier = "x64" }, // yes, we already have ambiguous RIDs
|
|
||||||
+ new RID() { BaseRID = "linux-musl", Architecture = "x64" } };
|
|
||||||
}
|
|
||||||
|
|
||||||
[Theory]
|
|
||||||
[MemberData(nameof(ValidRIDData))]
|
|
||||||
- internal void ParseCorrectly(string input, RID expected)
|
|
||||||
+ internal void ParseCorrectly(string input, RID expected, RID? expectedNoQualifier)
|
|
||||||
{
|
|
||||||
- RID actual = RID.Parse(input);
|
|
||||||
+ _ = expectedNoQualifier; // unused
|
|
||||||
+
|
|
||||||
+ RID actual = RID.Parse(input, noQualifier: false);
|
|
||||||
|
|
||||||
Assert.Equal(expected, actual);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Theory]
|
|
||||||
[MemberData(nameof(ValidRIDData))]
|
|
||||||
- internal void ToStringAsExpected(string expected, RID rid)
|
|
||||||
+ internal void ParseCorrectlyNoQualifier(string input, RID expected, RID? expectedNoQualifier)
|
|
||||||
+ {
|
|
||||||
+ expectedNoQualifier ??= expected;
|
|
||||||
+
|
|
||||||
+ RID actual = RID.Parse(input, noQualifier: true);
|
|
||||||
+
|
|
||||||
+ Assert.Equal(expectedNoQualifier, actual);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ [Theory]
|
|
||||||
+ [MemberData(nameof(ValidRIDData))]
|
|
||||||
+ internal void ToStringAsExpected(string expected, RID rid, RID? expectedNoQualifierRid)
|
|
||||||
{
|
|
||||||
string actual = rid.ToString();
|
|
||||||
|
|
||||||
Assert.Equal(expected, actual);
|
|
||||||
+
|
|
||||||
+ if (expectedNoQualifierRid is not null)
|
|
||||||
+ {
|
|
||||||
+ actual = expectedNoQualifierRid.ToString();
|
|
||||||
+
|
|
||||||
+ Assert.Equal(expected, actual);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
From f70da467ca94291039e0ea5b0723cb9db5e090e7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Deseyn <tom.deseyn@gmail.com>
|
|
||||||
Date: Thu, 6 Apr 2023 18:14:31 +0200
|
|
||||||
Subject: [PATCH 2/2] Update
|
|
||||||
src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
|
||||||
|
|
||||||
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
|
|
||||||
---
|
|
||||||
.../Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
|
||||||
index 31009a8d28e5e..ec4762d71424c 100644
|
|
||||||
--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
|
||||||
+++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/RuntimeGroupCollection.cs
|
|
||||||
@@ -34,6 +34,7 @@ public RuntimeGroupCollection(ICollection<RuntimeGroup> runtimeGroups)
|
|
||||||
/// <param name="parent"></param>
|
|
||||||
public void AddRuntimeIdentifier(string runtimeIdentifier, string parent)
|
|
||||||
{
|
|
||||||
+ // don't parse qualifier since we don't use them and they are ambiguous with `-` in base RID
|
|
||||||
RID rid = RID.Parse(runtimeIdentifier, noQualifier: true);
|
|
||||||
|
|
||||||
AddRuntimeIdentifier(rid, parent);
|
|
Loading…
Reference in a new issue