Can anybody help shed some light on why publishing cross-platform .NET is not supported?
I can publish an apk in a GitHub yaml file using Ubuntu with actions/setup-dotnet@v4, or from ubuntu/dotnet-runtime:latest, or Debian with these instructions: Install .NET on Debian - .NET | Microsoft Learn
I’m new here, but if the F-Droid image doesn’t have .NET, then can’t it be added like this?
.NET is not something like golang that you can bootstrap with GCC in few minutes. It’s impossible to bootstrap it from source. We can’t simply rebuild it on our buildserver. Fortunately Ubuntu packages it, though I guess it’s not bootstraped from source. That’s good enough. Then the problem is that we don’t use Ubuntu. Someone needs to figure out how to use the package on our buildserver.
According the the Inclusion Policy, “Though we tried to build everything from source, we still need some prebuilt binaries.” What’s stopping us from adding dotnet as a prebuilt binary? Microsoft says, “All aspects of .NET are open source including class libraries, runtime, compilers, languages, ASP.NET Core web framework, Windows desktop frameworks, and Entity Framework Core data access library, and more.”
Surely dotnet counts under the “some other compilers/build tools” exception category, so why not say so?
We don’t want to add more exceptions. If you go through the list, you’ll found that those exceptions are mostly FOSS and can be built from source.
Android SDK/NDK: The binaries are under a proprietary license, but the source code are under Apacke 2.0. Some old versions are packaged in Debian.
Gradle: Mostly FOSS and old versions are packaged in Debian. New versions have weird build deps under a proprietary license.
Flutter SDK, JSC/Hermes, Nix packages, pip packages, Rust/Rustup: FOSS and can be built easily. But that takes too much resources so we use upstream binaries currenly.
Golang, Nodejs and other not mentioned compilers including sbt: FOSS and packaged in Debian. We use the binaries only when the version is not packaged yet or not in the Debian version we use. In fact we build golang from source currently.
Dotnet is a different case. It’s never packaged in Debian and I don’t know if it can really be packaged. When I checked that last time the binary has some license problem but it seems that has been solved. And we consider the Ubuntu package is FOSS so we can use that. That said, we still need to check MAUI which is used to build Android apps with dotnet. Currently there is no dotnet app in F-Droid so we don’t have dotnet in the exception list. But if someone finally packages a dotnet app for F-Droid we can update that page.
And there are only few dotnet FOSS apps available. The most popular one is Bitwarden. I did some test to package Bitwarden for F-Droid but failed. Since Bitwarden will be rewrite in Kotlin I won’t spend more time on that. If you want to package other dotnet apps for F-Droid, you should use the Ubuntu package. We also had a try on that path but it doesn’t work on Bullseye. We recently upgraded our buildserver to Bookworm so you have have another try.
It’s never packaged in Debian and I don’t know if it can really be packaged.
It looks like it is packaged now, by adding the Microsoft package repository. If so, can I use it in an F-Droid project? If so, does it need to be mentioned in the Inclusion Policy?
We have to use Android SDK and Gradle. But there is no reason to add a exception for dotnet. Maybe only one or two FOSS apps use it. Of course, any help is welcome.
I asked the dotnet project if it’s FOSS, and their responses were quite compelling.
After all that, is it okay if I submit a pull request with the dotnet SDK from Ubuntu added to the build?