Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: dotnet-sdk-8.0.7.
@ 2024-08-02 12:46 AnInternetTroll
  2024-08-04 18:30 ` rmboggs
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: AnInternetTroll @ 2024-08-02 12:46 UTC (permalink / raw)
  To: ml

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

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

https://github.com/AnInternetTroll/void-packages dotnet
https://github.com/void-linux/void-packages/pull/51606

New package: dotnet-sdk-8.0.7.
[ci skip]
#### Testing the changes
- I tested the changes in this PR: **YES**

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

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)

Inspired by arch linux's package
https://gitlab.archlinux.org/archlinux/packaging/packages/dotnet-core/-/blob/main/PKGBUILD

Missing a couple subpackages, but should be a starting point.

A couple TODOs or stuff that are less than ideal:
- [ ] Downloading happens during do_configure and assets are not cached
- [ ] Only x86_64-glibc is supported, as I couldn't get it to work on
  musl due to some weird error.
- [ ] No test suite


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

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

From 11a87bf38991f00d2c00ae2a5d511cd3292e42cd Mon Sep 17 00:00:00 2001
From: Luca Matei Pintilie <luca@lucamatei.com>
Date: Sat, 3 Feb 2024 13:51:13 +0100
Subject: [PATCH] New package: dotnet-sdk-8.0.7.

---
 srcpkgs/aspnetcore-runtime                    |  1 +
 srcpkgs/dotnet-runtime                        |  1 +
 .../patches/sdk_telemetry-output.patch        | 33 +++++++++
 srcpkgs/dotnet-sdk/template                   | 74 +++++++++++++++++++
 4 files changed, 109 insertions(+)
 create mode 120000 srcpkgs/aspnetcore-runtime
 create mode 120000 srcpkgs/dotnet-runtime
 create mode 100644 srcpkgs/dotnet-sdk/patches/sdk_telemetry-output.patch
 create mode 100644 srcpkgs/dotnet-sdk/template

diff --git a/srcpkgs/aspnetcore-runtime b/srcpkgs/aspnetcore-runtime
new file mode 120000
index 00000000000000..121eb4adae786f
--- /dev/null
+++ b/srcpkgs/aspnetcore-runtime
@@ -0,0 +1 @@
+dotnet-sdk
\ No newline at end of file
diff --git a/srcpkgs/dotnet-runtime b/srcpkgs/dotnet-runtime
new file mode 120000
index 00000000000000..121eb4adae786f
--- /dev/null
+++ b/srcpkgs/dotnet-runtime
@@ -0,0 +1 @@
+dotnet-sdk
\ No newline at end of file
diff --git a/srcpkgs/dotnet-sdk/patches/sdk_telemetry-output.patch b/srcpkgs/dotnet-sdk/patches/sdk_telemetry-output.patch
new file mode 100644
index 00000000000000..864afa4d4ef1b3
--- /dev/null
+++ b/srcpkgs/dotnet-sdk/patches/sdk_telemetry-output.patch
@@ -0,0 +1,33 @@
+From 20472f229151ca848196a1d3276d9685cad662a0 Mon Sep 17 00:00:00 2001
+From: Luca Matei Pintilie <luca@lucamatei.com>
+Date: Thu, 6 Jul 2023 21:02:59 +0200
+Subject: [PATCH] SDK telemetry optout
+
+Disables telemetry by default.
+
+Patch copied from Alpine Linux
+and authored by Antoine Martin <dev@ayakael.net>
+---
+ src/sdk/src/Cli/dotnet/Program.cs | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/sdk/src/Cli/dotnet/Program.cs b/src/sdk/src/Cli/dotnet/Program.cs
+index 32a9f4ccc6..ac3f5fd293 100644
+--- a/src/sdk/src/Cli/dotnet/Program.cs
++++ b/src/sdk/src/Cli/dotnet/Program.cs
+@@ -27,6 +27,12 @@ public class Program
+ 
+         public static int Main(string[] args)
+         {
++            // opt out of telemetry by default if the env var is unset
++            string telemetryValue = Environment.GetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT");
++            if (String.IsNullOrEmpty(telemetryValue))
++            {
++                Environment.SetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
++            }
+             using AutomaticEncodingRestorer _ = new();
+ 
+             // Setting output encoding is not available on those platforms
+-- 
+2.41.0
+
diff --git a/srcpkgs/dotnet-sdk/template b/srcpkgs/dotnet-sdk/template
new file mode 100644
index 00000000000000..c0ab685e18d05d
--- /dev/null
+++ b/srcpkgs/dotnet-sdk/template
@@ -0,0 +1,74 @@
+# Template file for 'dotnet-sdk'
+pkgname=dotnet-sdk
+version=8.0.7
+revision=1
+archs="x86_64"
+hostmakedepends="curl python3 clang cmake tar jq"
+makedepends="llvm18 mit-krb5-devel lttng-ust-devel icu-devel"
+depends="icu-libs"
+short_desc=".NET is the free framework for building apps and powerful services"
+maintainer="Luca Matei Pintilie <luca@lucamatei.com>"
+license="MIT"
+homepage="https://dotnet.microsoft.com/en-us/"
+changelog="https://github.com/dotnet/dotnet/releases/"
+distfiles="https://github.com/dotnet/dotnet/archive/refs/tags/v${version}.tar.gz
+ https://github.com/dotnet/dotnet/releases/download/v${version}/release.json"
+checksum="c190bd7ee6b4ec26681ce4d36118f2e74f6cae8256604bbb6f24b6d42a3df57c
+ 65dbc9c82c7b9fddaa815339173d369aeae7e3b1664daa86184609bb58d0e1e0"
+skip_extraction="release.json"
+
+# Private stuff used throughout below
+_libbase="/usr/lib/dotnet"
+_binbase="/usr/bin/dotnet"
+_rid="x64"
+_releasepath="$XBPS_SRCDISTDIR/$pkgname-$version/release.json"
+
+pre_build() {
+	bash ./prep.sh
+}
+
+do_build() {
+	PATH="/usr/libexec/chroot-git:${PATH}"
+	DOTNET_CLI_TELEMETRY_OPTOUT=1
+	bash ./build.sh \
+		--clean-while-building \
+		--online \
+		--source-repository "$(jq -r .sourceRepository "${_releasepath}")" \
+		--source-version "$(jq -r .sourceVersion "${_releasepath}")"
+}
+
+do_install() {
+	mkdir -p "${DESTDIR}${_libbase}"
+	tar xvf "artifacts/${_rid}/Release/dotnet-sdk-$(jq -r .sdkVersion "${_releasepath}")-void-${_rid}.tar.gz" -C "${DESTDIR}${_libbase}"
+	mkdir -p "${DESTDIR}/usr/bin"
+	ln -s "$_libbase/dotnet" "$DESTDIR$_binbase"
+	mkdir -p "$DESTDIR/etc/dotnet"
+	echo "$_libbase" > "$DESTDIR/etc/dotnet/install_location"
+}
+
+post_install() {
+	vlicense "LICENSE.TXT"
+	vlicense "THIRD-PARTY-NOTICES.txt"
+}
+
+dotnet-runtime_package() {
+	short_desc+=" - runtime"
+	depends="icu-libs"
+	pkg_install() {
+		mkdir -p "${PKGDESTDIR}${_libbase}"
+		tar xvf "artifacts/${_rid}/Release/dotnet-runtime-${version}-void-${_rid}.tar.gz" -C "${PKGDESTDIR}${_libbase}"
+		mkdir -p "${PKGDESTDIR}/usr/bin"
+		ln -s "$_libbase/dotnet" "$PKGDESTDIR$_binbase"
+		mkdir -p "$PKGDESTDIR/etc/dotnet"
+		echo "$_libbase" > "$PKGDESTDIR/etc/dotnet/install_location"
+	}
+}
+
+aspnetcore-runtime_package() {
+	short_desc+=" - aspnetcore-runtime"
+	depends="dotnet-runtime>=${version}_${revision}"
+	pkg_install() {
+		mkdir -p "${PKGDESTDIR}${_libbase}"
+		tar xvf "artifacts/${_rid}/Release/aspnetcore-runtime-${version}-void-${_rid}.tar.gz" -C "${PKGDESTDIR}${_libbase}"
+	}
+}

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

* Re: New package: dotnet-sdk-8.0.7.
  2024-08-02 12:46 [PR PATCH] New package: dotnet-sdk-8.0.7 AnInternetTroll
@ 2024-08-04 18:30 ` rmboggs
  2024-08-04 18:49 ` AnInternetTroll
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rmboggs @ 2024-08-04 18:30 UTC (permalink / raw)
  To: ml

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

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/51606#issuecomment-2267630153

Comment:
Here is work we did last year for dotnet6 and dotnet7.  This may help you get dotnet 8 farther than we did.  
https://github.com/void-dotnet/staging/tree/main/srcpkgs

I was going to try to pick this up when I got a new machine setup but looks like you beat me to it.  Not a bad thing. ;)  Let me see if I can test it when I have everything in place on my new machine.  Please let me know if you need more help with this.

Thanks,
Ryan

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

* Re: New package: dotnet-sdk-8.0.7.
  2024-08-02 12:46 [PR PATCH] New package: dotnet-sdk-8.0.7 AnInternetTroll
  2024-08-04 18:30 ` rmboggs
