(gnu home services xdg): Wrong value for $XDG_STATE_HOME

  • Open
  • quality assurance status badge
Details
2 participants
  • Bruno Victal
  • Philip McGrath
Owner
unassigned
Submitted by
Philip McGrath
Severity
normal
P
P
Philip McGrath wrote on 26 Feb 2023 12:43
(name . bug-guix)(address . bug-guix@gnu.org)
21836149.EfDdHjke4D@bastet
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:

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:

Toggle quote (7 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmP7Rd8ACgkQygNjjfo/
HHoKjBAAj24YT50JcffP5t/PYE6/6P04+uFNES7p2aKBAQchU9ay6xi1nzX9B7so
lk6OgY1iKy5y/umZ0NQ4Ag1Z8AHGM8XztkO69pm9+twUoMPa5oJpS/lor4AoHJRa
Ko5n7z0ZQWum5kTRCx9kIBEWa/nZfSkJ6oK8zXERTKAMyUzQ/TgSZrpRgQ7d6r2A
PrDdp2i0i1t/sLewP9/N2gRhc4DElLutbkEYdub/gRCmzE1oSsDsh2RXGKlQdEMX
5vM6YRKF5Z2AXhbgRd5eHwywD7G/zG3u1eQdVGiPthFV1LJXcnGsNkEtY6GFL13N
VkyPjYC/warecqLRxhGnkmDJKCcm/YrdVYU/QzrFBHdqWfl8PKqZskphxuOWs4Gt
Jg3B3LRkcENnyIDP3YHdnPw7DPqwWQBzCKGUxsaWhKAvpNEz3THcCJmf9Cia5EBf
/wkpRs2Fe0eUOWImNoaNlfEL9makn9nD1wJ11FhrdQ9pWLzpd5hm+Gy5SPz4Qy2D
02dY8l6kWa9s2IvTtd6DsgEGV3q3Tn5TT/llWnC8Q85b/BYekoRCxak+8FNn9ELu
Ld+pPaInP/lFLDS+ww9P4VFwjvIvq78OHAXWZcYg4GPEVXTodjd3+Q0QR5muiz6w
wUy8jnAHn1fSvD+KrKAuGbFqkyNXAJwB5f1bw177ib3TbUKD6u0=
=o+Lo
-----END PGP SIGNATURE-----


B
B
Bruno Victal wrote on 5 Mar 2023 16:44
(name . Philip McGrath)(address . philip@philipmcgrath.com)(address . 61809@debbugs.gnu.org)
5ec6e731-06d2-0c60-13f7-591e630d817b@makinata.eu
Hi Philip,

Can you test the patches in https://issues.guix.gnu.org/61982?


Cheers,
Bruno
?