unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip McGrath <philip@philipmcgrath.com>
To: 61809@debbugs.gnu.org
Subject: bug#61809: (gnu home services xdg): Wrong value for $XDG_STATE_HOME
Date: Sun, 26 Feb 2023 06:43:27 -0500	[thread overview]
Message-ID: <21836149.EfDdHjke4D@bastet> (raw)

[-- 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 --]

             reply	other threads:[~2023-02-26 11:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-26 11:43 Philip McGrath [this message]
2023-03-05 15:44 ` bug#61809: (gnu home services xdg): Wrong value for $XDG_STATE_HOME Bruno Victal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21836149.EfDdHjke4D@bastet \
    --to=philip@philipmcgrath.com \
    --cc=61809@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).