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

.NET 9: Enable and better define "portable Linux" behavior #2932

Open
richlander opened this issue Jul 6, 2022 · 3 comments
Open

.NET 9: Enable and better define "portable Linux" behavior #2932

richlander opened this issue Jul 6, 2022 · 3 comments
Labels
area-product-experience Improvements in the end-user's product experience Epic Groups multiple user stories. Can be grouped under a theme.

Comments

@richlander
Copy link
Member

Source build should support both portable and distro-specific Linux build flavors. We'll also need to decide which is the default. There are reasons for both choices.

Today, we have the following dichotomy:

  • Microsoft proprietary build produces the portable linux flavor.
  • Source build produces distro-specific flavor, like rhel.

We need to support both flavors within source-build going forward. This issue goes into some detail on this topic: dotnet/runtime#66132 (comment)

I'm also not aware of a good spec on portable linux. We should probably have one. It affects topics like dotnet --info, dotnet build --use-current-runtime, and (obviously) dotnet restore. More context: dotnet/sdk#23539 (comment).

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@MichaelSimons MichaelSimons added area-product-experience Improvements in the end-user's product experience and removed untriaged labels Jul 7, 2022
@MichaelSimons MichaelSimons moved this to 8.0 Backlog in .NET Source Build Jul 7, 2022
@tmds
Copy link
Member

tmds commented Sep 14, 2022

I'm also not aware of a good spec on portable linux.

portable Linux means the binaries work across a range of distros.

When building .NET, it is the build Microsoft makes for linux-{arch} with an old glibc and a set of build flags that make the runtime dynamically look for libraries (like OpenSSL).
(And similar for linux-musl-{arch}).

Anything maintainers build on a specific distro using .NET source-build is not portable linux.
They may use some of the flags Microsoft uses for the portable build
Because they use the distro's glibc (and not the old one Microsoft is pinning to), the resulting binaries won't work across a range of distros.
These builds identify themselves with a non-portable rid (like fedora.36-x64).

build --use-current-runtime

Currently, only Microsoft is publish assets like Microsoft.NETCore.App.Runtime.<rid> which enable features like stand-alone applications.

That is why it makes sense for --use-current-runtime to target those portable assets today.

These features should be made source-buildable. I hope we can invest in this for .NET 8 (#1215).

Then we we have two use-cases:

build --use-portable-runtime // target linux-x64 to have something that works accross a range of distros
build --use-platform-runtime // target source-build non-portable rid (e.g. `fedora.36-x64`) to use assets completely built from source

@MichaelSimons
Copy link
Member

Stating the obvious but part of the work is to create documentation for what is supported and the UX.

@MichaelSimons MichaelSimons moved this from Needs Review to 8.0 Backlog in .NET Source Build Jun 15, 2023
@MichaelSimons MichaelSimons changed the title .NET 8: Enable and better define "portable Linux" behavior .NET 9: Enable and better define "portable Linux" behavior Jul 20, 2023
@MichaelSimons MichaelSimons moved this from 8.0 Backlog to Backlog in .NET Source Build Jul 20, 2023
@MichaelSimons MichaelSimons moved this from Backlog to 9.0 in .NET Source Build Sep 29, 2023
@MichaelSimons MichaelSimons added the Epic Groups multiple user stories. Can be grouped under a theme. label May 23, 2024
@MichaelSimons MichaelSimons moved this from 9.0 to 10.0 in .NET Source Build Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-product-experience Improvements in the end-user's product experience Epic Groups multiple user stories. Can be grouped under a theme.
Projects
Status: 10.0
Development

No branches or pull requests

3 participants