Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: dotnet-5.0.206.1
@ 2021-09-15 17:54 TinfoilSubmarine
  2021-09-15 18:35 ` rmboggs
                   ` (50 more replies)
  0 siblings, 51 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-15 17:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]

There is a new pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages dotnet
https://github.com/void-linux/void-packages/pull/32974

New package: dotnet-5.0.206.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

Supersedes https://github.com/void-linux/void-packages/pull/27170. I followed the [packaging guidelines](https://github.com/dotnet/source-build/blob/v5.0.206.1-SDK/Documentation/packaging-installation.md) in the source-build repo. I aligned with the [recommended packages list here](https://docs.microsoft.com/en-us/dotnet/core/distribution-packaging) minus `dotnet-runtime-deps`.

A patch file from https://github.com/void-linux/void-packages/pull/32974.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dotnet-32974.patch --]
[-- Type: text/x-diff, Size: 12225 bytes --]

From d7c56beb82baa5457f43ef00d8aebf8a40bf0bab Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
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 <joel@beckmeyer.us>"
+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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
@ 2021-09-15 18:35 ` rmboggs
  2021-09-15 21:48 ` TinfoilSubmarine
                   ` (49 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2021-09-15 18:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-920277471

Comment:
If it helps, I have been using this new package on my machine without issues so far.  Unfortunately, I haven't tested with musl, however.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
  2021-09-15 18:35 ` rmboggs
