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

Needs an additional step before installing .NET Core SDK #17537

Closed
tuttipazzo opened this issue Mar 20, 2020 · 13 comments · Fixed by #18106
Closed

Needs an additional step before installing .NET Core SDK #17537

tuttipazzo opened this issue Mar 20, 2020 · 13 comments · Fixed by #18106
Assignees
Milestone

Comments

@tuttipazzo
Copy link

tuttipazzo commented Mar 20, 2020

rpm -ql packages-microsoft-prod.rpm
/etc/yum.repos.d/microsoft-prod.repo
tuttipazzo@cafe:/etc/zypp/repos.d # ls -litra /etc/yum.repos.d/microsoft-prod.repo
6817396 -rw-r--r-- 1 root root 219 Mar 20 16:19 /etc/yum.repos.d/microsoft-prod.repo

zypper looks for repos in /etc/zypp.repos.d so:

tuttipazzo@cafe:/etc/zypp/repos.d # zypper se dotnet-runtime
Loading repository data...
Reading installed packages...
**No matching items found.**

But if we tell zypper where to find the microsoft-prod.repo file:

tuttipazzo@cafe:**/etc/zypp/repos.d** # sudo ln -s /etc/yum.repos.d/microsoft-prod.repo

tuttipazzo@cafe:/etc/zypp/repos.d # ls -litra microsoft-prod.repo
6818302 lrwxrwxrwx 1 root root 36 Mar 20 16:29 microsoft-prod.repo -> /etc/yum.repos.d/microsoft-prod.repo

Now we can refresh it:

tuttipazzo@cafe:/etc/zypp/repos.d # sudo zypper ref -r packages-microsoft-com-prod
Retrieving repository 'packages-microsoft-com-prod' metadata ...............................[done]
Building repository 'packages-microsoft-com-prod' cache ....................................[done]
Specified repositories have been refreshed.

And operations on pkgs in that repo can be used:

tuttipazzo@cafe:/etc/zypp/repos.d # zypper se dotnet-runtime
Loading repository data...
Reading installed packages...

S | Name                    | Summary                                                    | Type   
--+-------------------------+------------------------------------------------------------+--------
  | dotnet-runtime-2.1      | Microsoft .NET Core Runtime - 2.1.16 Microsoft.NETCore.App | package
  | dotnet-runtime-2.2      | Microsoft .NET Core Runtime - 2.2.8 Microsoft.NETCore.App  | package
  | dotnet-runtime-3.0      | Microsoft .NET Core Runtime - 3.0.3 Microsoft.NETCore.App  | package
  | dotnet-runtime-3.1      | Microsoft .NET Core Runtime - 3.1.2 Microsoft.NETCore.App  | package
  | dotnet-runtime-deps-2.1 | dotnet-runtime-deps-2.1 2.1.16                             | package
  | dotnet-runtime-deps-2.2 | dotnet-runtime-deps-2.2 2.2.8                              | package
  | dotnet-runtime-deps-3.0 | dotnet-runtime-deps-3.0 3.0.3                              | package
  | dotnet-runtime-deps-3.1 | dotnet-runtime-deps-3.1 3.1.2                              | package

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@tuttipazzo
Copy link
Author

tuttipazzo commented Mar 20, 2020

Moved to original comment

@Thraka Thraka added doc-enhancement and removed ⌚ Not Triaged Not triaged labels Mar 23, 2020
@Thraka
Copy link
Contributor

Thraka commented Mar 23, 2020

@dagood do you prefer a ping or an assignment when I need you to be pulled in? 😄

@dagood
Copy link
Member

dagood commented Mar 23, 2020

At a base level, this would be a bug with packages-microsoft-prod.rpm. These config packages are intended to be specific to a certain distro. I've confirmed that what I get when I download https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm does appear to target \etc\yum.repos.d\.

@tuttipazzo, what version of SLES are you using? Can you please show us cat /etc/os-release?

I'm wondering if you're using a newer version of SLES that we haven't tried this on yet. I would be surprised if this has been a problem so long in SLES 15 and we hadn't seen it until now (although that might be possible I guess).

Either way, I don't think adding another step to the instructions is the right move here. The package should be fixed. We could potentially add a step to the doc as a workaround if it ends up necessary though.

Thanks for the report!

/cc @NikolaMilosavljevic @dleeapho @nakarnam @leecow


I've edited the original post to add code formatting and make it a little easier to parse, hope that's alright @tuttipazzo.


prefer a ping or an assignment

They're the same to me. I'm fine with assignment if it helps keep track of things on your end.

But... @NikolaMilosavljevic actually owns this area now. He might have a different preference.

@tuttipazzo
Copy link
Author

I have no problem with formatting to make it more readable.

So let's get SLES-specific here. SLES12 is fine:

s12sp5sumaClient4:~ # cat /etc/os-release 
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"

