From 43662fdfe11446d7780e7ab2e05eb43bd3352264 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 7 Sep 2021 17:54:32 -0400 Subject: [PATCH] New package: dotnet-6.0.100 --- 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 + srcpkgs/dotnet/files/dotnet.sh | 9 + ...e-runtime-disable-package-validation.patch | 13 ++ .../dotnet-core-sdk-telemetry-optout.patch | 13 ++ srcpkgs/dotnet/template | 177 ++++++++++++++++++ srcpkgs/netstandard-targeting-pack | 1 + 14 files changed, 222 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/dotnet.sh create mode 100644 srcpkgs/dotnet/patches/dotnet-core-runtime-disable-package-validation.patch create mode 100644 srcpkgs/dotnet/patches/dotnet-core-sdk-telemetry-optout.patch 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/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/patches/dotnet-core-runtime-disable-package-validation.patch b/srcpkgs/dotnet/patches/dotnet-core-runtime-disable-package-validation.patch new file mode 100644 index 000000000000..17d4529afa57 --- /dev/null +++ b/srcpkgs/dotnet/patches/dotnet-core-runtime-disable-package-validation.patch @@ -0,0 +1,13 @@ +diff --git a/sources/src/runtime.4822e3c3aa77eb82b2fb33c9321f923cf11ddde6/eng/packaging.targets b/sources/src/runtime.4822e3c3aa77eb82b2fb33c9321f923cf11ddde6/eng/packaging.targets +index ecf7467..3add455 100644 +--- a/sources/src/runtime.4822e3c3aa77eb82b2fb33c9321f923cf11ddde6/eng/packaging.targets ++++ b/sources/src/runtime.4822e3c3aa77eb82b2fb33c9321f923cf11ddde6/eng/packaging.targets +@@ -1,7 +1,7 @@ + + + +- true ++ false + + true + $([MSBuild]::Subtract($(MajorVersion), 1)).0.0 diff --git a/srcpkgs/dotnet/patches/dotnet-core-sdk-telemetry-optout.patch b/srcpkgs/dotnet/patches/dotnet-core-sdk-telemetry-optout.patch new file mode 100644 index 000000000000..f7b094a4a134 --- /dev/null +++ b/srcpkgs/dotnet/patches/dotnet-core-sdk-telemetry-optout.patch @@ -0,0 +1,13 @@ +diff --git a/sources/src/sdk.2c798cbf6bf259ce49d94d91bc665a95d42d7a7f/src/Cli/dotnet/Program.cs b/sources/src/sdk.2c798cbf6bf259ce49d94d91bc665a95d42d7a7f/src/Cli/dotnet/Program.cs +index c3be733..adfa457 100644 +--- a/sources/src/sdk.2c798cbf6bf259ce49d94d91bc665a95d42d7a7f/src/Cli/dotnet/Program.cs ++++ b/sources/src/sdk.2c798cbf6bf259ce49d94d91bc665a95d42d7a7f/src/Cli/dotnet/Program.cs +@@ -171,7 +171,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/template b/srcpkgs/dotnet/template new file mode 100644 index 000000000000..5a0f4141709f --- /dev/null +++ b/srcpkgs/dotnet/template @@ -0,0 +1,177 @@ +# Template file for 'dotnet' +pkgname=dotnet +version=6.0.100 +revision=1 +_bootstrapver=0.1.0-6.0.100-bootstrap.29 +archs="x86_64" +wrksrc="dotnet-${version}" +build_style=meta +hostmakedepends="clang cmake curl git inetutils llvm tar" +makedepends="icu-devel mit-krb5-devel libgit2-devel libunwind-devel +libxml2-devel lldb-devel lttng-ust-devel nodejs-devel openssl-devel zlib-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://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.Artifacts.${_bootstrapver}.tar.gz" +checksum="e97c7dc2bfc7b6d92f06e357719d86b0b2ccd54ac2358b2aba30f95935475c33" +skip_extraction="Private.SourceBuilt.Artifacts.${_bootstrapver}.tar.gz" + +post_fetch() { + mkdir "${wrksrc}" + cd "${wrksrc}" + git clone https://github.com/dotnet/installer.git + cd installer + git checkout "v${version}" + + # contrary to what the name suggests, running the script with these flags + # just fetches the complete sources needed to build the SDK + ./build.sh \ + /p:ArcadeBuildTarball=true \ + /p:TarballDir="${wrksrc}/sources" +} + +do_configure() { + cd sources + ln -sf "${XBPS_SRCDISTDIR}/dotnet-${version}/Private.SourceBuilt.Artifacts.${_bootstrapver}.tar.gz" packages/archive/ + ./prep.sh +} + +do_build() { + cd sources + ./build.sh +} + +do_install() { + cd sources/artifacts/x64/Release + bsdtar -xf dotnet-sdk-"${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 + + cd "${wrksrc}"/sources/src/sdk.*/scripts + vcompletion register-completions.bash bash + vcompletion register-completions.zsh zsh + #vcompletion "$wrksrc/sources/src/sdk.*/scripts/register-completions.bash" bash + #vcompletion "$wrksrc/sources/src/sdk.*/scripts/register-completions.zsh" zsh + + vlicense "${wrksrc}"/sources/artifacts/x64/Release/LICENSE.txt + vlicense "${wrksrc}"/sources/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). + cd "${wrksrc}"/sources/src/runtime.*/docs/manpages/host + vman dotnet.1 dotnet-cli.1 + cd "${wrksrc}"/sources/src/sdk.*/documentation/manpages/sdk + for f in *.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}"/sources/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}"/sources/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}"/sources/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}"/sources/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}"/sources/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}"/sources/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}"/sources/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}"/sources/artifacts/x64/Release/LICENSE.txt + } +} + +dotnet-templates_package() { + short_desc=".NET Core SDK templates" + pkg_install() { + vmove usr/lib/dotnet/templates + vlicense "${wrksrc}"/sources/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