Bug 2394918
| Summary: | dnf5 does not set releasever_minor variable from system-release(releasever_minor) RPM provide | ||
|---|---|---|---|
| Product: | [Fedora] Fedora EPEL | Reporter: | nucleo <alekcejk> |
| Component: | dnf5 | Assignee: | Jonathan Wright <jonathan> |
| Status: | POST --- | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | epel10 | CC: | carl, jonathan, pkratoch, ppisar, rpm-software-management |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
nucleo
2025-09-12 23:51:16 UTC
What is your definition (content of the configuration file in /etc/yum.repos.d directory) of "epel" repository? What is a content of your /etc/os-release file? What DNF variables does your DNF5 report (dnf5 --dump-variables)? # cat /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux $releasever - $basearch # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurl=https://download.example/pub/epel/$releasever${releasever_minor:+z}/Everything/$basearch/ metalink=https://mirrors.fedoraproject.org/metalink?repo=epel${releasever_minor:+-z}-$releasever&arch=$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever_major gpgcheck=1 repo_gpgcheck=0 metadata_expire=24h countme=1 enabled=1 [epel-debuginfo] name=Extra Packages for Enterprise Linux $releasever - $basearch - Debug # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurl=https://download.example/pub/epel/$releasever${releasever_minor:+z}/Everything/$basearch/debug/ metalink=https://mirrors.fedoraproject.org/metalink?repo=epel${releasever_minor:+-z}-debug-$releasever&arch=$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever_major gpgcheck=1 repo_gpgcheck=0 metadata_expire=24h enabled=0 [epel-source] name=Extra Packages for Enterprise Linux $releasever - $basearch - Source # It is much more secure to use the metalink, but if you wish to use a local mirror # place its address here. #baseurl=https://download.example/pub/epel/$releasever${releasever_minor:+z}/Everything/source/tree/ metalink=https://mirrors.fedoraproject.org/metalink?repo=epel${releasever_minor:+-z}-source-$releasever&arch=source gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever_major gpgcheck=1 repo_gpgcheck=0 metadata_expire=24h enabled=0 # cat /etc/os-release NAME="AlmaLinux" VERSION="10.0 (Purple Lion)" ID="almalinux" ID_LIKE="rhel centos fedora" VERSION_ID="10.0" PLATFORM_ID="platform:el10" PRETTY_NAME="AlmaLinux 10.0 (Purple Lion)" ANSI_COLOR="0;34" LOGO="fedora-logo-icon" CPE_NAME="cpe:/o:almalinux:almalinux:10::baseos" HOME_URL="https://almalinux.org/" DOCUMENTATION_URL="https://wiki.almalinux.org/" VENDOR_NAME="AlmaLinux" VENDOR_URL="https://almalinux.org/" BUG_REPORT_URL="https://bugs.almalinux.org/" ALMALINUX_MANTISBT_PROJECT="AlmaLinux-10" ALMALINUX_MANTISBT_PROJECT_VERSION="10.0" REDHAT_SUPPORT_PRODUCT="AlmaLinux" REDHAT_SUPPORT_PRODUCT_VERSION="10.0" SUPPORT_END=2035-06-01 # dnf5 --dump-variables ======== Variables: ======== arch = x86_64 basearch = x86_64 releasever = 10 releasever_major = 10 stream = 10-stream The dump of variables is missing a releasever_minor variable set to "0". Therefore the metalink expands to …?repo=epel-10&…. And metalink server returns addresses for "10.2" now.
So the problem is why releasever_minor variable is not set to 0. I think that DNF5 computes the value from releasever which is obtained from these RPM provides in this order:
"system-release(releasever)",
"system-release",
"distribution-release(releasever)",
"distribution-release",
"redhat-release",
"suse-release"
What package does provide "system-release(releasever) on your system? And that package provides?
Intepretation of system-release(releasever_major) and system-release(releasever_minor) provides is not yet implemented <https://github.com/rpm-software-management/dnf5/issues/2400>. But still the code should derive from "system-release(releasever)". That could be a genuine bug. It at least does not work for me. # rpm -q --provides almalinux-release almalinux-release = 10.0-32.el10 almalinux-release(x86-64) = 10.0-32.el10 base-module(platform:el10) centos-release = 10.0-32.el10 centos-release-eula config(almalinux-release) = 10.0-32.el10 redhat-release = 10.0-32.el10 redhat-release-eula rpm_macro(almalinux) rpm_macro(almalinux_ver) rpm_macro(centos) rpm_macro(centos_ver) rpm_macro(dist) rpm_macro(dist_bug_report_url) rpm_macro(dist_home_url) rpm_macro(dist_name) rpm_macro(dist_vendor) rpm_macro(distcore) rpm_macro(el10) rpm_macro(rhel) system-release = 10.0-32.el10 system-release(releasever) = 10 system-release(releasever_major) = 10 system-release(releasever_minor) = 0 Looking at this problem again, I think it equivalent to the already mentioned <https://github.com/rpm-software-management/dnf5/issues/2400>. DNF5 reads releasever from system-release(releasever) and that is set to "10", not "10.0" for backward compatibility. As a workaround, you can explicitly pass --releasever 10.0 option to your DNF5 invocations. As workaround also can be echo "10.0" > /etc/dnf/vars/releasever But issue already fixed on github. https://koji.fedoraproject.org/koji/taskinfo?taskID=138391703 Scratch build with backported releasever fix works as expected installing el10_0 packages from epel # dnf5 install htop Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: htop x86_64 3.3.0-5.el10_0 epel 448.4 KiB Installing dependencies: hwdata noarch 0.379-10.4.el10 baseos 9.4 MiB hwloc-libs x86_64 2.11.1-3.el10 baseos 2.9 MiB libnl3 x86_64 3.11.0-1.el10 baseos 1.0 MiB libpciaccess x86_64 0.16-16.el10 baseos 44.5 KiB ocl-icd x86_64 2.3.2-8.el10 baseos 194.7 KiB Transaction Summary: Installing: 6 packages Old version # dnf5 --version dnf5 version 5.2.12.0 dnf5 plugin API version 2.0 libdnf5 version 5.2.12.0 libdnf5 plugin API version 2.2 Loaded dnf5 plugins: name: builddep version: 1.0.0 API version: 2.0 name: changelog version: 1.0.0 API version: 2.0 name: config-manager version: 0.1.0 API version: 2.0 name: copr version: 0.1.0 API version: 2.0 name: needs_restarting version: 1.0.0 API version: 2.0 name: repoclosure version: 1.0.0 API version: 2.0 name: reposync version: 1.0.0 API version: 2.0 # dnf5 --dump-variables ======== Variables: ======== arch = x86_64 basearch = x86_64 releasever = 10 releasever_major = 10 stream = 10-stream Fixed version # dnf5 --version dnf5 version 5.2.13.1 dnf5 plugin API version 2.0 libdnf5 version 5.2.13.1 libdnf5 plugin API version 2.2 Loaded dnf5 plugins: name: builddep version: 1.0.0 API version: 2.0 name: changelog version: 1.0.0 API version: 2.0 name: config-manager version: 0.1.0 API version: 2.0 name: copr version: 0.1.0 API version: 2.0 name: needs_restarting version: 1.0.0 API version: 2.0 name: repoclosure version: 1.0.0 API version: 2.0 name: reposync version: 1.0.0 API version: 2.0 # dnf5 --dump-variables ======== Variables: ======== arch = x86_64 basearch = x86_64 releasever = 10 releasever_major = 10 releasever_minor = 0 stream = 10-stream |