@ 2024-08-04 18:49 ` AnInternetTroll
  2024-08-04 20:56 ` rmboggs
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: AnInternetTroll @ 2024-08-04 18:49 UTC (permalink / raw)
  To: ml

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

New comment by AnInternetTroll on void-packages repository

https://github.com/void-linux/void-packages/pull/51606#issuecomment-2267634388

Comment:
Thanks Ryan, that looks awesome, and you caught some really important parts which I absolutely missed. In particular from a quick look

- [ ] Man pages
- [ ] vcompletion
- [ ] profile.d
- [ ] Many subpackages

It certainly looks like we can learn a lot from that earlier attempt and build upon it here!

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

* Re: New package: dotnet-sdk-8.0.7.
  2024-08-02 12:46 [PR PATCH] New package: dotnet-sdk-8.0.7 AnInternetTroll
  2024-08-04 18:30 ` rmboggs
  2024-08-04 18:49 ` AnInternetTroll
@ 2024-08-04 20:56 ` rmboggs
  2024-08-04 20:58 ` rmboggs
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rmboggs @ 2024-08-04 20:56 UTC (permalink / raw)
  To: ml

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

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/51606#issuecomment-2267666075

Comment:
> Thanks Ryan, that looks awesome, and you caught some really important parts which I absolutely missed. In particular from a quick look

