* bug#61809: (gnu home services xdg): Wrong value for $XDG_STATE_HOME
@ 2023-02-26 11:43 Philip McGrath
2023-03-05 15:44 ` Bruno Victal
0 siblings, 1 reply; 2+ messages in thread
From: Philip McGrath @ 2023-02-26 11:43 UTC (permalink / raw)
To: 61809
[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]
Hi,
The following part of the definition of
`home-xdg-base-directories-configuration` in `(gnu home services xdg)` is
wrong:
```
(state-home
(path "$HOME/.local/var/lib")
"Base directory for programs to store state files, like databases,
analogus to @file{/var/lib}, but for user. It is not a part of XDG
Base Directory Specification, but helps to make implementation of home
services more consistent.")
```
First of all, version 0.8 of the XDG Base Directory Specification added a
specification of $XDG_STATE_HOME in May 2021:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.8.html
Unfortunately, "$HOME/.local/var/lib" is not the specified default value: the
specification says it should be "$HOME/.local/state".
Can we just fix the default value, or do we need a more involved compatibility
plan? Maybe we should mention it in the channel news? Since the spec says it
should contain data "that is not important or portable enough to the user that
it should be stored in $XDG_DATA_HOME", maybe just changing it would be ok.
Moreover, it seems like the actually non-standard variable $XDG_LOG_HOME:
```
(log-home
(path "$HOME/.local/var/log")
"Base directory for programs to store log files, analogus to
@file{/var/log}, but for user. It is not a part of XDG Base Directory
Specification, but helps to make implementation of home services more
consistent.")
```
overlaps with the purposes of $XDG_STATE_HOME, which the spec says:
> may contain:
>
> - actions history (logs, history, recently used files, …)
>
> - current state of the application that can be reused on a restart (view,
> layout, open files, undo history, …)
Do we really need $XDG_LOG_HOME? It looks like it's currently used only to
control the locations of "dbus.log", "batsignal.log", "shepherd.log", and
"mcron.log". Could they just go in $XDG_STATE_HOME?
If there is some compelling need, I think the variable name should not begin
with XDG.
-Philip
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-05 15:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-26 11:43 bug#61809: (gnu home services xdg): Wrong value for $XDG_STATE_HOME Philip McGrath
2023-03-05 15:44 ` Bruno Victal
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).