@ 2021-09-15 21:48 ` TinfoilSubmarine
  2021-09-15 21:50 ` TinfoilSubmarine
                   ` (48 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-15 21:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-920406396

Comment:
Also wanted to mention that this bootstraps from a prebuilt dotnet-sdk since (surprise surprise) Roslyn, the .NET compiler, is self-hosting. I'm hoping this is OK since I did some poking around Void documentation and didn't see anything about bootstrapping from prebuilts.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
  2021-09-15 18:35 ` rmboggs
  2021-09-15 21:48 ` TinfoilSubmarine
@ 2021-09-15 21:50 ` TinfoilSubmarine
  2021-09-16 13:20 ` TinfoilSubmarine
                   ` (47 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-15 21:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-920407096

Comment:
There is some discussion here about a full source bootstrap, but it never went anywhere: https://github.com/dotnet/source-build/issues/1930

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (2 preceding siblings ...)
  2021-09-15 21:50 ` TinfoilSubmarine
@ 2021-09-16 13:20 ` TinfoilSubmarine
  2021-09-16 15:51 ` TinfoilSubmarine
                   ` (46 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-16 13:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-920896609

Comment:
I am working on building on x86_64-musl currently. I am having some issues with part of the build though, I'll post the log here later. 

I already had to add an additional dependency (`gettext-devel`) for musl to build, and it also incorrectly detects the RID as `linux-x64` instead of `linux-musl-x64` unless `/etc/os-release` is present, so I added `runit-void` as well, which is a bit hack-y. I've already detailed the issue in https://github.com/dotnet/source-build/issues/2459.

One thing that I need to understand is the architectures this should target. Currently if you pass `/p:Platform="${_foreign_architecture}"` to `build.sh` it downloads an Ubuntu (or Alpine) rootfs for the target architecture and runs under QEMU, which doesn't seem to be acceptable, especially since some of the tooling needed (`qemu-debootstrap` to name one) to facilitate this isn't available in void-packages currently. I've added `nocross=yes` to the template, but theoretically this should still be buildable as long as the target arch is the same as the host arch. Is this something we can do with e.g. a new build_helper like `build_helper=qemu`, or should this just be left as `nocross=yes`?

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (3 preceding siblings ...)
  2021-09-16 13:20 ` TinfoilSubmarine
@ 2021-09-16 15:51 ` TinfoilSubmarine
  2021-09-16 17:53 ` Anachron
                   ` (45 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-16 15:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-921022963

Comment:
Log as mentioned above.
[msbuild.log](https://github.com/void-linux/void-packages/files/7179232/msbuild.log)


^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (4 preceding siblings ...)
  2021-09-16 15:51 ` TinfoilSubmarine
@ 2021-09-16 17:53 ` Anachron
  2021-09-16 18:04 ` TinfoilSubmarine
                   ` (44 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: Anachron @ 2021-09-16 17:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 237 bytes --]

New comment by Anachron on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-921110044

Comment:
imo dotnet is such a beast, it's okay to mark it nocross for now and give it another try later.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (5 preceding siblings ...)
  2021-09-16 17:53 ` Anachron
@ 2021-09-16 18:04 ` TinfoilSubmarine
  2021-09-16 18:45 ` rmboggs
                   ` (43 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-16 18:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-921120988

Comment:
I agree with marking nocross.

However, I'm trying to determine if this will build on other archs than x86_64 right now. I'm letting my Rpi3 (so aarch64) give it the ol' college try, but it's taking a while and hanging on some weird things...

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (6 preceding siblings ...)
  2021-09-16 18:04 ` TinfoilSubmarine
@ 2021-09-16 18:45 ` rmboggs
  2021-09-16 21:49 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (42 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2021-09-16 18:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-921153668

Comment:
This may not be the best option but would it be possible to consider just making this x86_64 glib only for now while musl and arm64 are worked on?  Just a thought.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PR PATCH] [Updated] New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (7 preceding siblings ...)
  2021-09-16 18:45 ` rmboggs
@ 2021-09-16 21:49 ` TinfoilSubmarine
  2021-09-16 21:51 ` TinfoilSubmarine
                   ` (41 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-16 21:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages dotnet
https://github.com/void-linux/void-packages/pull/32974

New package: dotnet-5.0.206.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

Supersedes https://github.com/void-linux/void-packages/pull/27170. I followed the [packaging guidelines](https://github.com/dotnet/source-build/blob/v5.0.206.1-SDK/Documentation/packaging-installation.md) in the source-build repo. I aligned with the [recommended packages list here](https://docs.microsoft.com/en-us/dotnet/core/distribution-packaging) minus `dotnet-runtime-deps`.

A patch file from https://github.com/void-linux/void-packages/pull/32974.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dotnet-32974.patch --]
[-- Type: text/x-diff, Size: 12299 bytes --]

From 5f21c2e1a81f85ca66715ae059029a0b7237ed8e Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
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                       | 176 ++++++++++++++++++
 srcpkgs/netstandard-targeting-pack            |   1 +
 14 files changed, 231 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..0105391b12c9
--- /dev/null
+++ b/srcpkgs/dotnet/template
@@ -0,0 +1,176 @@
+# 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* aarch64*"
+wrksrc="source-build-${version}-SDK"
+build_style=meta
+hostmakedepends="git tar wget python3 cmake clang llvm dotnet-sdk"
+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 <joel@beckmeyer.us>"
+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 \
+	--with-sdk /usr/lib/dotnet \
+	/p:Platform=arm64 \
+	/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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PR PATCH] [Updated] New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (8 preceding siblings ...)
  2021-09-16 21:49 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2021-09-16 21:51 ` TinfoilSubmarine
  2021-09-20 12:18 ` TinfoilSubmarine
                   ` (40 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-16 21:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages dotnet
https://github.com/void-linux/void-packages/pull/32974

New package: dotnet-5.0.206.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

Supersedes https://github.com/void-linux/void-packages/pull/27170. I followed the [packaging guidelines](https://github.com/dotnet/source-build/blob/v5.0.206.1-SDK/Documentation/packaging-installation.md) in the source-build repo. I aligned with the [recommended packages list here](https://docs.microsoft.com/en-us/dotnet/core/distribution-packaging) minus `dotnet-runtime-deps`.

A patch file from https://github.com/void-linux/void-packages/pull/32974.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dotnet-32974.patch --]
[-- Type: text/x-diff, Size: 12222 bytes --]

From f128167af7178fbb258b4eeb1193c3fb6ad0a9b4 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
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                       | 173 ++++++++++++++++++
 srcpkgs/netstandard-targeting-pack            |   1 +
 14 files changed, 228 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..80fa1b78b537
--- /dev/null
+++ b/srcpkgs/dotnet/template
@@ -0,0 +1,173 @@
+# 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 dotnet-sdk"
+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 <joel@beckmeyer.us>"
+license="MIT"
+homepage="https://dotnet.microsoft.com"
+distfiles="https://github.com/dotnet/source-build/archive/refs/tags/v${version}-SDK.tar.gz"
+checksum=e531ac5ea818b0c10e945922ee761a0a33ec2389fa112721ea3e1c405461a0de
+
+_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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (9 preceding siblings ...)
  2021-09-16 21:51 ` TinfoilSubmarine
@ 2021-09-20 12:18 ` TinfoilSubmarine
  2021-09-21 13:25 ` rmboggs
                   ` (39 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-09-20 12:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-922876999

Comment:
So I haven't been able to make any progress on getting this working on musl or other architectures. I've updated the template to be x86_64 only for now, and the PR is ready for review.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (10 preceding siblings ...)
  2021-09-20 12:18 ` TinfoilSubmarine
@ 2021-09-21 13:25 ` rmboggs
  2021-10-09 15:43 ` rmboggs
                   ` (38 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2021-09-21 13:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-923987543

Comment:
@TinfoilSubmarine, 

Thank you for adding this to the template:
```
vmkdir etc/dotnet
echo '/usr/lib/dotnet' > "${DESTDIR}"/etc/dotnet/install_location
```
I've confirmed I can get EntityFrameworkCore (using PostgreSQL) working when the above entry in the template is installed in the system. :)

Any ETA of when this can be pulled into the package tree?

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (11 preceding siblings ...)
  2021-09-21 13:25 ` rmboggs
@ 2021-10-09 15:43 ` rmboggs
  2021-10-09 15:48 ` TinfoilSubmarine
                   ` (37 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2021-10-09 15:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-939316804

Comment:
Any word on when this could possibly go in?

Also, version 6 is expected to be released next month. Will this package just be updated to 6 or will this require additional steps to ensure nothing breaks during the upgrade?

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (12 preceding siblings ...)
  2021-10-09 15:43 ` rmboggs
@ 2021-10-09 15:48 ` TinfoilSubmarine
  2021-10-19 14:09 ` TinfoilSubmarine
                   ` (36 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-10-09 15:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-939317736

Comment:
I'll have to rebase on 6 once the source-build repo gets support for it. I'll dig around and see if they are expecting to support it soon.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (13 preceding siblings ...)
  2021-10-09 15:48 ` TinfoilSubmarine
@ 2021-10-19 14:09 ` TinfoilSubmarine
  2021-11-16  3:14 ` jcgruenhage
                   ` (35 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2021-10-19 14:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-946762736

Comment:
So I need some help understanding how to make this bootstrap-able. Currently the template will build from a pre-built SDK every time. How would I go about using the previously built version of dotnet to build the next version, seeing as the build-system always uses the latest version causing a cyclic dependency in this case?

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (14 preceding siblings ...)
  2021-10-19 14:09 ` TinfoilSubmarine
@ 2021-11-16  3:14 ` jcgruenhage
  2022-02-10  4:35 ` [PR PATCH] [Updated] " TinfoilSubmarine
                   ` (34 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: jcgruenhage @ 2021-11-16  3:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-969770729

Comment:
One thing you could do for bootstrapping this is having a virtual package that depends on the newest version, and having a package per version similar to how the linux<x.y> packages work. I've thought about a similar approach for rust, but so far rust is binary bootstrapped and that's apparently not a problem, so I guess having binary bootstrapped dotnet would also be fine.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PR PATCH] [Updated] New package: dotnet-5.0.206.1
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (15 preceding siblings ...)
  2021-11-16  3:14 ` jcgruenhage
@ 2022-02-10  4:35 ` TinfoilSubmarine
  2022-02-18 18:15 ` [WIP] New package: dotnet-6.0.100 TinfoilSubmarine
                   ` (33 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2022-02-10  4:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]

There is an updated pull request by TinfoilSubmarine against master on the void-packages repository

https://github.com/TinfoilSubmarine/void-packages dotnet
https://github.com/void-linux/void-packages/pull/32974

New package: dotnet-5.0.206.1
<!-- Mark items with [x] where applicable -->

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [ ] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->

Supersedes https://github.com/void-linux/void-packages/pull/27170. I followed the [packaging guidelines](https://github.com/dotnet/source-build/blob/v5.0.206.1-SDK/Documentation/packaging-installation.md) in the source-build repo. I aligned with the [recommended packages list here](https://docs.microsoft.com/en-us/dotnet/core/distribution-packaging) minus `dotnet-runtime-deps`.

A patch file from https://github.com/void-linux/void-packages/pull/32974.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dotnet-32974.patch --]
[-- Type: text/x-diff, Size: 12788 bytes --]

From 43662fdfe11446d7780e7ab2e05eb43bd3352264 Mon Sep 17 00:00:00 2001
From: Joel Beckmeyer <joel@beckmeyer.us>
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 @@
+ <Project>
+ 
+   <PropertyGroup>
+-    <EnablePackageValidation>true</EnablePackageValidation>
++    <EnablePackageValidation>false</EnablePackageValidation>
+     <!-- Don't restore prebuilt packages during sourcebuild. -->
+     <DisablePackageBaselineValidation Condition="'$(DotNetBuildFromSource)' == 'true'">true</DisablePackageBaselineValidation>
+     <PackageValidationBaselineVersion Condition="'$(PackageValidationBaselineVersion)' == ''">$([MSBuild]::Subtract($(MajorVersion), 1)).0.0</PackageValidationBaselineVersion>
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 <joel@beckmeyer.us>"
+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

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (16 preceding siblings ...)
  2022-02-10  4:35 ` [PR PATCH] [Updated] " TinfoilSubmarine
@ 2022-02-18 18:15 ` TinfoilSubmarine
  2022-02-18 18:15 ` [PR PATCH] [Closed]: " TinfoilSubmarine
                   ` (32 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2022-02-18 18:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1044954951

Comment:
Closing as I no longer have a use for this. I did recently push a working dotnet6 template which is available here if anyone wants to take another shot at this. It is likely very difficult; [the work going on to get this packaged for Alpine](https://github.com/dotnet/installer/issues/12859) should give some appreciation for the difficulty of this.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [PR PATCH] [Closed]: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (17 preceding siblings ...)
  2022-02-18 18:15 ` [WIP] New package: dotnet-6.0.100 TinfoilSubmarine
@ 2022-02-18 18:15 ` TinfoilSubmarine
  2022-02-19 21:30 ` ayakael
                   ` (31 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: TinfoilSubmarine @ 2022-02-18 18:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]

There's a closed pull request on the void-packages repository

[WIP] New package: dotnet-6.0.100
https://github.com/void-linux/void-packages/pull/32974

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**


#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- [WIP] I built this PR locally for these architectures (if supported. mark crossbuilds):


Supersedes https://github.com/void-linux/void-packages/pull/27170. I followed the [packaging guidelines](https://github.com/dotnet/source-build/blob/v5.0.206.1-SDK/Documentation/packaging-installation.md) in the source-build repo. I aligned with the [recommended packages list here](https://docs.microsoft.com/en-us/dotnet/core/distribution-packaging) minus `dotnet-runtime-deps`.

[ci skip]

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (18 preceding siblings ...)
  2022-02-18 18:15 ` [PR PATCH] [Closed]: " TinfoilSubmarine
@ 2022-02-19 21:30 ` ayakael
  2022-02-27  1:03 ` kawaiiamber
                   ` (30 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-02-19 21:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1046107084

Comment:
I'm the package maintainer for Alpine's dotnet packaging project. If anyone should want some advice or some notes, feel free to mention me in whatever space that you're working in. I wouldn't wish working on this from scratch for anyone - source-build has a lot of moving parts, which makes it a major PITA. For anything I work on, I like to document my problems as much as possible for future use. Thus, there's a devlog on Alpine's package MR dotnet31 / 5 and 6 available below. It goes in more nuts and bolts of packaging for Alpine, while the Github threads are more dotnet specific.

31: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28197
5: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28195
6: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29253

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (19 preceding siblings ...)
  2022-02-19 21:30 ` ayakael
@ 2022-02-27  1:03 ` kawaiiamber
  2022-02-27  1:16 ` ayakael
                   ` (29 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: kawaiiamber @ 2022-02-27  1:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1183 bytes --]

New comment by kawaiiamber on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1052884431

Comment:
> I'm the package maintainer for Alpine's dotnet packaging project. If anyone should want some advice or some notes, feel free to mention me in whatever space that you're working in. I wouldn't wish working on this from scratch for anyone - source-build has a lot of moving parts, which makes it a major PITA. For anything I work on, I like to document my problems as much as possible for future use. Thus, there's a devlog on Alpine's package MR dotnet31 / 5 and 6 available below. It goes in more nuts and bolts of packaging for Alpine, while the Github threads are more dotnet specific.
> 
> 31: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28197 5: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28195 6: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29253

> # How to build dotnet6 stack
> * Build testing/dotnet6-stage0 (provides prebuilt bits for first bootstrap bld)

Is it not possible to build completely from source? Are these prebuilts available for crossbuild and musl?

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (20 preceding siblings ...)
  2022-02-27  1:03 ` kawaiiamber
@ 2022-02-27  1:16 ` ayakael
  2022-02-27  1:17 ` ayakael
                   ` (28 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-02-27  1:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2232 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1052897888

Comment:
> > I'm the package maintainer for Alpine's dotnet packaging project. If anyone should want some advice or some notes, feel free to mention me in whatever space that you're working in. I wouldn't wish working on this from scratch for anyone - source-build has a lot of moving parts, which makes it a major PITA. For anything I work on, I like to document my problems as much as possible for future use. Thus, there's a devlog on Alpine's package MR dotnet31 / 5 and 6 available below. It goes in more nuts and bolts of packaging for Alpine, while the Github threads are more dotnet specific.
> > 31: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28197 5: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28195 6: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29253
> 
> > # How to build dotnet6 stack
> > 
> > * Build testing/dotnet6-stage0 (provides prebuilt bits for first bootstrap bld)
> 
> Is it not possible to build completely from source? Are these prebuilts available for crossbuild and musl?

It is possible to build dotnet entirely from source, but as dotnet builds upon itsel, you need a bootstrap dotnet compiler. Microsoft provides `linux-musl` prebuilts for `armv7`, `aarch64`, `x86_64` which `dotnetx-stage0` fetches and packages. As it is policy for Alpine Linux to not allow binaries immediately built by prebuilt binaries, `dotnetx-bootstrap` sources `dotnetx-stage0` to build an Alpine version of a bootstrap SDK. `dotnetx-bootstrap` is then sourced by `dotnetx-build`, which builds the bits that are going to be packages for availability to end-user. As Alpine does not support versioning for subpackages, and as runtime and sdk has two difference versioning schemes, but share the same build process, the actual packaging of artifacts from `dotnetx-build` is done by `dotnetx-sdk` and `dotnetx-runtime`.

I encourage anyone to study the APKBUILD file, which reads very much like a shell script. I have made sure to leave ample comments and documentation for those interested in porting to other package managers.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (21 preceding siblings ...)
  2022-02-27  1:16 ` ayakael
@ 2022-02-27  1:17 ` ayakael
  2022-02-27  1:17 ` ayakael
                   ` (27 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-02-27  1:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2232 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1052897888

Comment:
> > I'm the package maintainer for Alpine's dotnet packaging project. If anyone should want some advice or some notes, feel free to mention me in whatever space that you're working in. I wouldn't wish working on this from scratch for anyone - source-build has a lot of moving parts, which makes it a major PITA. For anything I work on, I like to document my problems as much as possible for future use. Thus, there's a devlog on Alpine's package MR dotnet31 / 5 and 6 available below. It goes in more nuts and bolts of packaging for Alpine, while the Github threads are more dotnet specific.
> > 31: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28197 5: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28195 6: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29253
> 
> > # How to build dotnet6 stack
> > 
> > * Build testing/dotnet6-stage0 (provides prebuilt bits for first bootstrap bld)
> 
> Is it not possible to build completely from source? Are these prebuilts available for crossbuild and musl?

It is possible to build dotnet entirely from source, but as dotnet builds upon itsel, you need a bootstrap dotnet compiler. Microsoft provides `linux-musl` prebuilts for `armv7`, `aarch64`, `x86_64` which `dotnetx-stage0` fetches and packages. As it is policy for Alpine Linux to not allow binaries immediately built by prebuilt binaries, `dotnetx-bootstrap` sources `dotnetx-stage0` to build an Alpine version of a bootstrap SDK. `dotnetx-bootstrap` is then sourced by `dotnetx-build`, which builds the bits that are going to be packaged for availability to end-user. As Alpine does not support versioning for subpackages, and as runtime and sdk has two difference versioning schemes, but share the same build process, the actual packaging of artifacts from `dotnetx-build` is done by `dotnetx-sdk` and `dotnetx-runtime`.

I encourage anyone to study the APKBUILD file, which reads very much like a shell script. I have made sure to leave ample comments and documentation for those interested in porting to other package managers.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (22 preceding siblings ...)
  2022-02-27  1:17 ` ayakael
@ 2022-02-27  1:17 ` ayakael
  2022-02-27  1:18 ` ayakael
                   ` (26 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-02-27  1:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2232 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1052897888

Comment:
> > I'm the package maintainer for Alpine's dotnet packaging project. If anyone should want some advice or some notes, feel free to mention me in whatever space that you're working in. I wouldn't wish working on this from scratch for anyone - source-build has a lot of moving parts, which makes it a major PITA. For anything I work on, I like to document my problems as much as possible for future use. Thus, there's a devlog on Alpine's package MR dotnet31 / 5 and 6 available below. It goes in more nuts and bolts of packaging for Alpine, while the Github threads are more dotnet specific.
> > 31: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28197 5: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28195 6: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29253
> 
> > # How to build dotnet6 stack
> > 
> > * Build testing/dotnet6-stage0 (provides prebuilt bits for first bootstrap bld)
> 
> Is it not possible to build completely from source? Are these prebuilts available for crossbuild and musl?

It is possible to build dotnet entirely from source, but as dotnet builds upon itsel, you need a bootstrap dotnet compiler. Microsoft provides `linux-musl` prebuilts for `armv7`, `aarch64`, `x86_64` which `dotnetx-stage0` fetches and packages. As it is policy for Alpine Linux to not allow binaries immediately built by prebuilt binaries, `dotnetx-bootstrap` sources `dotnetx-stage0` to build an Alpine version of a bootstrap SDK. `dotnetx-bootstrap` is then sourced by `dotnetx-build`, which builds the bits that are going to be packaged for availability to end-user. As Alpine does not support versioning for subpackages, and as runtime and sdk have two different versioning schemes, but share the same build process, the actual packaging of artifacts from `dotnetx-build` is done by `dotnetx-sdk` and `dotnetx-runtime`.

I encourage anyone to study the APKBUILD file, which reads very much like a shell script. I have made sure to leave ample comments and documentation for those interested in porting to other package managers.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (23 preceding siblings ...)
  2022-02-27  1:17 ` ayakael
@ 2022-02-27  1:18 ` ayakael
  2022-02-27  1:29 ` ayakael
                   ` (25 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-02-27  1:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1052897888

Comment:
> > I'm the package maintainer for Alpine's dotnet packaging project. If anyone should want some advice or some notes, feel free to mention me in whatever space that you're working in. I wouldn't wish working on this from scratch for anyone - source-build has a lot of moving parts, which makes it a major PITA. For anything I work on, I like to document my problems as much as possible for future use. Thus, there's a devlog on Alpine's package MR dotnet31 / 5 and 6 available below. It goes in more nuts and bolts of packaging for Alpine, while the Github threads are more dotnet specific.
> > 31: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28197 5: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/28195 6: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29253
> 
> > # How to build dotnet6 stack
> > 
> > * Build testing/dotnet6-stage0 (provides prebuilt bits for first bootstrap bld)
> 
> Is it not possible to build completely from source? Are these prebuilts available for crossbuild and musl?

It is possible to build dotnet entirely from source, but as dotnet builds upon itsel, you need a bootstrap dotnet compiler. Microsoft provides `linux-musl` prebuilts for `armv7`, `aarch64`, `x86_64` which `dotnetx-stage0` fetches and packages. As it is policy for Alpine Linux to not allow binaries immediately built by prebuilt binaries, `dotnetx-bootstrap` sources `dotnetx-stage0` to build an Alpine version of a bootstrap SDK. `dotnetx-bootstrap` is then sourced by `dotnetx-build`, which builds the bits that are going to be packaged for availability to end-user. As Alpine does not support versioning for subpackages, and as runtime and sdk have two different versioning schemes, but share the same build process, the actual packaging of artifacts from `dotnetx-build` is done by `dotnetx-sdk` and `dotnetx-runtime`.

I encourage anyone to study the `APKBUILD` file, which reads very much like a shell script. I have made sure to leave ample comments and documentation for those interested in porting to other package managers.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (24 preceding siblings ...)
  2022-02-27  1:18 ` ayakael
@ 2022-02-27  1:29 ` ayakael
  2022-02-27  1:29 ` ayakael
                   ` (24 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-02-27  1:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1052911062

Comment:
The most important one is `testing/dotnet6-build/APKBUILD` as that shows the necessary steps to build with `linux-musl`. All patches include comments on why they are necessary, what errors they fix, etc. For packaging guidelines, I highly recommend following [this page](https://docs.microsoft.com/en-us/dotnet/core/distribution-packaging). Of note, dotnet needs two things to build from scratch: a prebuilt dotnet SDK, and source-built nupkgs which are provided by `Private.SourceBuild.Artifacts.tar.gz` which contains arch-agnostic bits and `linux-x64` bits. As linux-musl-{x86_64,aarch64,armv7) is targetted on Alpine, `dotnetx-stage0` goes beyond packaging the SDK and prebuilt artifacts: it also replaces all `linux-x64` nupkgs with `linux-musl-$arch` nupkgs.

I highly recommend ya'll open up an issue at `dotnet/installer`. The developpers there have been of great help.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (25 preceding siblings ...)
  2022-02-27  1:29 ` ayakael
@ 2022-02-27  1:29 ` ayakael
  2022-02-27  1:32 ` ayakael
                   ` (23 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-02-27  1:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1052911062

Comment:
The most important one is `testing/dotnet6-build/APKBUILD` as that shows the necessary steps to build with `linux-musl`. All patches include comments on why they are necessary, what errors they fix, etc. For packaging guidelines, I highly recommend following [this page](https://docs.microsoft.com/en-us/dotnet/core/distribution-packaging). Of note, dotnet needs two things to build from scratch: a prebuilt dotnet SDK, and source-built nupkgs which are provided by `Private.SourceBuild.Artifacts.tar.gz` which contains arch-agnostic bits and `linux-x64` bits. As `linux-musl-{x86_64,aarch64,armv7}` is targetted on Alpine, `dotnetx-stage0` goes beyond packaging the SDK and prebuilt artifacts: it also replaces all `linux-x64` nupkgs with `linux-musl-$arch` nupkgs.

I highly recommend ya'll open up an issue at `dotnet/installer`. The developpers there have been of great help.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (26 preceding siblings ...)
  2022-02-27  1:29 ` ayakael
@ 2022-02-27  1:32 ` ayakael
  2022-03-01 20:02 ` MichaelSimons
                   ` (22 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-02-27  1:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1052911062

Comment:
The most important one is `testing/dotnet6-build/APKBUILD` as that shows the necessary steps to build with `linux-musl`. All patches include comments on why they are necessary, what errors they fix, etc. For packaging guidelines, I highly recommend following [this page](https://docs.microsoft.com/en-us/dotnet/core/distribution-packaging). Of note, dotnet needs two things to build from scratch: a prebuilt dotnet SDK, and source-built nupkgs which are provided by `Private.SourceBuild.Artifacts.tar.gz` which contains arch-agnostic bits and `linux-x64` bits. As `linux-musl-{x86_64,aarch64,armv7}` is targetted on Alpine, `dotnetx-stage0` goes beyond packaging the SDK and prebuilt artifacts: it also replaces all `linux-x64` nupkgs with `linux-musl-$arch` nupkgs. (edit: dotnet also builds its own `Private.SourceBuild.Artifacts.tar.gz`, thus the Microsoft versions are only used by `dotnetx-bootstrap`)

I highly recommend ya'll open up an issue at `dotnet/installer`. The developpers there have been of great help.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (27 preceding siblings ...)
  2022-02-27  1:32 ` ayakael
@ 2022-03-01 20:02 ` MichaelSimons
  2022-09-27 23:35 ` mjeveritt
                   ` (21 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: MichaelSimons @ 2022-03-01 20:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 476 bytes --]

New comment by TinfoilSubmarine on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1044954951

Comment:
Closing as I no longer have a use for this. I did recently push a working dotnet6 template which is available here if anyone wants to take another shot at this. It is likely very difficult; [the work going on to get this packaged for Alpine](dotnet/source-build#2782) should give some appreciation for the difficulty of this.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (28 preceding siblings ...)
  2022-03-01 20:02 ` MichaelSimons
@ 2022-09-27 23:35 ` mjeveritt
  2022-09-29  2:54 ` astralchan
                   ` (20 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: mjeveritt @ 2022-09-27 23:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 341 bytes --]

New comment by mjeveritt on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1260181669

Comment:
Any chance of revisiting this? It would be kinda cool to get back to #27787 also .. 

I don't think I can handle the dotnet package as a void newbie, but I can probably get the Pinta one going ..

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (29 preceding siblings ...)
  2022-09-27 23:35 ` mjeveritt
@ 2022-09-29  2:54 ` astralchan
  2022-09-29  3:05 ` mjeveritt
                   ` (19 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: astralchan @ 2022-09-29  2:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

New comment by astralchan on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1261676260

Comment:
> Any chance of revisiting this? It would be kinda cool to get back to #27787 also ..
> 
> I don't think I can handle the dotnet package as a void newbie, but I can probably get the Pinta one going ..

That PR is abandoned. Feel free to pick it up, but I am no longer interested in maintaining a pinta package. For the sake of the tracker, consider that PR abandoned.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (30 preceding siblings ...)
  2022-09-29  2:54 ` astralchan
@ 2022-09-29  3:05 ` mjeveritt
  2022-09-29  3:18 ` ayakael
                   ` (18 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: mjeveritt @ 2022-09-29  3:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

New comment by mjeveritt on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1261688865

Comment:
> > Any chance of revisiting this? It would be kinda cool to get back to #27787 also ..
> > I don't think I can handle the dotnet package as a void newbie, but I can probably get the Pinta one going ..
> 
> That PR is abandoned. Feel free to pick it up, but I am no longer interested in maintaining a pinta package. For the sake of the tracker, consider that PR abandoned.

WFM .. at this point, stalled on the dotnet, as here .. afaict it's never moved forward .. the pinta section I Suspect I can handle .. not like we're dealing with, like, electron here .. *chuckle*

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (31 preceding siblings ...)
  2022-09-29  3:05 ` mjeveritt
@ 2022-09-29  3:18 ` ayakael
  2022-11-01 23:59 ` rmboggs
                   ` (17 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-09-29  3:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1261696163

Comment:
Of note, first release candidate of dotnet7 on Alpine Linux is implemented here: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/39122

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (32 preceding siblings ...)
  2022-09-29  3:18 ` ayakael
@ 2022-11-01 23:59 ` rmboggs
  2022-11-02  0:31 ` ayakael
                   ` (16 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2022-11-01 23:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1299372063

Comment:
No promises but I'll **_try_** to pick this up again in a couple of weeks when I get back home.  IIRC, the main hurdle right now is getting to to build/run on musl.  I'll setup a musl machine when I get back home now that they have new images to use.

I know that dotnet 7.0 will probably be released by that time so there will be more work to do on this but there is already a good starting point so hopefully it won't be too bad to get it up to speed.  And hopefully, we can get someone to fully approve it this time. ;)

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (33 preceding siblings ...)
  2022-11-01 23:59 ` rmboggs
@ 2022-11-02  0:31 ` ayakael
  2022-11-02  0:45 ` ayakael
                   ` (15 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-11-02  0:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1299392838

Comment:
> hurdle

I'm in the processus of getting a bunch of patches for `dotnet6` and `dotnet7` pushed to upstream, so hopefully by 6.0.111 the processus will be easier for ya'll. We just got `dotnet6` on `s390x` working, although they are still some hurdles.

You can follow the state of backporting in https://github.com/dotnet/source-build/issues/3087. 

The difference between `dotnet6` and `dotnet7` in terms of build procedure isn't big, so going from one to the next shouldn't take much work.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (34 preceding siblings ...)
  2022-11-02  0:31 ` ayakael
@ 2022-11-02  0:45 ` ayakael
  2022-11-02  1:14 ` mjeveritt
                   ` (14 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-11-02  0:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1299401645

Comment:
A few changes since February:
* redid `dotnet6-stage0` as to allow crossbuild to new platforms, and now it only builds the minimum components to build dotnet, acting as a shim between Microsoft provided builds and Alpine Linux. 
This is especially relevant for linux-musl nupkgs, as they are not included in `Private.SourceBuild.Artifacts.tar.gz`. `stage0` thus takes the already prebuilt `linux-musl` SDKs, builds the musl specific nupkgs while rebuilding the SDK for use by `dotnet6-build`.
* Removed custom functions on `dotnet6-build` as to simplify the process. Most relevant to ya'll: all patches are now rebased to the tarball. It should be copy paste for ya'll.

Good luck! For `dotnet7` we were to target release with Alpine 3.17, but there's so little time between release of 3.17 and 7 that I think I'll target 3.18. The final package should come a bit later, as `s390x` and `ppc64le` are both platforms that are still a bit broken for `dotnet7`.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (35 preceding siblings ...)
  2022-11-02  0:45 ` ayakael
@ 2022-11-02  1:14 ` mjeveritt
  2022-11-02  1:57 ` ayakael
                   ` (13 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: mjeveritt @ 2022-11-02  1:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

New comment by mjeveritt on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1299419377

Comment:
&lt;snip&gt;

> Good luck! For `dotnet7` we were to target release with Alpine 3.17, but there's so little time between release of 3.17 and 7 that I think I'll target 3.18. The final package should come a bit later, as `s390x` and `ppc64le` are both platforms that are still a bit broken for `dotnet7`.

That all sounds very promising .. getting cross-platform code going is good for portability, making cross-libc coding that much easier to complete!

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (36 preceding siblings ...)
  2022-11-02  1:14 ` mjeveritt
@ 2022-11-02  1:57 ` ayakael
  2022-11-26 17:24 ` rmboggs
                   ` (12 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-11-02  1:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1299452435

Comment:
> ###

Check out [this](https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/dotnet6-stage0/APKBUILD) then. Since dotnet is actually an ecosytem of components packaged together, to figure out crosscompilation it was necessary to identify the core-components to build. Our `stage0` package thus builds the following components:

* runtime (this is where the actual crosscompilation happens, as clang builds the c# runtime)
* roslyn (we then build roslyn compilers using the current bootstrap sdk. As it's all c# code, the corssbuilt sdk will be able to run the code)
* sdk (takes runtime, roslyn, and downloads prebuilt c# code and packages initial SDK code)
* aspnetcore (using roslyn, and other downloadable prebuilt c# code, packages aspnetcore runtime)
* installer (using runtime, sdk, and aspnetcore artifacts, packages an SDK tarball similar to what upstream provides)

The idea is that we just need to feed the tarball SDK to `stage0` on the target platform, and it'll build from scratch and package in a .apk file the necessary bootstrap artifacts for use by `dotnet6-build`. 

`dotnet6-build` can then take those packaged artifacts, feeds them into source-build, and builds the whole stack properly so that no upstream prebuilts are used. Now that `dotnet6-build` is built, future builds will use `build` rather than `stage0` to build itself.

I don't know how void does its crossbuilding. Alpine crossbuilds via sysroots so our `stage0` is built around that.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (37 preceding siblings ...)
  2022-11-02  1:57 ` ayakael
@ 2022-11-26 17:24 ` rmboggs
  2022-11-26 18:29 ` jcgruenhage
                   ` (11 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2022-11-26 17:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1328084006

Comment:
So, update.  With a little fine tuning, I was able to get dotnet 7 installed on my current Void setup and it is currently working as expected with the limited testing I was able to do.  I want to do more testing before I start working on the musl side, then submit it to this repo.

I do have a small concern with this.  I noticed that when it installs, it only installs the version 7 targeting pack.  I am unable to build projects that target dotnet 6.  Since 7 just came out, most, if not all, projects will need to be adjusted and tested to run on 7 before running.  Based on this, I'm wondering if 6 still needs to be included.  If so, what's the best way to approach this?

Lastly, should we take this conversation somewhere else, like Discord or someplace?  Feels kinda weird to report progress on a closed pull request.

Thoughts?

Thanks,
Ryan

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (38 preceding siblings ...)
  2022-11-26 17:24 ` rmboggs
@ 2022-11-26 18:29 ` jcgruenhage
  2022-11-26 18:59 ` rmboggs
                   ` (10 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: jcgruenhage @ 2022-11-26 18:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 586 bytes --]

New comment by jcgruenhage on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1328093630

Comment:
You could open a new pull request and report progress there if that's better? Would have the benefit that you can push your changes there so people can give feedback on that early.

As for a chat: Void uses IRC for chat. Topics around packaging stuff is handled in the #xbps channel on libera.chat. If you're looking to access that in a way that's more similar to Discord, I'd recommend using Matrix: https://matrix.to/#/#xbps:libera.chat

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (39 preceding siblings ...)
  2022-11-26 18:29 ` jcgruenhage
@ 2022-11-26 18:59 ` rmboggs
  2022-11-26 19:52 ` ayakael
                   ` (9 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2022-11-26 18:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1328097733

Comment:
> You could open a new pull request and report progress there if that's better? Would have the benefit that you can push your changes there so people can give feedback on that early.
> 
That's what I was planning on doing since it's a new version.  I was more worried about the discussions around it.

> As for a chat: Void uses IRC for chat. Topics around packaging stuff is handled in the #xbps channel on libera.chat. If you're looking to access that in a way that's more similar to Discord, I'd recommend using Matrix: https://matrix.to/#/#xbps:libera.chat
 
Ok, I'll check out matrix first.  If I don't like it, I'll check the IRC.

Thanks,
Ryan

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (40 preceding siblings ...)
  2022-11-26 18:59 ` rmboggs
@ 2022-11-26 19:52 ` ayakael
  2022-11-26 19:53 ` ayakael
                   ` (8 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-11-26 19:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 300 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1328104444

Comment:
FWIW, Alpine ships both .NET 6 and .NET 7 until either are EOL because of this very reason. .NET 6 being an LTS, many projects wont update till .NET 8 is out.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (41 preceding siblings ...)
  2022-11-26 19:52 ` ayakael
@ 2022-11-26 19:53 ` ayakael
  2022-11-26 20:06 ` rmboggs
                   ` (7 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-11-26 19:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1328104444

Comment:
FWIW, Alpine ships both .NET 6 and .NET 7 until either are EOL for this very reason. .NET 6 being an LTS, many projects wont update till .NET 8 is out.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (42 preceding siblings ...)
  2022-11-26 19:53 ` ayakael
@ 2022-11-26 20:06 ` rmboggs
  2022-11-26 20:10 ` ayakael
                   ` (6 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2022-11-26 20:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1328106114

Comment:
> FWIW, Alpine ships both .NET 6 and .NET 7 until either are EOL for this very reason. .NET 6 being an LTS, many projects wont update till .NET 8 is out.

Yeah, I am thinking that should be the way to go.  I just don't know the best approach for this.  Should I just make separate packages for each version (ex: dotnet6, dotnet7, etc)? Should i just make a regular and lts packages?  Thoughts?

Thanks,
Ryan

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (43 preceding siblings ...)
  2022-11-26 20:06 ` rmboggs
@ 2022-11-26 20:10 ` ayakael
  2022-11-28 17:14 ` ayakael
                   ` (5 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-11-26 20:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1328106649

Comment:
> > FWIW, Alpine ships both .NET 6 and .NET 7 until either are EOL for this very reason. .NET 6 being an LTS, many projects wont update till .NET 8 is out.
> 
> Yeah, I am thinking that should be the way to go. I just don't know the best approach for this. Should I just make separate packages for each version (ex: dotnet6, dotnet7, etc)? Should i just make a regular and lts packages? Thoughts?
> 
> Thanks, Ryan

We do the former (i.e. dotnet6, dotnet7). Indeed, they are times when 3 versions are supported once (like right now with .NET3.1 .NET 6 and .NET 7). As NET is designed to allow multiple versions to be installed at once, it's the right way to go. The [distribution guidelines](https://learn.microsoft.com/en-us/dotnet/core/distribution-packaging) have been especially useful to us, although rather than name ours dotnet-sdk-6.0 we went for dotnet6-sdk.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (44 preceding siblings ...)
  2022-11-26 20:10 ` ayakael
@ 2022-11-28 17:14 ` ayakael
  2022-11-28 18:26 ` JamiKettunen
                   ` (4 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: ayakael @ 2022-11-28 17:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

New comment by ayakael on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1329458130

Comment:
@rmboggs Where are y'all moving the conversation? My changes sometimes only check for Alpine, so if y'all hit issues, they are likely issues that I've already fixed but not for void. Also, how do y'all differentiate musl and non-musl void? Does the RID change? I can imagine that being problematic.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (45 preceding siblings ...)
  2022-11-28 17:14 ` ayakael
@ 2022-11-28 18:26 ` JamiKettunen
  2022-11-28 19:51 ` rmboggs
                   ` (3 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: JamiKettunen @ 2022-11-28 18:26 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

New comment by JamiKettunen on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1329551521

Comment:
> Also, how do y'all differentiate musl and non-musl void? Does the RID change? I can imagine that being problematic.

@ayakael [`XBPS_TARGET_LIBC` global variable](https://github.com/void-linux/void-packages/blob/master/Manual.md#global-variables) can be used in the build templates (there's also `XBPS_LIBC` for the host one), sometimes also `XBPS_TARGET_MACHINE` (or `XBPS_MACHINE`) are used which can have a `-musl` suffix or none for `glibc`.

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (46 preceding siblings ...)
  2022-11-28 18:26 ` JamiKettunen
@ 2022-11-28 19:51 ` rmboggs
  2022-11-28 19:53 ` rmboggs
                   ` (2 subsequent siblings)
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2022-11-28 19:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 488 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1329669287

Comment:
@ayakael ,
I haven't moved the convo over yet because I still need to do some things first (such as re organizing the package names, testing musl, etc.).

Speaking of which, if I need to add musl specific patches to the packages, what it the best way to do that?  Are there flags or special names to use for the patch files?  Please let ne know. 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (47 preceding siblings ...)
  2022-11-28 19:51 ` rmboggs
@ 2022-11-28 19:53 ` rmboggs
  2022-12-03 19:41 ` rmboggs
  2022-12-09  7:30 ` rmboggs
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2022-11-28 19:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 488 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1329669287

Comment:
@ayakael ,
I haven't moved the convo over yet because I still need to do some things first (such as re organizing the package names, testing musl, etc.).

Speaking of which, if I need to add musl specific patches to the packages, what it the best way to do that?  Are there flags or special names to use for the patch files?  Please let me know. 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (48 preceding siblings ...)
  2022-11-28 19:53 ` rmboggs
@ 2022-12-03 19:41 ` rmboggs
  2022-12-09  7:30 ` rmboggs
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2022-12-03 19:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1336245396

Comment:
For those interested, I opened a new [issue here](https://github.com/void-dotnet/void-packages/issues/1) to continue this conversation.  I'm still fine-tuning dotnet7 and begun updating the dotnet6 template (originally started by @TinfoilSubmarine) so it references the latest version of the 6.0 branch. 

^ permalink raw reply	[flat|nested] 52+ messages in thread

* Re: [WIP] New package: dotnet-6.0.100
  2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
                   ` (49 preceding siblings ...)
  2022-12-03 19:41 ` rmboggs
@ 2022-12-09  7:30 ` rmboggs
  50 siblings, 0 replies; 52+ messages in thread
From: rmboggs @ 2022-12-09  7:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/32974#issuecomment-1343952833

Comment:
Dotnet 6: [Repo](https://github.com/void-dotnet/void-packages/tree/dotnet-work-NOMERGE/srcpkgs/dotnet6)
Dotnet 7: [Repo](https://github.com/void-dotnet/void-packages/tree/dotnet-work-NOMERGE/srcpkgs/dotnet7)
Continued [discussion here](https://github.com/void-dotnet/void-packages/issues/1), for those who want toe help out with this.

^ permalink raw reply	[flat|nested] 52+ messages in thread

end of thread, other threads:[~2022-12-09  7:30 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 17:54 [PR PATCH] New package: dotnet-5.0.206.1 TinfoilSubmarine
2021-09-15 18:35 ` rmboggs
2021-09-15 21:48 ` TinfoilSubmarine
2021-09-15 21:50 ` TinfoilSubmarine
2021-09-16 13:20 ` TinfoilSubmarine
2021-09-16 15:51 ` TinfoilSubmarine
2021-09-16 17:53 ` Anachron
2021-09-16 18:04 ` TinfoilSubmarine
2021-09-16 18:45 ` rmboggs
2021-09-16 21:49 ` [PR PATCH] [Updated] " TinfoilSubmarine
2021-09-16 21:51 ` TinfoilSubmarine
2021-09-20 12:18 ` TinfoilSubmarine
2021-09-21 13:25 ` rmboggs
2021-10-09 15:43 ` rmboggs
2021-10-09 15:48 ` TinfoilSubmarine
2021-10-19 14:09 ` TinfoilSubmarine
2021-11-16  3:14 ` jcgruenhage
2022-02-10  4:35 ` [PR PATCH] [Updated] " TinfoilSubmarine
2022-02-18 18:15 ` [WIP] New package: dotnet-6.0.100 TinfoilSubmarine
2022-02-18 18:15 ` [PR PATCH] [Closed]: " TinfoilSubmarine
2022-02-19 21:30 ` ayakael
2022-02-27  1:03 ` kawaiiamber
2022-02-27  1:16 ` ayakael
2022-02-27  1:17 ` ayakael
2022-02-27  1:17 ` ayakael
2022-02-27  1:18 ` ayakael
2022-02-27  1:29 ` ayakael
2022-02-27  1:29 ` ayakael
2022-02-27  1:32 ` ayakael
2022-03-01 20:02 ` MichaelSimons
2022-09-27 23:35 ` mjeveritt
2022-09-29  2:54 ` astralchan
2022-09-29  3:05 ` mjeveritt
2022-09-29  3:18 ` ayakael
2022-11-01 23:59 ` rmboggs
2022-11-02  0:31 ` ayakael
2022-11-02  0:45 ` ayakael
2022-11-02  1:14 ` mjeveritt
2022-11-02  1:57 ` ayakael
2022-11-26 17:24 ` rmboggs
2022-11-26 18:29 ` jcgruenhage
2022-11-26 18:59 ` rmboggs
2022-11-26 19:52 ` ayakael
2022-11-26 19:53 ` ayakael
2022-11-26 20:06 ` rmboggs
2022-11-26 20:10 ` ayakael
2022-11-28 17:14 ` ayakael
2022-11-28 18:26 ` JamiKettunen
2022-11-28 19:51 ` rmboggs
2022-11-28 19:53 ` rmboggs
2022-12-03 19:41 ` rmboggs
2022-12-09  7:30 ` rmboggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).