Red Hat Bugzilla – Bug 821565
Use XDG dirs instead of $HOME
Last modified: 2015-02-17 09:15:14 EST
rpm uses ~/.rpmrc and ~/.rpmmacros. It would be better to use the locations defined in the XDG Base Directory specification.
What is planned about FreeDesktop.org Base directory specification for rpm?
I'm not terribly keen on invalidating 10+ years of documentation and community knowledge by moving the per-user rpm configuration to appease GNOME agendas, especially as rpm is most certainly NOT a "desktop application".
Why not do it like Git did?
Git will first try to read ~/.config/git/config, then ~/.gitconfig if the former doesn't exist.
They didn't break any community-knowledge nor documentation, because the old path still works just as well.
You are still trying to mix desktop-focused specification with configuration of low-level tool that desktop user will use only minimally. I don't think that's a good idea. Furthermore I don't see any real gain in this change neither on server nor on desktop.
The XDG specs are not only for desktop stuff, they are for user data and configuration.
As a Fedora packager, I am a user of rpm, so files like ~/.rpmmacros are user configuration.
And there are real gains to the migration.
One of them is that of backups: currently, I would have to backup every single dot file in my home folder if I wanted to preserve my user configuration. Moving to XDG folders, I can backup only .config (and .local for user data).
That means I will not forget to add a new dot file to my backups when I start using new software.
Some other advantages were given in the first link Eric provided in comment 1.
There's no "if foo doesn't exist then read bar" logic in rpm's configuration system, everything in the macro path is read inclusively in the specified order if they exist. So if both ~/.rpmmacros and eg ~/.config/rpmmacros exist one will take precedense and if the contents differ you'll get confused users for little added value.
Another problem is that you can't rely on eg $XDG_CONFIG_HOME and such being set, so properly supporting the XDG spec would require extra logic over the current simple "macro path" to handle the cases where its set and falling back to default ~/.config/ if not.
In other words, it requires adding extra complexity to rpm's configuration system AND dealing with the consequent migration pains for the next 5-10 years.
Mind you, I'm not adverse to the idea of centralized configuration in ~/.config/, which is why I haven't closed this WONTFIX by now. It's more a question of waiting for the right opportunity, such as other events/enhancements suddenly making supporting the XDG directory spec more desireable/feasible.
Oh and BTW, "forgetting to add a new dot file to backups" is IMO an entirely backwards approach. For backups you'll want everything that's not *excluded*.
There's really a snowball's chance in hell that all software ever written will be "fixed" to comply with XDG, so you can really never stop backing up all the dotfiles. Its far more productive to try to get the worst offenders to place their disposable data info a known exclude-location, such as browsers putting their cached data into XDG cache which can be easily excluded.
Full specification can be found at:
The Freedesktop.org XDG base directory specification have good de facto adoption.
It has been adopted by:
- GNOME ( https://live.gnome.org/GnomeGoals/XDGConfigFolders )
- GTK+ ( https://bugzilla.gnome.org/show_bug.cgi?id=646631 )
- KDE ( http://techbase.kde.org/KDE_System_Administration/XDG_Filesystem_Hierarchy#Freedesktop.org_and_Standard_Directories )
- QT ( http://harmattan-dev.nokia.com/docs/library/html/qt4/qsettings.html#setPath )
- XFCE ( http://docs.xfce.org/xfce/xfce4-session/advanced in Files and Environment Variables )
- VLC ( https://trac.videolan.org/vlc/ticket/1267 )
- GStreamer ( https://bugzilla.gnome.org/show_bug.cgi?id=518597 )
- Chrome ( http://code.google.com/p/chromium/issues/detail?id=16976 )
- many more upstream applications
- Ubuntu ( http://brainstorm.ubuntu.com/idea/6557/ & http://packages.ubuntu.com/fr/source/precise/libxdg-basedir )
- Debian ( http://packages.debian.org/squeeze/libxdg-basedir1 )
- Red Hat
- many more distributions
I think that @APPNAME@ should use same locations than the vast majority of Desktop environment and applications.
There are real advantages of following this specification :
- a lot less cluttered $HOME
- Make backups a lot more safer and easier.
Backuping your $XDG_DATA_HOME along with your files is enough
(or just excluding $XDG_CACHE_HOME)
- A lot easier to reset a default configuration if you want/need it (and
without any risk to loose informations). Even for the software itself
could choose to reset $XDG_CONFIG_HOME if needed.
- Avoid some strange bugs that happens because you had a old version of
some configuration file
- A lot more of flexibility and portability because no path are hardcoded.
Automated advertisement spam for a specification? That's a new one... but just as annoying as any spam. If anything, such spam is going to make me LESS likely to do the damnest thing about this. Dont do it again.
This was not a spam
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.
(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)
More information and reason for this action is here:
This message is a notice that Fedora 19 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 19. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 19 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.