EPEL 10 bikeshedding: pointing users at the right repo

The original EPEL 10 proposal thread is getting a bit long, so I’d like to start a new thread to specifically focus further discussion on just one aspect: the best way to point users at the correct minor-versioned repo.

In the original proposal, I suggested making use of symlinks on the infrastructure side that move to point at different repos at different times. This would require different epel-release packages for CentOS and RHEL that point to the appropriate symlinks. (Note: this approach will require changes to MirrorManager to no longer ignore symlinks).

  • RHEL and RHEL clone users:
    • epel-release-rhel package
    • epel.repo file with repo=$releasever metalink
    • mirrormanager redirecting to $releasever (10) symlink on various mirrors
  • CentOS Stream users:
    • epel-release-centos package
    • epel.repo file with repo=centos$releasever metalink
    • mirrormanager redirecting to centos$releasever (centos10) symlink on various mirrors

This approach also has an additional benefit that users could temporarily override $releasever to select a specific minor version repo to install from, either older or newer (e.g. dnf --releasever 10.2 install foo).

It was also suggested by @ngompa that if dnf5 implements a feature request for major/minor version variables, we could use those to avoid the need to change symlinks for RHEL. The RHEL epel.repo file would use repo=$releasever_major.$releasever_minor to ask MirrorManager for the appropriate EPEL repo matching the current RHEL release. It’s not clear to me how we would handle the CentOS epel.repo file with this approach. CentOS Stream doesn’t advertise what minor version it currently represents. Would we still need a symlink for CentOS anyways? Would it be better to rename the leading repo directory to just 10 and rely on $releasever?

The behavior Zypper has is that if the distribution doesn’t have a minor version, then $releasever_minor is empty. Zypper also supports limited variable expansion capabilities for this purpose, so something like repo=${releasever_major}${releasever_minor:+.${releasever_minor}} would work.

This would allow us to use a single repo file for both Stream and RHEL, assuming that we always have minor versions for the EPEL tree used for RHEL and derivatives.

The idea would be to have this functionality ported over to DNF5 and leverage it.

This is intriguing to me, and sounds like it could work. But I’m worried for a few reasons.

  • These capabilities don’t exist yet, and the dnf5 team already have plenty of work in front of them to bring dnf5 to feature parity with dnf in time for EL10 without worrying about new features.
  • Asking for major/minor variables is one level of complexity. Asking for pseudo-shell expansion capabilities is another level on top of that. Even if we can get the first done in time, I have doubts for the second.
  • These features were first requested back in January 2020, even predating the announcement of dnf5. There has been zero comments on the bugzilla request from the development team, and I’m not aware of any other public indication that they’re even considering this feature.

Perhaps the way to address this would be to call this our preferred solutions, but contingent on the features existing by some agreed upon date. If the features aren’t implemented in time, then we move forward with an alternate plan (symlinks probably, or something else).

1 Like

Another possibility has been suggested on the epel-devel mailing list by @tdawson. We could try to use RPM file triggers to fire off a scriptlet from epel-release that creates /etc/dnf/vars/epelrelease based on the value of VERSION_ID in /etc/os-release. It would be run every time /etc/os-release gets updated, changing the value of the epelrelease variable to match the OS. This would solve things neatly for RHEL, but I’m not clear yet on how it would work for CentOS Stream. Its has a VERSION_ID of just the major version. I suppose this is another scenario that would be well served by having the leading repo directory be just 10, instead of 10.minor.

1 Like

Here is a proof-of-concept pull request from @tdawson for using RPM’s %transfiletriggerin to create the epelrelease dnf variable.

https://src.fedoraproject.org/rpms/epel-release/pull-request/27

This pull request is for EPEL 9. To be clear this doesn’t mean we’re trying to implement minor-versioned repos for EPEL 9, but we can start creating the dnf variable to make sure the approach is sound before we start relying on it in EPEL 10.

I’ve been thinking through the dnf variable approach, and I think that will work best with a slight tweak of the proposed repo path. As implemented in the proof of concept, the file trigger will set epelrelease to 10.0 on RHEL 10.0, and simply 10 on CentOS Stream 10. To avoid requiring code changes for MirrorManager (see EPEL 10 proposal - #17 by adrian) to redirect 10 to the latest minor version, we can just have the epel10 dist-git branch populate an epel/10 repo path (instead of the originally planned epel/10.x path).

branch built against dist tag repo
epel10 CentOS Stream 10 .el10_1 epel/10.1 10
epel10.0 RHEL 10.0 .el10_0 epel/10.0
1 Like

This feature request I mentioned before was actually filed in bugzilla for dnf, not dnf5. @ngompa has filed the equivalent request for dnf5 in GitHub.

1 Like