From e9b7ea8023fed61bdf351dcec2dcc70732e6c791 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Thu, 22 Jun 2023 12:29:34 +0000 Subject: [PATCH] import dotnet7.0-7.0.107-1.0.1.el8_8 --- .dotnet7.0.metadata | 2 +- SOURCES/1000-set-OL-RID.patch | 312 ++++++++++++++++++++++++++++++++++ SPECS/dotnet7.0.spec | 26 ++- 3 files changed, 335 insertions(+), 5 deletions(-) create mode 100644 SOURCES/1000-set-OL-RID.patch diff --git a/.dotnet7.0.metadata b/.dotnet7.0.metadata index d3dc815..1d2cd22 100644 --- a/.dotnet7.0.metadata +++ b/.dotnet7.0.metadata @@ -1 +1 @@ -4db2c625b60535fec9d1a40608cb25452c96964d SOURCES/dotnet-v7.0.105.tar.gz +1919e3270166b2669fee72f6a157b6347ce127db SOURCES/dotnet-v7.0.107.tar.gz diff --git a/SOURCES/1000-set-OL-RID.patch b/SOURCES/1000-set-OL-RID.patch new file mode 100644 index 0000000..cea6e88 --- /dev/null +++ b/SOURCES/1000-set-OL-RID.patch @@ -0,0 +1,312 @@ +From b237532a0f6ee04ccdee1964c44b91bb75fdce6b Mon Sep 17 00:00:00 2001 +From: Tianyue Lan +Date: Thu, 6 Oct 2022 10:17:55 -0700 +Subject: [PATCH] Set TargetRid based on os release major version +Also added OL arm64 RuntimeIdentifier +[Orabug:34671152] +Signed-Off-By: Tianyue.Lan@oracle.com + +For OL8-u7GA: +src/diagnostics/eng/init-distro-rid.sh moved to src/diagnostics/eng/native/init-distro-rid.sh + +Signed-Off-By: John.Mcwalters@oracle.com + +--- + .../Native/PlatformApis.cs | 2 +- + .../eng/native/init-distro-rid.sh | 2 +- + src/diagnostics/eng/native/init-distro-rid.sh | 2 +- + src/runtime/eng/native/init-distro-rid.sh | 2 +- + .../System/PlatformDetection.Unix.cs | 2 +- + .../src/Microsoft.NETCore.Platforms.csproj | 2 +- + .../src/runtime.compatibility.json | 70 +++++++++++++++++++ + .../src/runtime.json | 33 +++++++++ + .../src/runtimeGroups.props | 4 +- + .../src/native/corehost/hostmisc/pal.unix.cpp | 7 +- + .../RuntimeEnvironment.cs | 2 +- + 11 files changed, 118 insertions(+), 10 deletions(-) + +diff --git a/src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs b/src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs +index 80fcf45e4..4d94dc27b 100644 +--- a/src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs ++++ b/src/arcade/src/Microsoft.DotNet.XUnitConsoleRunner/src/common/AssemblyResolution/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs +@@ -131,7 +131,7 @@ private static DistroInfo NormalizeDistroInfo(DistroInfo distroInfo) + // Handle if VersionId is null by just setting the index to -1. + int minorVersionNumberSeparatorIndex = distroInfo.VersionId?.IndexOf('.') ?? -1; + +- if (distroInfo.Id == "rhel" && minorVersionNumberSeparatorIndex != -1) ++ if ((distroInfo.Id == "rhel" || distroInfo.Id == "ol") && minorVersionNumberSeparatorIndex != -1) + { + distroInfo.VersionId = distroInfo.VersionId.Substring(0, minorVersionNumberSeparatorIndex); + } +diff --git a/src/deployment-tools/eng/native/init-distro-rid.sh b/src/deployment-tools/eng/native/init-distro-rid.sh +index 22efd8e8b..28ea80898 100644 +--- a/src/deployment-tools/eng/native/init-distro-rid.sh ++++ b/src/deployment-tools/eng/native/init-distro-rid.sh +@@ -41,7 +41,7 @@ initNonPortableDistroRid() + # We have forced __PortableBuild=0. This is because -portablebuld + # has been passed as false. + if (( isPortable == 0 )); then +- if [ "${ID}" = "rhel" ]; then ++ if [[ "${ID}" == "rhel" || "${ID}" == "ol" ]]; then + # remove the last version digit + VERSION_ID="${VERSION_ID%.*}" + fi +diff --git a/src/diagnostics/eng/native/init-distro-rid.sh b/src/diagnostics/eng/native/init-distro-rid.sh +index bc38ed90b..ed600ce0a 100755 +--- a/src/diagnostics/eng/native/init-distro-rid.sh ++++ b/src/diagnostics/eng/native/init-distro-rid.sh +@@ -41,7 +41,7 @@ + # We have forced __PortableBuild=0. This is because -portablebuld + # has been passed as false. + if (( isPortable == 0 )); then +- if [[ "${ID}" == "rhel" || "${ID}" == "rocky" ]]; then ++ if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "ol" ]]; then + # remove the last version digit + VERSION_ID="${VERSION_ID%.*}" + fi +diff --git a/src/runtime/eng/native/init-distro-rid.sh b/src/runtime/eng/native/init-distro-rid.sh +index 750122406..fe6d8ffa2 100644 +--- a/src/runtime/eng/native/init-distro-rid.sh ++++ b/src/runtime/eng/native/init-distro-rid.sh +@@ -41,7 +41,7 @@ initNonPortableDistroRid() + # We have forced __PortableBuild=0. This is because -portablebuld + # has been passed as false. + if (( isPortable == 0 )); then +- if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" ]]; then ++ if [[ "${ID}" == "rhel" || "${ID}" == "rocky" || "${ID}" == "alpine" || "${ID}" == "ol" ]]; then + # remove the last version digit + VERSION_ID="${VERSION_ID%.*}" + fi +diff --git a/src/runtime/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs b/src/runtime/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs +index 33c4f5f93..600c20024 100644 +--- a/src/runtime/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs ++++ b/src/runtime/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Unix.cs +@@ -258,7 +258,7 @@ private static DistroInfo GetDistroInfo() + + private static bool IsRedHatFamilyAndVersion(int major = -1, int minor = -1, int build = -1, int revision = -1) + { +- return IsDistroAndVersion((distro) => distro == "rhel" || distro == "centos", major, minor, build, revision); ++ return IsDistroAndVersion((distro) => distro == "rhel" || distro == "centos" || distro == "ol", major, minor, build, revision); + } + + /// +diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj +index 482e0b70e..681ad6c2b 100644 +--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj ++++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj +@@ -76,7 +76,7 @@ + RuntimeJson="runtime.json" + CompatibilityMap="runtime.compatibility.json" + RuntimeDirectedGraph="$(OutputPath)runtime.json.dgml" +- UpdateRuntimeFiles="$(UpdateRuntimeFiles)" /> ++ UpdateRuntimeFiles="true" /> + + + +diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json +index 15c8c0a74..77a0fcfd3 100644 +--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json ++++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtime.compatibility.json +@@ -4938,6 +4938,18 @@ + "any", + "base" + ], ++ "ol-arm64": [ ++ "ol-arm64", ++ "ol", ++ "rhel-arm64", ++ "rhel", ++ "linux-arm64", ++ "linux", ++ "unix-arm64", ++ "unix", ++ "any", ++ "base" ++ ], + "ol.7": [ + "ol.7", + "ol", +@@ -5324,6 +5336,22 @@ + "any", + "base" + ], ++ "ol.8-arm64": [ ++ "ol.8-arm64", ++ "ol.8", ++ "ol-arm64", ++ "rhel.8-arm64", ++ "ol", ++ "rhel.8", ++ "rhel-arm64", ++ "rhel", ++ "linux-arm64", ++ "linux", ++ "unix-arm64", ++ "unix", ++ "any", ++ "base" ++ ], + "ol.8-x64": [ + "ol.8-x64", + "ol.8", +@@ -5372,6 +5400,48 @@ + "any", + "base" + ], ++ "ol.9": [ ++ "ol.9", ++ "ol", ++ "rhel.9", ++ "rhel", ++ "linux", ++ "unix", ++ "any", ++ "base" ++ ], ++ "ol.9-arm64": [ ++ "ol.9-arm64", ++ "ol.9", ++ "ol-arm64", ++ "rhel.9-arm64", ++ "ol", ++ "rhel.9", ++ "rhel-arm64", ++ "rhel", ++ "linux-arm64", ++ "linux", ++ "unix-arm64", ++ "unix", ++ "any", ++ "base" ++ ], ++ "ol.9-x64": [ ++ "ol.9-x64", ++ "ol.9", ++ "ol-x64", ++ "rhel.9-x64", ++ "ol", ++ "rhel.9", ++ "rhel-x64", ++ "rhel", ++ "linux-x64", ++ "linux", ++ "unix-x64", ++ "unix", ++ "any", ++ "base" ++ ], + "omnios": [ + "omnios", + "illumos", +diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json +index 050ce1e4e..71763c670 100644 +--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json ++++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtime.json +@@ -1933,6 +1933,12 @@ + "rhel-x64" + ] + }, ++ "ol-arm64": { ++ "#import": [ ++ "ol", ++ "rhel-arm64" ++ ] ++ }, + "ol.7": { + "#import": [ + "ol", +@@ -2050,6 +2056,13 @@ + "rhel.8-x64" + ] + }, ++ "ol.8-arm64": { ++ "#import": [ ++ "ol.8", ++ "ol-arm64", ++ "rhel.8-arm64" ++ ] ++ }, + "ol.8.0": { + "#import": [ + "ol.8", +@@ -2063,6 +2076,26 @@ + "rhel.8.0-x64" + ] + }, ++ "ol.9": { ++ "#import": [ ++ "ol", ++ "rhel.9" ++ ] ++ }, ++ "ol.9-arm64": { ++ "#import": [ ++ "ol.9", ++ "ol-arm64", ++ "rhel.9-arm64" ++ ] ++ }, ++ "ol.9-x64": { ++ "#import": [ ++ "ol.9", ++ "ol-x64", ++ "rhel.9-x64" ++ ] ++ }, + "omnios": { + "#import": [ + "illumos" +diff --git a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props +index 1b10a2604..dc57d4580 100644 +--- a/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props ++++ b/src/runtime/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props +@@ -157,8 +157,8 @@ + + + rhel +- x64 +- 8;8.0 ++ x64;arm64 ++ 8;8.0;9 + true + + +diff --git a/src/runtime/src/native/corehost/hostmisc/pal.unix.cpp b/src/runtime/src/native/corehost/hostmisc/pal.unix.cpp +index 422c966a3..b4ab15c15 100644 +--- a/src/runtime/src/native/corehost/hostmisc/pal.unix.cpp ++++ b/src/runtime/src/native/corehost/hostmisc/pal.unix.cpp +@@ -764,12 +764,17 @@ pal::string_t pal::get_current_os_rid_platform() + static + pal::string_t normalize_linux_rid(pal::string_t rid) + { ++ pal::string_t olPrefix(_X("ol.")); + pal::string_t rhelPrefix(_X("rhel.")); + pal::string_t alpinePrefix(_X("alpine.")); + pal::string_t rockyPrefix(_X("rocky.")); + size_t lastVersionSeparatorIndex = std::string::npos; + +- if (rid.compare(0, rhelPrefix.length(), rhelPrefix) == 0) ++ if (rid.compare(0, olPrefix.length(), olPrefix) == 0) ++ { ++ lastVersionSeparatorIndex = rid.find(_X("."), olPrefix.length()); ++ } ++ else if (rid.compare(0, rhelPrefix.length(), rhelPrefix) == 0) + { + lastVersionSeparatorIndex = rid.find(_X("."), rhelPrefix.length()); + } +diff --git a/src/sdk/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs b/src/sdk/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs +index 11d42fda8..877bb2050 100644 +--- a/src/sdk/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs ++++ b/src/sdk/src/Cli/Microsoft.DotNet.Cli.Utils/RuntimeEnvironment.cs +@@ -220,7 +220,7 @@ private static DistroInfo NormalizeDistroInfo(DistroInfo distroInfo) + lastVersionNumberSeparatorIndex = distroInfo.VersionId.IndexOf('.', lastVersionNumberSeparatorIndex + 1); + } + +- if (lastVersionNumberSeparatorIndex != -1 && (distroInfo.Id == "rhel" || distroInfo.Id == "alpine")) ++ if (lastVersionNumberSeparatorIndex != -1 && (distroInfo.Id == "rhel" || distroInfo.Id == "alpine" || distroInfo.Id == "ol")) + { + distroInfo.VersionId = distroInfo.VersionId.Substring(0, lastVersionNumberSeparatorIndex); + } +-- +2.27.0 + diff --git a/SPECS/dotnet7.0.spec b/SPECS/dotnet7.0.spec index 07939b1..4ed7686 100644 --- a/SPECS/dotnet7.0.spec +++ b/SPECS/dotnet7.0.spec @@ -6,10 +6,10 @@ # until that's done, disable LTO. This has to happen before setting the flags below. %define _lto_cflags %{nil} -%global host_version 7.0.5 -%global runtime_version 7.0.5 +%global host_version 7.0.7 +%global runtime_version 7.0.7 %global aspnetcore_runtime_version %{runtime_version} -%global sdk_version 7.0.105 +%global sdk_version 7.0.107 %global sdk_feature_band_version %(echo %{sdk_version} | cut -d '-' -f 1 | sed -e 's|[[:digit:]][[:digit:]]$|00|') %global templates_version %{runtime_version} #%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') @@ -51,7 +51,7 @@ Name: dotnet7.0 Version: %{sdk_rpm_version} -Release: 2%{?dist} +Release: 1.0.1%{?dist} Summary: .NET Runtime and SDK 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 URL: https://github.com/dotnet/ @@ -80,6 +80,10 @@ Patch1: roslyn-analyzers-ppc64le-apphost.patch +#Oracle patches +Patch1000: 1000-set-OL-RID.patch + + %if 0%{?fedora} || 0%{?rhel} >= 8 ExclusiveArch: aarch64 ppc64le s390x x86_64 %else @@ -407,6 +411,8 @@ sed -i 's|/usr/share/dotnet|%{_libdir}/dotnet|' src/runtime/src/native/corehost/ sed -i -E 's|( /p:BuildDebPackage=false)|\1 --cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|' src/runtime/eng/SourceBuild.props %endif +#Oracle patches +%patch1000 -p1 %build cat /etc/os-release @@ -478,6 +484,7 @@ VERBOSE=1 ./build.sh \ /v:n \ /p:LogVerbosity=n \ /p:UseNonPortableIlasmPackageOverride=true \ + /p:TargetRid=%{runtime_id} \ @@ -617,6 +624,17 @@ export COMPlus_LTTng=0 %changelog +* Wed Jun 14 2023 EL Errata - 7.0.107-1.0.1 +- Set TargetRid based on os release major version, add OL arm64 RuntimeIdentifier [Orabug: 34671152] + +* Fri Jun 02 2023 Andrew Slice - 7.0.107-1 +- Update to .NET SDK 7.0.107 and Runtime 7.0.7 +- Resolves: RHBZ#2211876 + +* Thu May 04 2023 Omair Majid - 7.0.106-2 +- Update to .NET SDK 7.0.106 and Runtime 7.0.6 +- Resolves: RHBZ#2190267 + * Wed Apr 12 2023 Omair Majid - 7.0.105-2 - Update to .NET SDK 7.0.105 and Runtime 7.0.5 - Resolves: RHBZ#2183589