Use correct RHEL major version in rpm package names

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Bazel
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      `packager.py` parsed the RHEL major version out of a `build_os` name with a
      single-digit regex, which assumed the legacy major+minor form (`rhel93`). On
      RHEL 10+ the names are major-only (`rhel10`), so the parse yielded `1`: rpms
      were named `.el1` instead of `.el10`, and the yum repo path was `redhat/1`
      instead of `redhat/10`. That breaks version selection for users of our repos.

      Changes:

      • Added `rhel_major_version(build_os)` in `buildscripts/packager.py`, which
        handles both the legacy single-digit form (`rhel93` -> `9`) and the
        major-only form (`rhel10` -> `10`). It raises on an unrecognized name rather
        than silently truncating, so a future naming change fails loudly in the
        packaging task instead of shipping mislabeled rpms.
      • `Distro.repo_os_version` and `Distro.release_dist` now use the helper.
        `release_dist` was restructured into a single if/elif chain whose final
        `else` is the non-RHEL passthrough, and its docstring updated to match.
      • Existing RHEL build_os names (`rhel55` through `rhel93`) map to the same
        values as before, so this is backward compatible for every currently
        published platform; only RHEL 10+ output changes.

      Testing: added cases to `buildscripts/tests/test_packager.py` covering
      `release_dist` (`rhel55`/`rhel80`/`rhel93`/`rhel10`), `repo_os_version`
      (`rhel79`/`rhel93`/`rhel10`), and rejection of a malformed name.
      `bazel run //buildscripts/tests:test_packager` passes (10 tests).

            Assignee:
            John Daniels
            Reporter:
            John Daniels
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: