-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Building .NET apps from source, including their (build) dependencies. #7443
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
Comments
cc @dotnet/distro-maintainers |
Just thinking out loud without much preprocessing here: Could NuGet itself be extended to resolve this issue? NuGet already supports symbol packages (which contain at least some form of the source code) – could it perhaps be extended to support source packages as well? That would benefit the entire .NET ecosystem and not just those few of us that maintain distributions of the .NET SDK or runtime. |
I like the scenario. I'm not sure how to solve it. We've had similar discussions, for secure-supply-chain scenarios. We wanted to determine if we could rebuild NuGet packages using sourcelink information (in the PDB). So far, we've concluded that this angle doesn't work. A much more direct angle would be enabling a first-class transformation from |
As a concrete example, @hickford is looking to add |
There's a related issue about documenting our solution (when we have one) at dotnet/docs#17757 |
I got some community feedback that another set of libraries/applications that might be a good idea to package would be AvaloniaUI and Jellyfin. Jellyfin is even available via rpmfusion (https://pkgs.rpmfusion.org/cgit/free/jellyfin.git/tree), but can't be added to Fedora proper due to the offline build restrictions. |
It seems that currently dotnet cannot be built offline as |
My understanding is that The C# compiler is written in C# so it requires an existing C# compiler to build. This is a common characteristic with compilers. In addition, it isn't possible to build .NET 8 with .NET 6 or 7. We make lots of breaking changes each release that breaks our old build system. A big part of that is that we use new .NET 8 feature in the .NET 8 source code, which prevents the .NET 6 compiler from compiling the code. That all means you need binaries to build the code. A C++ compiler on its own is not sufficient. The source build scripts provide the MS-built SDK. We know it works and the distros we work with have been OK with that. It is fully OK if people want to work on an alternate script and process that uses the RHEL, Ubuntu, or other distro build of .NET as part of source-build. Certainly, that will involve pulling packages over the network. I read the four essential freedoms and the rest of the page you linked to. It isn't clear to me where .NET is violating FOSS in spirit or name. |
As @richlander explained, .NET needs some binaries to build.
This process enables .NET to meet the requirements distros set for software to be included in distro packages. Some parts of .NET are under restrictive licenses and are not FOSS, like the vsdbg debugger component. This specific issue is about enabling/facilitating to build .NET apps using a .NET distro SDK so they meet the (FOSS) requirements to be included in the distro. |
If you want to add a .NET app into a distro's package repository, you are faced with a daunting task.
Distro repositories require all binaries that are distributed, and needed to built the app, to be built from source.
That means the app needs to be built without using NuGet packages since those have prebuilt binaries.
Instead of using NuGet packages, you needs to build the NuGet packages again from source, so they can be consumed by your build.
To facilitate the maintainer, it would be nice if the tooling could support this use-case.
For example, distros do this by having source packages which include everything needed to build a package from source.
I understand this is not a major use-case for .NET apps, and the effort for this would be high.
I'm creating this issue to raise awareness.
cc @omajid @musuruan @richlander
The text was updated successfully, but these errors were encountered: