Updated dotnet-5.0 to 5.0.12

This commit is contained in:
build@apk-groulx 2021-12-04 22:24:49 +00:00
parent aa5f6499e0
commit 0ae9f921c9
8 changed files with 97 additions and 166 deletions

View file

@ -6,12 +6,17 @@
# Max Liebkies <mail@maxliebkies.de>
# Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
#
# Build vars
#
# Sets whether we use pre-built bootstraps from microsoft or repo-provided bootstraps for building
_bootstrap=false
_bootstrap_sdk=5.0.8-r1
_bootstrap_runtime=3.1.17-r2
_targetrid=alpine.3.15-x64
# LLVM version
_llvmver=12
# One packaging step that needs this set. Needs some work, but I'm sure there's a way to remove this.
_targetrid=alpine.3.15-x64
pkgname=dotnet-5.0
pkgdesc='The .NET Core SDK'
@ -38,6 +43,7 @@ makedepends="
lttng-ust-dev
nodejs
openssl-dev
linux-headers
zlib-dev
"
if [ ${_bootstrap} != 'true' ]; then
@ -48,15 +54,6 @@ if [ ${_bootstrap} != 'true' ]; then
"
fi
#depends='
# icu-libs
# krb5-libs
# libgcc
# #libgdiplus
# libintl
# libssl1.1
# libstdc++zlib
#'
subpackages="dotnet-sdk-5.0:sdk dotnet-host:host dotnet-runtime-5.0:runtime aspnet-runtime-5.0:aspnet_runtime:noarch netstandard-targeting-pack:netstandard_targeting_pack:noarch dotnet-targeting-pack-5.0:targeting_pack aspnet-targeting-pack-5.0:aspnet_targeting_pack:noarch"
_gittag=v${pkgver}-runtime
_giturl=https://github.com/dotnet/source-build
@ -66,21 +63,43 @@ source="
dotnet.sh
https://dot.net/v1/dotnet-install.sh
"
# Patches
#
# Patches description
#
# runtime_add-rid-for-alpine-315.patch/_
# As of version 5.0.12, runtime does not have the RIDs for Alpine Linux 3.15. This patch adds them. See dotnet/core issue #6985
#
# runtime_link-order.patch
# For some reason, runtime does not link in the right order. This fixes that.
#
# runtime_non-portable-distrorid-fix-alpine.patch
# Runtime adds the extra subversion in its calculation of Alpine's DistroRID when a non-portable build, but does so inconsistently. This creates an error when it generates its nuget package
# Might be fixed by just making making package a portable build, which would make runtime_add-rid defunct, and make the targetRID linux-musl-x64 like for the dotnet-3.1 package
#
# build_darc-fix-alpine.patch
# Darc has a segmentation fault on Alpine due to not chosing the correct binary architecture. This patch deletes all the wrong ones so that it is forced to chose the correct one.
# See dotnet/source-build issue #1868, and dotnet/source-build issue #297 (which would also fix all the other RID issues.
#
# sdk_telemetry-optout.patch
# Optouts of telemetry gathering
#
source="
${source}
runtime_link-order.patch
runtime_add-rid-for-alpine-315.patch
runtime_fix-last-version-digit-present-on-alpine-non-portable.patch
application-insights_fix-net40-location.patch
sdk_telemetry-optout.patch
runtime_link-order.patch
runtime_non-portable-distrorid-fix-alpine.patch
build_darc-fix-alpine.patch
build_remove-runtime-install.patch
build_applicationinsights-alternative-source.patch
sdk_telemetry-optout.patch
"
builddir="$srcdir/$pkgname"
#
# A custom version of snapshot is used because Darc expects the build directory to be a git repo, thus the auto-generated tar.gz on github is not sufficient.
# There's a way to trick Darc into thinking its in a git repo but it's hardly elegant. Thus make sure to 'abuild snapshot' before 'abuild -r'
#
snapshot() {
mkdir -p "$srcdir"
cd "${srcdir}"
@ -169,6 +188,14 @@ build() {
export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1
#
# Notes
#
# Ideally would like some parity between dotnet-3.1 and dotnet-5.0 on the question of the TargetRid. Builds on 3.1 work only if TargetRid is set to linux-musl-* while builds
# on 5.0 work well when we let the build system generate its own (barring above patches, of course). It would probably be best to let the system do its thing and fix 3.1's
# RID generator functions.
#
./build.sh \
--with-sdk ../$pkgname \
/p:ArchiveDownloadedPackages=true \
@ -177,7 +204,6 @@ build() {
/p:SkipPrebuiltEnforcement=true \
/p:UseSystemLibraries=true \
/p:UseSystemLibunwind=true
# /p:TargetRid=$_targetrid \
}
package() {
@ -314,12 +340,9 @@ sha512sums="
8ad768f65bd0358282ed80a1e60cfccbe003b9fdd087918d56839701a02a2fe9ebf00bde0213293743fbb7602db5064de10251419b7b53df0fdd708e761a0d15 dotnet-5.0-5.0.12.git.zip
f58bd83b709dcb4b0b67830756069c34258a167b33cb290cbf30f21d69d75402d38e013fd7bbf00640fe19e397f78df6ff787cf8484ee8967d5b8809f033eafb dotnet.sh
ecab4809e617e9cd30940b1c1a700e16b37b5974c850a60da7f1a25bf81516850e4533ef39d2d8786381e0e4e325d3b53fbb2377ecaa6c0813bb00fc1c92b784 dotnet-install.sh
ad57d02371d351106e043fa104e31afbb0d6799e7ce0ea1a26f585abbfbab7bcba734c7e70491c4af5bfbed965a9ed3235cf4bc1019f504baf482518193b10a7 runtime_link-order.patch
96cae734054ae9e5b41a214b33ca45397f54761dc5ff5497d4f9f790fd16c34a7211a473c414f3923cefec87766755d76d216eb9fa205461c72c35a8a6b89a8f runtime_add-rid-for-alpine-315.patch
944461da9ed50d536195ab3572b15fdfa74713344a4ca5e31bed627f09fbf328dd0d1f66599553d474e766cacdba7146c701180810383245fcdce1aba39bfef3 runtime_fix-last-version-digit-present-on-alpine-non-portable.patch
0469d571d0f7634d3794761f04e1cbff9d27d642d134a11a13560574280e5cab6f366eb8820e61a449eca99470fdea8d9f6a7d97b633059b2fe25257ed1579e6 application-insights_fix-net40-location.patch
c96700138ea919c169c3a394f1bf9548c7f86b1ba42b193d6e7bb0a1e2bd6f7f202befbc61246a8720181cd40e1f7fa36a6c208eb19b03a23e21994136fb2507 sdk_telemetry-optout.patch
4899175597a1d4cd14c382469fe17e6d8d4644b784dca02eb2d4f71afa8e898e60269d5b0cdfea6e3ed6dc92feb676c6db21aae3bcb206d859c02cd10cdcaca0 runtime_add-rid-for-alpine-315.patch
0d6ca9b4c6bb0999102f8a51b408c6f938d7262af552d63ef180fdc9a48bba940d0437d0d06916c3f7be7e70e2717a46a4ebc91c0f85467cbc7776b944eca83e runtime_link-order.patch
6dd3ff4db79aa95fa37ba4011da82c74d8ac83a7a92124fc4a97bd78b818b024b569df293b1edae2b16d8161c76b6a00e1c81bd421480e367925af64673b0f84 runtime_non-portable-distrorid-fix-alpine.patch
74767c34f15e0eaee3682516e093296621efaeeb6d84e62d826587db9b559fb7c00c42aafbf4fdfd34460d1cf16edad3fd5f720f2b37f8bf52b26d7f73f79d5e build_darc-fix-alpine.patch
b3bf420ddd2bba28a012800af3bb740429b19b81fe7ca7c252de9fa65ee99d601f9d2484ac516d224799fc8586e9ce00cd730f9f6113d0411fe326f149ec7e3c build_remove-runtime-install.patch
58a3e93e5fb6247569c291f86db127cbbc6cc6842eaf0973c2a211d4806f08dcabd9781b7da567088d820a337d58d6375230ade991dcc77e170266675c4a97e5 build_applicationinsights-alternative-source.patch
c96700138ea919c169c3a394f1bf9548c7f86b1ba42b193d6e7bb0a1e2bd6f7f202befbc61246a8720181cd40e1f7fa36a6c208eb19b03a23e21994136fb2507 sdk_telemetry-optout.patch
"

View file

@ -1,26 +0,0 @@
From 47d5121ae6ec33de1d2fe48d5700999ec0b685da Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Sat, 31 Jul 2021 21:44:44 +0000
Subject: [PATCH 1/1] Remove runtime install
---
build.sh | 3 ---
1 file changed, 3 deletions(-)
diff --git a/build.sh b/build.sh
index b2fe4ad..99f8923 100755
--- a/build.sh
+++ b/build.sh
@@ -125,9 +125,6 @@ fi
set -x
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
-# runtime 3.1.1 required for darc
-"$scriptroot/eng/common/dotnet-install.sh" -runtime dotnet -version 3.1.1
-
if [ "$alternateTarget" == "true" ]; then
"$CLIPATH/dotnet" $SDKPATH/MSBuild.dll "$scriptroot/build.proj" /bl:source-build-test.binlog /flp:v=diag /clp:v=m "$@"
else
--
2.32.0

View file

@ -1,24 +1,25 @@
From 34bd8c2e4078129d5bf57af7f89ab5a112f7da2e Mon Sep 17 00:00:00 2001
From 09e477fd876de48614d728fbd6582db2a0f203b7 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Tue, 20 Jul 2021 23:22:54 +0000
Date: Mon, 29 Nov 2021 20:39:25 +0000
Subject: [PATCH 1/1] add RID for Alpine 3.15
---
.../runtime.compatibility.json | 109 +++++++++++++++++-
.../runtime.compatibility.json | 116 +++++++++++++++++-
.../Microsoft.NETCore.Platforms/runtime.json | 25 +++-
.../runtimeGroups.props | 2 +-
3 files changed, 133 insertions(+), 3 deletions(-)
3 files changed, 140 insertions(+), 3 deletions(-)
diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
index f56d7461e90..37d104e8ee7 100644
index 844590f8022..7d7517f043b 100644
--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
@@ -401,6 +401,113 @@
@@ -508,6 +508,120 @@
"any",
"base"
],
+ "alpine.3.15": [
+ "alpine.3.15",
+ "alpine.3.14",
+ "alpine.3.13",
+ "alpine.3.12",
+ "alpine.3.11",
@ -37,6 +38,8 @@ index f56d7461e90..37d104e8ee7 100644
+ "alpine.3.15-arm": [
+ "alpine.3.15-arm",
+ "alpine.3.15",
+ "alpine.3.14-arm",
+ "alpine.3.14",
+ "alpine.3.13-arm",
+ "alpine.3.13",
+ "alpine.3.12-arm",
@ -67,6 +70,8 @@ index f56d7461e90..37d104e8ee7 100644
+ "alpine.3.15-arm64": [
+ "alpine.3.15-arm64",
+ "alpine.3.15",
+ "alpine.3.14-arm64",
+ "alpine.3.14",
+ "alpine.3.13-arm64",
+ "alpine.3.13",
+ "alpine.3.12-arm64",
@ -97,6 +102,8 @@ index f56d7461e90..37d104e8ee7 100644
+ "alpine.3.15-x64": [
+ "alpine.3.15-x64",
+ "alpine.3.15",
+ "alpine.3.14-x64",
+ "alpine.3.14",
+ "alpine.3.13-x64",
+ "alpine.3.13",
+ "alpine.3.12-x64",
@ -127,7 +134,7 @@ index f56d7461e90..37d104e8ee7 100644
"alpine.3.6": [
"alpine.3.6",
"alpine",
@@ -7032,4 +7139,4 @@
@@ -7239,4 +7353,4 @@
"any",
"base"
]
@ -135,40 +142,40 @@ index f56d7461e90..37d104e8ee7 100644
\ No newline at end of file
+}
diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
index 3e8b2e74e85..21080c54167 100644
index 7d6aa102b50..ea7eac422b8 100644
--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtime.json
@@ -115,6 +115,29 @@
"alpine.3.12-x64"
@@ -138,6 +138,29 @@
"alpine.3.13-x64"
]
},
+ "alpine.3.15": {
+ "#import": [
+ "alpine.3.13"
+ "alpine.3.14"
+ ]
+ },
+ "alpine.3.15-arm": {
+ "#import": [
+ "alpine.3.15",
+ "alpine.3.13-arm"
+ "alpine.3.14-arm"
+ ]
+ },
+ "alpine.3.15-arm64": {
+ "#import": [
+ "alpine.3.15",
+ "alpine.3.13-arm64"
+ "alpine.3.14-arm64"
+ ]
+ },
+ "alpine.3.15-x64": {
+ "#import": [
+ "alpine.3.15",
+ "alpine.3.13-x64"
+ "alpine.3.14-x64"
+ ]
+ },
"alpine.3.6": {
"#import": [
"alpine"
@@ -3121,4 +3144,4 @@
@@ -3196,4 +3219,4 @@
]
}
}
@ -176,18 +183,18 @@ index 3e8b2e74e85..21080c54167 100644
\ No newline at end of file
+}
diff --git a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
index e78268c077f..a5f37b373a4 100644
index 3cb3d2df858..c7a346d1672 100644
--- a/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+++ b/src/libraries/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
@@ -16,7 +16,7 @@
<RuntimeGroup Include="alpine">
<Parent>linux-musl</Parent>
<Architectures>x64;arm;arm64</Architectures>
- <Versions>3.6;3.7;3.8;3.9;3.10;3.11;3.12;3.13</Versions>
+ <Versions>3.6;3.7;3.8;3.9;3.10;3.11;3.12;3.13;3.15</Versions>
- <Versions>3.6;3.7;3.8;3.9;3.10;3.11;3.12;3.13;3.14</Versions>
+ <Versions>3.6;3.7;3.8;3.9;3.10;3.11;3.12;3.13;3.14;3.15</Versions>
</RuntimeGroup>
<RuntimeGroup Include="android">
--
2.32.0
2.34.0

View file

@ -1,35 +0,0 @@
From 839ad29b16a8baf7b1470f13d7faa0ce941769b3 Mon Sep 17 00:00:00 2001
From: Jan Vorlicek <janvorli@microsoft.com>
Date: Mon, 30 Nov 2020 16:11:36 +0100
Subject: [PATCH] Fix build on Alpine edge (#45352)
The atoll definition in the pal.h was leaking into the PAL implementation and
on Alpine edge, the difference in throws() classification was causing a build
break.
---
src/coreclr/src/pal/src/include/pal/palinternal.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/coreclr/src/pal/src/include/pal/palinternal.h b/src/coreclr/src/pal/src/include/pal/palinternal.h
index e73720bec73..4ad42a03a13 100644
--- a/src/coreclr/src/pal/src/include/pal/palinternal.h
+++ b/src/coreclr/src/pal/src/include/pal/palinternal.h
@@ -170,6 +170,7 @@ function_name() to call the system's implementation
#define memset DUMMY_memset
#define memmove DUMMY_memmove
#define memchr DUMMY_memchr
+#define atoll DUMMY_atoll
#define strlen DUMMY_strlen
#define stricmp DUMMY_stricmp
#define strstr DUMMY_strstr
@@ -357,6 +358,7 @@ function_name() to call the system's implementation
#undef memset
#undef memmove
#undef memchr
+#undef atoll
#undef strlen
#undef strnlen
#undef wcsnlen
--
2.30.2

View file

@ -1,25 +0,0 @@
From bc6f00bf2734cf900b456c505ae59e70bfb7bdbd Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Thu, 3 Jun 2021 18:19:15 +0000
Subject: [PATCH] Fix last version digit present on alpine non-portable build
---
eng/native/init-distro-rid.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/native/init-distro-rid.sh b/eng/native/init-distro-rid.sh
index f71aa8640b1..bef677c77d4 100644
--- a/eng/native/init-distro-rid.sh
+++ b/eng/native/init-distro-rid.sh
@@ -41,7 +41,7 @@ initNonPortableDistroRid()
# We have forced __PortableBuild=0. This is because -portablebuld
# has been passed as false.
if (( isPortable == 0 )); then
- if [ "${ID}" = "rhel" ]; then
+ if [ "${ID}" = "rhel" ] || [ "${ID}" = "alpine" ]; then
# remove the last version digit
VERSION_ID="${VERSION_ID%.*}"
fi
--
2.30.2

View file

@ -1,27 +0,0 @@
From c82d6ad7fa2dfbfa4168adb6b6adf1c5c1b1214d Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Sat, 17 Jul 2021 14:28:50 +0000
Subject: [PATCH 1/1] hardcode illink target
---
eng/illink.targets | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eng/illink.targets b/eng/illink.targets
index 928e9934858..3aff0f38dbd 100644
--- a/eng/illink.targets
+++ b/eng/illink.targets
@@ -289,8 +289,8 @@
RootAssemblyNames=""
OutputDirectory="$(ILLinkTrimOutputPath)"
ExtraArgs="$(ILLinkArgs)"
- ToolExe="$(_DotNetHostFileName)"
- ToolPath="$(_DotNetHostDirectory)" />
+ ToolExe="dotnet"
+ ToolPath="$(DotNetRoot)" />
</Target>
--
2.30.2

View file

@ -1,5 +1,16 @@
--- runtime.f27d33729518f5aa478aa818b7b4f54a4d50bef1.orig/src/installer/corehost/cli/apphost/static/CMakeLists.txt 2021-03-16 15:05:11.692543567 +0000
+++ runtime.f27d33729518f5aa478aa818b7b4f54a4d50bef1/src/installer/corehost/cli/apphost/static/CMakeLists.txt 2021-03-16 15:06:51.581738910 +0000
From 6e549ddb51fbebe1778143bc91b8cd434d751870 Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Wed, 1 Dec 2021 02:34:39 +0000
Subject: [PATCH 1/1] Runtime link order patch for alpine
---
src/installer/corehost/cli/apphost/static/CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/installer/corehost/cli/apphost/static/CMakeLists.txt b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
index ffb4f3ed02c..b05a05e70e2 100644
--- a/src/installer/corehost/cli/apphost/static/CMakeLists.txt
+++ b/src/installer/corehost/cli/apphost/static/CMakeLists.txt
@@ -207,12 +207,12 @@ target_link_libraries(
libhostcommon
${CORECLR_LIBRARIES}
@ -17,3 +28,6 @@
+ ${LIBGSS}
+ ${NATIVE_LIBS_EXTRA}
)
--
2.34.0

View file

@ -1,14 +1,14 @@
From bc6f00bf2734cf900b456c505ae59e70bfb7bdbd Mon Sep 17 00:00:00 2001
From a557508590dca1536345e13ba1b043f33defe13a Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Thu, 3 Jun 2021 18:19:15 +0000
Subject: [PATCH] Fix last version digit present on alpine non-portable build
Date: Wed, 1 Dec 2021 02:52:05 +0000
Subject: [PATCH] Fix last version digit present on alpine non-portable
---
eng/native/init-distro-rid.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eng/native/init-distro-rid.sh b/eng/native/init-distro-rid.sh
index f71aa8640b1..bef677c77d4 100644
index b6921a90346..091738944a7 100644
--- a/eng/native/init-distro-rid.sh
+++ b/eng/native/init-distro-rid.sh
@@ -41,7 +41,7 @@ initNonPortableDistroRid()
@ -21,5 +21,5 @@ index f71aa8640b1..bef677c77d4 100644
VERSION_ID="${VERSION_ID%.*}"
fi
--
2.30.2
2.34.0