%{?scl:%scl_package dotnetcore} %{!?scl:%global pkg_name %{name}} # there are no build id notes in these binaries # dont abort finding-debuginfo because of that %undefine _missing_build_ids_terminate_build # lldb doesn't like our nice debug information %undefine _include_minidebuginfo %global _find_debuginfo_dwz_opts %{nil} %global cli_version 1.0.0-preview2-1-003371 %global runtime_version 1.1.12 # Do not provide internal .so as standard libraries %global __provides_exclude_from ^(%{_libdir}/dotnetcore/.*\\.so|%{_libdir}/dotnetcore/sdk/%{cli_version}/.*\\.so|%{_libdir}/dotnetcore/shared/Microsoft.NETCore.App/%{runtime_version}/.*)$ # Do not scan some files for which we have no dependencies %global __requires_exclude_from ^(%{_libdir}/dotnetcore/shared/Microsoft.NETCore.App/%{runtime_version}/libcoreclrtraceptprovider.so|%{_libdir}/dotnetcore/shared/Microsoft.NETCore.App/%{runtime_version}/libsosplugin.so)$ # Do not generate requires for libraries provided by this own package %global __requires_exclude ^(libmscordaccore.so\\(\\)\\(64bit\\)|libmscordaccore.so\\(V1.0\\)\\(64bit\\))$ Name: %{?scl_prefix}dotnetcore Version: %{runtime_version} Release: 1%{?dist} Summary: .NET Core is a general-purpose cross platform development platform Group: Development/Languages License: ASL 2.0 and MIT URL: https://www.microsoft.com/net/core Source0: cli-%{cli_version}.tar.gz # Built on a developer's laptop, from source Source1: dotnet-dev-rhel-x64.%{cli_version}.tar.gz # Generated from sources via: # find -path '*manpage*' -type f -iname '*.1' -print0 | tar -czvf manpages.tar.gz --null -T - Source2: manpages.%{cli_version}.tar.gz Source3: https://raw.githubusercontent.com/dotnet/core-setup/release/1.1.0/LICENSE Source4: check-debug-symbols.py ExclusiveArch: x86_64 BuildRequires: python2 Requires: %{?scl_prefix}libcurl%{?_isa} Requires: %{?scl_prefix}libuv%{?_isa} %{?scl:Requires: %scl_runtime} %description .NET Core is a fast, lightweight and modular platform for creating cross platform applications that work on Linux, Mac and Windows. .NET Core contains a runtime conforming to the .NET standards, a set of framework libraries, an SDK containing compilers and a 'dotnet' application to drive everything. %prep %setup -q -T -c -b 1 -n %{pkg_name}-%{version} tar xvf %{SOURCE2} # Upstream license file is bogus # https://github.com/dotnet/core-setup/issues/676 rm LICENSE.txt cp %{SOURCE3} LICENSE %build # Nothing to build; this is already a binary in a tarball # Remove things with dependencies that are not ready yet # Requires lttng # find -iname libcoreclrtraceptprovider.so -delete # Requires lldb # find -iname libsosplugin.so -delete # Replace libuv with our own version. Note, there's also another copy of this # same libuv, bundled, in the nuget package cache. rm shared/Microsoft.NETCore.App/%{runtime_version}/libuv.so ln -s %{_libdir}/libuv.so.1 shared/Microsoft.NETCore.App/%{runtime_version}/libuv.so %install install -dm 755 $RPM_BUILD_ROOT/%{_libdir}/%{pkg_name}/ cp -a dotnet sdk host shared $RPM_BUILD_ROOT/%{_libdir}/%{pkg_name}/ mkdir -p $RPM_BUILD_ROOT/%{_bindir} ln -s %{_libdir}/%{pkg_name}/dotnet $RPM_BUILD_ROOT/%{_bindir}/ mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ find -type f -iname 'dotnet*\.1' -exec cp {} $RPM_BUILD_ROOT/%{_mandir}/man1/ \; # Check debug symbols in all elf objects. This is not in %%check # because native binaries are stripped by rpm-build after %%install. # So we need to do this check earlier. echo "Testing build results for debug symbols..." %{SOURCE4} -v %{buildroot}%{_libdir}/%{pkg_name}/ %files %doc LICENSE %doc ThirdPartyNotices.txt %{_libdir}/%{pkg_name} %{_bindir}/* %{_mandir}/man1/dotnet*.1* %changelog * Thu Mar 07 2019 Omair Majid - 1.1.12-1 - Update to .NET Core 1.1.12 - Resolves: RHBZ#1686624 * Fri Feb 01 2019 Omair Majid - 1.1.11-2 - Fix debuginfo in native binaries - Add a script to test debuginfo after build - Resolves: RHBZ#1669702 * Sat Jan 26 2019 Omair Majid - 1.1.11-1 - Update to .NET Core 1.1.11 - Resolves: RHBZ#1669702 * Tue Oct 02 2018 Omair Majid - 1.1.10-1 - Switch to a smaller tarball to work around source size issues - Resolves: rhbz#1634072 * Fri Sep 28 2018 Omair Majid - 1.1.10-1 - Update to .NET Core 1.1.10 - Resolves: rhbz#1634072 * Thu Jun 28 2018 Omair Majid - 1.1.9-1 - Update to .NET Core 1.1.9 * Fri Apr 06 2018 Omair Majid - 1.1.8-1 - Update to .NET Core 1.1.8 * Mon Mar 05 2018 Omair Majid - 1.1.7-1 - Update to .NET Core 1.1.7 * Thu Jan 04 2018 Andrew Slice - 1.1.6-1 - Update to .NET Core 1.1.6 * Thu Oct 26 2017 Omair Majid - 1.1.5-1 - Update to .NET Core 1.1.5 * Mon Sep 25 2017 Omair Majid - 1.1.4-1 - Update to 1.1.4 * Tue Apr 25 2017 Omair Majid - 1.1.2-1 - Update to 1.1.2 * Fri Mar 03 2017 Omair Majid - 1.1.1-1 - Update to 1.1.1 - Uses preview2-1 tooling (project.json rather than csproj) * Sat Nov 26 2016 Omair Majid - 1.1-3 - Add a LICENSE based on upstream discussions * Mon Nov 14 2016 Omair Majid - 1.1-2 - Use libuv from rh-dotnetcore11-libuv * Fri Nov 11 2016 Omair Majid - 1.1-1 - 003175 is the final 1.1 build * Thu Nov 10 2016 Omair Majid - 1.1-0.2 - Update to new CLI preview2 build. * Tue Nov 8 2016 Omair Majid - 1.1-0.1 - Update to 1.1 * Tue Sep 20 2016 Omair Majid - 1.0.1-2 - Add man pages * Mon Sep 19 2016 Omair Majid - 1.0.1-1 - Update to 1.0.1 - Resolves: RHBZ 1361254 - Resolves: RHBZ 1372033 * Wed Jun 22 2016 Omair Majid - 1.0.0-7 - Update to newer build. - Fixes https://github.com/NuGet/Home/issues/3010 * Mon Jun 20 2016 Severin Gehwolf - 1.0.0-6 - Reinstate libuv runtime requirement. * Fri Jun 17 2016 Omair Majid - 1.0.0-5 - Update with new build. This one includes a libuv built from source. * Fri Jun 17 2016 Omair Majid - 1.0.0-4 - Update source. - Fix filtering of provides and requires - Don't use the scl-wide libuv.so. There's a bundled copy included. * Fri Jun 17 2016 Omair Majid - 1.0.0-3 - Update requires filtering for self-provided library * Fri Jun 17 2016 Omair Majid - 1.0.0-2 - Update requires filtering for self-provided library * Thu Jun 16 2016 Omair Majid - 1.0.0-1 - First build of .NET Core 1.0 * Fri May 27 2016 Omair Majid - 1.0.0-0.9.rc2 - Don't generate requires for self-provided library * Fri May 27 2016 Omair Majid - 1.0.0-0.8.rc2 - Do not rpm-provide internal implementation libraries * Tue May 17 2016 Omair Majid - 1.0.0-0.7.rc2 - Strip binaries and produce debug packages * Mon May 16 2016 Omair Majid - 1.0.0-0.6.preview1 - Build using new upstream tarball with fixed LICENSE. * Mon May 16 2016 Omair Majid - 1.0.0-0.5.preview1 - Include license file * Thu May 12 2016 Omair Majid - 1.0.0-0.4.preview1 - Update to latest preview build * Wed May 11 2016 Omair Majid - 1.0.0-0.3.preview1 - Update to latest build * Thu Apr 28 2016 Omair Majid - 1.0.0-0.2.20160428 - Update to the latest nightly build * Thu Apr 21 2016 Omair Majid - 1.0.0-0.2.20160421 - Update to latest nightly build * Wed Apr 20 2016 Omair Majid - 1.0.0-0.2.20160407 - Explicitly require customized libcurl * Mon Apr 18 2016 Omair Majid - 1.0.0-0.1.20160407 - Rename package * Thu Apr 07 2016 Omair Majid - 1.0.0-0.1.20160407 - Update to latest nightly * Wed Apr 06 2016 Omair Majid - 1.0.0-0.1.20160406 - Update to latest nightly * Mon Apr 04 2016 Omair Majid - 1.0.0-0.1.20160404 - Update to newer drop * Fri Mar 11 2016 Omair Majid - 1.0.0-0.1.20160229 - Initial package