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 support for Fedora 33 #5018

Closed
8 of 15 tasks
rbhanda opened this issue Aug 4, 2020 · 31 comments
Closed
8 of 15 tasks

Add support for Fedora 33 #5018

rbhanda opened this issue Aug 4, 2020 · 31 comments

Comments

@rbhanda
Copy link
Contributor

rbhanda commented Aug 4, 2020

This issue is created to track progress for the work to enable Fedora 33 support for .NET Core 3.1 and .NET 5.

Product and Test updates

  • [All teams] Do a compatibility check for the product with the new OS
  • [CoreCLR/CoreFX] Runtime / RID Support update
  • [Infra] Ensure that the correct Docker images used by teams are built in the dotnet-buildtools-prereqs (if applicable)
  • [Infra] Replace docker tags used in builds across repos and branches
  • [CLI team] Update CI legs to latest updated Dockerfile
  • [All teams] Update test infrastructure to support the new version
  • [Acquisition] Add support within nightly repos
  • [Acquisition] Deploy to master (GA) during next patch release cycle

Release team:

  • Notify .NET Core teams regarding new OS release
  • Add feed for new OS release to packages.microsoft.com (if applicable)
  • Update release manifest files
  • Create new Docker files to test the new OS
  • Update the supported OS content on GitHub and marketing sites.

Document updates:

  • Add OS prerequisites to the dependencies document
  • Update distro install page
@omajid
Copy link
Member

omajid commented Aug 17, 2020

[CoreCLR/CoreFX] Runtime / RID Support update

Done via dotnet/runtime#32752 (master, 5.0) dotnet/corefx#42871 (release/3.1) and dotnet/corefx#42872 (release/2.1)

@adegeo
Copy link

adegeo commented Nov 12, 2020

@rbhanda Hey there. According to @LukeXuan .NET 5 isn't showing up in the fedora feeds.

@LukeXuan what version of fedora are you using?

@LukeXuan
Copy link

LukeXuan commented Nov 12, 2020

I'm using Fedora 33. This is what I see from dnf search dotnet --refresh:

================================================================= Name Exactly Matched: dotnet =================================================================
dotnet.x86_64 : .NET Core CLI tools and runtime
===================================================================== Name Matched: dotnet =====================================================================
dotnet-apphost-pack-3.1.x86_64 : Targeting Pack for Microsoft.NETCore.App 3.1
dotnet-build-reference-packages.x86_64 : Reference packages needed by the .NET Core SDK build
dotnet-host.x86_64 : .NET command line launcher
dotnet-hostfxr-3.1.x86_64 : .NET Core command line host resolver
dotnet-runtime-3.1.x86_64 : NET Core 3.1 runtime
dotnet-sdk-3.1.x86_64 : .NET Core 3.1 Software Development Kit
dotnet-sdk-3.1-source-built-artifacts.x86_64 : Internal package for building .NET Core 3.1 Software Development Kit
dotnet-targeting-pack-3.1.x86_64 : Targeting Pack for Microsoft.NETCore.App 3.1
dotnet-templates-3.1.x86_64 : .NET Core 3.1 templates

The packages without the version suffix are also for 3.1, as demonstrated by dnf info dotnet:

Installed Packages
Name         : dotnet
Version      : 3.1.109
Release      : 1.fc33
Architecture : x86_64
Size         : 0.0  
Source       : dotnet3.1-3.1.109-1.fc33.src.rpm
Repository   : @System
From repo    : updates
Summary      : .NET Core CLI tools and runtime
URL          : https://github.com/dotnet/
License      : MIT and ASL 2.0 and BSD and LGPLv2+ and CC-BY and CC0 and MS-PL and EPL-1.0 and GPL+ and GPLv2 and ISC and OFL and zlib
Description  : .NET Core is a fast, lightweight and modular platform for creating
             : cross platform applications that work on Linux, macOS and Windows.
             : 
             : It particularly focuses on creating console applications, web
             : applications and micro-services.
             : 
             : .NET Core contains a runtime conforming to .NET Standards a set of
             : framework libraries, an SDK containing compilers and a 'dotnet'
             : application to drive everything.

In case it's useful, the following is the output of dnf repolist:

