core-rocky-rid.patch 8.54 KB
Newer Older
1
2
3
diff -Naurp dotnet-v3.1.120-SDK-orig/src/dotnet-coreclr.63ecd17b41a826d8fbc77b238e8490df7bc92af4/init-distro-rid.sh dotnet-v3.1.120-SDK/src/dotnet-coreclr.63ecd17b41a826d8fbc77b238e8490df7bc92af4/init-distro-rid.sh
--- dotnet-v3.1.120-SDK-orig/src/dotnet-coreclr.63ecd17b41a826d8fbc77b238e8490df7bc92af4/init-distro-rid.sh	2021-07-29 11:51:27.000000000 -0700
+++ dotnet-v3.1.120-SDK/src/dotnet-coreclr.63ecd17b41a826d8fbc77b238e8490df7bc92af4/init-distro-rid.sh	2021-08-11 16:09:37.673740318 -0700
4
@@ -51,7 +51,7 @@ initNonPortableDistroRid()
5
6
7
8
9
10
11
12
             # 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}" == "rocky" ]; then
                     # remove the last version digit	
                     VERSION_ID=${VERSION_ID%.*}
                 fi
13
@@ -185,4 +185,4 @@ initDistroRidGlobal()
14
15
16
17
18
19
         
         export __RuntimeId=${__DistroRid}
     fi
-}
\ No newline at end of file
+}
20
21
22
diff -Naurp dotnet-v3.1.120-SDK-orig/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json dotnet-v3.1.120-SDK/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json
--- dotnet-v3.1.120-SDK-orig/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json	2021-07-29 11:51:44.000000000 -0700
+++ dotnet-v3.1.120-SDK/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json	2021-08-11 16:12:33.225921253 -0700
23
@@ -3204,6 +3204,75 @@
24
25
26
     "any",
     "base"
   ],
27
+  "rocky": [
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
+    "rocky",
+    "rhel",
+    "linux",
+    "unix",
+    "any",
+    "base"
+  ],
+  "rocky-arm64": [
+    "rocky-arm64",
+    "rocky",
+    "rhel-arm64",
+    "rhel",
+    "linux-arm64",
+    "linux",
+    "unix-arm64",
+    "unix",
+    "any",
+    "base"
+  ],
47
48
+  "rocky-x64": [
+    "rocky-x64",
49
+    "rocky",
50
+    "rhel-x64",
51
+    "rhel",
52
+    "linux-x64",
53
+    "linux",
54
+    "unix-x64",
55
56
57
58
+    "unix",
+    "any",
+    "base"
+  ],
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
+  "rocky.8.4": [
+    "rocky.8.4",
+    "rocky",
+    "rhel",
+    "linux",
+    "unix",
+    "any",
+    "base"
+  ],
+  "rocky.8.4-arm64": [
+    "rocky.8.4-arm64",
+    "rocky.8.4",
+    "rocky-arm64",
+    "rocky",
+    "rhel-arm64",
+    "rhel",
+    "linux-arm64",
+    "linux",
+    "unix-arm64",
+    "unix",
+    "any",
+    "base"
+  ],
+  "rocky.8.4-x64": [
+    "rocky.8.4-x64",
+    "rocky.8.4",
+    "rocky-x64",
+    "rocky",
+    "rhel-x64",
+    "rhel",
+    "linux-x64",
90
91
92
93
94
95
96
97
+    "linux",
+    "unix-x64",
+    "unix",
+    "any",
+    "base"
+  ],
   "sles": [
     "sles",
98
     "linux",
99
100
101
102
103
104
105
@@ -5225,4 +5294,4 @@
     "any",
     "base"
   ]
-}
\ No newline at end of file
+}
106
107
108
diff -Naurp dotnet-v3.1.120-SDK-orig/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props dotnet-v3.1.120-SDK/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props
--- dotnet-v3.1.120-SDK-orig/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props	2021-07-29 11:51:44.000000000 -0700
+++ dotnet-v3.1.120-SDK/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props	2021-08-11 16:13:16.146454465 -0700
109
@@ -137,6 +137,12 @@
110
111
112
113
114
115
       <Versions>9</Versions>
     </RuntimeGroup>
 
+    <RuntimeGroup Include="rocky">
+      <Parent>rhel</Parent>
+      <Architectures>x64;arm64</Architectures>
116
+      <Versions>8.4</Versions>
117
118
119
120
121
+    </RuntimeGroup>
+
     <RuntimeGroup Include="sles">
       <Parent>linux</Parent>
       <Architectures>x64</Architectures>
