From 5a00348a016ab7640bc4d5c057faa3afff067a74 Mon Sep 17 00:00:00 2001 From: slava86 Date: Wed, 1 Sep 2021 02:32:08 +0300 Subject: [PATCH] 3.1.12 -> 3.1.18;replace rosa2019.1 platform with rosa2021.1 in patches, remove unnecessary patches --- .abf.yml | 2 + RID-ROSA.patch | 8 +- RuntimeIdentifierGraph-Rosa.patch | 6 +- check-debug-symbols.py | 0 core-setup-gcc11.patch | 19 --- core-setup-hardening-flags.patch | 11 -- coreclr-hardening-flags.patch | 11 -- corefx-Rosalinux-groups.patch | 260 ++++++++++++++++-------------- dotnet-pull10652.patch | 104 ------------ dotnet3.1.spec | 37 ++--- 10 files changed, 155 insertions(+), 303 deletions(-) mode change 100755 => 100644 check-debug-symbols.py delete mode 100644 core-setup-gcc11.patch delete mode 100644 core-setup-hardening-flags.patch delete mode 100644 coreclr-hardening-flags.patch delete mode 100644 dotnet-pull10652.patch diff --git a/.abf.yml b/.abf.yml index c2ce4a1..f3b3485 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,2 +1,4 @@ sources: dotnet-v3.1.112-SDK.tar.gz: e4b887e6ae07247a64ce50689605c46f50a98da1 + dotnet-v3.1.118-SDK-original.tar.gz: 2f4fac048fda5cf19f04947ef7b509271db2f3db + dotnet-v3.1.118-SDK.tar.gz: 1b3240e054b9d1872aa043216755fe29c34e748a diff --git a/RID-ROSA.patch b/RID-ROSA.patch index 8feea8c..d54c870 100644 --- a/RID-ROSA.patch +++ b/RID-ROSA.patch @@ -1,12 +1,12 @@ ---- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs 2021-02-27 18:56:00.070820761 +0300 -+++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs 2021-02-27 19:00:56.342954236 +0300 +--- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs 2021-08-31 16:02:07.573333299 +0300 ++++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/PublishCoreSetupBinaries.cs 2021-08-31 16:07:21.936666632 +0300 @@ -49,6 +49,14 @@ { version = version.Substring(0, version.Length - "-osx".Length); } -+ if (version.Contains("-rosa.2019.1")) ++ if (version.Contains("-rosa.2021.1")) + { -+ version = version.Substring(0, version.IndexOf("-rosa.2019.1")); ++ version = version.Substring(0, version.IndexOf("-rosa.2021.1")); + } + if (version.Contains("-rosa.2019.05")) + { diff --git a/RuntimeIdentifierGraph-Rosa.patch b/RuntimeIdentifierGraph-Rosa.patch index ba95389..ec943be 100644 --- a/RuntimeIdentifierGraph-Rosa.patch +++ b/RuntimeIdentifierGraph-Rosa.patch @@ -3,17 +3,17 @@ @@ -1,5 +1,35 @@ { "runtimes": { -+ "rosa.2019.1": { ++ "rosa.2021.1": { + "#import": [ + "linux" + ] + }, -+ "rosa.2019.1-arm64": { ++ "rosa.2021.1-arm64": { + "#import": [ + "linux-arm64" + ] + }, -+ "rosa.2019.1-x64": { ++ "rosa.2021.1-x64": { + "#import": [ + "linux-x64" + ] diff --git a/check-debug-symbols.py b/check-debug-symbols.py old mode 100755 new mode 100644 diff --git a/core-setup-gcc11.patch b/core-setup-gcc11.patch deleted file mode 100644 index 8cbfcbb..0000000 --- a/core-setup-gcc11.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/src/corehost/cli/test/nativehost/host_context_test.cpp b/src/corehost/cli/test/nativehost/host_context_test.cpp -index e6dc9f6d8..d42c0e0f2 100644 ---- a/src/corehost/cli/test/nativehost/host_context_test.cpp -+++ b/src/corehost/cli/test/nativehost/host_context_test.cpp -@@ -11,6 +11,7 @@ - #include - #include "host_context_test.h" - #include -+#include - - namespace - { -@@ -539,4 +540,4 @@ bool host_context_test::load_assembly_and_get_function_pointer( - hostfxr_exports hostfxr{ hostfxr_path }; - - return load_assembly_and_get_function_pointer(hostfxr, config_path, argc, argv, config_log_prefix, test_output); --} -\ No newline at end of file -+} diff --git a/core-setup-hardening-flags.patch b/core-setup-hardening-flags.patch deleted file mode 100644 index 3f6b91c..0000000 --- a/core-setup-hardening-flags.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/src/settings.cmake b/src/settings.cmake ---- a/src/settings.cmake -+++ b/src/settings.cmake -@@ -218,6 +218,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1") -+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie") - add_compile_options(-fstack-protector-strong) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - add_compile_options(-fstack-protector) diff --git a/coreclr-hardening-flags.patch b/coreclr-hardening-flags.patch deleted file mode 100644 index d58d735..0000000 --- a/coreclr-hardening-flags.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/src/debug/createdump/CMakeLists.txt b/src/debug/createdump/CMakeLists.txt ---- a/src/debug/createdump/CMakeLists.txt -+++ b/src/debug/createdump/CMakeLists.txt -@@ -21,6 +21,7 @@ include_directories(BEFORE ${VM_DIR}) - add_definitions(-DPAL_STDCPP_COMPAT) - - add_compile_options(-fPIE) -+add_link_options(-pie) - - set(CREATEDUMP_SOURCES - createdump.cpp diff --git a/corefx-Rosalinux-groups.patch b/corefx-Rosalinux-groups.patch index 51279d2..d7b72f9 100644 --- a/corefx-Rosalinux-groups.patch +++ b/corefx-Rosalinux-groups.patch @@ -1,11 +1,13 @@ -diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283-diff/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json ---- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json 2021-02-27 22:01:04.000000000 +0300 -+++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json 2021-03-19 16:24:33.429393286 +0300 -@@ -133,6 +133,50 @@ +diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json +index da73456..428d9c9 100644 +--- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json ++++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json +@@ -177,6 +177,53 @@ "any", "base" ], -+ "alpine.3.13": [ ++ "alpine.3.14": [ ++ "alpine.3.14", + "alpine.3.13", + "alpine.3.12", + "alpine.3.11", @@ -21,7 +23,9 @@ diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.P + "any", + "base" + ], -+ "alpine.3.13-x64": [ ++ "alpine.3.14-x64": [ ++ "alpine.3.14-x64", ++ "alpine.3.14", + "alpine.3.13-x64", + "alpine.3.13", + "alpine.3.12-x64", @@ -52,47 +56,35 @@ diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.P "alpine.3.6": [ "alpine.3.6", "alpine", -@@ -647,6 +691,23 @@ +@@ -625,6 +672,74 @@ "any", "base" ], -+ "exherbo": [ -+ "exherbo", ++ "debian.11": [ ++ "debian.11", ++ "debian", + "linux", + "unix", + "any", + "base" + ], -+ "exherbo-x64": [ -+ "exherbo-x64", -+ "exherbo", -+ "linux-x64", ++ "debian.11-arm": [ ++ "debian.11-arm", ++ "debian.11", ++ "debian-arm", ++ "debian", ++ "linux-arm", + "linux", -+ "unix-x64", ++ "unix-arm", + "unix", + "any", + "base" + ], - "fedora": [ - "fedora", - "linux", -@@ -1058,6 +1119,38 @@ - "any", - "base" - ], -+ "fedora.35": [ -+ "fedora.35", -+ "fedora", -+ "linux", -+ "unix", -+ "any", -+ "base" -+ ], -+ "fedora.35-arm64": [ -+ "fedora.35-arm64", -+ "fedora.35", -+ "fedora-arm64", -+ "fedora", ++ "debian.11-arm64": [ ++ "debian.11-arm64", ++ "debian.11", ++ "debian-arm64", ++ "debian", + "linux-arm64", + "linux", + "unix-arm64", @@ -100,11 +92,23 @@ diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.P + "any", + "base" + ], -+ "fedora.35-x64": [ -+ "fedora.35-x64", -+ "fedora.35", -+ "fedora-x64", -+ "fedora", ++ "debian.11-armel": [ ++ "debian.11-armel", ++ "debian.11", ++ "debian-armel", ++ "debian", ++ "linux-armel", ++ "linux", ++ "unix-armel", ++ "unix", ++ "any", ++ "base" ++ ], ++ "debian.11-x64": [ ++ "debian.11-x64", ++ "debian.11", ++ "debian-x64", ++ "debian", + "linux-x64", + "linux", + "unix-x64", @@ -112,17 +116,25 @@ diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.P + "any", + "base" + ], - "freebsd": [ - "freebsd", - "unix", -@@ -3037,6 +3130,97 @@ - "linux-x64", - "linux", - "unix-x64", ++ "debian.11-x86": [ ++ "debian.11-x86", ++ "debian.11", ++ "debian-x86", ++ "debian", ++ "linux-x86", ++ "linux", ++ "unix-x86", + "unix", + "any", + "base" + ], + "debian.8": [ + "debian.8", + "debian", +@@ -3204,6 +3319,97 @@ + "any", + "base" + ], + "rosa": [ + "rosa", + "linux", @@ -182,17 +194,17 @@ diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.P + "any", + "base" + ], -+ "rosa.2019.1": [ -+ "rosa.2019.1", ++ "rosa.2021.1": [ ++ "rosa.2021.1", + "rosa", + "linux", + "unix", + "any", + "base" + ], -+ "rosa.2019.1-arm64": [ -+ "rosa.2019.1-arm64", -+ "rosa.2019.1", ++ "rosa.2021.1-arm64": [ ++ "rosa.2021.1-arm64", ++ "rosa.2021.1", + "rosa-arm64", + "rosa", + "linux-arm64", @@ -202,81 +214,86 @@ diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.P + "any", + "base" + ], -+ "rosa.2019.1-x64": [ -+ "rosa.2019.1-x64", -+ "rosa.2019.1", ++ "rosa.2021.1-x64": [ ++ "rosa.2021.1-x64", ++ "rosa.2021.1", + "rosa-x64", + "rosa", + "linux-x64", + "linux", + "unix-x64", - "unix", - "any", - "base" -diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.Platforms/runtime.json corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283-diff/pkg/Microsoft.NETCore.Platforms/runtime.json ---- a/pkg/Microsoft.NETCore.Platforms/runtime.json 2021-02-27 22:01:04.000000000 +0300 -+++ b/pkg/Microsoft.NETCore.Platforms/runtime.json 2021-03-19 16:24:33.419381753 +0300 -@@ -44,6 +44,17 @@ - "alpine.3.11-x64" ++ "unix", ++ "any", ++ "base" ++ ], + "sles": [ + "sles", + "linux", +diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json +index 608a034..f832924 100644 +--- a/pkg/Microsoft.NETCore.Platforms/runtime.json ++++ b/pkg/Microsoft.NETCore.Platforms/runtime.json +@@ -55,6 +55,17 @@ + "alpine.3.12-x64" ] }, -+ "alpine.3.13": { ++ "alpine.3.14": { + "#import": [ -+ "alpine.3.12" ++ "alpine.3.13" + ] + }, -+ "alpine.3.13-x64": { ++ "alpine.3.14-x64": { + "#import": [ -+ "alpine.3.13", -+ "alpine.3.12-x64" ++ "alpine.3.14", ++ "alpine.3.13-x64" + ] + }, "alpine.3.6": { "#import": [ "alpine" -@@ -312,6 +323,17 @@ +@@ -286,6 +297,41 @@ "debian-x86" ] }, -+ "exherbo": { ++ "debian.11": { + "#import": [ -+ "linux" ++ "debian" + ] + }, -+ "exherbo-x64": { ++ "debian.11-arm": { + "#import": [ -+ "exherbo", -+ "linux-x64" ++ "debian.11", ++ "debian-arm" + ] + }, - "fedora": { ++ "debian.11-arm64": { ++ "#import": [ ++ "debian.11", ++ "debian-arm64" ++ ] ++ }, ++ "debian.11-armel": { ++ "#import": [ ++ "debian.11", ++ "debian-armel" ++ ] ++ }, ++ "debian.11-x64": { ++ "#import": [ ++ "debian.11", ++ "debian-x64" ++ ] ++ }, ++ "debian.11-x86": { ++ "#import": [ ++ "debian.11", ++ "debian-x86" ++ ] ++ }, + "debian.8": { "#import": [ - "linux" -@@ -533,6 +555,23 @@ - "fedora-x64" - ] - }, -+ "fedora.35": { -+ "#import": [ -+ "fedora" -+ ] -+ }, -+ "fedora.35-arm64": { -+ "#import": [ -+ "fedora.35", -+ "fedora-arm64" -+ ] -+ }, -+ "fedora.35-x64": { -+ "#import": [ -+ "fedora.35", -+ "fedora-x64" -+ ] -+ }, - "freebsd": { - "#import": [ - "unix" -@@ -1356,6 +1395,57 @@ + "debian" +@@ -1428,6 +1474,57 @@ "rhel-x64" ] }, @@ -314,63 +331,56 @@ diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.P + "rosa-x64" + ] + }, -+ "rosa.2019.1": { ++ "rosa.2021.1": { + "#import": [ + "rosa" + ] + }, -+ "rosa.2019.1-arm64": { ++ "rosa.2021.1-arm64": { + "#import": [ -+ "rosa.2019.1", ++ "rosa.2021.1", + "rosa-arm64" + ] + }, -+ "rosa.2019.1-x64": { ++ "rosa.2021.1-x64": { + "#import": [ -+ "rosa.2019.1", ++ "rosa.2021.1", + "rosa-x64" + ] + }, "sles": { "#import": [ "linux" -diff -ur corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props corefx.50a99d5d3c6e68aecf70627897c0d862a92fc283-diff/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props ---- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props 2021-02-27 22:01:04.000000000 +0300 -+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props 2021-03-19 15:40:31.863898850 +0300 +diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props +index 0e8d06d..846a80d 100644 +--- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props ++++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props @@ -16,7 +16,7 @@ linux-musl x64 -- 3.6;3.7;3.8;3.9;3.10;3.11;3.12 -+ 3.6;3.7;3.8;3.9;3.10;3.11;3.12;3.13 +- 3.6;3.7;3.8;3.9;3.10;3.11;3.12;3.13 ++ 3.6;3.7;3.8;3.9;3.10;3.11;3.12;3.13;3.14 -@@ -40,10 +40,15 @@ - false - - -+ -+ linux -+ x64 -+ -+ - +@@ -43,7 +43,7 @@ + linux - x64;arm64 -- 23;24;25;26;27;28;29;30;31;32;33;34 -+ 23;24;25;26;27;28;29;30;31;32;33;34;35 + x64;x86;arm;armel;arm64 +- 8;9;10 ++ 8;9;10;11 false -@@ -125,6 +130,13 @@ +@@ -137,6 +137,13 @@ 9 + + linux + x64;arm64 -+ 2019.1;2019.05 ++ 2021.1;2019.05 + false + + diff --git a/dotnet-pull10652.patch b/dotnet-pull10652.patch deleted file mode 100644 index 6f1b870..0000000 --- a/dotnet-pull10652.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 49891b96c12567109d6086a23ca7c117dd40bdc7 Mon Sep 17 00:00:00 2001 -From: sfoslund -Date: Fri, 14 Feb 2020 15:05:24 -0800 -Subject: [PATCH] Resolving and adding test coverage for stack dump on dotnet - -d - ---- - .../LocalToolsCommandResolver.cs | 3 +- - src/Cli/dotnet/Program.cs | 4 +++ - .../GivenALocalToolsCommandResolver.cs | 13 ++++++++ - .../CommandTests/CommandIntegrationTests.cs | 31 +++++++++++++++++++ - 4 files changed, 50 insertions(+), 1 deletion(-) - create mode 100644 src/Tests/dotnet.Tests/CommandTests/CommandIntegrationTests.cs - -diff --git a/src/dotnet/CommandFactory/CommandResolution/LocalToolsCommandResolver.cs b/src/dotnet/CommandFactory/CommandResolution/LocalToolsCommandResolver.cs -index fae180cbde..59af704755 100644 ---- a/src/dotnet/CommandFactory/CommandResolution/LocalToolsCommandResolver.cs -+++ b/src/dotnet/CommandFactory/CommandResolution/LocalToolsCommandResolver.cs -@@ -57,7 +57,8 @@ public CommandSpec Resolve(CommandResolverArguments arguments) - return null; - } - -- if (!arguments.CommandName.StartsWith(LeadingDotnetPrefix, StringComparison.OrdinalIgnoreCase)) -+ if (!arguments.CommandName.StartsWith(LeadingDotnetPrefix, StringComparison.OrdinalIgnoreCase) || -+ string.IsNullOrWhiteSpace(arguments.CommandName.Substring(LeadingDotnetPrefix.Length))) - { - return null; - } -diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs -index 8b9cccfe0b..67e784bbf3 100644 ---- a/src/dotnet/Program.cs -+++ b/src/dotnet/Program.cs -@@ -216,6 +216,10 @@ internal static int ProcessArgs(string[] args, ITelemetry telemetryClient = null - - exitCode = builtIn.Command(appArgs.ToArray()); - } -+ else if (string.IsNullOrEmpty(topLevelCommandParserResult.Command)) -+ { -+ exitCode = 0; -+ } - else - { - CommandResult result = CommandFactoryUsingResolver.Create( -diff --git a/test/Microsoft.DotNet.CommandFactory.Tests/GivenALocalToolsCommandResolver.cs b/test/Microsoft.DotNet.CommandFactory.Tests/GivenALocalToolsCommandResolver.cs -index 4235f2055e..07bd774c97 100644 ---- a/test/Microsoft.DotNet.CommandFactory.Tests/GivenALocalToolsCommandResolver.cs -+++ b/test/Microsoft.DotNet.CommandFactory.Tests/GivenALocalToolsCommandResolver.cs -@@ -79,6 +79,19 @@ public void WhenResolveItCanFindToolExecutable(string toolCommand) - commandPath.Should().Be(fakeExecutable.Value); - } - -+ [Fact] -+ public void WhenResolveWithNoArgumentsItReturnsNull() -+ { -+ (FilePath fakeExecutable, LocalToolsCommandResolver localToolsCommandResolver) = DefaultSetup("-d"); -+ -+ var result = localToolsCommandResolver.Resolve(new CommandResolverArguments() -+ { -+ CommandName = "-d", -+ }); -+ -+ result.Should().BeNull(); -+ } -+ - private (FilePath, LocalToolsCommandResolver) DefaultSetup(string toolCommand) - { - NuGetVersion packageVersionA = NuGetVersion.Parse("1.0.4"); -diff --git a/test/dotnet.Tests/CommandTests/CommandIntegrationTests.cs b/test/dotnet.Tests/CommandTests/CommandIntegrationTests.cs -new file mode 100644 -index 0000000000..30e5bfdbb7 ---- /dev/null -+++ b/test/dotnet.Tests/CommandTests/CommandIntegrationTests.cs -@@ -0,0 +1,31 @@ -+// Copyright (c) .NET Foundation and contributors. All rights reserved. -+// Licensed under the MIT license. See LICENSE file in the project root for full license information. -+ -+using FluentAssertions; -+using Microsoft.NET.TestFramework; -+using Microsoft.NET.TestFramework.Commands; -+using Xunit; -+using Xunit.Abstractions; -+ -+namespace Microsoft.DotNet.Tests.Commands -+{ -+ public class CommandIntegrationTests : SdkTest -+ { -+ public CommandIntegrationTests(ITestOutputHelper log) : base(log) {} -+ -+ [Fact] -+ public void GivenNoArgumentsProvided() -+ { -+ var cmd = new DotnetCommand(Log).Execute(string.Empty); -+ cmd.StdErr.Should().BeEmpty(); -+ } -+ -+ [Fact] -+ public void GivenOnlyArgumentProvidedIsDiagnosticsFlag() -+ { -+ var cmd = new DotnetCommand(Log).Execute("-d"); -+ cmd.ExitCode.Should().Be(0); -+ cmd.StdErr.Should().BeEmpty(); -+ } -+ } -+} diff --git a/dotnet3.1.spec b/dotnet3.1.spec index 380af28..b67f4e4 100644 --- a/dotnet3.1.spec +++ b/dotnet3.1.spec @@ -29,10 +29,10 @@ %define _lto_cflags %{nil} -%global host_version 3.1.12 -%global runtime_version 3.1.12 +%global host_version 3.1.18 +%global runtime_version 3.1.18 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 3.1.112 +%global sdk_version 3.1.118 # upstream can update releases without revving the SDK version so these don't always match %global src_version %{sdk_version} %global templates_version %(echo %{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') @@ -60,10 +60,11 @@ %endif %global runtime_id %{distsuffix}.%{rosa_release}*-%{runtime_arch} +%bcond_with identifier_platform_rosa Name: dotnet3.1 Version: %{sdk_rpm_version} -Release: 4 +Release: 1 Summary: .NET Core Runtime and SDK Group: Development/Other License: MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib @@ -71,7 +72,7 @@ URL: https://github.com/dotnet/ # The source is generated on a Fedora box via: # ./build-dotnet-tarball v%%{src_version}-SDK -Source0: dotnet-v%{src_version}-SDK.tar.gz +Source0: dotnet-v%{src_version}-SDK%{?_with_bootstrap:-original}.tar.gz Source1: check-debug-symbols.py Source2: dotnet.sh.in @@ -79,8 +80,7 @@ Patch1: source-build-warnings-are-not-errors.patch # Fix building with our additional CFLAGS/CXXFLAGS/LDFLAGS Patch100: corefx-optflags-support.patch - -# Add some support for cgroupv2 in corefx +#Add some support for cgroupv2 in corefx # All these patches are upstreamed for 5.0 Patch101: corefx-39686-cgroupv2-01.patch Patch102: corefx-39686-cgroupv2-02.patch @@ -89,8 +89,6 @@ Patch103: corefx-39633-cgroupv2-mountpoints.patch # https://github.com/dotnet/source-build/issues/2095 Patch104: corefx-Rosalinux-groups.patch -# Build with with hardening flags, including -pie -Patch200: coreclr-hardening-flags.patch # Fix build with clang 10; Already applied at tarball-build time # Patch201: coreclr-clang10.patch # Fix build on recent versions of gcc/clang @@ -98,18 +96,12 @@ Patch200: coreclr-hardening-flags.patch # Already applied #Patch202: coreclr-libunwind-fno-common.patch -# Build with with hardening flags, including -pie -Patch300: core-setup-hardening-flags.patch -Patch301: core-setup-gcc11.patch - # Disable telemetry by default; make it opt-in Patch500: cli-telemetry-optout.patch # fix RID bootstrap, do it once Patch501: RuntimeIdentifierGraph-Rosa.patch -# https://github.com/dotnet/sdk/pull/10652 -Patch502: dotnet-pull10652.patch -ExclusiveArch: aarch64 x86_64 +ExclusiveArch: x86_64 BuildRequires: clang BuildRequires: cmake @@ -338,7 +330,7 @@ These are not meant for general use. %prep -%setup -q -n dotnet-v%{src_version}-SDK +%setup -q -n dotnet-v%{src_version}-SDK%{?_with_bootstrap:-original} # https://github.com/dotnet/source-build/issues/1689 find . -type f -exec touch {} + @@ -374,23 +366,21 @@ pushd src/corefx.* %patch101 -p1 %patch102 -p1 %patch103 -p1 +%if %{with identifier_platform_rosa} %patch104 -p1 +%endif popd pushd src/coreclr.* -%patch200 -p1 #%%patch201 -p1 #%%patch202 -p1 popd pushd src/core-setup.* -%patch300 -p1 -%patch301 -p1 popd pushd src/cli.* %patch500 -p1 -%patch502 -p1 popd # If CLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE is misisng, add it back @@ -417,12 +407,7 @@ cat /etc/os-release %if %{without bootstrap} # We need to create a copy because we will mutate this cp -a %{_libdir}/dotnet previously-built-dotnet - %if 1 -pushd previously-built-dotnet -patch -p1 < %{P:501} -popd %endif - %endif %if 0%{?fedora} > 32 || 0%{?rhel} > 8 # Setting this macro ensures that only clang supported options will be