repo id                                                                repo name
fedora                                                                 Fedora 33 - x86_64
fedora-cisco-openh264                                                  Fedora 33 openh264 (From Cisco) - x86_64
fedora-modular                                                         Fedora Modular 33 - x86_64
google-chrome                                                          google-chrome
mono-centos8-stable                                                    mono-centos8-stable
rpmfusion-free                                                         RPM Fusion for Fedora 33 - Free
rpmfusion-free-updates                                                 RPM Fusion for Fedora 33 - Free - Updates
rpmfusion-nonfree                                                      RPM Fusion for Fedora 33 - Nonfree
rpmfusion-nonfree-updates                                              RPM Fusion for Fedora 33 - Nonfree - Updates
slack                                                                  slack
updates                                                                Fedora 33 - x86_64 - Updates
updates-modular                                                        Fedora Modular 33 - x86_64 - Updates

@rbhanda
Copy link
Contributor Author

rbhanda commented Nov 12, 2020

If you follow the instructions on release notes are you still installing 3.1.109 instead of .NET 5?
I can see that .NET 5 is available on package feed at https://packages.microsoft.com/fedora/33/prod/

@adegeo
Copy link

adegeo commented Nov 12, 2020

@rbhanda is this a case of the "default" feeds? Fedora 32 had Core 3.1 in the default feed (no instructions given to include a microsoft specific package feed), is it not available in the default feed for 33?

@omajid
Copy link
Member

omajid commented Nov 12, 2020

https://www.reddit.com/r/Fedora/comments/jt0zvf/how_to_get_net_5_sdk_in_fedora_33/ has a similar issue.

It seems like the Microsoft documentation says "use the Fedora packages" which is a good idea, except when the Fedora packages are not ready yet - basically what happened with 5.0 😞

In that case, perhaps the docs can point to https://packages.microsoft.com/fedora/33/prod/ as the alternate mechanism?

@LukeXuan
Copy link

The instructions on release notes doesn't ask me to add Microsoft's repo into yum.repos.d, where instructions for older fedora versions are included.

I'm fine adding Microsoft's repo config, since the updates repo maintained by donet-sig might lag behind Microsoft's release to some degree. However, I believe it should be clearly documented on dotnet's website.

@adegeo
Copy link

adegeo commented Nov 12, 2020

@omajid Is this the same case with RHEL?

@LukeXuan @rbhanda I'm updating the docs via dotnet/docs#21526

@omajid
Copy link
Member

omajid commented Nov 12, 2020

@omajid Is this the same case with RHEL?

