core icon indicating copy to clipboard operation
core copied to clipboard

Add support for Fedora 40

Open rbhanda opened this issue 1 year ago • 14 comments
trafficstars

This issue is created to track progress for the work to enable Fedora 40 support for .NET 8.0, .NET 7.0 and .NET 6.0

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
  • [x] ~[Acquisition] Add support within nightly repos~
  • [x] ~[Acquisition] Deploy to master (GA) during next patch release cycle~

Release team:

  • [x] Notify .NET Core teams regarding new OS release
  • [ ] Update the supported OS content on GitHub and marketing sites.

Document updates:

  • [ ] Add OS prerequisites to the dependencies document
  • [ ] Update distro install page

rbhanda avatar Jan 30 '24 23:01 rbhanda

@rbhanda Note: Starting with .NET 8.0, the RID graph is frozen. In other words, adding RIDs is currently only needed for 6.0 and 7.0.

For reference, see issue https://github.com/dotnet/runtime/issues/90000 and PRs https://github.com/dotnet/runtime/pull/90297 (which was merged to 8.0 before it was shipped).

carlossanlop avatar Feb 07 '24 07:02 carlossanlop

The 7.0 runtime PR has been closed for the reasons described in the PR: https://github.com/dotnet/runtime/pull/98079#issuecomment-1934981974

The 6.0 runtime PR has been merged.

carlossanlop avatar Feb 08 '24 21:02 carlossanlop

Just a note, Fedora 40 just landed! Is 8.0 available for it now?

atrauzzi avatar Apr 23 '24 15:04 atrauzzi

Just a note, Fedora 40 just landed! Is 8.0 available for it now?

If you are looking for Fedora-maintained packages (ie, maintained by the Fedora .NET SIG, as opposed to Microsoft built/maintained .NET packages), .NET 6.0 and .NET 8.0 have been available in Fedora repos since 40 entered development.

$  podman run -it fedora:40                                                                                              12:14:06 [36/36]
Resolved "fedora" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)                                                                        
Trying to pull registry.fedoraproject.org/fedora:40...                                                                                                        
Getting image source signatures                                                                                                                               
Copying blob 454eac4198a0 done   |                                                                                                                            
Copying config 868a0de675 done   |                                                                                                                            
Writing manifest to image destination                                                                                                                         
[root@5cd85d831277 /]# dnf install -y dotnet-sdk-8.0                                                                                                          
Fedora 40 - x86_64                                                                                                            7.4 MB/s |  20 MB     00:02    
Fedora 40 openh264 (From Cisco) - x86_64                                                                                      2.1 kB/s | 1.8 kB     00:00    
Fedora 40 - x86_64 - Updates                                                                                                  3.6 MB/s | 2.1 MB     00:00    
...
Installed:                
  aspnetcore-runtime-8.0-8.0.3-1.fc40.x86_64      aspnetcore-targeting-pack-8.0-8.0.3-1.fc40.x86_64         dotnet-apphost-pack-8.0-8.0.3-1.fc40.x86_64     
  dotnet-host-8.0.3-1.fc40.x86_64                 dotnet-hostfxr-8.0-8.0.3-1.fc40.x86_64                    dotnet-runtime-8.0-8.0.3-1.fc40.x86_64          
  dotnet-sdk-8.0-8.0.103-1.fc40.x86_64            dotnet-targeting-pack-8.0-8.0.3-1.fc40.x86_64             dotnet-templates-8.0-8.0.103-1.fc40.x86_64      
  libicu-74.2-1.fc40.x86_64                       netstandard-targeting-pack-2.1-8.0.103-1.fc40.x86_64     

Complete!        
[root@5cd85d831277 /]# dotnet --info
.NET SDK:                                                                                                                                                     
 Version:           8.0.103                                                                                                                                   
 Commit:            6a90b4b4bc                                                                                                                                
 Workload version:  8.0.100-manifests.e99a2be4                                                                                                                
                                                                                                                                                              
Runtime Environment:                                                                                                                                          
 OS Name:     fedora                                                                                                                                          
 OS Version:  40                                                                                                                                              
 OS Platform: Linux                                                                                                                                           
 RID:         fedora.40-x64
 Base Path:   /usr/lib64/dotnet/sdk/8.0.103/                                   
                                       
