From d7c56beb82baa5457f43ef00d8aebf8a40bf0bab Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 7 Sep 2021 17:54:32 -0400 Subject: [PATCH] New package: dotnet-5.0.206.1 --- srcpkgs/aspnetcore-runtime | 1 + srcpkgs/aspnetcore-targeting-pack | 1 + srcpkgs/dotnet-apphost-pack | 1 + srcpkgs/dotnet-host | 1 + srcpkgs/dotnet-hostfxr | 1 + srcpkgs/dotnet-runtime | 1 + srcpkgs/dotnet-sdk | 1 + srcpkgs/dotnet-targeting-pack | 1 + srcpkgs/dotnet-templates | 1 + .../files/9999-runtime-link-order.patch | 23 +++ .../files/9999-sdk-telemetry-optout.patch | 13 ++ srcpkgs/dotnet/files/dotnet.sh | 9 + srcpkgs/dotnet/template | 174 ++++++++++++++++++ srcpkgs/netstandard-targeting-pack | 1 + 14 files changed, 229 insertions(+) create mode 120000 srcpkgs/aspnetcore-runtime create mode 120000 srcpkgs/aspnetcore-targeting-pack create mode 120000 srcpkgs/dotnet-apphost-pack create mode 120000 srcpkgs/dotnet-host create mode 120000 srcpkgs/dotnet-hostfxr create mode 120000 srcpkgs/dotnet-runtime create mode 120000 srcpkgs/dotnet-sdk create mode 120000 srcpkgs/dotnet-targeting-pack create mode 120000 srcpkgs/dotnet-templates create mode 100644 srcpkgs/dotnet/files/9999-runtime-link-order.patch create mode 100644 srcpkgs/dotnet/files/9999-sdk-telemetry-optout.patch create mode 100644 srcpkgs/dotnet/files/dotnet.sh create mode 100644 srcpkgs/dotnet/template create mode 120000 srcpkgs/netstandard-targeting-pack diff --git a/srcpkgs/aspnetcore-runtime b/srcpkgs/aspnetcore-runtime new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/aspnetcore-runtime @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/aspnetcore-targeting-pack b/srcpkgs/aspnetcore-targeting-pack new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/aspnetcore-targeting-pack @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/dotnet-apphost-pack b/srcpkgs/dotnet-apphost-pack new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/dotnet-apphost-pack @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/dotnet-host b/srcpkgs/dotnet-host new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/dotnet-host @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/dotnet-hostfxr b/srcpkgs/dotnet-hostfxr new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/dotnet-hostfxr @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/dotnet-runtime b/srcpkgs/dotnet-runtime new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/dotnet-runtime @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/dotnet-sdk b/srcpkgs/dotnet-sdk new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/dotnet-sdk @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/dotnet-targeting-pack b/srcpkgs/dotnet-targeting-pack new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/dotnet-targeting-pack @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/dotnet-templates b/srcpkgs/dotnet-templates new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/dotnet-templates @@ -0,0 +1 @@ +dotnet \ No newline at end of file diff --git a/srcpkgs/dotnet/files/9999-runtime-link-order.patch b/srcpkgs/dotnet/files/9999-runtime-link-order.patch new file mode 100644 index 000000000000..c814f99e63f7 --- /dev/null +++ b/srcpkgs/dotnet/files/9999-runtime-link-order.patch @@ -0,0 +1,23 @@ +diff --git a/src/installer/corehost/cli/apphost/static/CMakeLists.txt b/src/installer/corehost/cli/apphost/static/CMakeLists.txt +index a9d5b04..653b356 100644 +--- a/src/installer/corehost/cli/apphost/static/CMakeLists.txt ++++ b/src/installer/corehost/cli/apphost/static/CMakeLists.txt +@@ -212,14 +212,14 @@ target_link_libraries( + libhostcommon + ${CORECLR_LIBRARIES} + +- ${ZLIB_LIBRARIES} +- ${LIBGSS} +- ${NATIVE_LIBS_EXTRA} +- + ${START_WHOLE_ARCHIVE} + ${RUNTIMEINFO_LIB} + ${NATIVE_LIBS} + ${END_WHOLE_ARCHIVE} ++ ++ ${ZLIB_LIBRARIES} ++ ${LIBGSS} ++ ${NATIVE_LIBS_EXTRA} + ) + + if(NOT FEATURE_DISTRO_AGNOSTIC_SSL) diff --git a/srcpkgs/dotnet/files/9999-sdk-telemetry-optout.patch b/srcpkgs/dotnet/files/9999-sdk-telemetry-optout.patch new file mode 100644 index 000000000000..6d4fe2b24125 --- /dev/null +++ b/srcpkgs/dotnet/files/9999-sdk-telemetry-optout.patch @@ -0,0 +1,13 @@ +diff --git a/src/Cli/dotnet/Program.cs b/src/Cli/dotnet/Program.cs +index f811472..26982c0 100644 +--- a/src/Cli/dotnet/Program.cs ++++ b/src/Cli/dotnet/Program.cs +@@ -187,7 +187,7 @@ internal static int ProcessArgs(string[] args, TimeSpan startupTime, ITelemetry + bool generateAspNetCertificate = + environmentProvider.GetEnvironmentVariableAsBool("DOTNET_GENERATE_ASPNET_CERTIFICATE", defaultValue: true); + bool telemetryOptout = +- environmentProvider.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", defaultValue: false); ++ environmentProvider.GetEnvironmentVariableAsBool("DOTNET_CLI_TELEMETRY_OPTOUT", defaultValue: true); + bool addGlobalToolsToPath = + environmentProvider.GetEnvironmentVariableAsBool("DOTNET_ADD_GLOBAL_TOOLS_TO_PATH", defaultValue: true); + bool nologo = diff --git a/srcpkgs/dotnet/files/dotnet.sh b/srcpkgs/dotnet/files/dotnet.sh new file mode 100644 index 000000000000..c6c4cf36f0ff --- /dev/null +++ b/srcpkgs/dotnet/files/dotnet.sh @@ -0,0 +1,9 @@ +# Set location for AppHost lookup +[ -z "$DOTNET_ROOT" ] && export DOTNET_ROOT=/usr/lib/dotnet + +# Add dotnet tools directory to PATH +DOTNET_TOOLS_PATH="$HOME/.dotnet/tools" +case "$PATH" in + *"$DOTNET_TOOLS_PATH"* ) true ;; + * ) PATH="$PATH:$DOTNET_TOOLS_PATH" ;; +esac diff --git a/srcpkgs/dotnet/template b/srcpkgs/dotnet/template new file mode 100644 index 000000000000..385ff2b68162 --- /dev/null +++ b/srcpkgs/dotnet/template @@ -0,0 +1,174 @@ +# Template file for 'dotnet' +pkgname=dotnet +version=5.0.206.1 +revision=1 +_tarball_version=5.0.206 +_dotnet_version=5.0.9 +archs="x86_64*" +wrksrc="source-build-${version}-SDK" +build_style=meta +hostmakedepends="git tar wget python3 cmake clang llvm" +makedepends="icu-devel libunwind-devel lttng-ust-devel zlib-devel mit-krb5-devel" +depends="dotnet-sdk aspnetcore-runtime dotnet-runtime dotnet-hostfxr dotnet-host + dotnet-apphost-pack dotnet-targeting-pack aspnetcore-targeting-pack + netstandard-targeting-pack dotnet-templates" +short_desc=".NET Core components meta package" +maintainer="Joel Beckmeyer " +license="MIT" +homepage="https://dotnet.microsoft.com" +distfiles="https://github.com/dotnet/source-build/archive/refs/tags/v${version}-SDK.tar.gz" +checksum=e531ac5ea818b0c10e945922ee761a0a33ec2389fa112721ea3e1c405461a0de +nocross=yes + +_sdk_commit=a8e1d9cb37e54f08f58fce93af19378607332973 +_runtime_commit=208e377a5329ad6eb1db5e5fb9d4590fa50beadd +# left as reference; values come from the source tarball +# _sdk_commit=$(xmllint --xpath \ +# "//Dependency[@Name='Microsoft.NET.Sdk']//*[name()='Sha']/text()" \ +# eng/Version.Details.xml) +# _runtime_commit=$(xmllint --xpath \ +# "//Dependency[@Name='Microsoft.NETCore.App.Runtime.win-x64']//*[name()='Sha']/text()" \ +# eng/Version.Details.xml) + +post_extract() { + git init +} + +pre_patch() { + cp "${FILESDIR}"/9999-runtime-link-order.patch patches/runtime/ + cp "${FILESDIR}"/9999-sdk-telemetry-optout.patch patches/sdk/ + # broken patch; removing fixes building from failing on missing crossgen + rm patches/aspnetcore/0001-Use-non-portable-NETCoreAppRuntime-for-crossgen.patch +} + +do_build() { + ./build.sh \ + /p:SkipPortableRuntimeBuild=true \ + /p:UseSystemLibraries=true \ + /p:UseSystemLibunwind=true +} + +do_install() { + cd artifacts/x64/Release + bsdtar -xf dotnet-sdk-"${_tarball_version}"-linux-x64.tar.gz + + vmkdir usr/lib/dotnet + vcopy dotnet usr/lib/dotnet + vcopy host usr/lib/dotnet + vcopy packs usr/lib/dotnet + vcopy sdk usr/lib/dotnet + vcopy shared usr/lib/dotnet + vcopy templates usr/lib/dotnet + + vmkdir etc/dotnet + echo '/usr/lib/dotnet' > "${DESTDIR}"/etc/dotnet/install_location + + vmkdir etc/profile.d + vcopy "${FILESDIR}"/dotnet.sh etc/profile.d + + vmkdir usr/bin + ln -s /usr/lib/dotnet/dotnet "${DESTDIR}"/usr/bin/dotnet +} + +dotnet-host_package() { + short_desc=".NET Core Command Line Interface" + pkg_install() { + vmove usr/lib/dotnet/dotnet + vmove usr/bin/dotnet + vmove etc/dotnet/install_location + vmove etc/profile.d/dotnet.sh + vcompletion "${wrksrc}"/artifacts/src/sdk."${_sdk_commit}"/scripts/register-completions.bash bash + vcompletion "${wrksrc}"/artifacts/src/sdk."${_sdk_commit}"/scripts/register-completions.zsh zsh + + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + vlicense "${wrksrc}"/artifacts/x64/Release/ThirdPartyNotices.txt + # there are 2 dotnet.1 manpages; one in the runtime and one in the sdk. On + # closer inspection this one is titled dotnet-cli(1) at the top. sdk + # manpages are included here because they are referenced by + # dotnet-cli(1). + vman "${wrksrc}"/artifacts/src/runtime."${_runtime_commit}"/docs/manpages/host/dotnet.1 dotnet-cli.1 + for f in "${wrksrc}"/artifacts/src/sdk."${_sdk_commit}"/documentation/manpages/sdk/*.1; do + vman $f + done + } +} + +dotnet-hostfxr_package() { + short_desc=".NET Core Command Line Interface" + depends="dotnet-host" + pkg_install() { + vmove usr/lib/dotnet/host/fxr + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + } +} + +dotnet-runtime_package() { + short_desc=".NET Core runtime" + depends="dotnet-hostfxr" + pkg_install() { + vmove usr/lib/dotnet/shared/Microsoft.NETCore.App + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + } +} + +aspnetcore-runtime_package() { + short_desc="ASP.NET Core runtime" + depends="dotnet-runtime" + pkg_install() { + vmove usr/lib/dotnet/shared/Microsoft.AspNetCore.App + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + } +} + +dotnet-sdk_package() { + short_desc=".NET Core SDK" + depends="dotnet-runtime aspnetcore-runtime dotnet-targeting-pack + aspnetcore-targeting-pack netstandard-targeting-pack dotnet-apphost-pack + dotnet-templates" + pkg_install() { + vmove usr/lib/dotnet/sdk + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + + } +} + +dotnet-apphost-pack_package() { + short_desc=".NET Core apphost pack" + pkg_install() { + vmove usr/lib/dotnet/packs/Microsoft.NETCore.App.Host.linux-x64 + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + } +} + +dotnet-targeting-pack_package() { + short_desc=".NET Core targeting pack" + pkg_install() { + vmove usr/lib/dotnet/packs/Microsoft.NETCore.App.Ref + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + } +} + +aspnetcore-targeting-pack_package() { + short_desc="ASP.NET Core targeting pack" + pkg_install() { + vmove usr/lib/dotnet/packs/Microsoft.AspNetCore.App.Ref + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + } +} + +netstandard-targeting-pack_package() { + short_desc=".NET Standard targeting pack" + pkg_install() { + vmove usr/lib/dotnet/packs/NETStandard.Library.Ref + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + } +} + +dotnet-templates_package() { + short_desc=".NET Core SDK templates" + pkg_install() { + vmove usr/lib/dotnet/templates + vlicense "${wrksrc}"/artifacts/x64/Release/LICENSE.txt + + } +} diff --git a/srcpkgs/netstandard-targeting-pack b/srcpkgs/netstandard-targeting-pack new file mode 120000 index 000000000000..8115f8387cd9 --- /dev/null +++ b/srcpkgs/netstandard-targeting-pack @@ -0,0 +1 @@ +dotnet \ No newline at end of file