Pretty much. RHEL 8 has .NET 5 packages, except they are old (5.0 Preview 8 right now). RHEL 7 doesn't have any .NET 5 packages. It's the same underlying issue as Fedora since they all use the same source (https://github.com/dotnet/source-build) as the mechanism for building .NET (Core) packages.

If customers want to use .NET 5 right now on CentOS, Fedora or RHEL, they should probably get it from Microsoft because the other versions are missing or too old.

We (Red Hat and Microsoft) are trying to fix this but it will take a while (probably a few weeks) to resolve completely.

@adegeo
Copy link

adegeo commented Nov 12, 2020

Thanks I'll update these too

@mario-d-s
Copy link

mario-d-s commented Dec 3, 2020

I'm currently on Fedora 33 but I work on a lot of projects targeting .NET Core 2.1.
I just spent half an hour troubleshooting very weird issues because I had added the Microsoft Yum repo and apparently that recently has started conflicting with the Fedora repo. Long story short I followed the instructions at dotnet/sdk#11533 (comment).

Now I have the dotnet-sdk-3.1 installed from Fedora repo but I can't run any unit test projects as these are targeting 2.1 currently.

How can I best get dotnet-sdk-2.1 on my machine too?

Edit: answer seems to be at #4655 (comment) (for anyone coming after me).

Now I have to tinker some more with repositories and yum configuration... I hope Microsoft can sort this mess out - I'm sorry for calling it that, but this has not exactly been a pleasant experience. Especially considering that the documentation does not seem to mention any of these caveats, and on top of that 2.1 is officially supported on Fedora 33.

Edit 2:
After following the mentioned instructions, I have successfully installed dotnet-sdk-2.1, but now it seems impossible to install dotnet-sdk-3.1 as well!

sudo dnf install dotnet-sdk-3.1
Last metadata expiration check: 0:03:48 ago on do 03 dec 2020 18:18:01.
Error:
Problem: conflicting requests

  • package dotnet-sdk-3.1-3.1.109-1.x86_64 requires dotnet-targeting-pack-3.1, but none of the providers can be installed
  • package dotnet-sdk-3.1-3.1.110-1.x86_64 requires dotnet-targeting-pack-3.1, but none of the providers can be installed
  • package dotnet-sdk-3.1-3.1.403-1.x86_64 requires dotnet-targeting-pack-3.1, but none of the providers can be installed
  • package dotnet-sdk-3.1-3.1.404-1.x86_64 requires dotnet-targeting-pack-3.1, but none of the providers can be installed
  • package dotnet-targeting-pack-3.1-3.1.10-1.fc33.x86_64 is filtered out by exclude filtering
  • package dotnet-targeting-pack-3.1-3.1.8-1.fc33.x86_64 is filtered out by exclude filtering
    (try to add '--skip-broken' to skip uninstallable packages)

@omajid
Copy link
Member

omajid commented Dec 3, 2020

@rbhanda Looks like dotnet-targeting-pack-3.1 is missing from https://packages.microsoft.com/fedora/33/prod/. I see the 5.0 targeting pack there, but not 3.1. Do you know who can fix this?

@rbhanda
Copy link
Contributor Author

rbhanda commented Dec 3, 2020

3.1 packages should be available on https://packages.microsoft.com/fedora/33/prod/ now

@mario-d-s
Copy link

@rbhanda thanks for the swift intervention, but alas I still have the same problem. If you open the URL in a browser you get an index, and indeed dotnet-targeting-pack-3.1 is still not on there.

@rbhanda
Copy link
Contributor Author

rbhanda commented Dec 7, 2020

@mario-d-s I have updated the prod feed. https://packages.microsoft.com/fedora/33/prod/dotnet-targeting-pack-3.1.0-x64.rpm is now available

@rbhanda rbhanda closed this as completed Dec 8, 2020
@RheaAyase
Copy link
Member

@rbhanda Hi, by the way, this ticket was also similarly vague in what the "support" means. Binary release is not, never was, and never will be a proper support. We ship packages in Fedora proper, that is proper "support." Those are a few months after binary release due to the source-build lag. (And 2.1 is just completely incompatible with open source type of publishing, so that's not gonna happen at all.)

Especially with the shift of .NET 6 further towards open source development and source-build gaining ever increasing importance, the wording with these kinds of tracking issues should also shift. Binary release should not be considered proper release, or "support."

@mario-d-s
Copy link

Thanks for the fix. I was able to install dotnet-sdk-3.1 now.
But I would like to know what the plans are for .NET Core in the official Fedora repositories. Core 2.1 has a bit of support in it left, so will it be "migrated"?

To be clear: as a professional .NET developer on Linux, I specifically chose Fedora because it is officially supported by .NET and I like it by far the most between the other choices. But for "officially supported", I found this experience to be quite a bump in the road. The docs are not clear on what is in the official Fedora repo and what needs the MS repo. And even if you do the MS repo, you are going to run into conflicts with the official repo that are not documented either.

I would appreciate if the team still works to smoothen this out further to have a good out-of-the-box experience because I can imagine a lot of people are going through the same trouble.

@RheaAyase
Copy link
Member

@mario-d-s 2.1 is too old for us to backport A LOT of work that went into being able to properly build dotnet from source. Long story short is, that 2.1 can not be built from source code, and therefor it can not be packaged in Fedora.

Fedora ships 3.1 and will ship 5.0 (which was also not possible to build from source until 3 days ago) Everything around these versions is (will be) in Fedora, you do not need any additional repositories. Simply type dnf install dotnet and you will get the latest sdk.

@RheaAyase
Copy link
Member

@mario-d-s the recommended way is to not use MS repositories at all, for any version. If you need both 3.1 and 2.1 you can use our copr repository for 2.1 which is compatible with Fedora proper and 3.1 and will work side by side.

The end user can actually google all this - if they only click on the links that say fedoraproject.org instead of the microsoft.com ones ;) ;)

@mario-d-s
Copy link

@RheaAyase thanks for the additional info! I will follow your recommendation of switching to the COPR repository. Indeed googling a bit more I could have found this too. I was convinced however that it was Microsoft/.NET that should be supporting Fedora and not the other way around. Goes to show how much hard work the Fedora people are actually doing and it all adds up to what a great distro it is indeed. Thanks for that!

