cruegge / pam-gnupg

Unlock GnuPG keys on login
GNU General Public License v3.0
268 stars 12 forks source link

Use a subdirectory within `$XDG_CONFIG_HOME`, rather than plain file #31

Closed OJFord closed 3 years ago

OJFord commented 3 years ago

My understanding of the spec:

A user specific version of the configuration file may be created in $XDG_CONFIG_HOME/subdir/filename

and experience with other tools' configuration, is that a subdirectory within the XDG base dir should be used.

For example, $XDG_CONFIG_HOME/pam-gnupg/conf (or perhaps $XDG_CONFIG_HOME/gnupg/pam).

Thanks for this, glad to find it!

cruegge commented 3 years ago

Not sure, but I interpret the spec differently. The paragraph starts with

Specifications may reference this specification by specifying the location of a configuration file as $XDG_CONFIG_DIRS/subdir/filename. This implies that:

  • [...]

So I would read this as “If someone talks about $XDG_CONFIG_DIRS/subdir/filename, this means the following: [...]“, with subdir/filename being essentially a kid of pattern or an example, not stating a requirement of a subdir. In fact, at least KDE is a precedent for dropping config files into the toplevel ~/.config.

I agree that a subdir would have been the better choice from the start, but given that we now already use a plain file, I can't change that without breaking some people's setup, and I would like to not increase the number of possible locations without a good reason.

So do you have a use case for this other than aesthetics?

OJFord commented 3 years ago

So do you have a use case for this other than aesthetics?

No, just aesthetics. I already have pam & gnupg dirs, and now I have pam-gnupg file too. 🙂

cruegge commented 3 years ago

Well, then I'm afraid your request comes too late ;)

Also, I would probably have used a subdir pam-gnupg anyway, so the only difference is that now its a file instead of a directory.