122
123
124
diff -Naurp dotnet-v3.1.120-SDK-orig/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtime.json dotnet-v3.1.120-SDK/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtime.json
--- dotnet-v3.1.120-SDK-orig/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtime.json	2021-07-29 11:51:44.000000000 -0700
+++ dotnet-v3.1.120-SDK/src/dotnet-corefx.c2011c5350eba4c83554205d06b9ed97c3fccf05/pkg/Microsoft.NETCore.Platforms/runtime.json	2021-08-11 16:13:54.429930073 -0700
125
@@ -1428,6 +1428,40 @@
126
127
128
129
130
131
132
133
         "rhel-x64"
       ]
     },
+    "rocky": {
+      "#import": [
+        "rhel"
+      ]
+    },
134
+    "rocky-arm64": {
135
136
+      "#import": [
+        "rocky",
137
+        "rhel-arm64"
138
139
+      ]
+    },
140
+    "rocky-x64": {
141
142
+      "#import": [
+        "rocky",
143
+        "rhel-x64"
144
145
+      ]
+    },
146
147
+    "rocky.8.4": {
+      "#import": [
148
+        "rocky"
149
150
151
152
153
+      ]
+    },
+    "rocky.8.4-arm64": {
+      "#import": [
+        "rocky.8.4",
154
+        "rocky-arm64"
155
156
157
158
159
+      ]
+    },
+    "rocky.8.4-x64": {
+      "#import": [
+        "rocky.8.4",
160
+        "rocky-x64"
161
+      ]
162
163
164
165
+    },
     "sles": {
       "#import": [
         "linux"
166
167
168
169
170
171
172
@@ -2390,4 +2424,4 @@
       ]
     }
   }
-}
\ No newline at end of file
+}
173
174
175
diff -Naurp dotnet-v3.1.120-SDK-orig/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/corehost/build.sh dotnet-v3.1.120-SDK/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/corehost/build.sh
--- dotnet-v3.1.120-SDK-orig/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/corehost/build.sh	2021-07-29 11:51:50.000000000 -0700
+++ dotnet-v3.1.120-SDK/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/corehost/build.sh	2021-08-11 16:14:31.400389369 -0700
176
@@ -21,7 +21,7 @@ init_rid_plat()
177
178
179
180
181
182
183
184
         __rid_plat=""
         if [ -e /etc/os-release ]; then
             source /etc/os-release
-            if [[ "$ID" == "rhel" ]]; then
+            if [[ "$ID" == "rhel" ]] || [[ "$ID" == "rocky" ]]; then
                 # remove the last version number
                 VERSION_ID=${VERSION_ID%.*}
             fi
185
186
187
diff -Naurp dotnet-v3.1.120-SDK-orig/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/corehost/common/pal.unix.cpp dotnet-v3.1.120-SDK/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/corehost/common/pal.unix.cpp
--- dotnet-v3.1.120-SDK-orig/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/corehost/common/pal.unix.cpp	2021-07-29 11:51:50.000000000 -0700
+++ dotnet-v3.1.120-SDK/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/corehost/common/pal.unix.cpp	2021-08-11 16:15:47.296332247 -0700
188
@@ -496,6 +496,7 @@ pal::string_t normalize_linux_rid(pal::s
189
190
191
192
193
194
195
 {
     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)
196
@@ -510,6 +511,10 @@ pal::string_t normalize_linux_rid(pal::s
197
198
199
200
201
             lastVersionSeparatorIndex = rid.find(_X("."), secondVersionSeparatorIndex + 1);
         }
     }
+    else if (rid.compare(0, rockyPrefix.length(), rockyPrefix) == 0)
+    {
202
203
+        lastVersionSeparatorIndex = rid.find(_X("."), rockyPrefix.length());
+    }
204
205
206
 
     if (lastVersionSeparatorIndex != std::string::npos)
     {
207
208
209
diff -Naurp dotnet-v3.1.120-SDK-orig/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/managed/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs dotnet-v3.1.120-SDK/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/managed/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs
--- dotnet-v3.1.120-SDK-orig/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/managed/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs	2021-07-29 11:51:50.000000000 -0700
+++ dotnet-v3.1.120-SDK/src/dotnet-core-setup.2833dab8c3f9c29843545986f9e94ce8dea32918/src/managed/Microsoft.DotNet.PlatformAbstractions/Native/PlatformApis.cs	2021-08-11 16:16:25.319804622 -0700
210
@@ -181,7 +181,7 @@ namespace Microsoft.DotNet.PlatformAbstr
211
212
213
214
215
216
217
218
                 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 == "rocky"))
             {
                 distroInfo.VersionId = distroInfo.VersionId.Substring(0, lastVersionNumberSeparatorIndex);
             }