@RheaAyase
Copy link
Member

5.0 is also in the mentioned copr now

@MightyCreak
Copy link

I still have some conflicts with the Fedora 33 packages if I try to have both .NET Core 3.1 and .NET 5.0 on my machine (as explained here: https://bugzilla.redhat.com/show_bug.cgi?id=1847206#c9)

Since this issue is closed, does it mean I just need to wait until the Microsoft repo gets updated? Or do I need to do something on my machine so that I can install both?

@RheaAyase
Copy link
Member

@MightyCreak this is not a bug, it's a well known feature that MS packages are not compatible with open source builds. And there is nothing we can do about it on the open source side. One should simply not combine these two because they're built in completely different way (open source vs binary magic) and they do not install the same way either.

There are two possible solutions should you wish to use 3.1 and 5.0 at the same time:

  • Using MS packages only (use higher priority on MS repository than Fedora repository)

  • Using Fedora only packages - 3.1 from the proper repository, and for 5.0 you can enable copr repositories while we're working on releasing it for Fedora proper (tldr building of dotnet from source lags behind release a few months, MS packages use different build pipeline.)

@MightyCreak
Copy link

MightyCreak commented Jan 10, 2021

Using MS packages only (use higher priority on MS repository than Fedora repository)

That does not work on my machine. There seems to be an issue with the packages priority.

If I do this:

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo wget -O /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/32/prod.repo
sudo dnf install dotnet-sdk-3.1 dotnet-sdk-5.0

Then I don't have the asp.net core 3.1 runtime, as you can see here I only have the .Net Core and ASP.NET Core 5.0.1:

$ dotnet --info                                 
.NET SDK (reflecting any global.json):
 Version:   5.0.101
 Commit:    d05174dc5a

Runtime Environment:
 OS Name:     fedora
 OS Version:  33
 OS Platform: Linux
 RID:         fedora.33-x64
 Base Path:   /usr/share/dotnet/sdk/5.0.101/

Host (useful for support):
  Version: 5.0.1
  Commit:  b02e13abab

.NET SDKs installed:
  3.1.404 [/usr/share/dotnet/sdk]
  5.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Here's the list of dotnet and aspnet packages installed:

$ sudo dnf list --installed '*dotnet*'    
Installed Packages
dotnet-apphost-pack-3.1.x86_64                                             3.1.10-1.fc33                                            @updates                    
dotnet-apphost-pack-5.0.x86_64                                             5.0.1-1                                                  @packages-microsoft-com-prod
dotnet-host.x86_64                                                         5.0.1-1                                                  @packages-microsoft-com-prod
dotnet-hostfxr-3.1.x86_64                                                  3.1.10-1.fc33                                            @updates                    
dotnet-hostfxr-5.0.x86_64                                                  5.0.1-1                                                  @packages-microsoft-com-prod
dotnet-runtime-3.1.x86_64                                                  3.1.10-1.fc33                                            @updates                    
dotnet-runtime-5.0.x86_64                                                  5.0.1-1                                                  @packages-microsoft-com-prod
dotnet-runtime-deps-5.0.x86_64                                             5.0.1-1                                                  @packages-microsoft-com-prod
dotnet-sdk-3.1.x86_64                                                      3.1.404-1                                                @packages-microsoft-com-prod
dotnet-sdk-5.0.x86_64                                                      5.0.101-1                                                @packages-microsoft-com-prod
dotnet-targeting-pack-3.1.x86_64                                           3.1.10-1.fc33                                            @updates                    
dotnet-targeting-pack-5.0.x86_64                                           5.0.0-1                                                  @packages-microsoft-com-prod
$ sudo dnf list --installed '*aspnet*'
Installed Packages
aspnetcore-runtime-3.1.x86_64                                                3.1.10-1.fc33                                          @updates                    
aspnetcore-runtime-5.0.x86_64                                                5.0.1-1                                                @packages-microsoft-com-prod
aspnetcore-targeting-pack-3.1.x86_64                                         3.1.10-1.fc33                                          @updates                    
aspnetcore-targeting-pack-5.0.x86_64                                         5.0.0-1                                                @packages-microsoft-com-prod

As you can see, there's a mix of packages-microsoft-com-prod and updates packages. I don't have any copr repo enabled:

$ sudo dnf repolist
repo id                                                                 repo name
code                                                                    Visual Studio Code
fedora                                                                  Fedora 33 - x86_64
fedora-cisco-openh264                                                   Fedora 33 openh264 (From Cisco) - x86_64
fedora-modular                                                          Fedora Modular 33 - x86_64
packages-microsoft-com-prod                                             packages-microsoft-com-prod
rpmfusion-free                                                          RPM Fusion for Fedora 33 - Free
rpmfusion-free-updates                                                  RPM Fusion for Fedora 33 - Free - Updates
rpmfusion-nonfree                                                       RPM Fusion for Fedora 33 - Nonfree
rpmfusion-nonfree-updates                                               RPM Fusion for Fedora 33 - Nonfree - Updates
updates                                                                 Fedora 33 - x86_64 - Updates
updates-modular                                                         Fedora Modular 33 - x86_64 - Updates

There might be a way to force the MS repo for all the .NET packages, but I don't know how to do that.

@RheaAyase
Copy link
Member

RheaAyase commented Jan 11, 2021

If I do this:

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo wget -O /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/32/prod.repo
sudo dnf install dotnet-sdk-3.1 dotnet-sdk-5.0

Like I said. If you want to use the worse of the two options (a) you need to edit the repo file and increase the priority. (Add priority = 1 for the highest priority, 99 is the lowest.)

Then I don't have the asp.net core 3.1 runtime, as you can see here I only have the .Net Core and ASP.NET Core 5.0.1:

No you actually do end up having both. Long story short HOST is the executable and is always provided from the highest version of dotnet, so in theory even if you were to install dotnet-sdk-3.1 alone, you would still have HOST package from the 5.0 - it is neither the sdk nor the runtime.

.NET SDKs installed:
 3.1.404 [/usr/share/dotnet/sdk]
 5.0.101 [/usr/share/dotnet/sdk]

Either way though, you should NEVER install packages from two different sources at the same time. It doesn't matter if it's dotnet, golang, or google chrome. It will always cause problems.

@MightyCreak
Copy link

No you actually do end up having both.

I might end up having both, but VS Code didn't want to compile and run my .NET Core 3.1 projects. So, as an end user, it wasn't working.

Either way though, you should NEVER install packages from two different sources at the same time. It doesn't matter if it's dotnet, golang, or google chrome. It will always cause problems.

I agree 200% and that's what I wanted to achieve. I simply didn't know how to prevent this.

I didn't know about the priority=1 trick (I've searched for it since but the only documentation I found was on CentOS: https://wiki.centos.org/PackageManagement/Yum/Priorities). Just out of curiosity, why do you consider this solution "the worse of the two options"?

In the end, I tried with priority=1 in the MS repo file and now all the SDKs and all the runtimes are listed as expected, as you can see:

$ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.101
 Commit:    d05174dc5a

Runtime Environment:
 OS Name:     fedora
 OS Version:  33
 OS Platform: Linux
 RID:         fedora.33-x64
 Base Path:   /usr/share/dotnet/sdk/5.0.101/

Host (useful for support):
  Version: 5.0.1
  Commit:  b02e13abab

.NET SDKs installed:
  3.1.404 [/usr/share/dotnet/sdk]
  5.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.10 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

@RheaAyase
Copy link
Member

Just out of curiosity, why do you consider this solution "the worse of the two options"?

Because these are proprietary binary blobs built by unknown magic shipped with unknown licensed code inside :P

Fedora packaging requirements guarantee that everything is built from known source, on Fedora and for Fedora. And even all the tools used to build it are also built from known source on Fedora and for Fedora. Which is why it's so difficult to build .NET, historically very closed off platform, the open source way. Even though the source is available, all the tooling used wasn't open until very recently and even now it always lags behind Microsoft's releases.

@MightyCreak
Copy link

Aaaah, makes much more sense now! 😉

@MightyCreak
Copy link

Is it planned to add both .net core 3.1 and .net 5.0 in official Fedora packages?

@RheaAyase
Copy link
Member

RheaAyase commented Jan 12, 2021

3.1 has been in Fedora for really long time (that's why there are conflicts with MS repo) and 5.0 is tracked here: #5596

@MightyCreak
Copy link

@RheaAyase Subscribed! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants