Add CentOS 9 RID to fix roslyn build

Also, enable gating/CI

Resolves: RHBZ#1951312
This commit is contained in:
Omair Majid 2021-04-20 12:46:59 -04:00
parent 26f68cd22c
commit 9906cb1566
4 changed files with 303 additions and 4 deletions

57
boot-sdk-centos-rid.patch Normal file
View File

@ -0,0 +1,57 @@
diff --git a/previously-built-dotnet/sdk/3.1.112/RuntimeIdentifierGraph.json b/previously-built-dotnet/sdk/3.1.112/RuntimeIdentifierGraph.json
--- a/previously-built-dotnet/sdk/3.1.112/RuntimeIdentifierGraph.json
+++ b/previously-built-dotnet/sdk/3.1.112/RuntimeIdentifierGraph.json
@@ -151,6 +151,12 @@
"rhel"
]
},
+ "centos-arm64": {
+ "#import": [
+ "centos",
+ "rhel-arm64"
+ ]
+ },
"centos-x64": {
"#import": [
"centos",
@@ -176,6 +182,13 @@
"rhel.8"
]
},
+ "centos.8-arm64": {
+ "#import": [
+ "centos.8",
+ "centos-arm64",
+ "rhel.8-arm64"
+ ]
+ },
"centos.8-x64": {
"#import": [
"centos.8",
@@ -183,6 +196,26 @@
"rhel.8-x64"
]
},
+ "centos.9": {
+ "#import": [
+ "centos",
+ "rhel.9"
+ ]
+ },
+ "centos.9-arm64": {
+ "#import": [
+ "centos.9",
+ "centos-arm64",
+ "rhel.9-arm64"
+ ]
+ },
+ "centos.9-x64": {
+ "#import": [
+ "centos.9",
+ "centos-x64",
+ "rhel.9-x64"
+ ]
+ },
"debian": {
"#import": [
"linux"

View File

@ -0,0 +1,220 @@
From 99ce8c8010296b48745edcfab9ea9cb3abf50ed1 Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Tue, 20 Apr 2021 11:52:13 -0400
Subject: [PATCH] Add CentOS 9 RID and make CentOS 8 arm64 as well
This is the only part of https://github.com/dotnet/runtime/pull/34088
that wasn't already backported to release/3.1.
https://www.redhat.com/en/blog/faq-centos-stream-updates says:
> There will not be a CentOS Linux 9.
>
> CentOS Stream 9 will launch in Q2 2021 as part of the RHEL 9
> development process.
The last part also means that the current parent-child relationship that
we use for RHEL->CentOS in our RID graph will flip starting in 9. I dont
see any immediate impact, so I think we can leave it alone for now.
I got a (currently internal) build of CentOS Stream 9 and
/etc/os-release looks like this:
$ cat /etc/os-release
NAME="CentOS Stream"
VERSION="9"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="9"
PLATFORM_ID="platform:el9"
PRETTY_NAME="CentOS Stream 9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:9"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
---
.../runtime.compatibility.json | 72 ++++++++++++++++++-
pkg/Microsoft.NETCore.Platforms/runtime.json | 35 ++++++++-
.../runtimeGroups.props | 9 ++-
.../packageIndex.json | 3 +-
src/packages.builds | 3 +
6 files changed, 119 insertions(+), 5 deletions(-)
diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
index 29bd92af0b..da7345623e 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
+++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
@@ -366,6 +366,18 @@
"any",
"base"
],
+ "centos-arm64": [
+ "centos-arm64",
+ "centos",
+ "rhel-arm64",
+ "rhel",
+ "linux-arm64",
+ "linux",
+ "unix-arm64",
+ "unix",
+ "any",
+ "base"
+ ],
"centos-x64": [
"centos-x64",
"centos",
@@ -414,6 +426,22 @@
"any",
"base"
],
+ "centos.8-arm64": [
+ "centos.8-arm64",
+ "centos.8",
+ "centos-arm64",
+ "rhel.8-arm64",
+ "centos",
+ "rhel.8",
+ "rhel-arm64",
+ "rhel",
+ "linux-arm64",
+ "linux",
+ "unix-arm64",
+ "unix",
+ "any",
+ "base"
+ ],
"centos.8-x64": [
"centos.8-x64",
"centos.8",
@@ -430,6 +458,48 @@
"any",
"base"
],
+ "centos.9": [
+ "centos.9",
+ "centos",
+ "rhel.9",
+ "rhel",
+ "linux",
+ "unix",
+ "any",
+ "base"
+ ],
+ "centos.9-arm64": [
+ "centos.9-arm64",
+ "centos.9",
+ "centos-arm64",
+ "rhel.9-arm64",
+ "centos",
+ "rhel.9",
+ "rhel-arm64",
+ "rhel",
+ "linux-arm64",
+ "linux",
+ "unix-arm64",
+ "unix",
+ "any",
+ "base"
+ ],
+ "centos.9-x64": [
+ "centos.9-x64",
+ "centos.9",
+ "centos-x64",
+ "rhel.9-x64",
+ "centos",
+ "rhel.9",
+ "rhel-x64",
+ "rhel",
+ "linux-x64",
+ "linux",
+ "unix-x64",
+ "unix",
+ "any",
+ "base"
+ ],
"debian": [
"debian",
"linux",
diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json
index 0bcd543a3b..608a034808 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtime.json
+++ b/pkg/Microsoft.NETCore.Platforms/runtime.json
@@ -151,6 +151,12 @@
"rhel"
]
},
+ "centos-arm64": {
+ "#import": [
+ "centos",
+ "rhel-arm64"
+ ]
+ },
"centos-x64": {
"#import": [
"centos",
@@ -176,6 +182,13 @@
"rhel.8"
]
},
+ "centos.8-arm64": {
+ "#import": [
+ "centos.8",
+ "centos-arm64",
+ "rhel.8-arm64"
+ ]
+ },
"centos.8-x64": {
"#import": [
"centos.8",
@@ -183,6 +196,26 @@
"rhel.8-x64"
]
},
+ "centos.9": {
+ "#import": [
+ "centos",
+ "rhel.9"
+ ]
+ },
+ "centos.9-arm64": {
+ "#import": [
+ "centos.9",
+ "centos-arm64",
+ "rhel.9-arm64"
+ ]
+ },
+ "centos.9-x64": {
+ "#import": [
+ "centos.9",
+ "centos-x64",
+ "rhel.9-x64"
+ ]
+ },
"debian": {
"#import": [
"linux"
diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
index 52b3659651..0e8d06dddd 100644
--- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
+++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
@@ -28,7 +28,14 @@
<RuntimeGroup Include="centos">
<Parent>rhel</Parent>
<Architectures>x64</Architectures>
- <Versions>7;8</Versions>
+ <Versions>7</Versions>
+ <ApplyVersionsToParent>true</ApplyVersionsToParent>
+ <TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
+ </RuntimeGroup>
+ <RuntimeGroup Include="centos">
+ <Parent>rhel</Parent>
+ <Architectures>x64;arm64</Architectures>
+ <Versions>8;9</Versions>
<ApplyVersionsToParent>true</ApplyVersionsToParent>
<TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
</RuntimeGroup>
--
2.30.2

View File

@ -65,6 +65,7 @@ URL: https://github.com/dotnet/
Source0: dotnet-v%{src_version}-SDK.tar.gz
Source1: check-debug-symbols.py
Source2: dotnet.sh.in
Source3: boot-sdk-centos-rid.patch
Patch1: source-build-warnings-are-not-errors.patch
@ -79,6 +80,8 @@ Patch103: corefx-39633-cgroupv2-mountpoints.patch
# https://github.com/dotnet/corefx/pull/43032
Patch104: corefx-43032-fedora-35-rid.patch
# https://github.com/dotnet/corefx/pull/43068
Patch105: corefx-43068-centos-9-rid.patch
# Build with with hardening flags, including -pie
Patch200: coreclr-hardening-flags.patch
@ -364,6 +367,7 @@ pushd src/corefx.*
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
popd
pushd src/coreclr.*
@ -407,13 +411,14 @@ cat /etc/os-release
# We need to create a copy because we will mutate this
cp -a %{_libdir}/dotnet previously-built-dotnet
# .NET Core 3.1 doesn't (yet) know about RHEL 9, so lets hack the RHEL
# 9 RID into there, for now. This hack can be removed when the 3.1.112
# SDK is available in the buildroot.
# .NET Core 3.1 doesn't (yet) know about CentOS 9, so lets hack the
# CentOS 9 RID into there, for now. This hack can be removed when an
# SDK that knows about CentOS 9 is available in the buildroot.
%if 0%{?rhel} == 9
cat /etc/os-release
find -iname RuntimeIdentifierGraph.json
patch -p1 -i %{SOURCE3}
cat $(find -iname RuntimeIdentifierGraph.json)
sed -i -e 's|rhel.8|rhel.9|g' $(find -iname RuntimeIdentifierGraph.json)
%endif
%endif
@ -570,6 +575,10 @@ echo "Testing build results for debug symbols..."
%changelog
* Wed Apr 21 2021 Omair Majid <omajid@redhat.com> - 3.1.113-3
- Fix build by adding CentOS 9 RIDs
- Resolves: RHBZ#1951312
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.1.113-3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937

View File

@ -5,3 +5,16 @@ decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}