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

tool-cache._getOsVersion should improve to detect RHEL compatible Linux distro version. #1493

Open
ganadist opened this issue Aug 15, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ganadist
Copy link

Describe the enhancement

tool-cache._getOsVersion() had been using /etc/lsb-release to detect Linux OS versions, but recently, it was improved to use /etc/os-release from systemd : #594

But it used VERSION_ID only, and it does not process Linux distro information.

IMHO, the purpose of tool-cache._getOsVersion() is to distinguish the ABI of the OS.
So, I propose to improve it as follows.

  • Return PLATFORM_ID first if it is available from /etc/os-release

    • RHEL based Linux distros provides PLATFORM_ID which OS is compatible.
      • RHEL 8.x, CentOS 8.x, and Rocky Linux 8.x have same PLATFORM_ID=platform:el8
  • Return old behavior (VERSION_ID from /etc/os-release) if PLATFORM_ID is not available.

    • This can keep compatiblity with current behavior.

Code Snippet
If applicable, add a code snippet to show the api enhancement.

Additional information
Add any other context about the feature here.

@ganadist ganadist added the enhancement New feature or request label Aug 15, 2023
@ganadist
Copy link
Author

Note:
Since RHEL 9 (or compatible distos) does not have lsb_release tool.
source : https://access.redhat.com/solutions/6973382

Root Cause

Red Hat Enterprise Linux has not adhered to nor been required to be compliant with the LSB specification 
since the release of Red Hat Enterprise Linux 8.0. The LSB specification was last updated in 2015 
with no activity in the project to update or stay current with the broader open source software ecosystem. 

A subset of the utilities and libraries required by the LSB 5.0 specification were deprecated 
in Red Hat Enterprise Linux 8 and removed in Red Hat Enterprise Linux 9[1]. 

With no functioning standard body, and other utilities being removed, 
the redhat-lsb packages were also removed from Red Hat Enterprise Linux 9 
as any implementation would no longer be able to meet the LSB 5.0 specification.

[1]: https://access.redhat.com/solutions/6973382#fn:1

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

No branches or pull requests

1 participant