.NET workloads installed:  
 Workload version: 8.0.100-manifests.e99a2be4                                  
There are no installed workloads to display.                                                                                                                  
                                                                                                                                                              
Host:                                                                                                                                                         
  Version:      8.0.3                                                                                                                                         
  Architecture: x64                                                                                                                                           
  Commit:       9f4b1f5d66                                                                                                                                    
                                                                                                                                                              
.NET SDKs installed:                                                                                                                                          
  8.0.103 [/usr/lib64/dotnet/sdk]                                                                                                                             
                                                                                                                                                              
.NET runtimes installed:                                                                                                                                      
  Microsoft.AspNetCore.App 8.0.3 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]                                                                          
  Microsoft.NETCore.App 8.0.3 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]                                                                                

Other architectures found:
  None                                                                                                                                                        
                                                                                                                                                              
Environment variables:                                                                                                                                        
  Not set                                                                                                                                                     

global.json file:
  Not found                         
                                       
Learn more:                
  https://aka.ms/dotnet/info  
                                                                               
Download .NET:                         
  https://aka.ms/dotnet/download

omajid avatar Apr 23 '24 16:04 omajid

Nice! Does Microsoft maintain a first-party .NET fedora package repo?

atrauzzi avatar Apr 24 '24 12:04 atrauzzi

Nice! Does Microsoft maintain a first-party .NET fedora package repo?

Yes, it does. https://packages.microsoft.com/config/fedora/40/ https://packages.microsoft.com/fedora/40/prod/

inntran avatar Apr 26 '24 18:04 inntran

@rbhanda I have a question regarding the versioning. As of today(4/26/2024), Microsoft packaged dotnet-8.0 packages on packages.microsoft.com have version number 8.0.4-1. The Fedora 40's dotnet-8.0 packages have version number 8.0.4-1.fc40, and DNF would see Fedora ones newer than Microsoft's ones, is that a desired/expected behavior?

In dotnet --info outputs, Commit ID of the "Host" section are the same, 2d7eea2529. But in the .NET SDK section, Microsoft packaged one is returning version 8.0.204, with commit ID c338c7548c, Fedora's is returning version 8.0.104 with commit ID 034f91fcc0.

inntran avatar Apr 26 '24 19:04 inntran

@inntran I recommend against any mixing of Fedora-built and Microsoft-built packages of .NET.

You should enable the Microsoft repository, and disable fetching any dotnet packages from Fedora. Or you should disable the Microsoft repository and only use dotnet packages from Fedora. Having both enabled will pull down some packages from each repo - as you discovered - which will result in a broken .NET installation.

We have some steps on how to do that here: https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-redhat

omajid avatar Apr 26 '24 21:04 omajid

PR for docs: https://github.com/dotnet/docs/pull/40659

omajid avatar Apr 29 '24 15:04 omajid

I thought it might help to say if I install .NET 8.0 on Fedora 40 from Microsoft's repository and not the Fedora-maintained repos, I get the following message when running a dotnet command (e.g. dotnet new) :

You must install or update .NET to run this application.

App: /usr/share/dotnet/sdk/8.0.300/dotnet.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '8.0.5' (x64)
.NET location: /usr/share/dotnet/

The following frameworks were found:
  8.0.4 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.5&arch=x64&rid=linux-x64&os=fedora.40

mdx0111 avatar May 14 '24 20:05 mdx0111

@mdx0111 That issue is https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-redhat again.

omajid avatar May 14 '24 20:05 omajid

@mdx0111 That issue is https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-redhat again.

@omajid I don't think so as I have excluded Fedora maintained .NET packages altogether.

mdx0111 avatar May 14 '24 20:05 mdx0111

@mdx0111 Hm. Can you run a sudo dnf upgrade --refresh? I think you might have picked up a newer sdk but not the newer runtime from the Microsoft packages repo.

omajid avatar May 14 '24 20:05 omajid

@mdx0111 Hm. Can you run a sudo dnf upgrade --refresh? I think you might have picked up a newer sdk but not the newer runtime from the Microsoft packages repo.

@omajid Thanks for the help! That's all sorted now.

mdx0111 avatar May 15 '24 21:05 mdx0111