From b3257c2cbc0937a48b93804c8e102b34b01fafdc Mon Sep 17 00:00:00 2001 From: nmilosev Date: Feb 10 2017 11:08:30 +0000 Subject: New fixes implemented: - debug info is now properly packaged into a separate RPM (patch 1) - RIL for F25 and F26 implemented to corefx with a patch (2) - RIL for F25 and F26 implemented to payload with a patch (3) --- diff --git a/dotnetcore-1.1-RIL-fix.patch b/dotnetcore-1.1-RIL-fix.patch new file mode 100644 index 0000000..e250658 --- /dev/null +++ b/dotnetcore-1.1-RIL-fix.patch @@ -0,0 +1,23 @@ +--- pkg/Microsoft.NETCore.Platforms/runtime.json 2017-02-09 21:57:26.867230782 +0100 ++++ pkg/Microsoft.NETCore.Platforms/runtime.json 2017-02-09 22:00:04.228542890 +0100 +@@ -381,6 +381,20 @@ + "#import": [ "fedora.24", "fedora-x64" ] + }, + ++ "fedora.25": { ++ "#import": [ "fedora.24" ] ++ }, ++ "fedora.25-x64": { ++ "#import": [ "fedora.25", "fedora.24-x64" ] ++ }, ++ ++ "fedora.26": { ++ "#import": [ "fedora.25" ] ++ }, ++ "fedora.26-x64": { ++ "#import": [ "fedora.26", "fedora.25-x64" ] ++ }, ++ + "opensuse": { + "#import": [ "linux" ] + }, diff --git a/dotnetcore-1.1-RIL-payload.patch b/dotnetcore-1.1-RIL-payload.patch new file mode 100644 index 0000000..945eec5 --- /dev/null +++ b/dotnetcore-1.1-RIL-payload.patch @@ -0,0 +1,52 @@ +--- shared/Microsoft.NETCore.App/1.1.0/Microsoft.NETCore.App.deps.json 2016-11-14 23:26:30.000000000 +0100 ++++ shared/Microsoft.NETCore.App/1.1.0/Microsoft.NETCore.App.deps.json 2017-02-10 11:45:24.550503581 +0100 +@@ -2703,6 +2703,28 @@ + "any", + "base" + ], ++ "fedora.25-x64": [ ++ "fedora.25", ++ "fedora-x64", ++ "fedora", ++ "linux-x64", ++ "linux", ++ "unix-x64", ++ "unix", ++ "any", ++ "base" ++ ], ++ "fedora.26-x64": [ ++ "fedora.26", ++ "fedora-x64", ++ "fedora", ++ "linux-x64", ++ "linux", ++ "unix-x64", ++ "unix", ++ "any", ++ "base" ++ ], + "debian.8-x64": [ + "debian.8", + "debian-x64", +@@ -3319,6 +3341,20 @@ + "any", + "base" + ], ++ "fedora.25": [ ++ "fedora", ++ "linux", ++ "unix", ++ "any", ++ "base" ++ ], ++ "fedora.26": [ ++ "fedora", ++ "linux", ++ "unix", ++ "any", ++ "base" ++ ], + "opensuse": [ + "linux", + "unix", diff --git a/dotnetcore-1.1-debuginfo-fix.patch b/dotnetcore-1.1-debuginfo-fix.patch new file mode 100644 index 0000000..c40c7b4 --- /dev/null +++ b/dotnetcore-1.1-debuginfo-fix.patch @@ -0,0 +1,101 @@ +diff -bur coreclr/functions.cmake coreclr/functions.cmake +--- coreclr/functions.cmake 2017-02-09 16:48:09.009209414 +0100 ++++ coreclr/functions.cmake 2017-02-09 16:52:53.303586505 +0100 +@@ -117,53 +117,9 @@ + endif(MSVC) + endfunction() + +-function(strip_symbols targetName outputFilename) +- if (CLR_CMAKE_PLATFORM_UNIX) +- if (UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE) +- +- # On the older version of cmake (2.8.12) used on Ubuntu 14.04 the TARGET_FILE +- # generator expression doesn't work correctly returning the wrong path and on +- # the newer cmake versions the LOCATION property isn't supported anymore. +- if (CMAKE_VERSION VERSION_EQUAL 3.0 OR CMAKE_VERSION VERSION_GREATER 3.0) +- set(strip_source_file $) +- else() +- get_property(strip_source_file TARGET ${targetName} PROPERTY LOCATION) +- endif() +- +- if (CMAKE_SYSTEM_NAME STREQUAL Darwin) +- set(strip_destination_file ${strip_source_file}.dwarf) +- +- add_custom_command( +- TARGET ${targetName} +- POST_BUILD +- VERBATIM +- COMMAND ${DSYMUTIL} --flat --minimize ${strip_source_file} +- COMMAND ${STRIP} -S ${strip_source_file} +- COMMENT Stripping symbols from ${strip_source_file} into file ${strip_destination_file} +- ) +- else (CMAKE_SYSTEM_NAME STREQUAL Darwin) +- set(strip_destination_file ${strip_source_file}.dbg) +- +- add_custom_command( +- TARGET ${targetName} +- POST_BUILD +- VERBATIM +- COMMAND ${OBJCOPY} --only-keep-debug ${strip_source_file} ${strip_destination_file} +- COMMAND ${OBJCOPY} --strip-debug ${strip_source_file} +- COMMAND ${OBJCOPY} --add-gnu-debuglink=${strip_destination_file} ${strip_source_file} +- COMMENT Stripping symbols from ${strip_source_file} into file ${strip_destination_file} +- ) +- endif (CMAKE_SYSTEM_NAME STREQUAL Darwin) +- +- set(${outputFilename} ${strip_destination_file} PARENT_SCOPE) +- endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE) +- endif(CLR_CMAKE_PLATFORM_UNIX) +-endfunction() +- + function(install_clr targetName) + list(FIND CLR_CROSS_COMPONENTS_LIST ${targetName} INDEX) + if (NOT DEFINED CLR_CROSS_COMPONENTS_LIST OR NOT ${INDEX} EQUAL -1) +- strip_symbols(${targetName} strip_destination_file) + # On the older version of cmake (2.8.12) used on Ubuntu 14.04 the TARGET_FILE + # generator expression doesn't work correctly returning the wrong path and on + # the newer cmake versions the LOCATION property isn't supported anymore. +diff -bur coreclr/src/.nuget/Microsoft.NETCore.ILAsm/rhel/Microsoft.NETCore.ILAsm.pkgproj coreclr/src/.nuget/Microsoft.NETCore.ILAsm/rhel/Microsoft.NETCore.ILAsm.pkgproj +--- coreclr/src/.nuget/Microsoft.NETCore.ILAsm/rhel/Microsoft.NETCore.ILAsm.pkgproj 2017-02-09 16:43:17.978829906 +0100 ++++ coreclr/src/.nuget/Microsoft.NETCore.ILAsm/rhel/Microsoft.NETCore.ILAsm.pkgproj 2017-02-09 16:53:51.676458308 +0100 +@@ -15,7 +15,6 @@ + + + +- + + + +diff -bur coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/rhel/Microsoft.NETCore.ILDAsm.pkgproj coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/rhel/Microsoft.NETCore.ILDAsm.pkgproj +--- coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/rhel/Microsoft.NETCore.ILDAsm.pkgproj 2017-02-09 16:43:17.979829887 +0100 ++++ coreclr/src/.nuget/Microsoft.NETCore.ILDAsm/rhel/Microsoft.NETCore.ILDAsm.pkgproj 2017-02-09 16:54:22.136862080 +0100 +@@ -15,7 +15,6 @@ + + + +- + + + +diff -bur coreclr/src/.nuget/Microsoft.NETCore.Jit/rhel/Microsoft.NETCore.Jit.pkgproj coreclr/src/.nuget/Microsoft.NETCore.Jit/rhel/Microsoft.NETCore.Jit.pkgproj +--- coreclr/src/.nuget/Microsoft.NETCore.Jit/rhel/Microsoft.NETCore.Jit.pkgproj 2017-02-09 16:43:17.979829887 +0100 ++++ coreclr/src/.nuget/Microsoft.NETCore.Jit/rhel/Microsoft.NETCore.Jit.pkgproj 2017-02-09 16:54:47.837318530 +0100 +@@ -15,7 +15,6 @@ + + + +- + + + +diff -bur coreclr/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/rhel/Microsoft.NETCore.Runtime.CoreCLR.pkgproj coreclr/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/rhel/Microsoft.NETCore.Runtime.CoreCLR.pkgproj +--- coreclr/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/rhel/Microsoft.NETCore.Runtime.CoreCLR.pkgproj 2017-02-09 16:43:20.140788221 +0100 ++++ coreclr/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/rhel/Microsoft.NETCore.Runtime.CoreCLR.pkgproj 2017-02-09 16:55:29.787496952 +0100 +@@ -40,7 +40,6 @@ + + + +- + + + diff --git a/dotnetcore.spec b/dotnetcore.spec index c1266ed..2d765f1 100644 --- a/dotnetcore.spec +++ b/dotnetcore.spec @@ -15,6 +15,23 @@ BuildRequires: python cmake clang llvm libicu-devel lldb-devel libunwind-devel l # Everything is build from git, this archive only contains the RHEL SRPM with payload Source0: dotnetcore.tar.gz +# This patch is for including debug info into shared object files. That info is then stripped into a separate package. +# Upstream: Not in the upstream yet +Patch1: dotnetcore-1.1-debuginfo-fix.patch +# This patch is for adding Fedora 25 and Fedora 26 to corefx platform runtimes.json +# Upstream: Not in the upstream yet +Patch2: dotnetcore-1.1-RIL-fix.patch +# This patch is for adding Fedora 25 and Fedora 26 to Microsoft.NETCore.App supported runtimes in the payload +# Upstream: Not in the upstream yet +Patch3: dotnetcore-1.1-RIL-payload.patch + +# Disable automatic requirements check - a lot is taken from the old %build section. Could be removed in the future, since everything now is in %prep. +Autoreq: no + +# Some BUILD ID's are missing, which prevents us from building a debug package. This fixes that. +# Reference: https://github.com/tpokorra/lbs-mono-fedora/issues/3#issuecomment-219857688 +%undefine _missing_build_ids_terminate_build + %description .NET Core is a fast, lightweight and modular platform for creating cross platform applications that work on Linux, Mac and Windows. @@ -23,13 +40,12 @@ cross platform applications that work on Linux, Mac and Windows. of framework libraries, an SDK containing compilers and a 'dotnet' application to drive everything. -%define debug_package %{nil} +# We want the debug info in a separate package dotnetcore-debuginfo +#%%debug_package %prep %setup -%build - # Get the Rover script from Microsoft git clone https://github.com/dotnet/core cd core @@ -58,18 +74,30 @@ echo "%{srpm_sha256} %{rhel_srpm}" | sha256sum -c # Unpack SRPM to get the payload rpm2cpio %{rhel_srpm} | cpio -idm +# Patch the payload (Microsoft.NETCore.App supported runtimes are carried over...) +mkdir temp-payload && cd temp-payload +tar xf ../%{payload_tarball} +rm ../%{payload_tarball} +%patch3 -p0 + +# Repack +tar czf ../%{payload_tarball} * +cd .. + # Setup the target for dotnet.bootstrap mkdir -p fedora.%{fedora}-x64-dotnet/src && cd fedora.%{fedora}-x64-dotnet/src -git clone https://github.com/dotnet/corefx && cd corefx +git clone https://github.com/dotnet/coreclr && cd coreclr git checkout release/%{version} +%patch1 -p1 cd .. -git clone https://github.com/dotnet/coreclr && -cd coreclr +git clone https://github.com/dotnet/corefx && cd corefx git checkout release/%{version} -cd ../../.. +%patch2 -p0 +%build +cd core/tools/dotnet-bootstrap/ ./dotnet.bootstrap.py -payload %{payload_tarball} %install @@ -88,6 +116,11 @@ ln -s %{_libdir}/%{name}/dotnet %{buildroot}/%{_bindir}/ %{_bindir}/* %changelog +* Thu Feb 09 2017 Nemanja Milosevic +- Fixed debuginfo going to separate package (Patch1) +- Added F25/F26 RIL and fixed the version info (Patch2) +- Added F25/F26 RIL in Microsoft.NETCore.App suported runtime graph (Patch3) +- SPEC file cleanup * Wed Jan 11 2017 Nemanja Milosevic - Initial RPM for Fedora 25/26.