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

packages-microsoft-prod.rpm for el9 installable on el8 #95

Open
Klaas- opened this issue Nov 17, 2023 · 0 comments
Open

packages-microsoft-prod.rpm for el9 installable on el8 #95

Klaas- opened this issue Nov 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Klaas-
Copy link

Klaas- commented Nov 17, 2023

Describe the issue

Hi,
I've recently had an issue with a customer; they tried to install azure-cli on their RHEL8 system, they followed the docs: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=dnf

sadly they followed them line by line without reading too much :)
so what they did at the end was install the el9 package on el8:
sudo dnf install -y https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm

That actually did work, and they could even install the azure-cli el9 package. But that repository includes other packages, also some with improper rpm dependencies which lead to a different error in subsequent dnf update commands. This left me wondering why allow that package to be installed at all? :)

I am guessing the easiest way to keep this from happening is to set a Requires within the spec that builds this package on system-release(releasever)

C8S https://gitlab.com/redhat/centos-stream/rpms/centos-release/-/blob/88a0121e46cfe7501ddecc4fbef9710e24c44c11/centos-release.spec#L45
C9S https://gitlab.com/redhat/centos-stream/rpms/centos-release/-/blob/2e8259a53fcf1fe43b29d07a48e3686e75d6a6fd/centos-stream-release.spec#L26

redhat-release also does that as well, same for almalinux-release

Alma8 https://git.almalinux.org/rpms/almalinux-release/src/commit/76bfe3239140df0b4ad9ec95175523797c490c98/almalinux-release.spec#L29
Alma9 https://git.almalinux.org/rpms/almalinux-release/src/commit/3dbcc69913a5a31538b0ac594c06515324d553a8/almalinux-release.spec

That way you could not install a el9 package on an el8 system and vice versa.

Steps to Reproduce
run sudo dnf install -y https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm on el8 system

Actual Result
installs

Expected Result
should not install

@Klaas- Klaas- added the bug Something isn't working label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant