Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/native/init-distro-rid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ initNonPortableDistroRid()
# We have forced __PortableBuild=0. This is because -portablebuld
# has been passed as false.
if (( isPortable == 0 )); then
if [[ "${ID}" == "rhel" || "${ID}" == "rocky" ]]; then
# remove the last version digit
# for RHEL and its derivatives, remove the last version digit (if present)
if [[ "${ID}" == "rhel" || "${ID_LIKE}" =~ .*rhel.* ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this also affect centos and fedora?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition matches centos but not fedora.
After that value on centos is not affected by the line below, so it is only for distros which we have version / release policy like RHEL and are derivatives of that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, these PRs are not really needed, unless the distro really wants to create a "non-portable" release of .NET and provide some distro-specific packages.

https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-6.0.100-linux-x64-binaries works for any glibc-based linux distro..

non-portable is only used by source builds for a long time now, elsewhere we all use portable binaries, so these PRs are less meaningful.

VERSION_ID="${VERSION_ID%.*}"
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,120 @@
{
"almalinux": [
"almalinux",
"rhel",
"linux",
"unix",
"any",
"base"
],
"almalinux-arm64": [
"almalinux-arm64",
"almalinux",
"rhel-arm64",
"rhel",
"linux-arm64",
"linux",
"unix-arm64",
"unix",
"any",
"base"
],
"almalinux-x64": [
"almalinux-x64",
"almalinux",
"rhel-x64",
"rhel",
"linux-x64",
"linux",
"unix-x64",
"unix",
"any",
"base"
],
"almalinux.8": [
"almalinux.8",
"almalinux",
"rhel.8",
"rhel",
"linux",
"unix",
"any",
"base"
],
"almalinux.8-arm64": [
"almalinux.8-arm64",
"almalinux.8",
"almalinux-arm64",
"rhel.8-arm64",
"almalinux",
"rhel.8",
"rhel-arm64",
"rhel",
"linux-arm64",
"linux",
"unix-arm64",
"unix",
"any",
"base"
],
"almalinux.8-x64": [
"almalinux.8-x64",
"almalinux.8",
"almalinux-x64",
"rhel.8-x64",
"almalinux",
"rhel.8",
"rhel-x64",
"rhel",
"linux-x64",
"linux",
"unix-x64",
"unix",
"any",
"base"
],
"almalinux.9": [
"almalinux.9",
"almalinux",
"rhel.9",
"rhel",
"linux",
"unix",
"any",
"base"
],
"almalinux.9-arm64": [
"almalinux.9-arm64",
"almalinux.9",
"almalinux-arm64",
"rhel.9-arm64",
"almalinux",
"rhel.9",
"rhel-arm64",
"rhel",
"linux-arm64",
"linux",
"unix-arm64",
"unix",
"any",
"base"
],
"almalinux.9-x64": [
"almalinux.9-x64",
"almalinux.9",
"almalinux-x64",
"rhel.9-x64",
"almalinux",
"rhel.9",
"rhel-x64",
"rhel",
"linux-x64",
"linux",
"unix-x64",
"unix",
"any",
"base"
],
"alpine": [
"alpine",
"linux-musl",
Expand Down
57 changes: 57 additions & 0 deletions src/libraries/Microsoft.NETCore.Platforms/src/runtime.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,62 @@
{
"runtimes": {
"almalinux": {
"#import": [
"rhel"
]
},
"almalinux-arm64": {
"#import": [
"almalinux",
"rhel-arm64"
]
},
"almalinux-x64": {
"#import": [
"almalinux",
"rhel-x64"
]
},
"almalinux.8": {
"#import": [
"almalinux",
"rhel.8"
]
},
"almalinux.8-arm64": {
"#import": [
"almalinux.8",
"almalinux-arm64",
"rhel.8-arm64"
]
},
"almalinux.8-x64": {
"#import": [
"almalinux.8",
"almalinux-x64",
"rhel.8-x64"
]
},
"almalinux.9": {
"#import": [
"almalinux",
"rhel.9"
]
},
"almalinux.9-arm64": {
"#import": [
"almalinux.9",
"almalinux-arm64",
"rhel.9-arm64"
]
},
"almalinux.9-x64": {
"#import": [
"almalinux.9",
"almalinux-x64",
"rhel.9-x64"
]
},
"alpine": {
"#import": [
"linux-musl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
<Architectures>x64;x86;arm;armel;arm64;s390x</Architectures>
</RuntimeGroup>

<RuntimeGroup Include="almalinux">
<Parent>rhel</Parent>
<Architectures>x64;arm64</Architectures>
<Versions>8;9</Versions>
<ApplyVersionsToParent>true</ApplyVersionsToParent>
<TreatVersionsAsCompatible>false</TreatVersionsAsCompatible>
</RuntimeGroup>

<RuntimeGroup Include="alpine">
<Parent>linux-musl</Parent>
<Architectures>x64;arm;arm64</Architectures>
Expand Down
5 changes: 5 additions & 0 deletions src/native/corehost/hostmisc/pal.unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ pal::string_t normalize_linux_rid(pal::string_t rid)
pal::string_t rhelPrefix(_X("rhel."));
pal::string_t alpinePrefix(_X("alpine."));
pal::string_t rockyPrefix(_X("rocky."));
pal::string_t almalinuxPrefix(_X("almalinux."));
size_t lastVersionSeparatorIndex = std::string::npos;

if (rid.compare(0, rhelPrefix.length(), rhelPrefix) == 0)
Expand All @@ -738,6 +739,10 @@ pal::string_t normalize_linux_rid(pal::string_t rid)
{
lastVersionSeparatorIndex = rid.find(_X("."), rockyPrefix.length());
}
else if (rid.compare(0, almalinuxPrefix.length(), almalinuxPrefix) == 0)
{
lastVersionSeparatorIndex = rid.find(_X("."), almalinuxPrefix.length());
}

if (lastVersionSeparatorIndex != std::string::npos)
{
Expand Down