GNU bug report logs - #61809
(gnu home services xdg): Wrong value for $XDG_STATE_HOME

Previous Next

Package: guix;

Reported by: Philip McGrath <philip <at> philipmcgrath.com>

Date: Sun, 26 Feb 2023 11:44:02 UTC

Severity: normal

To reply to this bug, email your comments to 61809 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#61809; Package guix. (Sun, 26 Feb 2023 11:44:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philip McGrath <philip <at> philipmcgrath.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 26 Feb 2023 11:44:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: bug-guix <bug-guix <at> gnu.org>
Subject: (gnu home services xdg): Wrong value for $XDG_STATE_HOME
Date: Sun, 26 Feb 2023 06:43:27 -0500
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#61809; Package guix. (Sun, 05 Mar 2023 15:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 61809 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: Philip McGrath <philip <at> philipmcgrath.com>
Cc: 61809 <at> debbugs.gnu.org
Subject: Re: bug#61809: (gnu home services xdg): Wrong value for
 $XDG_STATE_HOME
Date: Sun, 5 Mar 2023 15:44:17 +0000
Hi Philip,

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


Cheers,
Bruno




This bug report was last modified 1 year and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.