Caveats for the dnf repo file move

Recently, dnf repo definition files moved from /etc/yum.repos.d to /usr/share/dnf5/repos.d. That’s a change that F45 brings with it. I’m not debating its purpose, just some caveats/observations:

  • Not all configs are moved; in particular, those from dnf copr enable are not, and neither from third party packages (insync); also: redhat.conf
  • Some settings are “reset”: If you enabled or disabled a repo by editing its config file (which was correct at least at some time in the past) this gets reset to the install default. The proper way is now via dnf configmanager.

Now you know why you’re suddenly left out on chrome updates and those from updates-testing on your F45 during freeze :wink:

This is following the pattern of /usr for config that you can treat as read-only.
Put admin changes into /etc, which is why copr is in /etc as it’s a change made by an admin.

I wonder if the upgrade is supposed to honour local changes like enable/disable a Fedora repo? If it does not maybe that is worth a bug report?

I’m not sure about the expectation.
Distribution repos were moved correctly. updates-testing went from on to off, which is typical for branched shortly before release. I don’t think it was that (release change) but the move, but in case beta users are used to it.
chrome thirdparty: I had edited the config directly rather than through the fedora-thirdparty tool; during rpmconf -a after the upgrade I probably said “Y”. So it’s easy to blame me. Still it’s good to know.
“fourth party”, i.e. thirdparty not covered by the fedora-thirdparty tool (including coprs) are not “distribution config” and are supposed to remain in /etc.
In summary, I don’t think there’s a bug, just possible surprises to be aware of.

[I find some of our change descriptions a bit terse this time, wrt to caveats and explanations.]

settings configured with dnf config-manager are retained in /etc/dnf/repos.override.d/99-config_manager.repo .
e.g

[updates-archive]
enabled=0
[updates-debuginfo]
enabled=1

Changed settings in /etc/yum/repod.d/<repo_file> are not, because the path has changed and rpm probably won’t create a <repo_file>.rpmnew file in this case.

It might create a .rpmsave file. In any case. the repo files for fedora 45 are no longer configuration files so they will be unconditionally replaced on updates.

it does.

Sure, that’s what I wrote. It’s something to be aware of on upgrade if you’ve been using the “old ways”. That’s why I put “caveats” in the title.

“Ask Fedora” is the wrong category, but it was applied by default without discourse asking me, and I didn’t find a way to change it. Feel free to move it to something more appropriate.

I could move this, but I think I’d rather mark Mark’s last reply as a solution so that this might get a little more publication. [1] I think this is good information to alert people about. :slightly_smiling_face:


  1. There is a short window where solved issues under the Ask category get promoted on the Fedora Start page. ↩︎

I’m sorry, but what does that file solve?
The solution is to

  • be aware that things might change unexpectedly and
  • use the proper new way for enabling and disabling repos.

Ah, sorry, I thought the rpmsave file solved the problem of losing custom settings after upgrading. I’m not sure If I can mark the original post as the solution, but I’ll try. :slightly_smiling_face:


Edit: There wasn’t an option to mark your original post as a solution, so I set it to your last post. The only reason I marked a solution was to promote the information a little bit more, but as of writing this, it only has a little over 200 views. Maybe a more catchy title would have been more effective. :person_shrugging:

AFAIK in this case, rpmconf -a cannot detect the stale rpmsave files, because there is no other file availalbe in /etc/yum.repos.d/ to compare it to. They have been moved to the new path in /usr/share

Thanks.. I don’t care so much about having the solution tagging “me” as about keeping others away from the pitfalls which I made it out of :wink:
This may or may not be a common issue. And I hate catchy titles for the sake of catching attention. I"m not lacking fantasy, though:

  • Fedora destroyed my repo config
  • Fedora disabled settings behind my back
  • Does anyone test this stuff before release?

The first two need a yet undetermined number of “!”, of course. Maybe even the third one.
[No, please don’t use these.]