# see `man dnf.conf` for defaults and possible options
[main]
or should it have some config pre-filled by default ?
I’ve seen in some posts/forums, there was something mentioned about having this:
gpgcheck=1
so got me wondering if something is off for me or i am looking in the wrong place ? Also, seen something about dnf now being version dnf5, should i be concerned about previous versions present (dnf4 etc., should i remove them if so) ? Or F41 from the start has only dnf5 without older stuff there ?
Note: I did fresh F41 install (and then i did updates from the ‘software’ app).
Thanks.
You are expected to only put in the .conf what you are overriding.
The man page will tell you all the settings you can change.
If the dnf.conf had commented out lines for each default setting it would be a messy file and get out of date after a few releases. So its ships in a minimal state.
Not sure i understood…isn’t that dnf.conf (in the /etc/dnf/) the ‘default’ config for the dnf program ? If so, for me it is completely empty (there is nothing below the [main]), hence my question above, should it be like that ?
Not quite.
The defaults are built into dnf itself.
The dnf.conf file is empty because it relies on the defaults.
Any configs put into dnf.conf act as overrides for the default and changes those specific settings. Unless you need to change how dnf works there should be nothing in the dnf.conf file.
Oh, thanks. So, the defaults are in some other file ? Should i even care where those can be seen ? Or i should care only when something will not be working ?
Yes I remember seen that in the Manual too. However till now I not really understood why exactly the directory is called libdnf5 and I am not certain if this changes also will affect dnf while using it with package-kit over Software (gnome) and Discover (KDE)?
The docs between latest and stable say different things.
The plan, as I understand it, is to have all packaging tools use libdnf5.
But at the moment PackageKit has not been ported.
Why it is libdnf5.conf.d and not dnf.conf.d I cannot answer.
Maybe the intention to be able to configure the libdnf algorithms seperate from any specific UI like dnf, but I’m wildly guessing.
This is 100% a guess, but a possibility.
Dnf4 uses /etc/dnf/dnf.conf.d. This may be this is to separate the conf files so for those systems that have both versions of dnf installed it would allow for separation of the configs so there is no confict. Systems that were upgraded from f40 or earlier still have dnf4 installed along with the newer dnf5.
Ok, this helps me to understand why the different paths. Still not explains why dnf.conf also works with dnf5. At least a strict separation would be with F42 necessary right? And/Or depreciate dnf4 before we do remove it totally from Fedora.
@barryascott is rpm included in packaging tools? Or is it viz-versa that dnf uses rpm? As I understood rpm is not resolving dependencies?
We may ask the Project Discussion/dnf users/developers to get info’s about the schedule and the strict separation of dnf4 & dnf5 configuration files/location. Can I mention this group with an @ or would I have to move it to discussion to make them aware of it?
In a config folder config fragments are processes in sorted file order.
It is common practice to prefix with 2 digit codes to make the order easy to see and rearrange. Usually gaps are left for inserting more files layer in between.
These numbers are for config file ordering and precedence. I.e. if the same parameter configuration is present in 10-smth.conf and 20-smth.conf the latter will overwrite first one. Source
Here an other link about Linux config files in general:
Mainly that’s what the “man dnf.conf” manual page says to use for the filename conventions. But really I just have one file in there so it doesn’t really matter. The number makes the loading order obvious if you have more than one.