s12sp5sumaClient4:~ # sudo rpm -Uvh https://packages.microsoft.com/config/sles/12/packages-microsoft-prod.rpm
Retrieving https://packages.microsoft.com/config/sles/12/packages-microsoft-prod.rpm
warning: /var/tmp/rpm-tmp.4yKMGJ: Header V4 RSA/SHA256 Signature, key ID be1229cf: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:packages-microsoft-prod-1.0-sle12################################# [100%]

s12sp5sumaClient4:~ # rpm -ql packages-microsoft-prod-1.0-sle12
/etc/pki/rpm-gpg/RPM-GPG-KEY-microsoft-prod
/etc/zypp/repos.d/microsoft-prod.repo

But SLES15 of that pkg is not:

Retrieving https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:packages-microsoft-prod-1.0-1    ################################# [100%]

s12sp5sumaClient4:~ # rpm -ql packages-microsoft-prod-1.0
/etc/yum.repos.d/microsoft-prod.repo

Fixing the pkg is fine.

NOTE: As far as I know SLE15's zypper has not changed WRT to repos outside of /etc/zypp/repos.d ...

@dagood
Copy link
Member

dagood commented Mar 23, 2020

Interesting, thanks for the extra info and digging into it. Definitely looks like a straightforward bug in the package. The packages.microsoft.com team maintains these configuration packages so we'll get them to fix it. (Unfortunately they have no public presence to file at directly.)

@tuttipazzo
Copy link
Author

OK, for completeness sake, I spun up a sles15.sp1 VM:

sles15sp1:~ # cat /etc/os-release
NAME="SLES"
VERSION="15-SP1"
VERSION_ID="15.1"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp1"

sles15sp1:~ # rpm -Uvh https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
Retrieving https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:packages-microsoft-prod-1.0-1    ################################# [100%]

sles15sp1:~ # zypper -n ref
Repository 'SLE-Module-Basesystem15-SP1-Pool' is up to date.                                      
Repository 'SLE-Module-Basesystem15-SP1-Updates' is up to date.                                   
Repository 'SLE-Product-SLES15-SP1-Pool' is up to date.                                           
Repository 'SLE-Product-SLES15-SP1-Updates' is up to date.                                        
Repository 'SLE-Module-Server-Applications15-SP1-Pool' is up to date.                             
Repository 'SLE-Module-Server-Applications15-SP1-Updates' is up to date.                          
All repositories have been refreshed.

sles15sp1:~ # zypper -n se dotnet-runtime
Refreshing service 'Basesystem_Module_15_SP1_x86_64'.
Refreshing service 'SUSE_Linux_Enterprise_Server_15_SP1_x86_64'.
Refreshing service 'Server_Applications_Module_15_SP1_x86_64'.
Loading repository data...
Reading installed packages...
No matching items found.

@Thraka
Copy link
Contributor

Thraka commented Mar 30, 2020

@NikolaMilosavljevic Should this issue be moved out of docs and into the product repo? Or is there something to doc here?

@dagood
Copy link
Member

dagood commented Mar 30, 2020

The product team that owns this feed setup package unfortunately has no public presence. This issue tracks filing an internal issue to get them to fix it. I think it'd be good to keep this feedback issue active so that others hitting this problem can find it from https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-sles15 and see the workaround.

If you want to transfer it for some procedural reason (triage, etc.), https://github.com/dotnet/core is the only place I think makes sense other than here.

@dagood
Copy link
Member

dagood commented Apr 15, 2020

The linux package repo team is now tracking this as a bug but haven't provided an ETA. They've made it clear they don't consider it high priority because this bug has been around a while and we have a workaround. (More info is on our ticket (internal Msft link, sorry): https://icm.ad.msft.net/imp/v3/incidents/details/182039364/home.)

It turns that, after all, we should incorporate this workaround into our doc, since the bug will probably be around for a while.

I think the workaround would be this to make it work from any directory:

sudo rpm -Uvh https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm
sudo ln -s /etc/yum.repos.d/microsoft-prod.repo /etc/zypp/repos.d/microsoft-prod.repo

@tuttipazzo does that look right, if you don't mind taking a look?

@Thraka can you help get this into the doc?

@Thraka
Copy link
Contributor

Thraka commented Apr 16, 2020

@dagood Do you have a quick summery I can base the update on? Just a problem statement would be fine.

@Thraka Thraka added this to the April 2020 milestone Apr 16, 2020
@Thraka Thraka assigned Thraka and unassigned NikolaMilosavljevic Apr 16, 2020
@dagood
Copy link
Member

dagood commented Apr 16, 2020

Do you mean something like this?

The SLES 15 Microsoft repository setup package installs the microsoft-prod.repo file to the wrong directory, preventing zypper from finding the .NET Core packages. To fix this, create a symlink in the correct directory.

@Thraka
Copy link
Contributor

Thraka commented Apr 27, 2020

@dagood does this only apply to SLES 15?

@Thraka Thraka added the P1 label Apr 27, 2020
@dagood
Copy link
Member

dagood commented Apr 27, 2020

Yep. SLES 12 and others don't have this bug.

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

Successfully merging a pull request may close this issue.

6 participants