Np, it was a group effort from multiple people.  You can see in the issues section in the void-packages repo of that organization. 
> 
> - [ ] Man pages
> - [ ] vcompletion
> - [ ] profile.d
> - [ ] Many subpackages
> 
> It certainly looks like we can learn a lot from that earlier attempt and build upon it here!

The original plan was to have a package per major version and the older versions depend on the newest dotnet host.  You can see the idea between dotnet6 and dotnet7 templates. 

If you want, I can add you to that org if you think it will help.  Let me know if you have any questions. 


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

* Re: New package: dotnet-sdk-8.0.7.
  2024-08-02 12:46 [PR PATCH] New package: dotnet-sdk-8.0.7 AnInternetTroll
                   ` (2 preceding siblings ...)
  2024-08-04 20:56 ` rmboggs
@ 2024-08-04 20:58 ` rmboggs
  2024-08-13 19:39 ` [PR REVIEW] " ahesford
  2024-10-03  0:26 ` raspher
  5 siblings, 0 replies; 7+ messages in thread
From: rmboggs @ 2024-08-04 20:58 UTC (permalink / raw)
  To: ml

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

New comment by rmboggs on void-packages repository

https://github.com/void-linux/void-packages/pull/51606#issuecomment-2267666075

Comment:
> Thanks Ryan, that looks awesome, and you caught some really important parts which I absolutely missed. In particular from a quick look

Np, it was a group effort from multiple people.  You can see in the issues section in the void-packages repo of that organization. 
> 
> - [ ] Man pages
> - [ ] vcompletion
> - [ ] profile.d
> - [ ] Many subpackages
> 
> It certainly looks like we can learn a lot from that earlier attempt and build upon it here!

The original plan was to have a package per major version and the older versions depend on the newest dotnet host.  You can see the idea between dotnet6 and dotnet7 templates. 

If you want, I can add you to that org if you think it will help.  Let me know if you have any questions. 

Btw, what is the musl error you are seeing?


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

* Re: [PR REVIEW] New package: dotnet-sdk-8.0.7.
  2024-08-02 12:46 [PR PATCH] New package: dotnet-sdk-8.0.7 AnInternetTroll
                   ` (3 preceding siblings ...)
  2024-08-04 20:58 ` rmboggs
@ 2024-08-13 19:39 ` ahesford
  2024-10-03  0:26 ` raspher
  5 siblings, 0 replies; 7+ messages in thread
From: ahesford @ 2024-08-13 19:39 UTC (permalink / raw)
  To: ml

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

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/51606#discussion_r1715830881

Comment:
```suggestion
short_desc="Micosoft .NET framework for application development"
```

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

* Re: [PR REVIEW] New package: dotnet-sdk-8.0.7.
  2024-08-02 12:46 [PR PATCH] New package: dotnet-sdk-8.0.7 AnInternetTroll
                   ` (4 preceding siblings ...)
  2024-08-13 19:39 ` [PR REVIEW] " ahesford
@ 2024-10-03  0:26 ` raspher
  5 siblings, 0 replies; 7+ messages in thread
From: raspher @ 2024-10-03  0:26 UTC (permalink / raw)
  To: ml

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

New review comment by raspher on void-packages repository

https://github.com/void-linux/void-packages/pull/51606#discussion_r1785480092

Comment:
.Net framework is completly different story related to only windows. It was released way before .net core.  Now it should be named just `.Net`, cos the two words connected `.Net framework` are a little confusing. 

- https://en.wikipedia.org/wiki/.NET
- https://learn.microsoft.com/en-us/dotnet/core/sdk

Just my 2 cents 🙂 , i can't wait to see this PR beign merged, when it's ready ofc.

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

end of thread, other threads:[~2024-10-03  0:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-02 12:46 [PR PATCH] New package: dotnet-sdk-8.0.7 AnInternetTroll
2024-08-04 18:30 ` rmboggs
2024-08-04 18:49 ` AnInternetTroll
2024-08-04 20:56 ` rmboggs
2024-08-04 20:58 ` rmboggs
2024-08-13 19:39 ` [PR REVIEW] " ahesford
2024-10-03  0:26 ` raspher

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).