upgrade to Mono 5.18.1.0

This commit is contained in:
Timotheus Pokorra 2019-03-22 19:51:52 +00:00
parent fb2b71da5d
commit 9aa43bbe66
13 changed files with 1385 additions and 239 deletions

View File

@ -1,42 +0,0 @@
--- a/mcs/class/reference-assemblies/Makefile 2016-06-10 12:08:09.878246486 +0200
+++ b/mcs/class/reference-assemblies/Makefile 2016-06-10 12:08:45.105854097 +0200
@@ -7,23 +7,26 @@
PROFILE_DIR=$(DESTDIR)$(mono_libdir)/mono
install-local:
- $(MKINSTALLDIRS) $(PROFILE_DIR)/2.0-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/3.5-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.0-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api/Facades
- $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v2.0/*.dll $(PROFILE_DIR)/2.0-api
- $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v3.5/*.dll $(PROFILE_DIR)/3.5-api
- $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.0/*.dll $(PROFILE_DIR)/4.0-api
- $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/*.dll $(PROFILE_DIR)/4.5-api
- $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll $(PROFILE_DIR)/4.5-api/Facades
+ #$(MKINSTALLDIRS) $(PROFILE_DIR)/2.0-api
+ #$(MKINSTALLDIRS) $(PROFILE_DIR)/3.5-api
+ #$(MKINSTALLDIRS) $(PROFILE_DIR)/4.0-api
+ #$(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api
+ #$(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api/Facades
+ #$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v2.0/*.dll $(PROFILE_DIR)/2.0-api
+ #$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v3.5/*.dll $(PROFILE_DIR)/3.5-api
+ #$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.0/*.dll $(PROFILE_DIR)/4.0-api
+ #$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/*.dll $(PROFILE_DIR)/4.5-api
+ #$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll $(PROFILE_DIR)/4.5-api/Facades
+ $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5
+ ln -sf 4.5 $(PROFILE_DIR)/4.5-api
+ ln -sf 4.5 $(PROFILE_DIR)/4.0-api
# Unfortunately, a few programs (most notably NUnit and FSharp) have hardcoded checks for <prefix>/lib/mono/4.0/mscorlib.dll or Mono.Posix.dll,
# so we need to place something there or those tools break. We decided to symlink to the reference assembly for now.
# See https://bugzilla.xamarin.com/show_bug.cgi?id=38331 and https://bugzilla.xamarin.com/show_bug.cgi?id=41052
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.0
- ln -sf ../4.0-api/mscorlib.dll $(PROFILE_DIR)/4.0/mscorlib.dll
- ln -sf ../4.0-api/Mono.Posix.dll $(PROFILE_DIR)/4.0/Mono.Posix.dll
+ #$(MKINSTALLDIRS) $(PROFILE_DIR)/4.0
+ #ln -sf ../4.0-api/mscorlib.dll $(PROFILE_DIR)/4.0/mscorlib.dll
+ #ln -sf ../4.0-api/Mono.Posix.dll $(PROFILE_DIR)/4.0/Mono.Posix.dll
DISTFILES = $(wildcard ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v4.5/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v4.0/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v3.5/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v2.0/*.dll) Makefile

View File

@ -1,10 +0,0 @@
--- a/mono/io-layer/processes.c 2017-03-15 09:36:22.000000000 +0000
+++ b/mono/io-layer/processes.c 2018-06-05 19:58:57.657838748 +0000
@@ -19,6 +19,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <unistd.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>

View File

@ -1,139 +0,0 @@
diff --git a/mcs/class/corlib/System/TermInfoReader.cs b/mcs/class/corlib/System/TermInfoReader.cs
index a171706add61..2be4627e7910 100644
--- a/mcs/class/corlib/System/TermInfoReader.cs
+++ b/mcs/class/corlib/System/TermInfoReader.cs
@@ -32,7 +32,8 @@
using System.Text;
namespace System {
// This class reads data from a byte array or file containing the terminfo capabilities
- // information for any given terminal. The maximum allowed size is 4096 bytes.
+ // information for any given terminal. The maximum allowed size is 4096 (or
+ // 32768 for terminfo2) bytes.
//
// Terminfo database files are divided in the following sections:
//
@@ -45,7 +46,7 @@ namespace System {
//
// The header is as follows:
//
- // Magic number (0x1 and 0x1A)
+ // Magic number (0x11A/0432 or 0x21e/01036 for terminfo2)
// Terminal names size
// Boolean section size
// Numeric section size
@@ -58,8 +59,9 @@ namespace System {
// The boolean capabilities section has bytes that are set to 1 if the capability is supported
// and 0 otherwise. If the index of a capability is greater than the section size, 0 is assumed.
//
- // The numeric capabilities section holds 2-byte integers in little endian format. No negative
- // values are allowed and the absence of a capability is marked as two 0xFF.
+ // The numeric capabilities section holds 2-byte integers (4-byte integers for terminfo2) in
+ // little endian format. No negative values are allowed and the absence of a capability is marked
+ // as two 0xFF (four 0xFF for terminfo2).
//
// The string offsets section contains 2-byte integer offsets into the string capabilies section.
// If the capability is not supported, the index will be two 0xFF bytes.
@@ -72,17 +74,17 @@ namespace System {
//
class TermInfoReader {
- //short nameSize;
- short boolSize;
- short numSize;
- short strOffsets;
- //short strSize;
+ int boolSize;
+ int numSize;
+ int strOffsets;
//string [] names; // Last one is the description
byte [] buffer;
int booleansOffset;
//string term;
+ int intOffset;
+
public TermInfoReader (string term, string filename)
{
using (FileStream st = File.OpenRead (filename)) {
@@ -114,12 +116,21 @@ public TermInfoReader (string term, byte [] buffer)
// get { return term; }
// }
+ void DetermineVersion (short magic)
+ {
+ if (magic == 0x11a)
+ intOffset = 2;
+ else if (magic == 0x21e)
+ intOffset = 4;
+ else
+ throw new Exception (String.Format ("Magic number is unexpected: {0}", magic));
+ }
+
void ReadHeader (byte [] buffer, ref int position)
{
short magic = GetInt16 (buffer, position);
position += 2;
- if (magic != 282)
- throw new Exception (String.Format ("Magic number is wrong: {0}", magic));
+ DetermineVersion (magic);
/*nameSize =*/ GetInt16 (buffer, position);
position += 2;
@@ -161,8 +172,8 @@ public int Get (TermInfoNumbers number)
if ((offset % 2) == 1)
offset++;
- offset += ((int) number) * 2;
- return GetInt16 (buffer, offset);
+ offset += ((int) number) * intOffset;
+ return GetInteger (buffer, offset);
}
public string Get (TermInfoStrings tstr)
@@ -175,7 +186,7 @@ public string Get (TermInfoStrings tstr)
if ((offset % 2) == 1)
offset++;
- offset += numSize * 2;
+ offset += numSize * intOffset;
int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
if (off2 == -1)
return null;
@@ -193,7 +204,7 @@ public string Get (TermInfoStrings tstr)
if ((offset % 2) == 1)
offset++;
- offset += numSize * 2;
+ offset += numSize * intOffset;
int off2 = GetInt16 (buffer, offset + (int) tstr * 2);
if (off2 == -1)
return null;
@@ -211,6 +222,27 @@ short GetInt16 (byte [] buffer, int offset)
return (short) (uno + dos * 256);
}
+ int GetInt32 (byte [] buffer, int offset)
+ {
+ int b1 = (int) buffer [offset];
+ int b2 = (int) buffer [offset + 1];
+ int b3 = (int) buffer [offset + 2];
+ int b4 = (int) buffer [offset + 3];
+ if (b1 == 255 && b2 == 255 && b3 == 255 && b4 == 255)
+ return -1;
+
+ return b1 + b2 << 8 + b3 << 16 + b4 << 24;
+ }
+
+ int GetInteger (byte [] buffer, int offset)
+ {
+ if (intOffset == 2)
+ return GetInt16 (buffer, offset);
+ else
+ // intOffset == 4
+ return GetInt32 (buffer, offset);
+ }
+
string GetString (byte [] buffer, int offset)
{
int length = 0;

View File

@ -0,0 +1,12 @@
--- a/scripts/mono-find-provides.in 2018-03-02 21:56:22.911149656 +0100
+++ b/scripts/mono-find-provides.in 2018-03-02 21:56:57.985962849 +0100
@@ -16,7 +16,8 @@
# Only include files with /gac/, /Facades/ or /4.5/ in path
# (Allows packages to contain private assemblies that don't conflict with other packages)
-monolist=($(printf "%s\n" "${monolist[@]}" | egrep "/(gac|Facades|4\\.5)/"))
+#quite a number of files are not in the gac, eg. System.IO, and Mono.Configuration.Crypto, and others
+#monolist=($(printf "%s\n" "${monolist[@]}" | egrep "/(gac|Facades|4\\.5)/"))
# Disabled... see ChangeLog
# Set the prefix, unless it is overriden (used when building mono rpms)

View File

@ -0,0 +1,87 @@
--- a/mcs/class/reference-assemblies/Makefile 2019-01-02 10:25:41.011999700 +0100
+++ b/mcs/class/reference-assemblies/Makefile 2019-01-02 10:27:20.591632515 +0100
@@ -10,25 +10,11 @@
$(MAKE) -C ../../../external/binary-reference-assemblies CSC="MONO_PATH=$(abspath $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)) $(INTERNAL_CSC)"
install-local:
- $(MKINSTALLDIRS) $(PROFILE_DIR)/2.0-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/3.5-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.0-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.1-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.2-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6.1-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6.2-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.7-api
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api/Facades
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.1-api/Facades
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.2-api/Facades
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6-api/Facades
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6.1-api/Facades
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6.2-api/Facades
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.7-api/Facades
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.7.1-api/Facades
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.7.2-api/Facades
+ $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5
+ ln -sf 4.5 $(PROFILE_DIR)/4.7-api
+ ln -sf 4.5 $(PROFILE_DIR)/4.6-api
+ ln -sf 4.5 $(PROFILE_DIR)/4.5-api
+ ln -sf 4.5 $(PROFILE_DIR)/4.0-api
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v2.0/*.dll $(PROFILE_DIR)/2.0-api
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/v3.5/*.dll $(PROFILE_DIR)/3.5-api
@@ -67,13 +53,6 @@
$(INSTALL_LIB) ../../../external/binary-reference-assemblies/mono/*.dll $(PROFILE_DIR)/4.7.2-api
rm -f $(PROFILE_DIR)/4.7.2-api/ICSharpCode.SharpZipLib.dll
- # Unfortunately, a few programs (most notably NUnit and FSharp) have hardcoded checks for <prefix>/lib/mono/4.0/mscorlib.dll or Mono.Posix.dll,
- # so we need to place something there or those tools break. We decided to symlink to the reference assembly for now.
- # See https://bugzilla.xamarin.com/show_bug.cgi?id=38331 and https://bugzilla.xamarin.com/show_bug.cgi?id=41052
- $(MKINSTALLDIRS) $(PROFILE_DIR)/4.0
- ln -sf ../4.0-api/mscorlib.dll $(PROFILE_DIR)/4.0/mscorlib.dll
- ln -sf ../4.0-api/Mono.Posix.dll $(PROFILE_DIR)/4.0/Mono.Posix.dll
-
DISTFILES = \
$(wildcard ../../../external/binary-reference-assemblies/v4.7.2/Facades/*.dll) \
$(wildcard ../../../external/binary-reference-assemblies/v4.7.1/Facades/*.dll) \
--- a/mcs/Makefile 2018-03-03 06:32:13.642690150 +0100
+++ b/mcs/Makefile 2018-03-03 06:32:54.699643624 +0100
@@ -40,7 +40,7 @@
# fun specialty targets
-PROFILES = net_4_x binary_reference_assemblies xbuild_12 xbuild_14
+PROFILES = net_4_x xbuild_12 xbuild_14
.PHONY: all-profiles $(STD_TARGETS:=-profiles)
all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
@@ -65,7 +65,6 @@
_boot_ = all clean install
$(_boot_:%=profile-do--xbuild_14--%): profile-do--xbuild_14--%: profile-do--net_4_x--%
$(_boot_:%=profile-do--xbuild_12--%): profile-do--xbuild_12--%: profile-do--net_4_x--%
-$(_boot_:%=profile-do--binary_reference_assemblies--%): profile-do--binary_reference_assemblies--%: profile-do--build--%
$(_boot_:%=profile-do--net_4_x--%): profile-do--net_4_x--%: profile-do--build--%
$(_boot_:%=profile-do--monodroid--%): profile-do--monodroid--%: profile-do--build--%
$(_boot_:%=profile-do--monodroid_tools--%): profile-do--monodroid_tools--%: profile-do--build--%
--- a/mcs/build/Makefile 2018-03-03 07:18:20.662959369 +0100
+++ b/mcs/build/Makefile 2018-03-03 07:18:33.303253408 +0100
@@ -19,7 +19,6 @@
PROFILES = \
basic \
build \
- binary_reference_assemblies \
net_4_x \
xbuild_12 \
xbuild_14
--- a/runtime/Makefile.in 2018-03-03 14:06:44.691631197 +0100
+++ b/runtime/Makefile.in 2018-03-03 14:07:07.241155116 +0100
@@ -80,7 +80,7 @@
host_triplet = @host@
target_triplet = @target@
@INSTALL_4_x_TRUE@am__append_1 = etc/mono/4.0/machine.config etc/mono/4.0/web.config etc/mono/4.5/web.config etc/mono/4.0/Browsers/Compat.browser etc/mono/4.5/Browsers/Compat.browser
-@INSTALL_4_x_TRUE@am__append_2 = binary_reference_assemblies net_4_x xbuild_12 xbuild_14
+@INSTALL_4_x_TRUE@am__append_2 = net_4_x xbuild_12 xbuild_14
@INSTALL_MONODROID_TRUE@am__append_3 = monodroid monodroid_tools
@INSTALL_MONOTOUCH_TRUE@am__append_4 = monotouch monotouch_runtime
@INSTALL_MONOTOUCH_WATCH_TRUE@am__append_5 = monotouch_watch monotouch_watch_runtime

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
--- a/mcs/packages/Makefile 2019-02-21 04:53:46.843939657 +0000
+++ b/mcs/packages/Makefile 2019-02-21 04:53:40.111824983 +0000
@@ -40,15 +40,19 @@
install-local: install-prototypes
$(MKINSTALLDIRS) $(TARGET_DIR)
+ifndef MCS_MODE
$(INSTALL_LIB) $(ROSLYN_FILES_FOR_MONO) $(TARGET_DIR)
$(MKINSTALLDIRS) $(MSBUILD_ROSLYN_DIR)
$(INSTALL_LIB) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD) $(MSBUILD_ROSLYN_DIR)
(cd $(MSBUILD_ROSLYN_DIR); for asm in $(ROSLYN_FILES_FOR_MONO); do ln -fs ../../../../$(FRAMEWORK_VERSION)/$$(basename $$asm) . ; done)
+endif
install-prototypes:
$(MKINSTALLDIRS) $(TARGET_DIR)/dim
+ifndef MCS_MODE
$(INSTALL_LIB) $(ROSLYN_DIM_FILES) $(TARGET_DIR)/dim
+endif
run-test-local: test-csi

View File

@ -0,0 +1,12 @@
--- a/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/FastZip.cs 2019-02-21 05:54:25.493666036 +0000
+++ b/mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib/Zip/FastZip.cs 2019-02-21 05:55:01.494273426 +0000
@@ -375,7 +375,8 @@
targetName = Path.Combine(targetDirectory, entryFileName);
dirName = Path.GetDirectoryName(Path.GetFullPath(targetName));
-
+ if (!Path.GetFullPath(targetName).StartsWith(targetDirectory, StringComparison.InvariantCultureIgnoreCase))
+ throw new ZipException("Parent traversal in paths is not allowed");
doExtraction = doExtraction && (entryFileName.Length > 0);
}

11
mono-5.18.0-use-msc.patch Normal file
View File

@ -0,0 +1,11 @@
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs 2019-02-20 21:17:20.324780985 +0000
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs 2019-02-20 21:17:43.537165909 +0000
@@ -219,7 +219,7 @@
protected override string ToolName {
get {
- return MSBuildUtils.RunningOnWindows ? "csc.bat" : "csc.exe";
+ return MSBuildUtils.RunningOnWindows ? "msc.bat" : "msc.exe";
}
}

View File

@ -0,0 +1,11 @@
--- a/mcs/tools/cil-stringreplacer/Makefile 2019-02-21 04:46:01.764018606 +0000
+++ b/mcs/tools/cil-stringreplacer/Makefile 2019-02-21 04:46:33.532559588 +0000
@@ -8,7 +8,7 @@
API = $(filter basic build, $(PROFILE))
ifdef API
# It can be run using system .net during boostrap
-TARGET_NET_REFERENCE = v4.6
+TARGET_NET_REFERENCE = v4.7.1
# Trick to make it work during boostrap where it has to run with system
# assemblies not the ones in lib/basic folder
PROGRAM_USE_INTERMEDIATE_FILE = 1

View File

@ -0,0 +1,11 @@
--- a/mono/utils/mono-context.h 2019-03-22 04:57:54.560641101 +0000
+++ b/mono/utils/mono-context.h 2019-03-22 04:58:27.765211676 +0000
@@ -865,7 +865,7 @@
#define MONO_ARCH_HAS_MONO_CONTEXT 1
-typedef struct ucontext MonoContext;
+typedef ucontext_t MonoContext;
#define MONO_CONTEXT_SET_IP(ctx,ip) \
do { \

192
mono.spec
View File

@ -9,45 +9,46 @@
%global _monodir %{_prefix}/lib/mono
%global _monogacdir %{_monodir}/gac
%endif
%if 0%{?rhel}%{?el6}%{?el7}
%if 0%{?el7}
# somehow _monodir and _monogacdir is missing in 7.5
%global _monodir %{_prefix}/lib/mono
%global _monogacdir %{_monodir}/gac
%endif
%if 0%{?rhel}%{?el6}%{?el7} || 0%{?bootstrap}
# to resolve: "ERROR: No build ID note found"
%undefine _missing_build_ids_terminate_build
%endif
%global xamarinrelease 0
Name: mono
Version: 4.8.0
Release: 17%{?dist}
Version: 5.18.1
Release: 0%{?dist}
Summary: Cross-platform, Open Source, .NET development framework
License: MIT
URL: http://www.mono-project.com
Source0: http://download.mono-project.com/sources/mono/mono-%{version}.520.tar.bz2
Source0: http://download.mono-project.com/sources/mono/mono-%{version}.%{xamarinrelease}.tar.bz2
# This key was generated by Tom "spot" Callaway <tcallawa@redhat.com> on Dec 1, 2009
# by running the following command:
# sn -k mono.snk
# You should not regenerate this unless you have a really, really, really good reason.
Source1: mono.snk
Patch0: mono-4.0.0-ignore-reference-assemblies.patch
Patch0: mono-5.10.0-ignore-reference-assemblies.patch
Patch1: mono-4.2.1-ppc.patch
Patch2: mono-4.3.2-find-provides.patch
Patch2: mono-5.10.0-find-provides.patch
Patch3: mono-4.2-fix-winforms-trayicon.patch
Patch4: mono-4.6.0-patch_arm_fast_tls.patch
Patch5: mono-4.6.1-aarch64.patch
# fix bz#1484151, bz#1484149 due to new glibc which
# drops the struct ucontext
Patch6: mono-4.8.0.520-glibc-ucontext.patch
# fix bz#1580447, due to new file format terminfo2 introduced with ncurses6.1
Patch7: mono-4.8.0-terminfo.patch
# glibc change: The inclusion of <sys/sysmacros.h> by <sys/types.h> is deprecated. This
# means that in a future release, the macros “major”, “minor”, and “makedev”
# will only be available from <sys/sysmacros.h>.
Patch8: mono-4.8.0-sysmacros.patch
Patch9: mono-4.8.0-python-shebang.patch
# Due to bug 1588734
ExcludeArch: ppc64le
Patch4: mono-4.6.1-aarch64.patch
Patch5: mono-5.18.1-s390x-ucontext.patch
Patch6: mono-5.18.0-roslyn-binaries.patch
Patch7: mono-5.18.0-use-msc.patch
Patch8: mono-5.18.0-use-v471.patch
Patch9: mono-5.18.0-reference-assemblies-fix.patch
Patch10: mono-5.18.0-sharpziplib-parent-path-traversal.patch
Patch11: mono-4.8.0-python-shebang.patch
BuildRequires: bison
BuildRequires: python
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: gettext-devel
@ -56,6 +57,7 @@ BuildRequires: libgdiplus-devel >= 2.10
BuildRequires: pkgconfig
BuildRequires: valgrind-devel
BuildRequires: zlib-devel
BuildRequires: perl-Getopt-Long
# Yes, mono actually depends on itself, because
# we deleted the bootstrapping binaries. If you
@ -63,9 +65,9 @@ BuildRequires: zlib-devel
# and don't delete the binaries in %%prep.
%if 0%{bootstrap}
# for bootstrap, use bundled monolite instead of local mono
# for bootstrap, use bundled monolite and reference assemblies instead of local mono
%else
BuildRequires: mono-core >= 4.0
BuildRequires: mono-core >= 5.0
%endif
# JIT only available on these:
@ -84,6 +86,33 @@ metadata access libraries.
%package core
Summary: The Mono CIL runtime, suitable for running .NET code
Requires: libgdiplus
#dependency requiered for install
Provides: mono(System.Collections.Immutable) = 1.2.0.0
Provides: mono(System.Diagnostics.StackTrace) = 4.0.2.0
Provides: mono(System.IO) = 4.0.10.0
Provides: mono(System.IO.Compression) = 4.1.1.0
Provides: mono(System.Linq.Expressions) = 4.0.10.0
Provides: mono(System.Reflection) = 4.0.10.0
Provides: mono(System.Runtime) = 4.0.20.0
Provides: mono(System.Runtime.Extensions) = 4.0.10.0
Provides: mono(System.Runtime.InteropServices) = 4.0.20.0
Provides: mono(System.Runtime.Loader) = 4.0.0.0
Provides: mono(System.Text.Encoding.CodePages) = 4.0.2.0
Provides: mono(System.ValueTuple) = 4.0.1.0
Provides: mono(System.Collections) = 4.0.0.0
Provides: mono(System.Diagnostics.Debug) = 4.0.0.0
Provides: mono(System.Globalization) = 4.0.0.0
Provides: mono(System.IO) = 4.0.0.0
Provides: mono(System.Linq) = 4.0.0.0
Provides: mono(System.Reflection) = 4.0.0.0
Provides: mono(System.Runtime) = 4.0.0.0
Provides: mono(System.Runtime.Extensions) = 4.0.0.0
Provides: mono(System.Runtime.InteropServices) = 4.0.0.0
Provides: mono(System.Security.Cryptography.Algorithms) = 4.0.0.0
Provides: mono(System.Text.Encoding) = 4.0.0.0
Provides: mono(System.Text.Encoding.Extensions) = 4.0.0.0
Provides: mono(System.Threading) = 4.0.0.0
Provides: mono(System.Xml.XPath.XDocument) = 4.0.1.0
%description core
This package contains the core of the Mono runtime including its
@ -252,6 +281,34 @@ Requires: mono-core = %{version}-%{release}
%description -n monodoc-devel
Development file for monodoc
%package complete
Summary: Install everything built from the mono source tree
Requires: ibm-data-db2 = %{version}
Requires: mono-core = %{version}
Requires: mono-data = %{version}
Requires: mono-data-oracle = %{version}
Requires: mono-data-sqlite = %{version}
Requires: mono-devel = %{version}
Requires: mono-extras = %{version}
Requires: mono-locale-extras = %{version}
Requires: mono-mvc = %{version}
Requires: mono-reactive = %{version}
Requires: mono-wcf = %{version}
Requires: mono-web = %{version}
Requires: mono-winforms = %{version}
Requires: mono-winfx = %{version}
Requires: monodoc = %{version}
%description -n mono-complete
The Mono Project is an open development initiative that is working to
develop an open source, Unix version of the .NET development platform.
Its objective is to enable Unix developers to build and deploy
cross-platform .NET applications. The project will implement various
technologies that have been submitted to the ECMA for standardization.
Install everything built from the mono source tree. Note that this does
not install anything from outside the mono source (XSP, mono-basic, etc.).
%global gac_dll(dll) %{_monogacdir}/%{1} \
%{_monodir}/4.5/%{1}.dll \
%{nil}
@ -261,9 +318,12 @@ Development file for monodoc
%{nil}
%prep
%setup -q -n %{name}-%{version}
%setup -q -n %{name}-%{version}.%{xamarinrelease}
%patch0 -p1
%ifarch ppc ppc64 ppc64le
%patch1 -p1
%endif
%patch2 -p1
%patch3 -p1
%patch4 -p1
@ -272,20 +332,23 @@ Development file for monodoc
%patch7 -p1
%patch8 -p1
%patch9 -p1
# Add undeclared Arg
sed -i "61a #define ARG_MAX _POSIX_ARG_MAX" mono/io-layer/wapi_glob.h
%patch10 -p1
%patch11 -p1
# Remove hardcoded lib directory for libMonoPosixHelper.so from the config
sed -i 's|$mono_libdir/||g' data/config.in
# Remove prebuilt binaries
find . -name "*.dll" -not -path "./mcs/class/lib/monolite/*" -print -delete
find . -name "*.exe" -not -path "./mcs/class/lib/monolite/*" -print -delete
%if 0%{bootstrap}
# for bootstrap, keep monolite. Mono 2.10 is too old to compile Mono 4.0
# for bootstrap, keep some binaries
find . -name "*.dll" -not -path "./mcs/class/lib/monolite-linux/*" -not -path "./external/binary-reference-assemblies/v4.7.1/*" -print -delete
find . -name "*.exe" -not -path "./mcs/class/lib/monolite-linux/*" -print -delete
%else
rm -rf mcs/class/lib/monolite/*
# Remove all prebuilt binaries
rm -rf mcs/class/lib/monolite-linux/*
find . -name "*.dll" -print -delete
find . -name "*.exe" -print -delete
# use the binaries from the currently installed mono
cd external/binary-reference-assemblies && mv v4.7.1 v4.7.1.tobuild && ln -s /usr/lib/mono/4.7.1-api v4.7.1 && cd -
%endif
%build
@ -298,6 +361,8 @@ RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-O2 /-O1 /g')
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure --disable-rpath \
--with-csc=mcs \
--disable-system-aot \
--with-moonlight=no
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@ -305,6 +370,11 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
# rebuild the reference assemblies
cd external/binary-reference-assemblies && if [ -d v4.7.1.tobuild ]; then rm -f v4.7.1 && mv v4.7.1.tobuild v4.7.1; fi && cd -
find ./external/binary-reference-assemblies/v4.7.1/ -name \*.dll -print -delete
BUILD_PATH=`pwd` && cd ./external/binary-reference-assemblies/ && MONO_PATH=$BUILD_PATH/mcs/class/lib/net_4_x-linux/ V=1 CSC="$BUILD_PATH/runtime/mono-wrapper $BUILD_PATH/mcs/class/lib/net_4_x-linux/mcs.exe" make -C v4.7.1
%install
make install DESTDIR=%{buildroot}
@ -312,6 +382,10 @@ make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/pki/mono
install -p -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pki/mono/
# install the newly built reference assembly dlls
mkdir -p %{buildroot}%{_monodir}/4.7.1-api
cp external/binary-reference-assemblies/v4.7.1/*.dll %{buildroot}%{_monodir}/4.7.1-api
# This was removed upstream:
# remove .la files (they are generally bad news)
rm -f %{buildroot}%{_libdir}/*.la
@ -325,8 +399,9 @@ rm -rf %{buildroot}%{_datadir}/libgc-mono
# remove stuff that we don't package
rm -f %{buildroot}%{_bindir}/cilc
rm -f %{buildroot}%{_mandir}/man1/cilc.1*
rm -f %{buildroot}%{_monodir}/*/browsercaps-updater.exe*
rm -f %{buildroot}%{_monodir}/*/culevel.exe*
rm -f %{buildroot}%{_mandir}/man1/mdb2ppdb.1*
rm -f %{buildroot}%{_monodir}/*/browsercaps-updater.*
rm -f %{buildroot}%{_monodir}/*/culevel.*
rm -f %{buildroot}%{_monodir}/2.0/cilc.exe*
rm -f %{buildroot}%{_monodir}/*/mscorlib.dll.so
@ -335,6 +410,7 @@ rm -f %{buildroot}%{_monodir}/*/gmcs.exe.so
rm -f %{buildroot}%{_monodir}/4.0/dmcs.exe.so
rm -rf %{buildroot}%{_bindir}/mono-configuration-crypto
rm -rf %{buildroot}%{_mandir}/man?/mono-configuration-crypto*
rm -rf %{buildroot}%{_monodir}/4.5/*.so
# remove the mono-nunit files
rm -f %{buildroot}%{_bindir}/nunit-console
@ -347,6 +423,10 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/mono-nunit.pc
# remove dmcs because it requires the .net 4.0 sdk but we only deliver 4.5 with Fedora (#1294967)
rm -f %{buildroot}%{_bindir}/dmcs
# remove csc
rm -f %{buildroot}%{_bindir}/csc
rm -f %{buildroot}%{_bindir}/csc-dim
# drop prj2make because the binary is not built anymore
rm -f %{buildroot}%{_bindir}/prj2make
rm -f %{buildroot}%{_mandir}/man1/prj2make*
@ -359,11 +439,19 @@ mkdir -p %{buildroot}%{_datadir}/gdb/auto-load%{_bindir}
# do not make cecil publicly available. other packages should use the mono-cecil package instead
rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
# remove msbuild / microsoft binary files
rm -rf %{buildroot}/usr/lib/mono/msbuild
# we have btls debug files
rm -rf %{buildroot}/usr/lib/debug/usr/lib64/libmono-btls-shared.so-*.debug
%find_lang mcs
%ldconfig_scriptlets
%post
%{?ldconfig}
cert-sync /etc/pki/tls/certs/ca-bundle.crt
%ldconfig_scriptlets devel
%ldconfig_postun
%files core -f mcs.lang
%license COPYING.LIB
@ -391,8 +479,11 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%mono_bin ikdasm
%mono_bin lc
%{_bindir}/gacutil2
%{_bindir}/csi
%{_bindir}/mcs
%{_monodir}/4.5/mcs.exe*
%{_monodir}/4.5/mcs.*
%{_monodir}/4.5/mono-api-diff.*
%{_bindir}/vbc
%mono_bin mozroots
%mono_bin pdb2mdb
%mono_bin setreg
@ -413,6 +504,7 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%{_mandir}/man1/lc.1.gz
%{_mandir}/man1/mprof-report.1.gz
%{_libdir}/libMonoPosixHelper.so*
%{_libdir}/libmono-system-native.so*
%dir %{_monodir}
%dir %{_monodir}/4.5
%dir %{_monodir}/4.5/Facades
@ -458,8 +550,6 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%config (noreplace) %{_sysconfdir}/mono/4.5/web.config
%dir %{_sysconfdir}/mono/4.0
%mono_bin ccrewrite
%{_monodir}/4.0-api
%{_monodir}/4.5-api
%{_monodir}/4.5/mscorlib.dll
%{_monodir}/4.5/mscorlib.dll.mdb
%gac_dll Microsoft.CSharp
@ -471,14 +561,11 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%gac_dll System.Numerics
%gac_dll System.Runtime.Caching
%gac_dll System.Runtime.DurableInstancing
%gac_dll System.Runtime.InteropServices.RuntimeInformation
%gac_dll System.Transactions
%gac_dll System.Xaml
%gac_dll WebMatrix.Data
%ifarch %{ix86} x86_64
# there is no btls for non-x86
%gac_dll Mono.Btls.Interface
%endif
%{_libdir}/libmono-btls-shared.so
%gac_dll Mono.CodeContracts
%dir %{_monodir}/mono-configuration-crypto
%dir %{_monodir}/mono-configuration-crypto/4.5
@ -501,14 +588,16 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%gac_dll System.Workflow.Activities
%gac_dll System.Workflow.ComponentModel
%gac_dll System.Workflow.Runtime
%gac_dll Mono.Profiler.Log
%files devel
%{_sysconfdir}/pki/mono/
%{_bindir}/mono-api-info
%{_monodir}/4.5/mono-api-info.exe*
%{_monodir}/4.5/mono-api-info.*
%{_bindir}/mono-api-html
%{_monodir}/4.5/mono-api-html.exe*
%{_monodir}/4.5/linkeranalyzer.exe*
%{_monodir}/4.5/mono-api-html.*
%{_monodir}/4.5/illinkanalyzer.*
%{_bindir}/illinkanalyzer
%mono_bin mono-symbolicate
%gac_dll SMDiagnostics
%mono_bin xbuild
@ -561,8 +650,11 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%{_mandir}/man1/mkbundle.1.gz
%{_mandir}/man1/mono-cil-strip.1.gz
%{_mandir}/man1/monodis.1.gz
%{_mandir}/man1/mono-profilers.1.gz
%{_mandir}/man1/illinkanalyzer.1.gz
%{_datadir}/mono-2.0/mono/cil/cil-opcodes.xml
%{_datadir}/mono-2.0/mono/profiler/mono-profiler-log.suppression
%{_datadir}/mono-2.0/mono/eglib/eglib-config.h
%{_datadir}/mono-2.0/mono/profiler/mono-profiler-coverage.suppression
%{_mandir}/man1/monolinker.1.gz
%{_mandir}/man1/mono-shlib-cop.1.gz
%{_mandir}/man1/mono-symbolicate.1.gz
@ -589,6 +681,7 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%gac_dll Mono.XBuild.Tasks
%gac_dll System.Windows
%gac_dll System.Xml.Serialization
%{_monodir}/4.7.1-api/
%{_monodir}/4.5/Microsoft.Common.tasks
%{_monodir}/4.5/MSBuild/Microsoft.Build*
%{_monodir}/4.5/Microsoft.Build.xsd
@ -783,7 +876,12 @@ rm -f %{buildroot}%{_libdir}/pkgconfig/cecil.pc
%files -n monodoc-devel
%{_libdir}/pkgconfig/monodoc.pc
%files complete
%changelog
* Thu Mar 21 2019 Timotheus Pokorra <timotheus.pokorra@solidcharity.com> - 5.18.1-0
- upgrade to Mono 5.18.1.0
* Mon Feb 11 2019 Timotheus Pokorra <timotheus.pokorra@solidcharity.com> - 4.8.0-17
- fixes to resolve FTBFS: python shebang
- disable build for ppc64le due to bug 1588734

View File

@ -1 +1 @@
SHA512 (mono-4.8.0.520.tar.bz2) = c3919f3c10c9cc1dd9894ac6c80b519b7c4bd6e62a6b6b00ac2af70d39e9fccc86ccfb0e43c727ed0494609803893c01cdc0a1407e8d6a9f7fe86cdd3f5be9df
SHA512 (mono-5.18.1.0.tar.bz2) = 3df43887751e7f73d516d0e2fe5c412542beaa949727135e3ef1b3e538ca1d8062c55d5394f1c01cece857ed8064b6f37984e46108160fae7623b9d0a48cd380