Why is the redhat-lsb package not available in Red Hat Enterprise Linux 9?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 9

Issue

  • The redhat-lsb package doesn't seem to be in either the BaseOS or AppStream repos on Red Hat Enterprise Linux 9, where can I get it?
  • An application requires lsb_release utility, which package provides that?

Resolution

Using only Red Hat Enterprise Linux Repositories

Customers and ISVs are encouraged to encode proper RPM dependencies in their applications to ensure the correct set of packages are installed. OS information such as the distribution, version, code name, and associated metadata is provided by the /etc/os-release file.

$ cat /etc/os-release 
NAME="Red Hat Enterprise Linux"
VERSION="9.0 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.0"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.0 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/9/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.0"

In addition, the python3-distro package is available in both Red Hat Enterprise Linux 8 and Red Hat Enterprise Linux 9 which provides much of the same functionality as the lsb_release command:

$ distro
Name: Red Hat Enterprise Linux 9.0 (Plow)
Version: 9.0 (Plow)
Codename: Plow

$ distro -j
{
    "codename": "Plow",
    "id": "rhel",
    "like": "fedora",
    "version": "9.0",
    "version_parts": {
        "build_number": "",
        "major": "9",
        "minor": "0"
    }
}

Using Extra Package for Enterprise Linux

Disclaimer: Links contained herein to external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.

The Extra Packages for Enterprise Linux (EPEL) community includes the lsb-release project.

The above provides a minimal /usr/bin/lsb_release compatibility layer that makes use of the os-release definition set. It is not to be construed with full LSB-compliance and is not recommended for instances where other supported alternatives are available.

To enable the EPEL repository please see the following:

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 91. 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.

Future Red Hat Enterprise Linux major releases will continue to evolve and further alter the content set in ways that will not be compatible with an out-of-date standard. It is recommended to review the Considerations in Adopting RHEL family of documents 23 for each subsequent release to plan for such removed content.

  • Component
  • lsb

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments