Mono new package
v6 cover Mono new package
This patch adds mono and monolite packages.
Changes v5 -> v6:
- Fixed /etc/mono configs files installation
Changes v4 -> v5:
- Defaulting BR2_PACKAGE_MONO_45 now depends on select
- Minor formatting issues
[Thomas:
- Merge mono-managed and mono-native as a single package. The mono-managed stuff is done by the host variant of the mono package, while the mono-native stuff is done as the target variant of the mono package.
- Introduce a BR2_PACKAGE_MONO_ARCH_SUPPORTS blind Config.in option to make sure the IPv6 related comment is not displayed when the architecture being used anyway doesn't support Mono.
- Add a patch to Mono to fix the C library path when uClibc and Musl is used. This is a better approach than the POST_INSTALL_TARGET_HOOKS because this approach can potentially be submitted upstreamed, which ultimately allows to simplify the Buildroot package.
- Depend on a 'monolite' package, and use it instead of letting Mono download Monolite by itself, which circumvents Buildroot's download infrastructure.
mono-managed stuff is done by the host variant of the mono package, while the mono-native stuff is done as the target variant of the mono package.
- Introduce a BR2_PACKAGE_MONO_ARCH_SUPPORTS blind Config.in option to make sure the IPv6 related comment is not displayed when the architecture being used anyway doesn't support Mono.
- Add a patch to Mono to fix the C library path when uClibc and Musl is used. This is a better approach than the POST_INSTALL_TARGET_HOOKS because this approach can potentially be submitted upstreamed, which ultimately allows to simplify the Buildroot package.
- Depend on a 'monolite' package, and use it instead of letting Mono download Monolite by itself, which circumvents Buildroot's download infrastructure.
- Move the installation of Mono libraries to the target Mono package, as a POST_INSTALL_TARGET_HOOKS.]
[Angelo:
- Bump to the latest Mono version 3.10.0
- Add selection for .Net runtime compilation and installation in target.]
Angelo Compagnucci (2):
package/monolite: new package
package/mono: new package
package/Config.in | 1 + package/mono/Config.in | 40 +++++++++++++++ package/mono/mono-001-gc-fix-uclibc.patch | 16 ++++++ package/mono/mono-002-support-uclibc-musl.patch | 25 ++++++++++ package/mono/mono.mk | 65 +++++++++++++++++++++++++ package/monolite/monolite.mk | 17 +++++++ 6 files changed, 164 insertions(+) create mode 100644 package/mono/Config.in create mode 100644 package/mono/mono-001-gc-fix-uclibc.patch create mode 100644 package/mono/mono-002-support-uclibc-musl.patch create mode 100644 package/mono/mono.mk create mode 100644 package/monolite/monolite.mk
Signature · 1 line
2.1.1
PATCH v6 1/2 package/monolite: new package
This patch adds Monolite package. This package is a dependency of Mono package.
--- package/monolite/monolite.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 package/monolite/monolite.mk
package/monolite/monolite.mk new file +17 -0
@@ -0,0 +1,17 @@ +############################################################# +# +# monolite +# +############################################################# + +MONOLITE_VERSION = 111 +MONOLITE_SITE = http://storage.bos.xamarin.com/mono-dist-master/latest/ +MONOLITE_SOURCE = monolite-$(MONOLITE_VERSION)-latest.tar.gz +MONOLITE_LICENSE = Dual license LGPL, commercial + +define HOST_MONOLITE_INSTALL_CMDS + mkdir -p $(HOST_DIR)/usr/lib/monolite + cp $(@D)/* $(HOST_DIR)/usr/lib/monolite +endef + +$(eval $(host-generic-package))
Signature · 1 line
2.1.1
PATCH v6 2/2 package/mono: new package
In reply to Angelo CompagnucciThis patch adds the complete Mono implementation. This patch builds both the native and managed parts.
--- package/Config.in | 1 + package/mono/Config.in | 40 +++++++++++++++ package/mono/mono-001-gc-fix-uclibc.patch | 16 ++++++ package/mono/mono-002-support-uclibc-musl.patch | 25 ++++++++++ package/mono/mono.mk | 65 +++++++++++++++++++++++++ 5 files changed, 147 insertions(+) create mode 100644 package/mono/Config.in create mode 100644 package/mono/mono-001-gc-fix-uclibc.patch create mode 100644 package/mono/mono-002-support-uclibc-musl.patch create mode 100644 package/mono/mono.mk
package/Config.in +1 -0
@@ -437,6 +437,7 @@ menu "Lua libraries/modules" source "package/xavante/Config.in" endmenu endif + source "package/mono/Config.in" source "package/nodejs/Config.in" source "package/perl/Config.in" if BR2_PACKAGE_PERL
package/mono/Config.in new file +40 -0
@@ -0,0 +1,40 @@ +config BR2_PACKAGE_MONO_ARCH_SUPPORTS + bool + default y if (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || \ + BR2_mipsel || BR2_powerpc || BR2_sparc || BR2_x86_64) + +config BR2_PACKAGE_MONO + bool "mono" + depends on BR2_PACKAGE_MONO_ARCH_SUPPORTS + depends on BR2_INET_IPV6 + select BR2_PACKAGE_MONO_45 if !BR2_PACKAGE_MONO_20 && !BR2_PACKAGE_MONO_40 + help + An open source, cross-platform, implementation of C# + and the CLR that is binary compatible with Microsoft.NET. + + http://download.mono-project.com/sources/mono/ + +if BR2_PACKAGE_MONO + +config BR2_PACKAGE_MONO_20 + bool "2.0/3.5 .Net Runtime" + help + This option enables the installation of the 2.0/3.5 version + of the Mono .Net runtime to the target + +config BR2_PACKAGE_MONO_40 + bool "4.0 .Net Runtime" + help + This option enables the installation of the 4.0 version + of the Mono .Net runtime to the target + +config BR2_PACKAGE_MONO_45 + bool "4.5 .Net Runtime" + help + This option enables the installation of the 4.5 version + of the Mono .Net runtime to the target + +endif + +comment "mono needs a toolchain w/ IPv6" + depends on !BR2_INET_IPV6
package/mono/mono-001-gc-fix-uclibc.patch new file +16 -0
@@ -0,0 +1,16 @@ +Disable backtrace on not supported uclibc. + +Signed-off-by: Angelo Compagnucci <[email protected]> + +diff -purN mono-native-3.8.0.orig/libgc/include/gc.h mono-native-3.8.0/libgc/include/gc.h +--- mono-native-3.8.0.orig/libgc/include/gc.h 2014-10-07 15:00:21.259466731 +0200 ++++ mono-native-3.8.0/libgc/include/gc.h 2014-10-07 15:05:25.560975681 +0200 +@@ -500,7 +500,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_of + #ifdef __linux__ + # include <features.h> + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif
package/mono/mono-002-support-uclibc-musl.patch new file +25 -0
@@ -0,0 +1,25 @@ +Adjust libc.so path depending on C library being used + +By default, on Linux systems, Mono assumes that the C library is +libc.so.6. While this is true for glibc, it is not true for uClibc and +Musl based systems. This patch adds support for such systems. + +Signed-off-by: Thomas Petazzoni <[email protected]> + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2973,6 +2973,12 @@ + SQLITE="libsqlite.so" + SQLITE3="libsqlite3.so" + ;; ++ *-*-*uclibc*) ++ LIBC="libc.so.0" ++ ;; ++ *-*-*musl*) ++ LIBC="libc.so" ++ ;; + *-*-*linux*) + AC_PATH_X + dlsearch_path=`(libtool --config ; echo eval echo \\$sys_lib_dlsearch_path_spec) | sh`
package/mono/mono.mk new file +65 -0
65 lines not on this page · raw message
Signature · 1 line
2.1.1
v6 cover Mono new package
In reply to Angelo CompagnucciDear Angelo Compagnucci,
Quoted 3 lines · Angelo Compagnucci
Angelo Compagnucci (2):
package/monolite: new package
package/mono: new package
Thanks, both patches applied. On the second patch, there was a missing dependency of host-mono on host-gettext (which you didn't see probably because you have gettext installed on your machine). I also did some improvements to the licensing description, even though some independent review of this (Yann, Luca ?) would be good.
Thanks for getting through the review process for those not-so-trivial packages!
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
v6 cover Mono new package
Dear Thomas, Angelo,
Quoted 8 lines · Thomas Petazzoni
Dear Angelo Compagnucci,
Quoted 3 lines · Angelo Compagnucci
Angelo Compagnucci (2):
package/monolite: new package
package/mono: new package
Quoted 5 lines
Thanks, both patches applied. On the second patch, there was a missing dependency of host-mono on host-gettext (which you didn't see probably because you have gettext installed on your machine). I also did some improvements to the licensing description, even though some independent review of this (Yann, Luca ?) would be good.
I don't use Mono and it's a fairly large package. I just gave it a quick look, and it looks like it has a _very_ complex licensing scheme...
The file LICENSE is there to clarify the licensing. The need to have such a file is itself quite enlightening on how arcane the thing is. And around the middle of the file I got a headache and gave up.
According to their website [1], the tools are released under the GPL (no version specified). But in the tools/ subdirectory there is no mention of GPL, only a BSD license.
Overall, if it were me, and if I were forced to use Mono at all, I'd state:
MONO_LICENSE = A fuzzy mix of LGPL (any version), MIT/X11 and \
others, or commercial
BTW, Angelo, Thomas, where did you get licensing info when writing/committing the package?
[1] http://www.mono-project.com/docs/faq/licensing/
Signature · 1 line
Luca
v6 cover Mono new package
Dear Luca,
Quoted 2 lines
BTW, Angelo, Thomas, where did you get licensing info when writing/committing the package?
Mono is a complex piece of software composed by several components, so the licensing scheme is complex. I'll try to summarize here.
The file COPYING.LIB is quite explicative:
"The Mono runtime is licensed under the terms of the GNU Library General Public License, version 2.
The eglib directory is licensed under the terms of the MIT X11 license and is a drop-in replacement for Mono's use of glib 2.0 (which was LGPL).
The Boehm licensing information is in the libgc directory
The SGen Garbage Collector is under the terms of the MIT X11 license
The class libraries under mono/mcs are unless otherwise stated under the MIT X11 license.
Open source Microsoft code is licensed under the original terms which is either MS-PL for older components, or dual licensed MS-PL/Apache2 licensed."
* The C# compiler is dual-licensed under the MIT/X11 license and the GNU General Public License (GPL).
Every file inside mcs/mcs folder has this preamble "Dual licensed under the terms of the MIT X11 or GNU GPL"
* The tools are released under the terms of the GNU General Public License (GPL).
Not every file has a license in it's preamble, but the most part show a GPL preamble.
* The class libraries are released under the terms of the MIT X11 license.
Every file inside mcs/class show a MIT.X11 preamble
It's complex but it shows some sense!
For the practical point of view of using it, you should comply with the license of the software you ship so the mono runtime and mono class only (LGPL2, MIT)
Hope this clarify!
Sincerely, Angelo.
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo
v6 cover Mono new package
Dear Angelo,
thank you for the follow-up.
Quoted 7 lines · Angelo Compagnucci
Dear Luca,
Quoted 2 lines
BTW, Angelo, Thomas, where did you get licensing info when writing/committing the package?
Mono is a complex piece of software composed by several components, so the licensing scheme is complex. I'll try to summarize here.
Yes, it's very complex. If I were the Mono developer I'd probably split each part in a different package. But this is not a Buildroot issue of course.
Back in topic, I don't use Mono, hence I don't know the meaning of "mcs", "gmcs", "jay", "boehm" etc, which doesn't help.
Quoted 2 lines
The file COPYING.LIB is quite explicative:
Oops, I looked in LICENSE. The fact that there are at least 3 different explanations (website, LICENSE and COPYING.LIB) does not help me either.
Quoted 3 lines
"The Mono runtime is licensed under the terms of the GNU Library General Public License, version 2.
This is coherent with the website, while LICENSE states LGPL, without specifying a version. So LGPLv2 should be correct.
Quoted 5 lines
The eglib directory is licensed under the terms of the MIT X11 license and is a drop-in replacement for Mono's use of glib 2.0 (which was LGPL).
Quoted 7 lines
The Boehm licensing information is in the libgc directory
The SGen Garbage Collector is under the terms of the MIT X11 license
The class libraries under mono/mcs are unless otherwise stated under the MIT X11 license.
So eglib, boehm and the garbage collector are part of the runtime, correct?
Quoted 4 lines
Open source Microsoft code is licensed under the original terms which is either MS-PL for older components, or dual licensed MS-PL/Apache2 licensed."
But we have no mention of MS-PL nor Apache2 in MONO_LICENSE.
Where is the Microsoft code used? In the runtime?
Quoted 4 lines
* The C# compiler is dual-licensed under the MIT/X11 license and the GNU General Public License (GPL).
Quoted 8 lines
Every file inside mcs/mcs folder has this preamble "Dual licensed under the terms of the MIT X11 or GNU GPL"
* The tools are released under the terms of the GNU General Public License (GPL).
Not every file has a license in it's preamble, but the most part show a GPL preamble.
Uh, where are these "tools" located?
In the tools/ subdir I can't find any evidence of a GPL license:
$ git grep -i -C3 licens -- tools/ | grep -i general $
Maybe you refer to another subdir?
Quoted 9 lines
* The class libraries are released under the terms of the MIT X11 license.
Every file inside mcs/class show a MIT.X11 preamble
It's complex but it shows some sense!
For the practical point of view of using it, you should comply with the license of the software you ship so the mono runtime and mono class only (LGPL2, MIT)
That's correct if you ship a target, not if you ship an SDK (which is basically the stuff that is produced by Buildroot in output/host/). If you do, you have host-mono in the SDK and this pulls in GPL and other licenses.
Is my understanding correct?
Quoted 2 lines
Hope this clarify!
Yes, it is less fuzzy now, thanks.
But unfortunately, due to my poor knowledge of the Mono project, I can't build myself a strong opinion on what the correct MONO_LICENSE value should be. But maybe you can further improve the current value starting from my questions above (or clarify that the current value is ok).
Regards,
Signature · 1 line
Luca
v6 cover Mono new package
Hi Luca,
Quoted 2 lines
So eglib, boehm and the garbage collector are part of the runtime, correct?
I've not this understanding of Mono internals, probably they are used to compile mono runtime executable.
Quoted 1 line
Where is the Microsoft code used? In the runtime?
The most part is in the class: part of the libraries you can use in a mono application are based on microsoft code. However this note is probably outdated because it was that way at the beginning, now most (if not all) libraries are written by the mono team or contributed externally under an OSS license.
Quoted 7 lines
Uh, where are these "tools" located?
In thetools/subdir I can't find any evidence of a GPL license:$ git grep -i -C3 licens -- tools/ | grep -i general $Maybe you refer to another subdir?
Most (if not all) files in tool doesn't have a license at all, probably that note was added just to inform you that the tools are GPL also if they haven't a GPL note on their files.
Quoted 6 lines
That's correct if you ship a target, not if you ship an SDK (which is basically the stuff that is produced by Buildroot in output/host/). If you do, you have host-mono in the SDK and this pulls in GPL and other licenses.
Is my understanding correct?
Unfortunately I'm not a lawyer, nor one of the mono core developer, nor a xamarin employee, and I really don't want to express my personal opinion, someone could read this email in future and misunderstanding my point of view.
I think that redistributing something based on a certain number of packages, with or without mono, should be object of a severe license review if your company wants to be safe.
Quoted 4 lines
But unfortunately, due to my poor knowledge of the Mono project, I can't build myself a strong opinion on what the correct
MONO_LICENSEvalue should be. But maybe you can further improve the current value starting from my questions above (or clarify that the current value is ok).
I think that clearly stating all the license files distributed with mono is the only correct way. Again, you should make a license review of your code and what you distribute to be safe.
I don't think that buildroot is useful in any way more than saying you where to look for license files.
Sicerely, Angelo.
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo