home: services: xdg-base-directories: Deprecate XDG_LOG_HOME.

XDG_LOG_HOME is non-standard and log files should go to XDG_STATE_HOME
according to the XDG Base Directory Specification.

Fixes <https://issues.guix.gnu.org/61809>.

* gnu/home/services/desktop.scm (home-dbus-shepherd-services): Log to XDG_STATE_HOME.
* gnu/home/services/desktop.scm (home-unclutter-shepherd-services): Log to
XDG_STATE_HOME.
* gnu/home/services/mcron.scm (home-mcron-shepherd-services): Ditto.
* gnu/home/services/pm.scm (home-batsignal-shepherd-services): Ditto.
* gnu/home/services/shepherd.scm (launch-shepherd-gexp): Ditto.
* gnu/home/services/xdg.scm
(home-xdg-base-directories-configuration)[log-home]: Deprecate and unset default value.
(home-xdg-base-directories-environment-variables-service)
(ensure-xdg-base-dirs-on-activation): Handle field deprecation.
(home-xdg-base-directories-service-type): Update description.

Co-authored-by: Andrew Tropin <andrew@trop.in>
Signed-off-by: Andrew Tropin <andrew@trop.in>
This commit is contained in:
Bruno Victal 2023-03-05 15:19:14 +00:00 committed by Andrew Tropin
parent 48cdc47d8c
commit f74df2ab87
No known key found for this signature in database
GPG key ID: 2208D20958C1DEB0
5 changed files with 46 additions and 27 deletions

View file

@ -214,9 +214,9 @@ according to time of day.")))
(cons "DBUS_VERBOSE=1"
(default-environment-variables))
#:log-file
(format #f "~a/dbus.log"
(or (getenv "XDG_LOG_HOME")
(format #f "~a/.local/var/log"
(format #f "~a/log/dbus.log"
(or (getenv "XDG_STATE_HOME")
(format #f "~a/.local/state"
(getenv "HOME"))))))
(stop #~(make-kill-destructor)))))
@ -264,10 +264,10 @@ according to time of day.")))
(number->string
#$(home-unclutter-configuration-idle-timeout config)))
#:log-file (string-append
(or (getenv "XDG_LOG_HOME")
(format #f "~a/.local/var/log"
(or (getenv "XDG_STATE_HOME")
(format #f "~a/.local/state"
(getenv "HOME")))
"/unclutter.log"))))))
"/log/unclutter.log"))))))
(define home-unclutter-service-type
(service-type