Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fedora 38 RID #74372

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Add Fedora 38 RID #74372

merged 1 commit into from
Sep 7, 2022

Conversation

omajid
Copy link
Member

@omajid omajid commented Aug 22, 2022

Fedora 38 is now in development:

$ podman run -it registry.fedoraproject.org/fedora:rawhide
[root@d3934d2b267b /]# cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Container Image Prerelease)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Container Image Prerelease)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
VARIANT="Container Image"
VARIANT_ID=container

The changes to runtime.compatibility.json and runtime.json were automated and made by dotnet pack -p:UpdateRuntimeFiles=true

Fedora 38 is now in development:

    $ podman run -it registry.fedoraproject.org/fedora:rawhide
    [root@d3934d2b267b /]# cat /etc/os-release
    NAME="Fedora Linux"
    VERSION="38 (Container Image Prerelease)"
    ID=fedora
    VERSION_ID=38
    VERSION_CODENAME=""
    PLATFORM_ID="platform:f38"
    PRETTY_NAME="Fedora Linux 38 (Container Image Prerelease)"
    ANSI_COLOR="0;38;2;60;110;180"
    LOGO=fedora-logo-icon
    CPE_NAME="cpe:/o:fedoraproject:fedora:38"
    DEFAULT_HOSTNAME="fedora"
    HOME_URL="https://fedoraproject.org/"
    DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
    SUPPORT_URL="https://ask.fedoraproject.org/"
    BUG_REPORT_URL="https://bugzilla.redhat.com/"
    REDHAT_BUGZILLA_PRODUCT="Fedora"
    REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
    REDHAT_SUPPORT_PRODUCT="Fedora"
    REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
    VARIANT="Container Image"
    VARIANT_ID=container
@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Aug 22, 2022
@ghost
Copy link

ghost commented Aug 22, 2022

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

Fedora 38 is now in development:

$ podman run -it registry.fedoraproject.org/fedora:rawhide
[root@d3934d2b267b /]# cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Container Image Prerelease)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Container Image Prerelease)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
VARIANT="Container Image"
VARIANT_ID=container

The changes to runtime.compatibility.json and runtime.json were automated and made by dotnet pack -p:UpdateRuntimeFiles=true

Author: omajid
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@carlossanlop
Copy link
Member

@ViktorHofer @wfurt do we allow merging RIDs for distro versions under development?

@carlossanlop carlossanlop requested a review from wfurt August 22, 2022 20:30
@ViktorHofer
Copy link
Member

Yes we do.

@wfurt
Copy link
Member

wfurt commented Aug 22, 2022

I did not find anything on Fedora pages (maybe I did not look enough) but it already has 38 here: https://en.wikipedia.org/wiki/Fedora_Linux_release_history

@tmds
Copy link
Member

tmds commented Aug 23, 2022

I don't think we still need to keep adding these.

source-build doesn't need them.

dotnet/designs#260 describes why these rids are in fact not that useful.

@ViktorHofer
Copy link
Member

AFAIK this statement still applies which make the RID changes necessary: #57832 (comment)

Please correct me if I'm wrong but I don't think that dotnet/designs#260 is yet committed.

cc @ericstj @richlander

@tmds
Copy link
Member

tmds commented Aug 23, 2022

AFAIK this statement still applies which make the RID changes necessary: #57832 (comment)

In most cases the rid doesn't need to be in the graph. This includes portable builds, source-build .NET, and distros for which the fallback applies (like Fedora).

If dotnet/runtime build fails because the fallback is not right, then the DOTNET_RUNTIME_ID env can be set to a compatible rid.

Please correct me if I'm wrong but I don't think that dotnet/designs#260 is yet committed.

This design no longer requires non-portable rids to be in the rid graph.

It does so because it considers cross-distro publishing not a supported use-case.

If we're adding it here, it's because we consider that a supported use-case.

I hope we can come to a lean rid graph in .NET 8.

We've been adding these rids to make sure things build. That should no longer be necessary.
By continuing to add them, we end up masking issues that come up with new distros (unknown rids).

@omajid
Copy link
Member Author

omajid commented Aug 23, 2022

source-build doesn't need them.

At least as of 6.0, this patch is needed in source-build for the build to work. Here's a build log from the failing build:

    Build FAILED.
    
    /builddir/build/BUILD/dotnet-v6.0.108/previously-built-dotnet/sdk/6.0.107/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(129,5): error NETSDK1083: The specified RuntimeIdentifier 'fedora.38-x64' is not recognized. [/builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/src/Build.proj]

AFAIK, adding things to the RID graph for 6.0 (but not 7.0 or main) is not an option, so I have done PRs to add RIDs everywhere.

@tmds
Copy link
Member

tmds commented Aug 23, 2022

At least as of 6.0, this patch is needed in source-build for the build to work. Here's a build log from the failing build:

Then this is broken: #50818.

We don't notice it is broken because we continue adding rids to this graph.

@tmds
Copy link
Member

tmds commented Aug 23, 2022

@omajid does .NET 6 source-build on Fedora 38 work when you export DOTNET_RUNTIME_ID=linux-x64?

@omajid
Copy link
Member Author

omajid commented Aug 24, 2022

does .NET 6 source-build on Fedora 38 work when you export DOTNET_RUNTIME_ID=linux-x64?

Tested that in the RPM build. It seems to work for a bit then fails with other errors: https://kojipkgs.fedoraproject.org//work/tasks/8083/91188083/build.log

/builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.22314.7/build/Packaging.targets(1257,5): error : Error when creating nuget lib package from /builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/src/artifacts/packages/Release/specs/runtime.linux-x64.Microsoft.NETCore.DotNetAppHost.nuspec. System.IO.DirectoryNotFoundException: Could not find a part of the path '/builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/src/artifacts/bin/linux-x64.Release/corehost'. [/builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/src/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.pkgproj]

source-build runs a separate runtime-portable step and that works, runtime is essentially hardcoded to be non-portable, I think.

@tmds
Copy link
Member

tmds commented Aug 24, 2022

/builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.build.tasks.packaging/6.0.0-beta.22314.7/build/Packaging.targets(1257,5): error : Error when creating nuget lib package from /builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/src/artifacts/packages/Release/specs/runtime.linux-x64.Microsoft.NETCore.DotNetAppHost.nuspec. System.IO.DirectoryNotFoundException: Could not find a part of the path '/builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/src/artifacts/bin/linux-x64.Release/corehost'. [/builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/src/src/installer/pkg/projects/Microsoft.NETCore.DotNetAppHost/Microsoft.NETCore.DotNetAppHost.pkgproj]

Thanks for giving it a try. Clearly this is not working...

There are two rids we care about:
The rid that represents the build host which we controlling using the DOTNET_RUNTIME_ID envvar.
And the rid that represent the target.

We should be able to treat this latter rid as just a name. This name gets passed in from source-build as the TargetRid arg. And runtime then calls it the OutputRid/PackageRID.

From the log:

issue #1:

/p:TargetRid=linux-x64

The target rid we should be passing here is fedora.38-x64.
source-build should determine the name ignoring DOTNET_RUNTIME_ID. It should also be overridable by the user.

issue #2:

Commencing build of "install" target in "installer component" for Linux.x64.Release in /builddir/build/BUILD/dotnet-v6.0.108/src/runtime/artifacts/source-build/self/src/artifacts/obj/fedora.38-x64.Release

This location should be using TargetRid but it is not.
Surprisingly even DOTNET_RUNTIME_ID doesn't affect it.

This is why Microsoft.NETCore.DotNetAppHost.pkgproj is failing to find corehost.

@tmds
Copy link
Member

tmds commented Aug 24, 2022

The 2nd issue should be fixed by #74498.

@tmds
Copy link
Member

tmds commented Aug 30, 2022

The 2nd issue should be fixed by #74498.

This was replaced by #74504.

With that PR, I can build .NET 6 packages on an unknown flavor of Fedora by setting DOTNET_RUNTIME_ID to a known compatible rid, like linux-x64/fedora-x64.
On the main branch this latter part isn't even needed, I think because of the changes recently made to consume the host that got built.

What's still missing is the built runtime is not aware of the distro's rid. It needs to know the rid to be able to fall back to fedora-x64.
To make this work, we need #53550. Then AdditionalRuntimeIdentifiers can be used to inject the fedora.39-x64 rid.
cc @ericstj

@omajid
Copy link
Member Author

omajid commented Sep 7, 2022

Can we merge this PR? The 3.1 and 6.0 and 7.0 version of this was merged and I was told that we should keep the RIDs present in the main branch to avoid breakage as well?

@wfurt wfurt merged commit 408089b into dotnet:main Sep 7, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants