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

runtime: add RIDs for anolis distro #66132

Closed
wants to merge 1 commit into from
Closed

Conversation

geliwei
Copy link

@geliwei geliwei commented Mar 3, 2022

instead of patching dotnet everytime after
it got updated we plan to add runtime ID for
anolis 7/anolis 8/anolis 9.

Signed-off-by: Livy Ge livy.ge@gmail.com

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Mar 3, 2022
@ghost
Copy link

ghost commented Mar 3, 2022

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

Issue Details

instead of patching dotnet everytime after
it got updated we plan to add runtime ID for
anolis 7/anolis 8/anolis 9.

Signed-off-by: Livy Ge livy.ge@gmail.com

Author: geliwei
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

@dnfadmin
Copy link

dnfadmin commented Mar 3, 2022

CLA assistant check
All CLA requirements met.

@bartonjs
Copy link
Member

@richlander is usually involved in the flow for adding new distros to the graph. Rich?

@AaronRobinsonMSFT
Copy link
Member

/cc @agocke

@richlander
Copy link
Member

We are currently considering this design proposal.

dotnet/designs#260

I don't think we can reasonably back-port it to .NET 6, however.

Can you share more context? Are you the maintainers for .NET for anolis?

@ericstj ericstj added the needs-author-action An issue or pull request that requires more info or actions from the author. label May 2, 2022
@ericstj
Copy link
Member

ericstj commented May 2, 2022

@geliwei can you please answer @richlander’s question?

@richlander
Copy link
Member

I was thinking more about this (based on our continuing conversations on RID simplification). Is the RID for anolis needed for restoring anolis-specific packages or just to ensure that anolis is correctly treated as either rhel or linux?

@geliwei
Copy link
Author

geliwei commented May 13, 2022

I was thinking more about this (based on our continuing conversations on RID simplification). Is the RID for anolis needed for restoring anolis-specific packages or just to ensure that anolis is correctly treated as either rhel or linux?

Hi,
Yes, I'm the maintainers for Anolis distro.
It's good if the Anolis is treated as rhel.
I wrote these RID maps manually, I remebered there is a way to automatically work out RID graph via build.sh command, but I forgot on which post I found it.
I heard some news that you guys are working on code that could created RID on the fly, is that true ? D:

@ghost ghost removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 13, 2022
@omajid
Copy link
Member

omajid commented May 13, 2022

Hey @geliwei ! If you don't add the RIDs (manually or otherwise), does the .NET build fail? Can you point us to any build logs that show the failure?

@richlander
Copy link
Member

This info might be what you are looking for: #50818

We have a maintainers group now. I can add you if you want to join it @geliwei.

The new plan for source-build is documented at https://github.com/dotnet/designs/pull/260/files#diff-20aa11d3c5c8d54fc1c45f4b81927255d3951fdd7cf58589fc6d03a2dd2a6a1bR195.

instead of patching dotnet everytime after
it got updated we plan to add runtime ID for
anolis 7/anolis 8/anolis 9.

Signed-off-by: Livy Ge <livy.ge@gmail.com>
@geliwei
Copy link
Author

geliwei commented Jun 2, 2022

Hey @geliwei ! If you don't add the RIDs (manually or otherwise), does the .NET build fail? Can you point us to any build logs that show the failure?

I copy a few errors from http://build.openanolis.cn/kojifiles/work/tasks/7092/297092/build.log:
/builddir/build/BUILD/dotnet-v6.0.105-SDK/previously-built-dotnet/sdk/6.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(129,5): error NETSDK1083: The specified RuntimeIdentifier 'anolis.8.6-x64' is not recognized. [/builddir/build/BUILD/dotnet-v6.0.105-SDK/src/runtime/artifacts/source-build/self/src/Build.proj]
/builddir/build/BUILD/dotnet-v6.0.105-SDK/previously-built-dotnet/sdk/6.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(129,5): error NETSDK1083: The specified RuntimeIdentifier 'anolis.8.6-x64' is not recognized. [/builddir/build/BUILD/dotnet-v6.0.105-SDK/src/runtime/artifacts/source-build/self/src/Build.proj]
/builddir/build/BUILD/dotnet-v6.0.105-SDK/previously-built-dotnet/sdk/6.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(129,5): error NETSDK1083: The specified RuntimeIdentifier 'anolis.8.6-x64' is not recognized. [/builddir/build/BUILD/dotnet-v6.0.105-SDK/src/runtime/artifacts/source-build/self/src/Build.proj]
/builddir/build/BUILD/dotnet-v6.0.105-SDK/previously-built-dotnet/sdk/6.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(129,5): error NETSDK1083: The specified RuntimeIdentifier 'anolis.8.6-x64' is not recognized. [/builddir/build/BUILD/dotnet-v6.0.105-SDK/src/runtime/artifacts/source-

@geliwei
Copy link
Author

geliwei commented Jun 2, 2022

I have made change to init-distro-rid.sh and also pal.unix.cpp, remove RIDs in runtime.json but keep runtimeGroups.props. But looks like it fails the test again, Would you like to help me figure out why?

@geliwei
Copy link
Author

geliwei commented Jun 2, 2022

I have made change to init-distro-rid.sh and also pal.unix.cpp, remove RIDs in runtime.json but keep runtimeGroups.props. But looks like it fails the test again, Would you like to help me figure out why?

this change works so far on dotnet5.0 https://gitee.com/src-anolis-os/dotnet5.0/commit/39c160eb817b5bab7366ed1d14f8c91d4316ca96

@wfurt
Copy link
Member

wfurt commented Jun 30, 2022

did we reached conciliation if new bistro is needed @omajid @richlander ?

As minimum we should rebuild other json files besides runtimeGroups.props and include this with the PR.
(dotnet pack from https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.NETCore.Platforms/readme.md)

@richlander
Copy link
Member

Ideally, we would not and this RID could be added via source-build per #50818. That should be the goto approach for these cases. Is that acceptable?

@wfurt
Copy link
Member

wfurt commented Jul 1, 2022

Ideally, we would not and this RID could be added via source-build per #50818.

Would that mean that RH binaries would be unusable e.g. the RID would work only if distribution has own package created via source-build?

@richlander
Copy link
Member

richlander commented Jul 1, 2022

Here's my take/understanding on how the system should work.

  • Everyone should publish portable linux binaries (for packages) as a general rule.
  • If they cannot, then they limit the use of their package to specific OSes (probably just one specific OS).
  • Publishing portable + specific is fine. I hope NuGet ignores RIDs it doesn't understand.

By building .NET for a distro as foo, you are not directly affecting package compatibility. You are saying "I'm this and I also accept the things I say I accept".

This is the same thing as blood types, where RIDs are like donors and distros are like recipients.

linux is like O- as a donor. It's universally compatible.
foo is like AB+ as a donor. It's universally incompatible, except with itself.

image

Credit to the Wikipedia page on blood types.

This is a fair analogy, right?

We can take the analogy a bit further. So far, we're only looking at two columns of donors (or RIDs). Let's look at the O+ donor column. That looks pretty close to the unix RID to me. The unix RID applies to Unix-like (or POSIX) OSes (Linux, macOS, and FreeBSD). It doesn't apply to Windows. O+ is more compatible than AB+ but less compatible than O-. That works pretty well. Note that there are other blood types with this same level of compatibility. I could have equally chosen one of the other but chose O+ only because it is more common.

@agocke
Copy link
Member

agocke commented Jul 1, 2022

I agree with @richlander, I think this is the correct direction.

@richlander
Copy link
Member

@clairernovotny @aortiz-msft It would be good for the NuGet team to review this approach.

@danmoseley
Copy link
Member

@aortiz-msft

@ericstj
Copy link
Member

ericstj commented Oct 3, 2022

cc @tmds who's been doing some recent work to make source build work without code changes to the RID graph.

@ericstj
Copy link
Member

ericstj commented Nov 28, 2022

So if I can summarize the state here, @richlander and @agocke are saying that this PR should not be needed due to the changes to how we expect distro's to source build in .NET 7.0. #66132 (comment)

@geliwei do you agree, or are you keeping this PR open for a scenario that wasn't covered by that explanation?

Thanks!
Eric

@carlossanlop
Copy link
Member

It would be good for the NuGet team to review this approach.

Ping @clairernovotny @aortiz-msft to help with this request.

are saying that this PR should not be needed

Ping @richlander @agocke to answer this question.

do you agree, or are you keeping this PR open for a scenario that wasn't covered by that explanation?

Ping @geliwei to answer this question.

@carlossanlop carlossanlop added this to the Future milestone Mar 13, 2023
@tmds
Copy link
Member

tmds commented Mar 14, 2023

are saying that this PR should not be needed

#83246 is superseding dotnet/designs#260 and is still being discussed.

As other rids are still being added, we can add these too.

The graph will be updated as needed for #83246.

@agocke
Copy link
Member

agocke commented Mar 14, 2023

I'm closing new RID PRs for now, until we can sort out the RID plan, as in #81115

@agocke agocke closed this Mar 14, 2023
@tmds
Copy link
Member

tmds commented Mar 14, 2023

I'm closing new RID PRs for now, until we can sort out the RID plan, as in #81115

I'm not sure why this doesn't get added, while other rids are still being added.

Will we no longer be adding any rids until the RID plan is sorted out?

I have good hope we'll sort it out for .NET 8, but I had the same hope for .NET 7.

I'd keep business as usual until the plan is decided.

@tmds tmds mentioned this pull request Mar 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 13, 2023
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.