user/dotnet8-stage0: support sdk as stage1

This commit is contained in:
Antoine Martin 2023-09-08 15:10:56 -04:00
parent 0db9ff5c2b
commit aa71d24702
Signed by: forge
GPG key ID: D62A472A4AA7D541
2 changed files with 38 additions and 11 deletions

View file

@ -2,8 +2,8 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=dotnet8-stage0
pkgver=8.0.100_pre7
pkgrel=1
pkgver=8.0.0_pre7
pkgrel=2
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
@ -34,6 +34,7 @@ _extra_nupkgs="
_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
@ -372,14 +373,14 @@ bootstrap() {
local _iltoolsver=$(grep \<MicrosoftNETCoreILAsmVersion "$builddir"/PackageVersions.props | sed -E 's|</?MicrosoftNETCoreILAsmVersion>||g' | tr -d ' ')
install -dm 755 \
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/docs \
"$subpkgdir"/$_libdir/dotnet/bootstrap/$pkgver/comp \
"$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver
"$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/docs \
"$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/comp \
"$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk
# 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/ \
-C "$subpkgdir"/$_libdir/dotnet/bootstrap/$_pkgver_sdk/ \
--no-same-owner
local _iltoolsArray="
@ -401,18 +402,18 @@ 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/ || true; done
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/
install -Dm644 "$srcdir"/$filename "$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk/
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/$i
local nupath="$subpkgdir"$_libdir/dotnet/artifacts/$_pkgver_sdk/$i
local nupath=$(find $nupath || true)
local nupkg="${nupath##*/}"
local nuname="${nupkg/.nupkg}"
@ -447,13 +448,13 @@ artifacts() {
# directory creation
install -dm 755 \
"$subpkgdir"/$_libdir/dotnet/artifacts/$pkgver \
"$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk \
"$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/ \
-C "$subpkgdir"/$_libdir/dotnet/artifacts/$_pkgver_sdk/ \
--no-same-owner
}

View file

@ -0,0 +1,26 @@
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