Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-65817

dnf: Introduce $releasever_major, $releasever_minor variables

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • dnf-4.14.0-31.el9
    • Moderate
    • rhel-swm
    • ssg_core_services
    • 18
    • 22
    • 0
    • Dev ack
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • Enhancement
    • Hide
      .New `$releasever_major` and `$releasever_minor` variables

      The new `$releasever_major` and `$releasever_minor` variables are available to better support the Extra Packages for Enterprise Linux (EPEL) repository and other repositories that distribute content per major version of RHEL instead of per minor version. These variables are automatically derived from the `$releasever` variable or the `system-release(releasever_major)` and `system-release(releasever_minor)` virtual provides. As a result, you can use `$releasever_major` and `$releasever_minor` to create repository configuration files that work across multiple major or minor versions of RHEL.
      Show
      .New `$releasever_major` and `$releasever_minor` variables The new `$releasever_major` and `$releasever_minor` variables are available to better support the Extra Packages for Enterprise Linux (EPEL) repository and other repositories that distribute content per major version of RHEL instead of per minor version. These variables are automatically derived from the `$releasever` variable or the `system-release(releasever_major)` and `system-release(releasever_minor)` virtual provides. As a result, you can use `$releasever_major` and `$releasever_minor` to create repository configuration files that work across multiple major or minor versions of RHEL.
    • Done
    • Done
    • Done
    • Not Required
    • All
    • None

      Some verbose context

      It's seems to be common that third-party products with DNF repositories content just per major version of RHEL, instead of per minor version (this includes also EPEL repositories). Some definitions of repositories have then

      • hardcoded major version in URL,
      • some are using $releasever variable and people need to set releasever to `7`, `8`, `9`, ... major version on RHEL systems to keep it working - that has been brought to me several times in last years, not sure how common this one is. But e.g. here:
        [couchdb]
        name=couchdb
        baseurl=https://apache.jfrog.io/artifactory/couchdb-rpm/el$releasever/$basearch/
        gpgkey=https://couchdb.apache.org/repo/keys.asc https://couchdb.apache.org/repo/rpm-package-key.asc
        gpgcheck=1
        repo_gpgcheck=1
        enabled=1
        

        If you check https://apache.jfrog.io/ui/native/couchdb-rpm/ you see that $releasever is expected to be either X (7, 8, 9) os "Xserver".

      This brings problems for in-place upgrades between major versions of RHEL systems as customer have to manually

      • create new repository definition for the upgrade process to access repository with content for the target system
        • replace the $releasever variable by expected string
        • change the repoid
      • after the upgrade replace original repository definition by the new one to keep consuming up-to-date content

      Presenting $releasever_major (eventually also $releasever_minor) variables, containing just major or minor OS release version would be step forward to improve the experience in future for IPU RHEL 9 -> 10 and newer. This change is already present in current Fedora, so I hope it's also part of RHEL 10 already (I haven't checked that; if not, please clone the ticket for el10 also).

      Discussing it with our PO (rhn-support-mkluson) and PM (rhandlin@redhat.com) they like the idea. We know it will take a time to propagate the change widely to other third party repositories, but better to start now than later.

      Goal

      As a user or a vendor, I want to be able to create repository definition in a way it works across RHEL systems. As a product is delivered just per major version of RHEL, I do not care about minor releases and require to use just major version number in the baseURL. At this point, I need DNF to provide $releasever_major variable which e.g. for releasever "9.6" contains "9". A $releasever_minor can be provided eventually too.

      Acceptance criteria

      • for $releasever set to "X.Y", var $releasever_major contains "X" ; (if $releasever_minor is provided, it contains "Y")
      • for $releasever set to "X", variable $releasever_major contains "X" ; (if $releasever_minor is provided, it contains "Y" empty string)
        • this could cover also situation when $releasever is set to "9Server", in such a case, $releasever_major should probably contain "9Server" as well

              rh-ee-egoode Evan Goode
              pstodulk@redhat.com Petr Stodulka
              packaging-team-maint packaging-team-maint
              Eva Mrakova Eva Mrakova
              Mariya Pershina Mariya Pershina
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: