package/dotnet-runtime: add dotnet core runtime package
PATCH 1/1 package/dotnet-runtime: add dotnet core runtime package
--- package/Config.in | 1 + package/dotnet-runtime/Config.in | 15 ++++++ package/dotnet-runtime/dotnet-runtime.hash | 5 ++ package/dotnet-runtime/dotnet-runtime.mk | 53 ++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 package/dotnet-runtime/Config.in create mode 100644 package/dotnet-runtime/dotnet-runtime.hash create mode 100644 package/dotnet-runtime/dotnet-runtime.mk
package/Config.in +1 -0
@@ -580,6 +580,7 @@ endmenu menu "Interpreter languages and scripting" source "package/4th/Config.in" + source "package/dotnet-runtime/Config.in" source "package/enscript/Config.in" source "package/erlang/Config.in" if BR2_PACKAGE_ERLANG
package/dotnet-runtime/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +comment "dotnet-runtime needs a toolchain w/ glibc or musl and threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_DOTNET_RUNTIME + bool "dotnet-runtime" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBZLIB + depends on BR2_PACKAGE_OPENSSL + depends on BR2_PACKAGE_LIBCURL + depends on BR2_PACKAGE_ICU + help + .NET Core 3.1 Runtime (v3.1.7) - Linux ARM32 binaries + + https://dotnet.microsoft.com/download/dotnet-core/3.1
package/dotnet-runtime/dotnet-runtime.hash new file +5 -0
@@ -0,0 +1,5 @@ +sha512 a586ed88cebbef298cda04c94e1809017800abea50668e18bcf27c3aa1ca114bb16963bcdcc4fd535288838120cba52966d594ef395bb8fac11693f64c97ccc1 dotnet-runtime-3.1.7-linux-arm.tar.gz +sha512 d5e97a7c3e495ffe03f62415802a5a6f8fc57e9ee86f7730e6752b016747514507fbf79c0e65a815b9d09fb35af05026ca8ea99626535b31703a217559909309 dotnet-runtime-3.1.7-linux-arm64.tar.gz +sha512 6919e87b0e8e2c42349acb1042dba81eaf2fdadd8967f9b78e192676efd883962e3b928c423055cef010bdf1923527817553cd24036303ee2741485fc44fb116 dotnet-runtime-3.1.7-linux-x64.tar.gz +sha512 b982c3f397f40a79b2bbe852083b648dc0c2ee530307127a1b6f5020d32322bd9eecaab9440d729dcaa5c1ce408bf37450411f5a0d83061b2ddc84e4dc043d3c dotnet-runtime-3.1.7-linux-musl-x64.tar.gz +sha512 7ea8b5b953528c35745aa3c53b1fb47f7b19a1c9967d8e00ca73e03a025cbab158fad8eaac917a13e60caa4a1e9fa50c681379d7d8ba52173b0165242d26cc4f dotnet-runtime-3.1.7-linux-musl-arm64.tar.gz
package/dotnet-runtime/dotnet-runtime.mk new file +53 -0
53 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 1/1 package/dotnet-runtime: add dotnet core runtime package
Hi Andrey,
Thank you for the contribution. See some comments below.
Am Mi., 19. Aug. 2020 um 15:06 Uhr schrieb Andrey Nechypurenko <[email protected]>:
Quoted 12 lines
Signed-off-by Andrey Nechypurenko <[email protected]>--- package/Config.in | 1 + package/dotnet-runtime/Config.in | 15 ++++++ package/dotnet-runtime/dotnet-runtime.hash | 5 ++ package/dotnet-runtime/dotnet-runtime.mk | 53 ++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 package/dotnet-runtime/Config.in create mode 100644 package/dotnet-runtime/dotnet-runtime.hash create mode 100644 package/dotnet-runtime/dotnet-runtime.mk
For a new package it is good to add yourself to the DEVELOPERS file
(https://buildroot.org/downloads/manual/manual.html#DEVELOPERS).
Quoted 19 lines
package/Config.in +1
-0@@ -580,6 +580,7 @@ endmenu menu "Interpreter languages and scripting" source "package/4th/Config.in" + source "package/dotnet-runtime/Config.in" source "package/enscript/Config.in" source "package/erlang/Config.in" if BR2_PACKAGE_ERLANGpackage/dotnet-runtime/Config.in new file +1
-0@@ -0,0 +1,15 @@ +comment "dotnet-runtime needs a toolchain w/ glibc or musl and threads"
package/dotnet-runtime/Config.in line 11
Quoted 10 lines
package/dotnet-runtime/Config.in new file +10
-0+ depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_DOTNET_RUNTIME + bool "dotnet-runtime" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBZLIB + depends on BR2_PACKAGE_OPENSSL + depends on BR2_PACKAGE_LIBCURL + depends on BR2_PACKAGE_ICU
Not clear for me if we should select the dependent packages?
package/dotnet-runtime/Config.in line 13
Quoted 2 lines
package/dotnet-runtime/Config.in new file +2
-0+ help + .NET Core 3.1 Runtime (v3.1.7) - Linux ARM32 binaries
Isn't it also x86 and arm64?
package/dotnet-runtime/dotnet-runtime.hash line 5
Quoted 13 lines
package/dotnet-runtime/Config.in new file +2
-0+ + https://dotnet.microsoft.com/download/dotnet-core/3.1package/dotnet-runtime/dotnet-runtime.hash new file +5
-0@@ -0,0 +1,5 @@ +sha512 a586ed88cebbef298cda04c94e1809017800abea50668e18bcf27c3aa1ca114bb16963bcdcc4fd535288838120cba52966d594ef395bb8fac11693f64c97ccc1 dotnet-runtime-3.1.7-linux-arm.tar.gz +sha512 d5e97a7c3e495ffe03f62415802a5a6f8fc57e9ee86f7730e6752b016747514507fbf79c0e65a815b9d09fb35af05026ca8ea99626535b31703a217559909309 dotnet-runtime-3.1.7-linux-arm64.tar.gz +sha512 6919e87b0e8e2c42349acb1042dba81eaf2fdadd8967f9b78e192676efd883962e3b928c423055cef010bdf1923527817553cd24036303ee2741485fc44fb116 dotnet-runtime-3.1.7-linux-x64.tar.gz +sha512 b982c3f397f40a79b2bbe852083b648dc0c2ee530307127a1b6f5020d32322bd9eecaab9440d729dcaa5c1ce408bf37450411f5a0d83061b2ddc84e4dc043d3c dotnet-runtime-3.1.7-linux-musl-x64.tar.gz +sha512 7ea8b5b953528c35745aa3c53b1fb47f7b19a1c9967d8e00ca73e03a025cbab158fad8eaac917a13e60caa4a1e9fa50c681379d7d8ba52173b0165242d26cc4f dotnet-runtime-3.1.7-linux-musl-arm64.tar.gz
If the hash is manually calculated there should be a small comment
like: "# Locally calculated" or if it comes from an external source like published by upstream, please add the url here.
From the documentation
(https://buildroot.org/downloads/manual/manual.html#adding-packages-hash):
"The format of this file is one line for each file for which to check the hash, each line with the following three fields separated by two spaces:"
Quoted 11 lines
package/dotnet-runtime/dotnet-runtime.mk new file +4
-0@@ -0,0 +1,53 @@ +################################################################################ +# +# dotnet-runtime +#
package/dotnet-runtime/dotnet-runtime.mk line 14
Quoted 10 lines
package/dotnet-runtime/dotnet-runtime.mk new file +10
-0+################################################################################ + +DOTNET_RUNTIME_VERSION = 3.1.7 + +# Set download URL and runtime identifier +# See https://docs.microsoft.com/en-us/dotnet/core/rid-catalog +# for the list of supported runtimes +# download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" + +AZURE_FEED = https://dotnetcli.azureedge.net/dotnet
This variable causes the checker to throw a warning:
Signature · 9 lines
utils/check-package package/dotnet-runtime/* package/dotnet-runtime/dotnet-runtime.mk:14: possible typo: AZURE_FEED -> *DOTNET_RUNTIME* 73 lines processed 1 warnings generated -- Do we really need this variable? You can set the DOTNET_RUNTIME_SITE with that value.
Quoted 16 lines
package/dotnet-runtime/dotnet-runtime.mk new file +16
-0+DOTNET_RUNTIME_SITE = $(AZURE_FEED)/Runtime/$(DOTNET_RUNTIME_VERSION) + +ifeq ($(BR2_x86_64),y) +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +DOTNET_RUNTIME_IDENTIFIER = linux-musl-x64 +else +DOTNET_RUNTIME_IDENTIFIER = linux-x64 +endif +else ifeq ($(BR2_arm),y) +DOTNET_RUNTIME_IDENTIFIER = linux-arm +else ifeq ($(BR2_aarch64),y) +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +DOTNET_RUNTIME_IDENTIFIER = linux-musl-arm64 +else +DOTNET_RUNTIME_IDENTIFIER = linux-arm64 +endif
package/dotnet-runtime/dotnet-runtime.mk line 40
Quoted 10 lines
package/dotnet-runtime/dotnet-runtime.mk new file +10
-0+endif + +ifeq ($(DOTNET_RUNTIME_IDENTIFIER),) +$(error "Target platform is not supported by dotnet") +endif + +DOTNET_RUNTIME_SOURCE = dotnet-runtime-$(DOTNET_RUNTIME_VERSION)-$(DOTNET_RUNTIME_IDENTIFIER).tar.gz + +DOTNET_RUNTIME_LICENSE = MIT +DOTNET_RUNTIME_LICENSE_FILES = LICENSE.txt
Please add an entry for that file in the hash file. With this a license change can be detected.
Quoted 14 lines
package/dotnet-runtime/dotnet-runtime.mk new file +13
-1+ +# Runtime could be installed in the global location [/usr/share/dotnet] and +# will be picked up automatically. +# As alternative, it is possible to use the DOTNET_ROOT environment variable +# to specify the runtime location or register the runtime location in +# [/etc/dotnet/install_location] +# This script will install runtime to +# /usr/share/dotnet-runtime-$(DOTNET_RUNTIME_VERSION) +define DOTNET_RUNTIME_INSTALL_TARGET_CMDS + cp -R $(@D) $(TARGET_DIR)/usr/share/ +endef + +$(eval $(generic-package)) --
Quoted 1 line
2.20.1
Thank you
Signature · 1 line
Heiko
PATCH 1/1 package/dotnet-runtime: add dotnet core runtime package
Hello Heiko, hello Andrey,
Quoted 6 lines · On Fri, 4 Sep 2020 09:34:22 +0200 Heiko Thiery <[email protected]> wrote:
Quoted 6 lines
package/dotnet-runtime/Config.in new file +0
-0@@ -0,0 +1,15 @@
Quoted 8 lines
package/dotnet-runtime/Config.in line 8
Quoted 8 lines
package/dotnet-runtime/Config.in new file +8
-0+comment "dotnet-runtime needs a toolchain w/ glibc or musl and threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_DOTNET_RUNTIME + bool "dotnet-runtime" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBZLIB
This should be BR2_PACKAGE_ZLIB, unless you really need the LIBZLIB variant (I don't know if the original zlib and zlib-ng are ABI compatible).
Quoted 5 lines
package/dotnet-runtime/Config.in line 11
Quoted 3 lines
package/dotnet-runtime/Config.in new file +3
-0+ depends on BR2_PACKAGE_OPENSSL + depends on BR2_PACKAGE_LIBCURL + depends on BR2_PACKAGE_ICUNot clear for me if we should select the dependent packages?
Yes, we should. However, I'm trying to understand: the .NET Core runtime is provided binary only. Is it linked against external shared libraries (zlib, openssl, curl, icu) ?
Quoted 4 lines
package/dotnet-runtime/Config.in line 13
Quoted 2 lines
package/dotnet-runtime/Config.in new file +2
-0+ help + .NET Core 3.1 Runtime (v3.1.7) - Linux ARM32 binariesIsn't it also x86 and arm64?
So we should probably have a BR2_PACKAGE_DOTNET_RUNTIME_ARCH_SUPPORTS hidden config boolean, which is used to show the package and its Config.in comment only on supported architectures ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/dotnet-runtime: add dotnet core runtime package
Thank you guys for the comments!
Will work on it next days and provide the new version for review.
Quoted 49 lines · Thomas Petazzoni
Hello Heiko, hello Andrey,
Quoted 6 lines · On Fri, 4 Sep 2020 09:34:22 +0200 Heiko Thiery <[email protected]> wrote:
Quoted 6 lines
package/dotnet-runtime/Config.in new file +0
-0@@ -0,0 +1,15 @@Quoted 8 lines
package/dotnet-runtime/Config.in line 8
Quoted 8 lines
package/dotnet-runtime/Config.in new file +8
-0+comment "dotnet-runtime needs a toolchain w/ glibc or musl and threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC && !BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_DOTNET_RUNTIME + bool "dotnet-runtime" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBZLIBThis should be
BR2_PACKAGE_ZLIB, unless you really need the LIBZLIB variant (I don't know if the original zlib and zlib-ng are ABI compatible).Quoted 5 lines
package/dotnet-runtime/Config.in line 11
Quoted 3 lines
package/dotnet-runtime/Config.in new file +3
-0+ depends on BR2_PACKAGE_OPENSSL + depends on BR2_PACKAGE_LIBCURL + depends on BR2_PACKAGE_ICUNot clear for me if we should select the dependent packages?
Yes, we should. However, I'm trying to understand: the .NET Core runtime is provided binary only. Is it linked against external shared libraries (zlib, openssl, curl, icu) ?
Quoted 4 lines
package/dotnet-runtime/Config.in line 13
Quoted 2 lines
package/dotnet-runtime/Config.in new file +2
-0+ help + .NET Core 3.1 Runtime (v3.1.7) - Linux ARM32 binariesIsn't it also x86 and arm64?
So we should probably have a
BR2_PACKAGE_DOTNET_RUNTIME_ARCH_SUPPORTShidden config boolean, which is used to show the package and its Config.in comment only on supported architectures ?Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com