Bug in XDG Base Directory Specification

Markus Raab elektra at markus-raab.org
Fri Nov 28 02:56:02 PST 2014


Hello,

Florian Müllner wrote:
> "$XDG_CONFIG_DIRS defines the preference-ordered set of base directories to
> search for configuration files in addition to the $XDG_CONFIG_HOME base
> directory."
> 
>  So $XDG_CONFIG_HOME should always take precedence over any directory
> defined in $XDG_CONFIG_DIRS, using the default $HOME/.config location if
> the variable is undefined. A tool like kdb should read defaults from
> $XDG_CONFIG_DIRS, but never write anything there.

In Elektra "normal" applications would use /sw/application to access their 
configuration. In that case, files in $XDG_CONFIG_DIRS would be a fallback, 
iff a key is not available in the namespace user/ (the feature is called 
cascading), but every write attempt would be user/ (i.e. $XDG_CONFIG_HOME for 
XDG). The XDG specification handles this simple case well.

The kdb-tool (or any Elektra based tool that does not use pathes that start 
with /), however, is intended to give the admin full control over all the 
system's configuration files. The admin can decide via the namespaces "user" 
(e.g. user/sw/application), respective "system" (e.g. system/sw/application) 
if he/she wants to configure a file for a specific user (in $XDG_CONFIG_HOME), 
respective globally (for every user by modifications in /etc/).

From your argumentation I can conclude that the XDG specification simply does 
not support full programmatical control over configuration files, but only 
handles the simple consumption-case, i.e. when applications do not change 
global defaults.

Positively said, I would argue that the XDG standard also does not prohibit 
such endeavour, because the relevant phrases are "should" and not "shall" 
and/or speak about "user-specific" and not about "system" configuration files, 
e.g.: "There is a single base directory relative to which user-specific 
configuration files should be written." and "should be made to create it with 
permission 0700".

So the "bug" boils down to spelling and small clarifications as others already 
noticed.

If XDG wants to go further and also want to standardize such tools, I am open 
for discussions.

best regards,  

-- 
Markus Raab            http://www.libelektra.org
Technische Universität Wien       elektra at markus-raab.org
Institut für Computersprachen           Phone: (+431) 58801/185185
Argentinierstr. 8, 1040 Wien, Austria     FAX: (+431) 58801/18598

DVR 0005886
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/xdg/attachments/20141128/075f1a1a/attachment.sig>


More information about the xdg mailing list