From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 0/2] Respect XDG Base Directory Specification 0.8. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sun, 05 Mar 2023 15:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61982@debbugs.gnu.org Cc: Bruno Victal , philip@philipmcgrath.com X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by submit@debbugs.gnu.org id=B.167802943113541 (code B ref -1); Sun, 05 Mar 2023 15:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Mar 2023 15:17:11 +0000 Received: from localhost ([127.0.0.1]:39659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYq6o-0003WJ-HY for submit@debbugs.gnu.org; Sun, 05 Mar 2023 10:17:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:57426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYq6l-0003W9-CO for submit@debbugs.gnu.org; Sun, 05 Mar 2023 10:17:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYq6k-00021V-RD for guix-patches@gnu.org; Sun, 05 Mar 2023 10:17:06 -0500 Received: from smtpm4.myservices.hosting ([185.26.105.235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYq6j-00043V-2C for guix-patches@gnu.org; Sun, 05 Mar 2023 10:17:06 -0500 Received: from smtpm8.myservices.hosting (smtpm8.myservices.hosting [185.26.105.209]) by smtpm4.myservices.hosting (Postfix) with ESMTP id 2F63820CAE for ; Sun, 5 Mar 2023 16:16:58 +0100 (CET) Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id E9A0520B75 for ; Sun, 5 Mar 2023 16:16:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 94F7F80097; Sun, 5 Mar 2023 16:16:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BWXSDV9f5QGv; Sun, 5 Mar 2023 16:16:58 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id CAD6780079; Sun, 5 Mar 2023 16:16:57 +0100 (CET) From: Bruno Victal Date: Sun, 5 Mar 2023 15:16:48 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.105.235; envelope-from=mirai@makinata.eu; helo=smtpm4.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Note: Needs to be tested. Bruno Victal (2): home: services: xdg-base-directories: Set correct value for XDG_STATE_HOME. home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. gnu/home/services/desktop.scm | 4 +-- gnu/home/services/mcron.scm | 4 +-- gnu/home/services/pm.scm | 6 ++-- gnu/home/services/shepherd.scm | 4 +-- gnu/home/services/xdg.scm | 52 +++++++++++++++++++++++----------- 5 files changed, 44 insertions(+), 26 deletions(-) base-commit: d92ec2f2812c76b23aab778e26708cf353542ae9 -- 2.39.1 From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 1/2] home: services: xdg-base-directories: Set correct value for XDG_STATE_HOME. References: In-Reply-To: Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 05 Mar 2023 15:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61982@debbugs.gnu.org Cc: Bruno Victal , philip@philipmcgrath.com Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.167802956414288 (code B ref 61982); Sun, 05 Mar 2023 15:20:03 +0000 Received: (at 61982) by debbugs.gnu.org; 5 Mar 2023 15:19:24 +0000 Received: from localhost ([127.0.0.1]:40320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYq8y-0003iO-4H for submit@debbugs.gnu.org; Sun, 05 Mar 2023 10:19:24 -0500 Received: from smtpmciv1.myservices.hosting ([185.26.107.237]:33358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYq8v-0003iB-Vg for 61982@debbugs.gnu.org; Sun, 05 Mar 2023 10:19:22 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv1.myservices.hosting (Postfix) with ESMTP id D8CC420608; Sun, 5 Mar 2023 16:19:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 71D4680098; Sun, 5 Mar 2023 16:19:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aeppnyUCeKte; Sun, 5 Mar 2023 16:19:20 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id C220D80079; Sun, 5 Mar 2023 16:19:19 +0100 (CET) From: Bruno Victal Date: Sun, 5 Mar 2023 15:19:13 +0000 Message-Id: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) XDG Base Directory Specification 0.8 officially introduces the XDG_STATE_HOME environment variable. Fixes . * gnu/home/services/xdg.scm (home-xdg-base-directories-configuration)[state-home]: Set default value according to spec. Update field documentation. (home-xdg-base-directories-service-type): Update service description. --- gnu/home/services/xdg.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 3007493f85..ac557b4c3d 100644 --- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -104,11 +104,11 @@ (define-configuration home-xdg-base-directories-configuration Specification, but helps to make implementation of home services more consistent.") (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.")) + (path "$HOME/.local/state") + "Base directory for programs to store state data that should persist +between (application) restarts, such as logs, but are not important or +portable enough to the user to warrant storing them in +@env{XDG_DATA_HOME}.")) (define (home-xdg-base-directories-environment-variables-service config) (map @@ -158,12 +158,12 @@ (define home-xdg-base-directories-service-type (compose identity) (extend last-extension-or-cfg) (description "Configure XDG base directories. This -service introduces two additional variables @env{XDG_STATE_HOME}, -@env{XDG_LOG_HOME}. They are not a part of XDG specification, at -least yet, but are convenient to have, it improves the consistency -between different home services. The services of this service-type is -instantiated by default, to provide non-default value, extend the -service-type (using @code{simple-service} for example)."))) +service introduces an additional @env{XDG_LOG_HOME} variable. It's not +a part of XDG specification, at least yet, but are convenient to have, +it improves the consistency between different home services. The +services of this service-type is instantiated by default, to provide +non-default value, extend the service-type (using @code{simple-service} +for example)."))) (define (generate-home-xdg-base-directories-documentation) (generate-documentation base-commit: d92ec2f2812c76b23aab778e26708cf353542ae9 -- 2.39.1 From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 05 Mar 2023 15:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61982@debbugs.gnu.org Cc: Bruno Victal , philip@philipmcgrath.com Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.167802956614295 (code B ref 61982); Sun, 05 Mar 2023 15:20:03 +0000 Received: (at 61982) by debbugs.gnu.org; 5 Mar 2023 15:19:26 +0000 Received: from localhost ([127.0.0.1]:40322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYq8z-0003iV-Ny for submit@debbugs.gnu.org; Sun, 05 Mar 2023 10:19:26 -0500 Received: from smtpm3.myservices.hosting ([185.26.105.234]:49886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYq8w-0003iC-Lh for 61982@debbugs.gnu.org; Sun, 05 Mar 2023 10:19:23 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 946F920F3C; Sun, 5 Mar 2023 16:19:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 1DF9780079; Sun, 5 Mar 2023 16:19:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NnrXK_30Lla1; Sun, 5 Mar 2023 16:19:20 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 3EEB680097; Sun, 5 Mar 2023 16:19:20 +0100 (CET) From: Bruno Victal Date: Sun, 5 Mar 2023 15:19:14 +0000 Message-Id: <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) XDG_LOG_HOME is non-standard and log files should go to XDG_STATE_HOME according to the XDG Base Directory Specification. Fixes . * gnu/home/services/desktop.scm (home-dbus-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. --- gnu/home/services/desktop.scm | 4 ++-- gnu/home/services/mcron.scm | 4 ++-- gnu/home/services/pm.scm | 6 +++--- gnu/home/services/shepherd.scm | 4 ++-- gnu/home/services/xdg.scm | 36 +++++++++++++++++++++++++--------- 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm index cb25b03b64..76df7b30a2 100644 --- a/gnu/home/services/desktop.scm +++ b/gnu/home/services/desktop.scm @@ -206,8 +206,8 @@ (define (home-dbus-shepherd-services config) (default-environment-variables)) #:log-file (format #f "~a/dbus.log" - (or (getenv "XDG_LOG_HOME") - (format #f "~a/.local/var/log" + (or (getenv "XDG_STATE_HOME") + (format #f "~a/.local/state" (getenv "HOME")))))) (stop #~(make-kill-destructor))))) diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm index 5f35bfe054..69c7f9faa6 100644 --- a/gnu/home/services/mcron.scm +++ b/gnu/home/services/mcron.scm @@ -99,8 +99,8 @@ (define (home-mcron-shepherd-services config) #~()) #$@files) #: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"))) "/mcron.log"))) (stop #~(make-kill-destructor)) diff --git a/gnu/home/services/pm.scm b/gnu/home/services/pm.scm index 5f09941827..274ab2303c 100644 --- a/gnu/home/services/pm.scm +++ b/gnu/home/services/pm.scm @@ -128,9 +128,9 @@ (define (home-batsignal-shepherd-services config) (list "-i") (list))) #:log-file (string-append - (or (getenv "XDG_LOG_HOME") - (format #f "~a/.local/var/log" - (getenv "HOME"))) + (or (getenv "XDG_STATE_HOME") + (format #f "~a/.local/state" + (getenv "HOME"))) "/batsignal.log"))) (stop #~(make-kill-destructor)))))) diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm index 1a70a220f0..825cf66f05 100644 --- a/gnu/home/services/shepherd.scm +++ b/gnu/home/services/shepherd.scm @@ -108,8 +108,8 @@ (define (launch-shepherd-gexp config) (or (getenv "XDG_RUNTIME_DIR") (format #f "/run/user/~a" (getuid))) "/shepherd/socket")) - (let ((log-dir (or (getenv "XDG_LOG_HOME") - (format #f "~a/.local/var/log" + (let ((log-dir (or (getenv "XDG_STATE_HOME") + (format #f "~a/.local/state" (getenv "HOME"))))) ;; TODO: Remove it, 0.9.2 creates it automatically? ((@ (guix build utils) mkdir-p) log-dir) diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index ac557b4c3d..958772696b 100644 --- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021, 2022 Andrew Tropin ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2023 Bruno Victal ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +23,7 @@ (define-module (gnu home services xdg) #:use-module (gnu home services) #:use-module (gnu packages freedesktop) #:use-module (gnu home services utils) + #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module (guix modules) #:use-module (guix records) @@ -39,7 +41,7 @@ (define-module (gnu home services xdg) home-xdg-base-directories-configuration-config-home home-xdg-base-directories-configuration-data-home home-xdg-base-directories-configuration-state-home - home-xdg-base-directories-configuration-log-home + home-xdg-base-directories-configuration-log-home ; deprecated home-xdg-base-directories-configuration-runtime-dir home-xdg-user-directories-service-type @@ -77,6 +79,7 @@ (define-module (gnu home services xdg) (define (serialize-path field-name val) "") (define path? string?) +(define-maybe path) (define-configuration home-xdg-base-directories-configuration (cache-home @@ -97,12 +100,17 @@ (define-configuration home-xdg-base-directories-configuration (path "${XDG_RUNTIME_DIR:-/run/user/$UID}") "Base directory for programs to store user-specific runtime files, like sockets.") + ;; TODO: deprecated field, use $XDG_STATE_HOME(/log) instead. (log-home - (path "$HOME/.local/var/log") + maybe-path "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.") +consistent." + (lambda (field-name val) + (when (maybe-value-set? val) + (warn-about-deprecation field-name #f #:replacement 'state-home)) + (serialize-path field-name val))) (state-home (path "$HOME/.local/state") "Base directory for programs to store state data that should persist @@ -117,7 +125,13 @@ (define (home-xdg-base-directories-environment-variables-service config) #f "XDG_~a" (object->snake-case-string (configuration-field-name field) 'upper)) ((configuration-field-getter field) config))) - home-xdg-base-directories-configuration-fields)) + ;; XXX: deprecated field, remove later + (if (maybe-value-set? + (home-xdg-base-directories-configuration-log-home config)) + home-xdg-base-directories-configuration-fields + (filter-configuration-fields + home-xdg-base-directories-configuration-fields + '(log-home) #t)))) (define (ensure-xdg-base-dirs-on-activation config) (with-imported-modules '((guix build utils)) @@ -138,7 +152,14 @@ (define (ensure-xdg-base-dirs-on-activation config) ;; and will be provided by elogind or other service. (and (not (string=? "XDG_RUNTIME_DIR" variable)) variable))) - home-xdg-base-directories-configuration-fields))))) + ;; XXX: deprecated field, remove later + (if (maybe-value-set? + (home-xdg-base-directories-configuration-log-home + config)) + home-xdg-base-directories-configuration-fields + (filter-configuration-fields + home-xdg-base-directories-configuration-fields + '(log-home) #t))))))) (define (last-extension-or-cfg config extensions) "Picks configuration value from last provided extension. If there @@ -157,10 +178,7 @@ (define home-xdg-base-directories-service-type (default-value (home-xdg-base-directories-configuration)) (compose identity) (extend last-extension-or-cfg) - (description "Configure XDG base directories. This -service introduces an additional @env{XDG_LOG_HOME} variable. It's not -a part of XDG specification, at least yet, but are convenient to have, -it improves the consistency between different home services. The + (description "Configure XDG base directories. The services of this service-type is instantiated by default, to provide non-default value, extend the service-type (using @code{simple-service} for example)."))) -- 2.39.1 From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 1/2] home: services: xdg-base-directories: Set correct value for XDG_STATE_HOME. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Apr 2023 06:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal , 61982@debbugs.gnu.org Cc: Bruno Victal , philip@philipmcgrath.com Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168084985727266 (code B ref 61982); Fri, 07 Apr 2023 06:45:01 +0000 Received: (at 61982) by debbugs.gnu.org; 7 Apr 2023 06:44:17 +0000 Received: from localhost ([127.0.0.1]:55599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkfpY-00075h-HF for submit@debbugs.gnu.org; Fri, 07 Apr 2023 02:44:16 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:41041) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkfpU-00075Q-9Z for 61982@debbugs.gnu.org; Fri, 07 Apr 2023 02:44:15 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id E3A4B100010; Fri, 7 Apr 2023 06:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1680849845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=v7kZt7d9260Bmas8B19OmxaHTOxWlUFM+3hjddK/zSo=; b=XnZ659cHW+rKCkcURu28wHvDsmad+pkc+Tisw2IAQozJLbrPwqqF6eta3fzL+dmSbLQ28o WVE28TKTf6yhelCN4A9OTzJ+0eU015dZB+ig9VrtolV6zP+n+NMZbfENWeeSTkOJxKCO5u LSr5Hq06r2uc7MpuJ3xFwKtKOyTnPTtI+1Xmd1A4uLiEQ+lgNwm1Ty71YyM8QAvjEpdIaV sokAyba63/8F1ltkxXNstVtZGRcYFYhK2sgFt8AP1WWyojkqFlHtWM2Vave7vgVVjbCnz1 bhK9h4fGIcKq9Of4l4ZKZ9etFHLDfc5knO4veLRzS8hImyILJvpJhq7wYGP7fg== From: Andrew Tropin In-Reply-To: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> Date: Fri, 07 Apr 2023 10:43:50 +0400 Message-ID: <87lej4w5sp.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-03-05 15:19, Bruno Victal wrote: > XDG Base Directory Specification 0.8 officially introduces the > XDG_STATE_HOME environment variable. > > Fixes . > > * gnu/home/services/xdg.scm > (home-xdg-base-directories-configuration)[state-home]: Set default value = according to spec. > Update field documentation. > (home-xdg-base-directories-service-type): Update service description. > --- > gnu/home/services/xdg.scm | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm > index 3007493f85..ac557b4c3d 100644 > --- a/gnu/home/services/xdg.scm > +++ b/gnu/home/services/xdg.scm > @@ -104,11 +104,11 @@ (define-configuration home-xdg-base-directories-con= figuration > Specification, but helps to make implementation of home services more > consistent.") > (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.")) > + (path "$HOME/.local/state") Ironically enough, it was my first idea for default value :) > + "Base directory for programs to store state data that should persist > +between (application) restarts, such as logs, but are not important or > +portable enough to the user to warrant storing them in > +@env{XDG_DATA_HOME}.")) >=20=20 > (define (home-xdg-base-directories-environment-variables-service config) > (map > @@ -158,12 +158,12 @@ (define home-xdg-base-directories-service-type > (compose identity) > (extend last-extension-or-cfg) > (description "Configure XDG base directories. This > -service introduces two additional variables @env{XDG_STATE_HOME}, > -@env{XDG_LOG_HOME}. They are not a part of XDG specification, at > -least yet, but are convenient to have, it improves the consistency > -between different home services. The services of this service-type is > -instantiated by default, to provide non-default value, extend the > -service-type (using @code{simple-service} for example)."))) > +service introduces an additional @env{XDG_LOG_HOME} variable. It's not > +a part of XDG specification, at least yet, but are convenient to have, > +it improves the consistency between different home services. The > +services of this service-type is instantiated by default, to provide > +non-default value, extend the service-type (using @code{simple-service} > +for example)."))) >=20=20 > (define (generate-home-xdg-base-directories-documentation) > (generate-documentation > > base-commit: d92ec2f2812c76b23aab778e26708cf353542ae9 Applied and pushed the first patch as=20 5c893787be78a79433fe1343f5b70cd647e8f667 Will think about the second one a little more and reply on that later. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmQvu6YACgkQIgjSCVjB 3rBkxg//bw2Snxad+y2klyFnHcvEBTknll1fF0v4jpT2Ex4IBZsnRhgAnbWDfIBV xG7DwYC+uAr443rsj4joFpapMJK2d8OJBBff45I4u3KYFZ9Z/bLfurTS7cX8aPIC Kcx5Wwvuf1R7ZWk+bRhHcQ75DmqAmBlLhupcBAluXgQ2kA+JhfyHnbv2zBAO9P8d TFYzu4LunHIY8ZTrsvwJsUg7J/dIDN0dI8YQMLzalHivXtFlLkUBbiJfgnDnu+dv YGUFGBqQmBpHq+5zcOqR1wnJhvqPzDuK15r160fpnrxp2JGe6m4qQSCeW/VxsJF2 PvXX+fyTwHT1dLv+0DCOzUJofgTMZ/7C/yDr3xKd+a1GHXlRHQowzfnsF33+xiuq fJHdQ29FH0F3P5WfUQdylwqsbuzaZpTVmAcY7xV3YVzyXqkNmSwia6rdR2z5w87+ R6Jq4P01YXiG6i+hi5pZE0bZMSGHtk04sQYm7arI70WZmMuhtLHqZa2Z3F56u3/Q fS2u6KrO0IgsD6d5lebO0LN1Dg91xSJ7Dao5gnAt24vUVbSfYY6vBgiNy4fKUlpg NTpb0IPitGmQ3x7aKfUHqTJby/bIqqCRSkwTBVh1cPnhim5cXbSsGZNS//9Krxfb LODE2N/dfvK6b95CL9Q/4HTxrEyY8iDDnjk51ovklilVzzyMNo8= =LYE/ -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Apr 2023 08:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal , 61982@debbugs.gnu.org Cc: Bruno Victal , philip@philipmcgrath.com Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.16808571397686 (code B ref 61982); Fri, 07 Apr 2023 08:46:01 +0000 Received: (at 61982) by debbugs.gnu.org; 7 Apr 2023 08:45:39 +0000 Received: from localhost ([127.0.0.1]:55671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkhj0-0001zt-RX for submit@debbugs.gnu.org; Fri, 07 Apr 2023 04:45:39 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:40927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkhiy-0001ze-Gs for 61982@debbugs.gnu.org; Fri, 07 Apr 2023 04:45:37 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 0C33BFF809; Fri, 7 Apr 2023 08:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1680857130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vaGDBHGTucabtKl3s/x+n4lQS8S58uidCyAVmarGIWM=; b=eu4Ui6JjIoD/RREPpM1iid18SW1Du6KeRdOcbKv7wbAI98eETMd851pcJItzC/E2Sp6BJ2 QH/40Ud/O3YltOCzwWadIqDf2UcceqY+oQxYh0O4vIFEi2TsVR4MsxyhGUrEDCzpGdIRzf ItU2r4NPf5qmmWLafm+Cvqta5WT78PxqaQRaKJUDBC2FkeOr4fZzfCR500aOIor4RFMwog QCS4fvpXvvN+uarL4nvgchv7wbKpj9WbwnogApz9IUsqVMLQHEKUt2lvPPAUkv/rA+DqAd UJUdG1W1qwaOhX9GMsGgBu8qTv19+OfFPcNSg29w0PM+17jQfbpEn7XLknHxzw== From: Andrew Tropin In-Reply-To: <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> Date: Fri, 07 Apr 2023 12:45:15 +0400 Message-ID: <87cz4gw06c.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2023-03-05 15:19, Bruno Victal wrote: > XDG_LOG_HOME is non-standard and log files should go to XDG_STATE_HOME > according to the XDG Base Directory Specification. > > Fixes . > > * gnu/home/services/desktop.scm (home-dbus-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. > --- > gnu/home/services/desktop.scm | 4 ++-- > gnu/home/services/mcron.scm | 4 ++-- > gnu/home/services/pm.scm | 6 +++--- > gnu/home/services/shepherd.scm | 4 ++-- > gnu/home/services/xdg.scm | 36 +++++++++++++++++++++++++--------- > 5 files changed, 36 insertions(+), 18 deletions(-) > > diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm > index cb25b03b64..76df7b30a2 100644 > --- a/gnu/home/services/desktop.scm > +++ b/gnu/home/services/desktop.scm > @@ -206,8 +206,8 @@ (define (home-dbus-shepherd-services config) > (default-environment-variables)) > #:log-file > (format #f "~a/dbus.log" > - (or (getenv "XDG_LOG_HOME") > - (format #f "~a/.local/var/log" > + (or (getenv "XDG_STATE_HOME") > + (format #f "~a/.local/state" If we deprecate XDG_LOG_HOME, maybe it's a good idea to make a helper function, which can be reused across different services?=20=20 Also, how about appending /log subdirectory by default? WDYT? > (getenv "HOME")))))) > (stop #~(make-kill-destructor))))) >=20=20 > diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm > index 5f35bfe054..69c7f9faa6 100644 > --- a/gnu/home/services/mcron.scm > +++ b/gnu/home/services/mcron.scm > @@ -99,8 +99,8 @@ (define (home-mcron-shepherd-services config) > #~()) > #$@files) > #: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"))) > "/mcron.log"))) > (stop #~(make-kill-destructor)) > diff --git a/gnu/home/services/pm.scm b/gnu/home/services/pm.scm > index 5f09941827..274ab2303c 100644 > --- a/gnu/home/services/pm.scm > +++ b/gnu/home/services/pm.scm > @@ -128,9 +128,9 @@ (define (home-batsignal-shepherd-services config) > (list "-i") > (list))) > #:log-file (string-append > - (or (getenv "XDG_LOG_HOME") > - (format #f "~a/.local/var/log" > - (getenv "HOME"))) > + (or (getenv "XDG_STATE_HOME") > + (format #f "~a/.local/state" > + (getenv "HOME"))) > "/batsignal.log"))) > (stop #~(make-kill-destructor)))))) >=20=20 > diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.= scm > index 1a70a220f0..825cf66f05 100644 > --- a/gnu/home/services/shepherd.scm > +++ b/gnu/home/services/shepherd.scm > @@ -108,8 +108,8 @@ (define (launch-shepherd-gexp config) > (or (getenv "XDG_RUNTIME_DIR") > (format #f "/run/user/~a" (getuid))) > "/shepherd/socket")) > - (let ((log-dir (or (getenv "XDG_LOG_HOME") > - (format #f "~a/.local/var/log" > + (let ((log-dir (or (getenv "XDG_STATE_HOME") > + (format #f "~a/.local/state" > (getenv "HOME"))))) > ;; TODO: Remove it, 0.9.2 creates it automatically? > ((@ (guix build utils) mkdir-p) log-dir) > diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm > index ac557b4c3d..958772696b 100644 > --- a/gnu/home/services/xdg.scm > +++ b/gnu/home/services/xdg.scm > @@ -1,6 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2021, 2022 Andrew Tropin > ;;; Copyright =C2=A9 2021 Xinglu Chen > +;;; Copyright =C2=A9 2023 Bruno Victal > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -22,6 +23,7 @@ (define-module (gnu home services xdg) > #:use-module (gnu home services) > #:use-module (gnu packages freedesktop) > #:use-module (gnu home services utils) > + #:use-module (guix deprecation) > #:use-module (guix gexp) > #:use-module (guix modules) > #:use-module (guix records) > @@ -39,7 +41,7 @@ (define-module (gnu home services xdg) > home-xdg-base-directories-configuration-config-home > home-xdg-base-directories-configuration-data-home > home-xdg-base-directories-configuration-state-home > - home-xdg-base-directories-configuration-log-home > + home-xdg-base-directories-configuration-log-home ; deprecat= ed > home-xdg-base-directories-configuration-runtime-dir >=20=20 > home-xdg-user-directories-service-type > @@ -77,6 +79,7 @@ (define-module (gnu home services xdg) >=20=20 > (define (serialize-path field-name val) "") > (define path? string?) > +(define-maybe path) >=20=20 > (define-configuration home-xdg-base-directories-configuration > (cache-home > @@ -97,12 +100,17 @@ (define-configuration home-xdg-base-directories-conf= iguration > (path "${XDG_RUNTIME_DIR:-/run/user/$UID}") > "Base directory for programs to store user-specific runtime files, > like sockets.") > + ;; TODO: deprecated field, use $XDG_STATE_HOME(/log) instead. > (log-home > - (path "$HOME/.local/var/log") > + maybe-path > "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.") > +consistent." > + (lambda (field-name val) > + (when (maybe-value-set? val) > + (warn-about-deprecation field-name #f #:replacement 'state-home)) > + (serialize-path field-name val))) > (state-home > (path "$HOME/.local/state") > "Base directory for programs to store state data that should persist > @@ -117,7 +125,13 @@ (define (home-xdg-base-directories-environment-varia= bles-service config) > #f "XDG_~a" > (object->snake-case-string (configuration-field-name field) = 'upper)) > ((configuration-field-getter field) config))) > - home-xdg-base-directories-configuration-fields)) > + ;; XXX: deprecated field, remove later > + (if (maybe-value-set? > + (home-xdg-base-directories-configuration-log-home config)) > + home-xdg-base-directories-configuration-fields > + (filter-configuration-fields > + home-xdg-base-directories-configuration-fields > + '(log-home) #t)))) >=20=20 > (define (ensure-xdg-base-dirs-on-activation config) > (with-imported-modules '((guix build utils)) > @@ -138,7 +152,14 @@ (define (ensure-xdg-base-dirs-on-activation config) > ;; and will be provided by elogind or other service. > (and (not (string=3D? "XDG_RUNTIME_DIR" variable)) > variable))) > - home-xdg-base-directories-configuration-fields))))) > + ;; XXX: deprecated field, remove later > + (if (maybe-value-set? > + (home-xdg-base-directories-configuration-log-home > + config)) > + home-xdg-base-directories-configuration-fields > + (filter-configuration-fields > + home-xdg-base-directories-configuration-fields > + '(log-home) #t))))))) >=20=20 > (define (last-extension-or-cfg config extensions) > "Picks configuration value from last provided extension. If there > @@ -157,10 +178,7 @@ (define home-xdg-base-directories-service-type > (default-value (home-xdg-base-directories-configuration)) > (compose identity) > (extend last-extension-or-cfg) > - (description "Configure XDG base directories. This > -service introduces an additional @env{XDG_LOG_HOME} variable. It's not > -a part of XDG specification, at least yet, but are convenient to have, > -it improves the consistency between different home services. The > + (description "Configure XDG base directories. The > services of this service-type is instantiated by default, to provide > non-default value, extend the service-type (using @code{simple-service} > for example)."))) Overall LGTM, let me know what you think on a few comments above. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmQv2BsACgkQIgjSCVjB 3rDrhw//cWndPui+Kl5k5KEkufH933IXT/qy8Y4yefqd9MJLAIbhfqTwsjz4v52P YBeYAJb0vx0Vh9Cq22clzvFq3w9wbVsaKeDkC2sL1Xk3vATRxSuvMI6gcAw8M4Hh 3jc1Lbxv4rv3181d3Qjq+hV665gCSpEDb/gp2dBieGpMRhFPloDdjPkIoebtk9B+ rhngsrvlV67mZl5HDJai91+7BSsBKY2mMxnQ6WOgvFoRUP14YEQ0YM2iikOpnvp+ 2Gjw6WIMRJC4CILglqf2mfLcBbxS6ivrgukOcvlpb0WR9wa7OlFpTZsARC39JPrd DoB54HvmiJzs7cN/gbxfST35rZA/O6P6VnbFjjlIyFrtVr6s2+ORTDfz4k20tSia hd83o6Z0jMrSr0x1PH9xjPCZ/2bKLiqGzpgvcP0cxl6yttiItojpSrXtBANTsT1Q AzKYk43QO09hlJvIWYj7NXZvwB4Tlq+5/Uu8XQr6/K472OvUgc1+0BGcjxWtEWnY F0/3i9d2OUdUJBqUi87j/2pN+C4bBZnJ7KPA/gCdJS2agPMN+88gybj0JBDKbePC EMcKI91iWPV0vv2VsRMpTeTQZ8WZTZo7KCq49IwsdqBdK2Cj4RgGbb+8sbDPK4/6 C7DRl6O0sh7+ilcuEg8QeUGqz+FhR68uzP6LG+o/8lDOlvhKhwE= =ijCt -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Apr 2023 11:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin Cc: philip@philipmcgrath.com, 61982@debbugs.gnu.org Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168086807116621 (code B ref 61982); Fri, 07 Apr 2023 11:48:01 +0000 Received: (at 61982) by debbugs.gnu.org; 7 Apr 2023 11:47:51 +0000 Received: from localhost ([127.0.0.1]:55862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkkZL-0004K0-0M for submit@debbugs.gnu.org; Fri, 07 Apr 2023 07:47:51 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]:40436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkkZJ-0004Jj-R9 for 61982@debbugs.gnu.org; Fri, 07 Apr 2023 07:47:50 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id 3FB2520F0A; Fri, 7 Apr 2023 13:47:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id EAE36800A5; Fri, 7 Apr 2023 13:47:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id n4HXpKBoJEdt; Fri, 7 Apr 2023 13:47:44 +0200 (CEST) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7FEC9800A4; Fri, 7 Apr 2023 13:47:44 +0200 (CEST) Message-ID: <10e30d4c-07f2-8bf9-24ed-7bbf820d12e8@makinata.eu> Date: Fri, 7 Apr 2023 12:47:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Content-Language: en-US References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> <87cz4gw06c.fsf@trop.in> From: Bruno Victal In-Reply-To: <87cz4gw06c.fsf@trop.in> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Hi Andrew, On 2023-04-07 09:45, Andrew Tropin wrote: > On 2023-03-05 15:19, Bruno Victal wrote: >> --- a/gnu/home/services/desktop.scm >> +++ b/gnu/home/services/desktop.scm >> @@ -206,8 +206,8 @@ (define (home-dbus-shepherd-services config) >> (default-environment-variables)) >> #:log-file >> (format #f "~a/dbus.log" >> - (or (getenv "XDG_LOG_HOME") >> - (format #f "~a/.local/var/log" >> + (or (getenv "XDG_STATE_HOME") >> + (format #f "~a/.local/state" > > If we deprecate XDG_LOG_HOME, maybe it's a good idea to make a helper > function, which can be reused across different services? > > Also, how about appending /log subdirectory by default? >> WDYT? I'm wondering if this continued usage of XDG_LOG_HOME was a good idea, maybe the service should just start using XDG_STATE_HOME as soon as possible? (in which case, this patch will have to be reworked to reflect that) This way we avoid introducing yet more code to handle deprecated code. It shouldn't result in any kind of problems, XDG_LOG_HOME will still be set in the meantime for scripts and code that happen to use it and are not part of (upstream) guix. WDYT? Cheers, Bruno From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Apr 2023 12:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal Cc: philip@philipmcgrath.com, 61982@debbugs.gnu.org Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.16808716091956 (code B ref 61982); Fri, 07 Apr 2023 12:47:02 +0000 Received: (at 61982) by debbugs.gnu.org; 7 Apr 2023 12:46:49 +0000 Received: from localhost ([127.0.0.1]:55945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pklUO-0000VU-Qm for submit@debbugs.gnu.org; Fri, 07 Apr 2023 08:46:49 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:46183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pklUL-0000Uv-Ip for 61982@debbugs.gnu.org; Fri, 07 Apr 2023 08:46:46 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 56E691BF206; Fri, 7 Apr 2023 12:46:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1680871599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=A88C6LY/zM638Nnyi/Z//3SgZalKkgTQhDAK9omXCaM=; b=JpbWZTRSWUvgznKcjWIWEXAYqLgE32z7iAtnO11c3X7hD4WPG2Etfcay/CRMw4oRWP05ok h8g+UJq8Ygw0rLkHLXRRJ7vZd0vq+Hw7PjqToVhdrP14YRzoHKF4wEUczG1sEzUfW8yPA3 iQ39jAhZx7qLuWVZnshJI3dda/QZDVfbSJOA9pySjw8Ve9iFAk9qjYQyIjHowRT3oaY4gL ipHRS7oZJTJ7ZhDvaMb3Ydji5cLnEOQi4qwbez1jpoK8Mwbmriu6TciPl2RcfoJiB2Jw/x EcfPL9pVHo7m16QrU6wdhEYW8O8EZvFgWMsrt/kGTEUNZRRITVncHIcmpGbYkg== From: Andrew Tropin In-Reply-To: <10e30d4c-07f2-8bf9-24ed-7bbf820d12e8@makinata.eu> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> <87cz4gw06c.fsf@trop.in> <10e30d4c-07f2-8bf9-24ed-7bbf820d12e8@makinata.eu> Date: Fri, 07 Apr 2023 16:46:34 +0400 Message-ID: <875ya7x3kl.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-04-07 12:47, Bruno Victal wrote: > Hi Andrew, > > On 2023-04-07 09:45, Andrew Tropin wrote: >> On 2023-03-05 15:19, Bruno Victal wrote: >>> --- a/gnu/home/services/desktop.scm >>> +++ b/gnu/home/services/desktop.scm >>> @@ -206,8 +206,8 @@ (define (home-dbus-shepherd-services config) >>> (default-environment-variables)) >>> #:log-file >>> (format #f "~a/dbus.log" >>> - (or (getenv "XDG_LOG_HOME") >>> - (format #f "~a/.local/var/log" >>> + (or (getenv "XDG_STATE_HOME") >>> + (format #f "~a/.local/state" >>=20 >> If we deprecate XDG_LOG_HOME, maybe it's a good idea to make a helper >> function, which can be reused across different services?=20=20 >>=20 >> Also, how about appending /log subdirectory by default? >>> WDYT? > > I'm wondering if this continued usage of XDG_LOG_HOME was a good idea, > maybe the service should just start using XDG_STATE_HOME as soon as possi= ble? > (in which case, this patch will have to be reworked to reflect that) > This way we avoid introducing yet more code to handle deprecated code. > > It shouldn't result in any kind of problems, XDG_LOG_HOME will still be s= et in the meantime > for scripts and code that happen to use it and are not part of (upstream)= guix. > > WDYT? I meant introducing something like this (define (get-log-dir) (string-append (getenv "XDG_STATE_HOME") "/log")) and use it instead of (or (getenv "XDG_STATE_HOME") (format #f "~a/.local/state" (getenv "HOME"))) =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmQwEKoACgkQIgjSCVjB 3rD0Tw/+Kn9fjK0gunUgwz0wWZ9T/+uvK8PFedGXRpDMH/ZV/iwHXC3AiS5R0I++ eHMTF0slJ6H06buDmaMwSZYy750R5GBJ7Ec4XQjLa+TSLSLaOIjP3BhviMFqxWJP zmGVqzT4ajsUgLHAbTAF7XymZMuHnggN8UZJzg1ZVEiF7amGIygP9CtE3GQbehao Erylha2O1ZZFMvwepmYBF9auhN1pyD5Um5Tn/IijAllc4VpCIsTIQBmozlNUIR0G GktkYIwo6C9H/R5v+O8C/ROFVjjMl/k4GMm/I8pLHUCQiy0FSfoKQmcSzbprY4TT nYVJvnvSnEtZ+CeamdB2l2O3Yqu/v4QdaPOvbq+j2+b818g378ffp5Je4BQ0n32U WmIEfq3W+vWHuffhWyozcb3RTbO14UxIECjVyPSSQezeolNWhJtJnvI8gphsBb+8 MOlm4suVDSpBJPjDkX5vVOn2tayMDyuI4AgqhUKWjDKZ4IaG1Cl+ML3msMqbdyjR 9hkYxnkBK+EeBDizPhuzDjRlFirXxmHUo3FmN6U/r0U127xlUWc52Bpn1tc8Yj0c XSFMn/GHOotJVLTIozd/Q8LFFbAvt6RNmeXg7oWpo3exDdQ730F9Kci0dZsdc+DL Ek0Pkb5yOPPuazbgR3oz85yEEmuyr31USpuaq3o3CKZqVBAtinU= =szw0 -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: "Philip McGrath" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Apr 2023 19:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Andrew Tropin" , "Bruno Victal" Cc: 61982@debbugs.gnu.org Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168106738416917 (code B ref 61982); Sun, 09 Apr 2023 19:10:02 +0000 Received: (at 61982) by debbugs.gnu.org; 9 Apr 2023 19:09:44 +0000 Received: from localhost ([127.0.0.1]:33724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plaQ3-0004Om-Ov for submit@debbugs.gnu.org; Sun, 09 Apr 2023 15:09:44 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:37265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plaQ1-0004OY-UQ for 61982@debbugs.gnu.org; Sun, 09 Apr 2023 15:09:42 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CA1755C00D1; Sun, 9 Apr 2023 15:09:34 -0400 (EDT) Received: from imap52 ([10.202.2.102]) by compute1.internal (MEProxy); Sun, 09 Apr 2023 15:09:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1681067374; x=1681153774; bh=ESiiyZH7th4O3WPr3FowaRr4ETKXo7l9P4F jp/3kE/U=; b=eKMfVgqO6ds0D0gX8LEc3adOhhloXPzBc64ZFMPX71nA0Ssq7+8 kphrTGopyu4yNyZzzzqTsLqUiRw57cRVAl4VYQmMzevknnyBwSU+dS3maOtgbpeV C06ole8+wmffnui1LJt+i7BqeKfpL2rcG7b37k5xVRVp+dYrIUSkLAop8MzM9ta2 Lt0ojIoW7wKd/d6cnEA21a21MDEl4/F8ZF64rI+l7Ax5VZ/I3bJUkT2BTeENT400 pbCgZ4NHYfQsNoD8OQiwbANBPU9p3Gv+MQlrHfEPxbhpR9iu9lFIjDHjSBgok34d 67KEgp5rSdnjVtfhP5UZVl84y/BsuQhhiCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1681067374; x=1681153774; bh=ESiiyZH7th4O3 WPr3FowaRr4ETKXo7l9P4Fjp/3kE/U=; b=sITvRFSqZueFni6GkQe0NGfL6KQ+x XG4U5AgTH70n/EkYgWrWiAveQCt09VxHzr+Y6a8ul1O4WphgpBdyWYpdqivWNuNv jZDOAPJtWB9qUaBi5MRaOEFL+GI21o3ezWAOFC3WsBqL3jWFkQ41qVqY5DwdRyvn QCSiFTfPj3ddteWsxwbJ0fzhe0oWfc+iqa3ADVWvgFQNfb9pJw4gngWM9oVbfraX 3qO7frmoNI3HJ1xh3UIj/JWWY5QE9Pj7CgwYB7MfLEJZGINXRBSedCb1V97bhBV8 3mdqbywwUNba32rrcwJc5RRGoKX91pJ2znic6t1qLztcQRu1VKcAjc7OQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdektddgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdfr hhhilhhiphcuofgtifhrrghthhdfuceophhhihhlihhpsehphhhilhhiphhmtghgrhgrth hhrdgtohhmqeenucggtffrrghtthgvrhhnpeefgfejheetleeileehhfejffekvdeuffek hfdugfetjeevleegfedthfelgeffleenucffohhmrghinhepghhnuhdrohhrghenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphes phhhihhlihhpmhgtghhrrghthhdrtghomh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6F6B7C60091; Sun, 9 Apr 2023 15:09:34 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-334-g8c072af647-fm-20230330.001-g8c072af6 Mime-Version: 1.0 Message-Id: <92d07a8a-aac9-42c7-809d-66373358c77b@app.fastmail.com> In-Reply-To: <875ya7x3kl.fsf@trop.in> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> <87cz4gw06c.fsf@trop.in> <10e30d4c-07f2-8bf9-24ed-7bbf820d12e8@makinata.eu> <875ya7x3kl.fsf@trop.in> Date: Sun, 09 Apr 2023 15:09:14 -0400 From: "Philip McGrath" Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, On Fri, Apr 7, 2023, at 8:46 AM, Andrew Tropin wrote: > On 2023-04-07 12:47, Bruno Victal wrote: > >> Hi Andrew, >> >> On 2023-04-07 09:45, Andrew Tropin wrote: >>> On 2023-03-05 15:19, Bruno Victal wrote: >>>> --- a/gnu/home/services/desktop.scm >>>> +++ b/gnu/home/services/desktop.scm >>>> @@ -206,8 +206,8 @@ (define (home-dbus-shepherd-services config) >>>> (default-environment-variables)) >>>> #:log-file >>>> (format #f "~a/dbus.log" >>>> - (or (getenv "XDG_LOG_HOME") >>>> - (format #f "~a/.local/var/log" >>>> + (or (getenv "XDG_STATE_HOME") >>>> + (format #f "~a/.local/state" >>> >>> If we deprecate XDG_LOG_HOME, maybe it's a good idea to make a helper >>> function, which can be reused across different services? >>> >>> Also, how about appending /log subdirectory by default? >>>> WDYT? >> >> I'm wondering if this continued usage of XDG_LOG_HOME was a good idea, >> maybe the service should just start using XDG_STATE_HOME as soon as possible? >> (in which case, this patch will have to be reworked to reflect that) >> This way we avoid introducing yet more code to handle deprecated code. >> >> It shouldn't result in any kind of problems, XDG_LOG_HOME will still be set in the meantime >> for scripts and code that happen to use it and are not part of (upstream) guix. >> >> WDYT? > > I meant introducing something like this > (define (get-log-dir) > (string-append > (getenv "XDG_STATE_HOME") "/log")) > Within the XDG directories, I think (unless perhaps you only use a single file) you are supposed to keep everything in a subdirectory named for your application (or with a well-known name for things shared among multiple applications). For example, on my system, I can find log files in "$XDG_DATA_HOME/akonadi/Akonadi.error", "$XDG_DATA_HOME/akonadi/Akonadi.error.old", "$XDG_DATA_HOME/sddm/wayland-session.log", and "$XDG_DATA_HOME/sddm/xorg-session.log". (Apparently SDDM and Akonadi haven't been updated to use $XDG_STATE_HOME.) I think Guix Home services should follow that convention, rather than putting all logs together in "$XDG_STATE_HOME/log/". > > and use it instead of > (or (getenv "XDG_STATE_HOME") > (format #f "~a/.local/state" (getenv "HOME"))) > Perhaps my least-favorite part of the XDG Base Directory specification is having to repeat the default values so many times. But I understood the conclusion from to be that Guix should be able to assume that the XDG variables are all explicitly set, either by Guix System or by the installation process for Guix on a foreign distro. -Philip From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Apr 2023 19:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Philip McGrath" , "Andrew Tropin" , "Bruno Victal" Cc: 61982@debbugs.gnu.org Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168107028023341 (code B ref 61982); Sun, 09 Apr 2023 19:58:02 +0000 Received: (at 61982) by debbugs.gnu.org; 9 Apr 2023 19:58:00 +0000 Received: from localhost ([127.0.0.1]:33849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plbAm-00064P-IZ for submit@debbugs.gnu.org; Sun, 09 Apr 2023 15:58:00 -0400 Received: from knopi.disroot.org ([178.21.23.139]:33536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plbAk-00064D-9j for 61982@debbugs.gnu.org; Sun, 09 Apr 2023 15:57:59 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 61E71401F8; Sun, 9 Apr 2023 21:57:56 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uHr6yxagq9dk; Sun, 9 Apr 2023 21:57:55 +0200 (CEST) Content-Type: multipart/signed; boundary=51d62a848cb3cdf91884e1cb2786bd3257ea7f5bc891fc483c8d6db3ad87; micalg=pgp-sha512; protocol="application/pgp-signature" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1681070275; bh=mT/PCtPh/IWgSBeM305rBGf9tTMg4raAbzq3dukGB+4=; h=Date:To:Cc:Subject:From:References:In-Reply-To; b=eHq5ZaZof2rekN5oUkzSELGcIDns0jcQ71dYBVU1ayvzKeUFvepjeQUt2ChDg2fgU WuNfnJYBmtKK3hCHvaSX/Ss2OzfBfEdvM90ytR4+2rFTXRkmXVEjRBl0C2A2AD0ZyZ BGSUe7RnosK1Cbs7cnh1cFzv7P55ymAmN5V6FEiqTJ4Ob6ArpbcGM/bFsIBeNBJp+0 +IJxgexI4zh3UOZ1deao0EiTMmcLM+8F0l/nV2miVwZWLzkRtg4jNeWTVG9etZjKh1 lcf+9STJBxtl1sWQJOVpVlN/EvB9Dq/Tj8yzhZ7nLG92m9DPrFuF2MstCcd6iSNN04 Wg9Q0MHnj7tVw== Date: Sun, 09 Apr 2023 20:57:54 +0100 Message-Id: From: "(" References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> <87cz4gw06c.fsf@trop.in> <10e30d4c-07f2-8bf9-24ed-7bbf820d12e8@makinata.eu> <875ya7x3kl.fsf@trop.in> <92d07a8a-aac9-42c7-809d-66373358c77b@app.fastmail.com> In-Reply-To: <92d07a8a-aac9-42c7-809d-66373358c77b@app.fastmail.com> X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) --51d62a848cb3cdf91884e1cb2786bd3257ea7f5bc891fc483c8d6db3ad87 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Sun Apr 9, 2023 at 8:09 PM BST, Philip McGrath wrote: > > I meant introducing something like this > > (define (get-log-dir) > > (string-append > > (getenv "XDG_STATE_HOME") "/log")) > > > > Within the XDG directories, I think (unless perhaps you only use a single= file) you are supposed to keep everything in a subdirectory named for your= application (or with a well-known name for things shared among multiple ap= plications). For example, on my system, I can find log files in "$XDG_DATA_= HOME/akonadi/Akonadi.error", "$XDG_DATA_HOME/akonadi/Akonadi.error.old", "$= XDG_DATA_HOME/sddm/wayland-session.log", and "$XDG_DATA_HOME/sddm/xorg-sess= ion.log". (Apparently SDDM and Akonadi haven't been updated to use $XDG_STA= TE_HOME.) I think Guix Home services should follow that convention, rather = than putting all logs together in "$XDG_STATE_HOME/log/". So it turns out Shepherd provides these gems squirreled away inside its (shepherd support) module: ``` (define %user-config-dir ;; Default config directory if shepherd is run as a normal user. (string-append (or (getenv "XDG_CONFIG_HOME") (string-append user-homedir "/.config")) "/shepherd")) (define %user-log-dir ;; Default log directory if shepherd is run as a normal user. (string-append (or (getenv "XDG_STATE_HOME") (string-append user-homedir "/.local/state")) "/shepherd")) (define %user-runtime-dir ;; Default runtime directory if shepherd is run as a normal user. (string-append (or (getenv "XDG_RUNTIME_DIR") (format #f "/run/user/~s" (getuid))))) ``` Shepherd already provides us with a %USER-LOG-DIR variable :D -- ( --51d62a848cb3cdf91884e1cb2786bd3257ea7f5bc891fc483c8d6db3ad87 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmQzGMMACgkQ7ImHg/nq I23uLwv/VOu1QciGvXiSykavq7Lo3K7lZ5o+dxhzPLpPeOqlhA9ybQkLRVJ26TQe JS4wQLUv7Fc+b1XUKDnQ0VR1MtQ51T4Tkl4RHlbINJof89nOtrtrTvkFtEUeF3Jk A+aiFbH0L7hAsQ+KPkiE0C77Tv79WQ5Ig/I/xexi96DD+my5rnyNfwk9M2hRjqti jnwmWhrV1PtHI+9thdlDtrByrrvg80kNzW14eSWIhKRBWcE4dtOTsxNI8UYWKK4v X82rAz2Qp/rARVH3IiRZKe+mh9IJ+vRhkKVtYoquEoMprWy+dGTof8J2lWihEmiS 7QPx08y3oZHlYllq99y61SFfg1nka+V/NZ3qCqL5+HITv9lgUZM+tO7E2EtJvnVE 2v/e/5k/DJE5eI0lHQO3Qu+VUGVBm7b0ND1nrEiW/l+maB1P/eDSH8qfLhRM2dCy WfFapUkkBtlZSvxcWarkgoqXVK9iwf92rkf2pGyCheFlyeMCtC2R8qglSLrLi32m Rzvg3Az6 =OMIV -----END PGP SIGNATURE----- --51d62a848cb3cdf91884e1cb2786bd3257ea7f5bc891fc483c8d6db3ad87-- From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Apr 2023 20:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "(" , "Philip McGrath" , "Andrew Tropin" , "Bruno Victal" Cc: 61982@debbugs.gnu.org Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168107051323881 (code B ref 61982); Sun, 09 Apr 2023 20:02:01 +0000 Received: (at 61982) by debbugs.gnu.org; 9 Apr 2023 20:01:53 +0000 Received: from localhost ([127.0.0.1]:33854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plbEX-0006D7-5U for submit@debbugs.gnu.org; Sun, 09 Apr 2023 16:01:53 -0400 Received: from knopi.disroot.org ([178.21.23.139]:60370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1plbEU-0006Cx-TH for 61982@debbugs.gnu.org; Sun, 09 Apr 2023 16:01:51 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 4047D401E0; Sun, 9 Apr 2023 22:01:50 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id atullHGj-Uvp; Sun, 9 Apr 2023 22:01:49 +0200 (CEST) Content-Type: multipart/signed; boundary=5b5fc1aabf6510b1a76e4332f7e2b89f30c72d0327f0ee6f2eb5b42fbfde; micalg=pgp-sha512; protocol="application/pgp-signature" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1681070509; bh=Xl7v25TF3a3WbsL3ZGXZCRq0bP6AuQ3iQ/ep+G362no=; h=Date:Cc:Subject:From:To:References:In-Reply-To; b=U4oSOeH8Wh9nTHvA/nvTtvbOuS7zrNwucrE0QK/LZ2yDIgruPv+NhrY/ug+p06wTc TbLqTyZJOtajnsXnuJaW2SRT2Sj0Li85LjSZzLkW40KgmEhP+OSES8cQPIVjsWwhuM CBEthq272De//dp+T3pOcqpBEZ38BfffAIIruEyQaNUKr1IeTdF/V2L7oHDPBdARdX gVAJMLS6NJ5gFZgTdxEvMOceUgmIYStjNPLfw97wajWU8Bnvc15P+3JyicgjN18z24 wYBm6H7lKW0hVzmveK8eRwyRtkKdVeh1aI2WROY7QJasZrorXCWs+zQxUBJ3U/ANXh oxzkrSSRAfhjw== Date: Sun, 09 Apr 2023 21:01:48 +0100 Message-Id: From: "(" References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> <87cz4gw06c.fsf@trop.in> <10e30d4c-07f2-8bf9-24ed-7bbf820d12e8@makinata.eu> <875ya7x3kl.fsf@trop.in> <92d07a8a-aac9-42c7-809d-66373358c77b@app.fastmail.com> In-Reply-To: X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) --5b5fc1aabf6510b1a76e4332f7e2b89f30c72d0327f0ee6f2eb5b42fbfde Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Sun Apr 9, 2023 at 8:57 PM BST, ( via Guix-patches via wrote: > Shepherd already provides us with a %USER-LOG-DIR variable :D One thing I will note is that it might be good if (shepherd support) was on= e of the modules imported into shepherd service gexps by default. -- ( --5b5fc1aabf6510b1a76e4332f7e2b89f30c72d0327f0ee6f2eb5b42fbfde Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmQzGa0ACgkQ7ImHg/nq I23ZOgv/Q4ZsSBdNMntoOF/rrzfQoq9qtlbLLvsAAdCIqMw14PNr+omSuvr2mmtK kcMXe9UCYCLEjgdLbRDaGr44w72lOeakYFyoonVwT9z7+SqAiGknh0o/ajrsk91R LrZBCJf+BUc+NMRqZSqSZ3J6X+IDJH4opcklnK9RbFg10cvvbqgqXo08jFdllgvD 80utEH31j6LeEnsC0Xbw0u6k2vTR4fORfLeeKiUMscl8fxhmXlkPqWfct5Xf3AF2 6VkPtAPt+9oShYggZslTmSIf/DXbgi4H2KAGiShfBG7lZrY+KFNG4/GUZuI+PE9G eKCO1P1POJ7NtiKoRsWywnlvsdv19gDMGCbScDefXMDUNJFQ8NxJ9tGXM15d10Lr qsDcd2SGext9vi8rT3cnc5aDyiI1nDdtK/wOS4iRjMBu8uxhd11w4Sldzej5jhhC W1mngixGlor9cJYBUcIA08Kpxh9QeT6Hn6+r4sZ3thcoW7xIP7kcKolS5aB7KrRa 0A4vIEkB =yf4j -----END PGP SIGNATURE----- --5b5fc1aabf6510b1a76e4332f7e2b89f30c72d0327f0ee6f2eb5b42fbfde-- From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. References: In-Reply-To: Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Apr 2023 13:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "(" Cc: 61982@debbugs.gnu.org, mirai@makinata.eu, philip@philipmcgrath.com, andrew@trop.in X-Debbugs-Original-Cc: 61982@debbugs.gnu.org, Bruno Victal , Philip McGrath , guix-patches@gnu.org, Andrew Tropin Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168130463932639 (code B ref 61982); Wed, 12 Apr 2023 13:04:01 +0000 Received: (at 61982) by debbugs.gnu.org; 12 Apr 2023 13:03:59 +0000 Received: from localhost ([127.0.0.1]:39293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pma8k-0008UN-Ma for submit@debbugs.gnu.org; Wed, 12 Apr 2023 09:03:58 -0400 Received: from knopi.disroot.org ([178.21.23.139]:56220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pma8i-0008UE-BH for 61982@debbugs.gnu.org; Wed, 12 Apr 2023 09:03:57 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 509FF40170; Wed, 12 Apr 2023 15:03:55 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XTuHdUud7qva; Wed, 12 Apr 2023 15:03:54 +0200 (CEST) From: "(" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1681304634; bh=10UYHoByAI8NhE0Qi4/+IUqhTTU7i+TtOR/nWa3sy6M=; h=From:To:Cc:Subject:Date; b=lw7lLWDPzDROdQQiaSvSW0RgCXI7X0mhqaBe87tLAZ0HuoIDCl2Aty9Bg9ppwsguv 0jjU6oHDUwA/qgMsWlraR463TSSBtQvPpfXkPRaqKKwAsnRaHtVEdFtL+4QJoKwR6z S5TUltPTO8XEBEPlWt1c+p+98iyi6q9IxyJMgj0lifRlbnfqIhVpKH4wL4QD9bGzMZ d0E+JkJ1OacuIMP6MFVTjjMssyWE5SkBmDP1SXnUzFBJAhzNjXDsej0589pFYNoKBq Mt8jvQAvDcBLNGj6wAWueihVVHDeXa3qgtfR0R9UFE7NWUGxmUN5hC3nm+7vZjkuXD vbtROYnyr1RWg== Date: Tue, 11 Apr 2023 21:01:31 +0100 Message-ID: <878rexgsli.fsf@disroot.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) "( via Guix-patches" via writes: > Shepherd already provides us with a %USER-LOG-DIR variable :D Apparently I can't read. This is *Shepherd*'s log dir, not a general log dir variable. Oops :) I suppose that would be a good thing to add to (gnu build utils), then... From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 12 Apr 2023 17:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "(" , "(" Cc: mirai@makinata.eu, philip@philipmcgrath.com, 61982@debbugs.gnu.org X-Debbugs-Original-Cc: Bruno Victal , Philip McGrath , guix-patches@gnu.org, 61982@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16813198849683 (code B ref -1); Wed, 12 Apr 2023 17:19:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Apr 2023 17:18:04 +0000 Received: from localhost ([127.0.0.1]:41704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pme6d-0002W1-Rh for submit@debbugs.gnu.org; Wed, 12 Apr 2023 13:18:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:39780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pme6c-0002Vn-J4 for submit@debbugs.gnu.org; Wed, 12 Apr 2023 13:18:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pme6b-0000kO-3r for guix-patches@gnu.org; Wed, 12 Apr 2023 13:18:02 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pme6Y-0008Iy-WB for guix-patches@gnu.org; Wed, 12 Apr 2023 13:18:00 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id B484B1BF208; Wed, 12 Apr 2023 17:17:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1681319875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hPS+zNNjw6SepGR699cFuvtbxO1m7WPGe5SWgdrCK30=; b=SCHSfl1KPMhADQNV9hEgMgJz49D9hBRl/9uLAaMz4oom8l28e5g6y4BV00m0d349l61/gU ZNtt12TJGVfdhEUd56lzc1EgfG3RqvfQ+hebtIHIG/B08/cfBdvCAkJ9SNGiHXOlVdp1jg QmkHZy42AGjhtgfhq/qQqRRf+ZfaBCe+3qMh2m3vH3rwXQcu0U7UC5PniMbtk1ahauawRL PeLI/aGFxWeZ32Uxzdk6k8TdW6z0wAohzKzKueHNYhNavGbM8h/deKXhiNlW5JyBAuFhKX 1xMbjsuyQYSMFdhECHDH7nGMuYSvrYvEtjfBzL6MJltOQ3rtwyafJwUZSwbmpg== From: Andrew Tropin In-Reply-To: <878rexgsli.fsf@disroot.org> References: <878rexgsli.fsf@disroot.org> Date: Wed, 12 Apr 2023 21:17:49 +0400 Message-ID: <87o7ntkojm.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.183.201; envelope-from=andrew@trop.in; helo=relay8-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-04-11 21:01, paren@disroot.org wrote: > "( via Guix-patches" via writes: >> Shepherd already provides us with a %USER-LOG-DIR variable :D > > Apparently I can't read. This is *Shepherd*'s log dir, not a general > log dir variable. Oops :) That's right :) > I suppose that would be a good thing to add to (gnu build utils), > then... Yep, I have the same idea. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmQ2570ACgkQIgjSCVjB 3rBFYA//ZZDIzzV2/xiEZFD2zRwxx6EFC3ha8DD+7c21RGcZXJNXsOQ2l1S4ruPS cZ4hHa3hw8aC+N3T3zdCdF+48tfVsjmZKzTECEpl208hnh12JGhLdAxhIMJCF0hP mtyLrt1b5AnjFPbfXj44R3JrUzstdkLszUhYnucMVcV7m/IJp8Cm/i4PKKpvquWe sl4bZW+DuZdkq7mT3Te4aPrXlupXXyYXnBI5Q2MN6jl/YABDI1J48VlcKlVPZsQt d7MW20tLq8OI36wMeETuxHnB0qo1baPCWREuuISwRKDvnHtNYX1laFNc3qzNNavI Agm9qU8fsquPLObpQuUepvY2RaCgb1L9BO/W2cqWJJoQ9NXN3U8a6ozjM4+P8GWq xS0WZdkhw6jAHgSxotsMX+byg0BybZqrXKIVgPKXi569yuX7KDtRAqoEBwg1TuA8 AdFCCzX/EMe8EwCPhSTHYkuZbSfp3A78dBpqquClJ0kMhCAosvYuyN3E1kjD5J1D JVq0J5CSaOiGAoxWJreeJ65Iaz+53KbrXMYjgctTAHLvD2D1nkLmq7i7L3DOxW5O 1/2eEW2s7HCtM5BUgUuaeqR94vGJ6PLOsbiTy5864tw68MsDzrHkrbkknwRZ1IIz CMWE4GtxUqthYrWnNX1yCjonTs5OlXeBL7PGcO1deSfTbciGEC8= =WQn+ -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 0/2] Respect XDG Base Directory Specification 0.8. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2023 21:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin Cc: Bruno Victal , 61982@debbugs.gnu.org, philip@philipmcgrath.com Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168634450732391 (code B ref 61982); Fri, 09 Jun 2023 21:02:02 +0000 Received: (at 61982) by debbugs.gnu.org; 9 Jun 2023 21:01:47 +0000 Received: from localhost ([127.0.0.1]:32826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7jEw-0008QM-P5 for submit@debbugs.gnu.org; Fri, 09 Jun 2023 17:01:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7jEv-0008QA-2X for 61982@debbugs.gnu.org; Fri, 09 Jun 2023 17:01:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7jEo-00028s-IH; Fri, 09 Jun 2023 17:01:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=/cky255HUhRokWggkUw9RolmqX0sIPZdLsc2BEmJgzw=; b=fbgyfxzAb3/iEdSWle0v LtWnM710OfgsqOt6uCkiTVTFhb/f8JNDgJ0qBLosEGbmVr9InLmbVpq1mdAsOY89e5hghk8sAjnGy 9y8MIgRuwItkTj7aGsA4wIGNVNK3QxD2TPBQEJmMmhbq44wYHU3nfMm2w5qUC21ktJHXzhXk6ul9R LyLLbrIfiXlk4H7B/ytWtwDXqZbTBk2I5krwQ3iWkc/xVDoYBswmROy+rh7ni/qT83La5D9Pc7nVo cOK1zF7lhoS076HT7Ai2zaQEBzEfZQc9BEAMPQoz00T8ZhiZ1wpq22TXnvQhJi4f/5BiIQSP9tBPm zoEAXmo4ldcAfA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7jEm-0004U5-W9; Fri, 09 Jun 2023 17:01:38 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <87lej4w5sp.fsf@trop.in> Date: Fri, 09 Jun 2023 23:01:35 +0200 In-Reply-To: <87lej4w5sp.fsf@trop.in> (Andrew Tropin's message of "Fri, 07 Apr 2023 10:43:50 +0400") Message-ID: <87y1kstknk.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Andrew, Andrew Tropin skribis: > Applied and pushed the first patch as=20 > 5c893787be78a79433fe1343f5b70cd647e8f667 > > Will think about the second one a little more and reply on that later. Could you take a look and apply it or close the issue? Thanks in advance, Ludo=E2=80=99. From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 0/2] Respect XDG Base Directory Specification 0.8. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Jun 2023 09:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Bruno Victal , 61982@debbugs.gnu.org, philip@philipmcgrath.com Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168673485113040 (code B ref 61982); Wed, 14 Jun 2023 09:28:02 +0000 Received: (at 61982) by debbugs.gnu.org; 14 Jun 2023 09:27:31 +0000 Received: from localhost ([127.0.0.1]:43723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Mmp-0003OF-8Q for submit@debbugs.gnu.org; Wed, 14 Jun 2023 05:27:31 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:40779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9Mmn-0003O2-DM for 61982@debbugs.gnu.org; Wed, 14 Jun 2023 05:27:30 -0400 X-GND-Sasl: andrew@trop.in DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1686734843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HbXITIMRj3z72851TM1qZF9U+PKW9nKMWPZ+GFIulE4=; b=kqKgoTdkHtRCYtRftHR4yZq/An8rkidbbTW5+6EdQ814Qli/t1OhS39vY+pi3sjucvnHOB qPx9JURn16VHcq2Pf6K32QU/IeBfjYcrV81eufbKJWKBmHtVml73dyYuwt7JUZEFezndxC Tr+Toina2LBw7iT8mpGoeqk/fah6K4Sh5d1pG1MYiaPitzjabZyjMcog0ZOUNJXxYZU4Rq H/NtzHjYZRN2QMVIqAH7IV03JbZddGrQQt9yuRqOkgC/A4BOKh6CP+4fr3ma70SeWhyfdl fdf61zu31qsA3+ukFQlQ8KJoEffgA/jZ0S3E4/Si3O920VaGvbPWwaQQs75xgQ== X-GND-Sasl: andrew@trop.in X-GND-Sasl: andrew@trop.in X-GND-Sasl: andrew@trop.in Received: by mail.gandi.net (Postfix) with ESMTPSA id D95FC1C000B; Wed, 14 Jun 2023 09:27:22 +0000 (UTC) From: Andrew Tropin In-Reply-To: <87y1kstknk.fsf_-_@gnu.org> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <87lej4w5sp.fsf@trop.in> <87y1kstknk.fsf_-_@gnu.org> Date: Wed, 14 Jun 2023 13:27:17 +0400 Message-ID: <87r0qegzre.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2023-06-09 23:01, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > Andrew Tropin skribis: > >> Applied and pushed the first patch as=20 >> 5c893787be78a79433fe1343f5b70cd647e8f667 >> >> Will think about the second one a little more and reply on that later. > > Could you take a look and apply it or close the issue? Sure, added this thread to my agenda for this week. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmSJh/UACgkQIgjSCVjB 3rAVeA/+I4PTw519Du0wUgFMVD/MlEcB2GRUuk/Zd+Ob/6WF6KeGhIvsIaBAh4UU 81C4r0HtIFh927MhNmmVDutoVxEQtYaP9QEXma1lyVtzyUTb/Va+MgDx9VwNXQs1 Aie+OHMe+fv+fkiV6aKVnRk80PVB/do07iBMM7LyJHL12sX1UEVeb/HTI835pZjU lm4IqzVLSFT8kKRsPWoHxYwvwoWcb6U1lULoCssYwZiYOlDdQevRlIgbXFv5ncBn hDGw7nToRHC8pdurClg7GlWZRmnTNiYID6dIvbwMwBobD97qxrFzxdNnB3klaSo1 Xr7i4+ZthQbgUwafkgGu8pPNdWuoHpWUkhX8V6scD++pK2TIQrI+FuciXVHDwwEy rLNTIZNga32iE/QJarZUIF+l6gjghgwJDBRc+poKu7XLOQMhUhK6tF1QHPpoRV+4 62Aj8FBWWi/Y32LmonRpT9PHrMb3Dvg3XTOxcW854T3cbuEgnXGLI5XfvpqhC9oa qgcqxPWHEzQrv8Z3sUhqlNXuBBKhZ853gvc21pHB0qwa66STFO6EBZUmP1A7K14i +1/p6wNYT8IpqI7vcE6qZPz7kfdj2VSS6m6aEy0FSgf3S2OCD33IGMSK/kPcZgau 6PIvnQp4eCaWIq8Wv0lEMSHnxm3RC9TribxDFfbKGhcq6oLeMuk= =cJsf -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 14 21:50:22 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Bruno Victal Subject: bug#61982: closed (Re: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME.) Message-ID: References: <87a5x1rrtv.fsf@trop.in> X-Gnu-PR-Message: they-closed 61982 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 61982@debbugs.gnu.org Date: Thu, 15 Jun 2023 09:36:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1686821761-16985-1" This is a multi-part message in MIME format... ------------=_1686821761-16985-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #61982: [PATCH 0/2] Respect XDG Base Directory Specification 0.8. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 61982@debbugs.gnu.org. --=20 61982: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61982 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1686821761-16985-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 61982-done) by debbugs.gnu.org; 15 Jun 2023 09:35:39 +0000 Received: from localhost ([127.0.0.1]:46210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9jOF-0004PG-6Q for submit@debbugs.gnu.org; Thu, 15 Jun 2023 05:35:39 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53565) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9jOD-0004P1-Bu for 61982-done@debbugs.gnu.org; Thu, 15 Jun 2023 05:35:38 -0400 X-GND-Sasl: andrew@trop.in DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1686821731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Fp35buM7r9oG8eVME6ql8OY0Jp7IrfybnJnBKYosRyI=; b=AEx8TjCxXVfYvKzuzjCTjV5c5UFYEZZQlvSGu8yZmxi4Z7fTJlQ5LotR3CanVLMOgVCdSX AwoGJQnBj2ETHkoTjEKByDG0aXAy1KvH9t6l68iQ1hK6nlk+WHN5qEIvwick4H090iFh3w B5sOn3Fidzpn4EqprAeNWulPvH2yryVn1t4vEr5te9VI/pJB+4tubmP6aaqkYIX1pv9DtR 2l/cZrtX+9xce+DbblR/a5ntT3cCyxDxqs0E6c4eYkYKAR7JUqu1mIrkzygiAYd9p6ZYS8 v9uzomunV4CqRCitXTWZFWk5TCEGSRhTaTIaSZ9tSE1ifPy2ZeYYf5TjlYxxqA== X-GND-Sasl: andrew@trop.in X-GND-Sasl: andrew@trop.in X-GND-Sasl: andrew@trop.in X-GND-Sasl: andrew@trop.in Received: by mail.gandi.net (Postfix) with ESMTPSA id 1D9D56000F; Thu, 15 Jun 2023 09:35:29 +0000 (UTC) From: Andrew Tropin To: Bruno Victal , 61982-done@debbugs.gnu.org, Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. In-Reply-To: <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> Date: Thu, 15 Jun 2023 13:35:24 +0400 Message-ID: <87a5x1rrtv.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 61982-done Cc: Bruno Victal , philip@philipmcgrath.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2023-03-05 15:19, Bruno Victal wrote: > XDG_LOG_HOME is non-standard and log files should go to XDG_STATE_HOME > according to the XDG Base Directory Specification. > > Fixes . > > * gnu/home/services/desktop.scm (home-dbus-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. > --- > gnu/home/services/desktop.scm | 4 ++-- > gnu/home/services/mcron.scm | 4 ++-- > gnu/home/services/pm.scm | 6 +++--- > gnu/home/services/shepherd.scm | 4 ++-- > gnu/home/services/xdg.scm | 36 +++++++++++++++++++++++++--------- > 5 files changed, 36 insertions(+), 18 deletions(-) > > diff --git a/gnu/home/services/desktop.scm b/gnu/home/services/desktop.scm > index cb25b03b64..76df7b30a2 100644 > --- a/gnu/home/services/desktop.scm > +++ b/gnu/home/services/desktop.scm > @@ -206,8 +206,8 @@ (define (home-dbus-shepherd-services config) > (default-environment-variables)) > #:log-file > (format #f "~a/dbus.log" > - (or (getenv "XDG_LOG_HOME") > - (format #f "~a/.local/var/log" > + (or (getenv "XDG_STATE_HOME") > + (format #f "~a/.local/state" > (getenv "HOME")))))) > (stop #~(make-kill-destructor))))) >=20=20 > diff --git a/gnu/home/services/mcron.scm b/gnu/home/services/mcron.scm > index 5f35bfe054..69c7f9faa6 100644 > --- a/gnu/home/services/mcron.scm > +++ b/gnu/home/services/mcron.scm > @@ -99,8 +99,8 @@ (define (home-mcron-shepherd-services config) > #~()) > #$@files) > #: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"))) > "/mcron.log"))) > (stop #~(make-kill-destructor)) > diff --git a/gnu/home/services/pm.scm b/gnu/home/services/pm.scm > index 5f09941827..274ab2303c 100644 > --- a/gnu/home/services/pm.scm > +++ b/gnu/home/services/pm.scm > @@ -128,9 +128,9 @@ (define (home-batsignal-shepherd-services config) > (list "-i") > (list))) > #:log-file (string-append > - (or (getenv "XDG_LOG_HOME") > - (format #f "~a/.local/var/log" > - (getenv "HOME"))) > + (or (getenv "XDG_STATE_HOME") > + (format #f "~a/.local/state" > + (getenv "HOME"))) > "/batsignal.log"))) > (stop #~(make-kill-destructor)))))) >=20=20 > diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.= scm > index 1a70a220f0..825cf66f05 100644 > --- a/gnu/home/services/shepherd.scm > +++ b/gnu/home/services/shepherd.scm > @@ -108,8 +108,8 @@ (define (launch-shepherd-gexp config) > (or (getenv "XDG_RUNTIME_DIR") > (format #f "/run/user/~a" (getuid))) > "/shepherd/socket")) > - (let ((log-dir (or (getenv "XDG_LOG_HOME") > - (format #f "~a/.local/var/log" > + (let ((log-dir (or (getenv "XDG_STATE_HOME") > + (format #f "~a/.local/state" > (getenv "HOME"))))) > ;; TODO: Remove it, 0.9.2 creates it automatically? > ((@ (guix build utils) mkdir-p) log-dir) > diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm > index ac557b4c3d..958772696b 100644 > --- a/gnu/home/services/xdg.scm > +++ b/gnu/home/services/xdg.scm > @@ -1,6 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2021, 2022 Andrew Tropin > ;;; Copyright =C2=A9 2021 Xinglu Chen > +;;; Copyright =C2=A9 2023 Bruno Victal > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -22,6 +23,7 @@ (define-module (gnu home services xdg) > #:use-module (gnu home services) > #:use-module (gnu packages freedesktop) > #:use-module (gnu home services utils) > + #:use-module (guix deprecation) > #:use-module (guix gexp) > #:use-module (guix modules) > #:use-module (guix records) > @@ -39,7 +41,7 @@ (define-module (gnu home services xdg) > home-xdg-base-directories-configuration-config-home > home-xdg-base-directories-configuration-data-home > home-xdg-base-directories-configuration-state-home > - home-xdg-base-directories-configuration-log-home > + home-xdg-base-directories-configuration-log-home ; deprecat= ed > home-xdg-base-directories-configuration-runtime-dir >=20=20 > home-xdg-user-directories-service-type > @@ -77,6 +79,7 @@ (define-module (gnu home services xdg) >=20=20 > (define (serialize-path field-name val) "") > (define path? string?) > +(define-maybe path) >=20=20 > (define-configuration home-xdg-base-directories-configuration > (cache-home > @@ -97,12 +100,17 @@ (define-configuration home-xdg-base-directories-conf= iguration > (path "${XDG_RUNTIME_DIR:-/run/user/$UID}") > "Base directory for programs to store user-specific runtime files, > like sockets.") > + ;; TODO: deprecated field, use $XDG_STATE_HOME(/log) instead. > (log-home > - (path "$HOME/.local/var/log") > + maybe-path > "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.") > +consistent." > + (lambda (field-name val) > + (when (maybe-value-set? val) > + (warn-about-deprecation field-name #f #:replacement 'state-home)) > + (serialize-path field-name val))) > (state-home > (path "$HOME/.local/state") > "Base directory for programs to store state data that should persist > @@ -117,7 +125,13 @@ (define (home-xdg-base-directories-environment-varia= bles-service config) > #f "XDG_~a" > (object->snake-case-string (configuration-field-name field) = 'upper)) > ((configuration-field-getter field) config))) > - home-xdg-base-directories-configuration-fields)) > + ;; XXX: deprecated field, remove later > + (if (maybe-value-set? > + (home-xdg-base-directories-configuration-log-home config)) > + home-xdg-base-directories-configuration-fields > + (filter-configuration-fields > + home-xdg-base-directories-configuration-fields > + '(log-home) #t)))) >=20=20 > (define (ensure-xdg-base-dirs-on-activation config) > (with-imported-modules '((guix build utils)) > @@ -138,7 +152,14 @@ (define (ensure-xdg-base-dirs-on-activation config) > ;; and will be provided by elogind or other service. > (and (not (string=3D? "XDG_RUNTIME_DIR" variable)) > variable))) > - home-xdg-base-directories-configuration-fields))))) > + ;; XXX: deprecated field, remove later > + (if (maybe-value-set? > + (home-xdg-base-directories-configuration-log-home > + config)) > + home-xdg-base-directories-configuration-fields > + (filter-configuration-fields > + home-xdg-base-directories-configuration-fields > + '(log-home) #t))))))) >=20=20 > (define (last-extension-or-cfg config extensions) > "Picks configuration value from last provided extension. If there > @@ -157,10 +178,7 @@ (define home-xdg-base-directories-service-type > (default-value (home-xdg-base-directories-configuration)) > (compose identity) > (extend last-extension-or-cfg) > - (description "Configure XDG base directories. This > -service introduces an additional @env{XDG_LOG_HOME} variable. It's not > -a part of XDG specification, at least yet, but are convenient to have, > -it improves the consistency between different home services. The > + (description "Configure XDG base directories. The > services of this service-type is instantiated by default, to provide > non-default value, extend the service-type (using @code{simple-service} > for example)."))) Hi Bruno, Applied, added log subdirectory, pushed, thank you for working on it. Hi Ludo, WDYT about adding (home-log-dir) function to (guix build utils)? So we can prevent copypasting the same code all over home modules. Something like: =2D-8<---------------cut here---------------start------------->8--- (define (home-log-dir) "Returns a directory for user applications logs." (string-append (or (getenv "XDG_STATE_HOME") (format #f "~a/.local/state" (getenv "HOME"))) "/log")) =2D-8<---------------cut here---------------end--------------->8--- =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmSK21wACgkQIgjSCVjB 3rB5nQ/+J6ifXaoQOhVxAsGTboPD1vr0SYfc+HXrgfQ0U1DXPXv4nETTuKlzhoU+ YocTjfCPX4Sq4Cqoi88jg5InBBN1jI0XokVOSMj9J64jecIYBNsPBcLmU2T+sn5M rfAgTJ63DJLT2EL+Ahc8HXATkL9fcgSQiGeAdWFO8/6Q15X6ifZpdvUTBE7HNDge AkjzrHOOcYQgpg88RQiGmZ6it3lXg8KLs2z/Y0gGJ7RsdS/yjKYO5ZDJGlkRg8bv 8zmNOxiGFUd17UtOZUI5HvdKdjoEEb9Lz+0sKQncblDrmagChZbn7HvznwCIWOpD Vli4y+7Wdqb3B0QVvoeJWYUTDY96sX9yOKlar+TFguKpsYJ8yRQOYzmIHiwCZ+uw bbAkPFblEkUx6ot30kJSpzKN/anngng5u9MMtgByHUym8FjzUMruGaTK4aRSIx+D wS3OYccSOuLZD93kkeu/pIu7ZYIJ7dSJy/6kX8GelzqUmJwDxGHRzdcjqdd5Xepq 4TCH34xs3Sg5OlxpTBPeHTVmd4t/NwxYR97dztWD5jblGHA9Zn2tNqJpCnc5Dqf2 ab4FtWWv4X21r/Y9MG9wn5mnJ2xgXeHsmX3/WP1I9OnAqFeumsXvLZoGS82APLGD mZNW7cHhetEm2Nsq7Ef6DyGlOifkBCf5gYXNOUzKXIcOckFRr3s= =d6+V -----END PGP SIGNATURE----- --=-=-=-- ------------=_1686821761-16985-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Mar 2023 15:17:11 +0000 Received: from localhost ([127.0.0.1]:39659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYq6o-0003WJ-HY for submit@debbugs.gnu.org; Sun, 05 Mar 2023 10:17:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:57426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYq6l-0003W9-CO for submit@debbugs.gnu.org; Sun, 05 Mar 2023 10:17:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYq6k-00021V-RD for guix-patches@gnu.org; Sun, 05 Mar 2023 10:17:06 -0500 Received: from smtpm4.myservices.hosting ([185.26.105.235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYq6j-00043V-2C for guix-patches@gnu.org; Sun, 05 Mar 2023 10:17:06 -0500 Received: from smtpm8.myservices.hosting (smtpm8.myservices.hosting [185.26.105.209]) by smtpm4.myservices.hosting (Postfix) with ESMTP id 2F63820CAE for ; Sun, 5 Mar 2023 16:16:58 +0100 (CET) Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm8.myservices.hosting (Postfix) with ESMTP id E9A0520B75 for ; Sun, 5 Mar 2023 16:16:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 94F7F80097; Sun, 5 Mar 2023 16:16:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BWXSDV9f5QGv; Sun, 5 Mar 2023 16:16:58 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id CAD6780079; Sun, 5 Mar 2023 16:16:57 +0100 (CET) From: Bruno Victal To: guix-patches@gnu.org Subject: [PATCH 0/2] Respect XDG Base Directory Specification 0.8. Date: Sun, 5 Mar 2023 15:16:48 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Debbugs-CC: philip@philipmcgrath.com Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.105.235; envelope-from=mirai@makinata.eu; helo=smtpm4.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_FILL_THIS_FORM_SHORT=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Bruno Victal X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Note: Needs to be tested. Bruno Victal (2): home: services: xdg-base-directories: Set correct value for XDG_STATE_HOME. home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. gnu/home/services/desktop.scm | 4 +-- gnu/home/services/mcron.scm | 4 +-- gnu/home/services/pm.scm | 6 ++-- gnu/home/services/shepherd.scm | 4 +-- gnu/home/services/xdg.scm | 52 +++++++++++++++++++++++----------- 5 files changed, 44 insertions(+), 26 deletions(-) base-commit: d92ec2f2812c76b23aab778e26708cf353542ae9 -- 2.39.1 ------------=_1686821761-16985-1-- From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: "Philip McGrath" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Jun 2023 18:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Andrew Tropin" , "Bruno Victal" , 61982@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168685259225366 (code B ref 61982); Thu, 15 Jun 2023 18:10:01 +0000 Received: (at 61982) by debbugs.gnu.org; 15 Jun 2023 18:09:52 +0000 Received: from localhost ([127.0.0.1]:47899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9rPr-0006b4-Kl for submit@debbugs.gnu.org; Thu, 15 Jun 2023 14:09:51 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:33179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9rPp-0006ar-8W for 61982@debbugs.gnu.org; Thu, 15 Jun 2023 14:09:49 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 454C032009FF; Thu, 15 Jun 2023 14:09:43 -0400 (EDT) Received: from imap52 ([10.202.2.102]) by compute1.internal (MEProxy); Thu, 15 Jun 2023 14:09:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1686852582; x= 1686938982; bh=p/RJzA8w6li56b4w7s8Y0EXPAer03am1BAZVVA+nFqQ=; b=E mul7y5qYXach2kuCblBlX+gCOv3ShW/y2ogB9NgzOd1yGYkQkdSZcEx/fXPDFcPM lyYsnS8ChVu38GO4MNHIKtAPtExDvCcwIvyXSniMC5UFRqm4ECY0yXNrZf8h46gR Dxl4BX4E0WWFVZJWKighaLyjmVHP+DVQKOUAUBclptyr/Fn9GA1x0CqibD0dPZoC lkYzxw7R3vpbZhEQKeF5K90CtEhyzxbtLoJNODCaExOvhB93sRi87nqhH9c55xkO y9/TF4XdYpC66RtqDzN59IFkPokfv5wXOjU1OHc+y/GFo3p2R8I1XYIXRnymyDrH oxEJDT8ev5O7CW8HXgoPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686852582; x=1686938982; bh=p/RJzA8w6li56 b4w7s8Y0EXPAer03am1BAZVVA+nFqQ=; b=NjROEa5KrXY5l8xfkNzLrbefxXRqY j1pOoTvvEWreW+POOxbDS1Ra+DjPut5EIyUnb8PRnjviyfegaAc9BsYgFGGX/KqE Fk9D1cR05CeQkrloUC4Et/KuEm7oWJEGcQkroyxRFAz5mPkZXmf6ImVL/U3NlXd6 zysGO/DPAIfrsGhqoMIjadQcAh3CpHndZeqRNe9hw7W4MWjB7X8NvAOtkXFqEo7r hJwab5Uj1EKSZiL6u2TC4qJg46ERKQqxghFdyCBVpe4gcJS1zJH93ZNmIhCJHeIj vyYHniEGEtJMqnFysCbIUm2+QkqoppaDV9TFdgMSmznOJz/dbT0ou+Twg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvvddguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfrfhh ihhlihhpucfotgfirhgrthhhfdcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthh drtghomheqnecuggftrfgrthhtvghrnhepgfdvuddtkeeuvedvgeekjeegueeiheehgeeg teeigeevhfegieeiueffvdfhieeunecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhhihhlihhpsehp hhhilhhiphhmtghgrhgrthhhrdgtohhm X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6BF42C60091; Thu, 15 Jun 2023 14:09:42 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-496-g8c46984af0-fm-20230615.001-g8c46984a Mime-Version: 1.0 Message-Id: In-Reply-To: <87a5x1rrtv.fsf@trop.in> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> <87a5x1rrtv.fsf@trop.in> Date: Thu, 15 Jun 2023 14:09:22 -0400 From: "Philip McGrath" Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, On Thu, Jun 15, 2023, at 5:35 AM, Andrew Tropin wrote: > > WDYT about adding (home-log-dir) function to (guix build utils)? > So we can prevent copypasting the same code all over home modules. > > Something like: > --8<---------------cut here---------------start------------->8--- > (define (home-log-dir) > "Returns a directory for user applications logs." > (string-append > (or (getenv "XDG_STATE_HOME") > (format #f "~a/.local/state" > (getenv "HOME"))) > "/log")) > --8<---------------cut here---------------end--------------->8--- > I still think idiomatic XDG structure is NOT to have a "/log" subdirectory like this, as I explained in . Aside from that, though, I thought the conclusion from was that it is the responsibility of Guix System or the installation mechanism for Guix on a foreign distribution (e.g. "/etc/profile.d/zzz-guix.sh") to initialize all of the XDG variables, so code like this can use `(getenv "XDG_STATE_HOME")` unconditionally (or indeed with a checked assertion). Maybe there's some context I'm forgetting, though. I've been looking into these things again as I attempt to solve : I noticed in the attached environment variables that entries under /home/philip/.guix-home/profile/ are duplicated in many search paths. -Philip From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Jun 2023 03:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath , Bruno Victal , 61982@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168688612713152 (code B ref 61982); Fri, 16 Jun 2023 03:29:02 +0000 Received: (at 61982) by debbugs.gnu.org; 16 Jun 2023 03:28:47 +0000 Received: from localhost ([127.0.0.1]:48323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qA08l-0003Q3-11 for submit@debbugs.gnu.org; Thu, 15 Jun 2023 23:28:47 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:38435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qA08i-0003Pp-P7 for 61982@debbugs.gnu.org; Thu, 15 Jun 2023 23:28:45 -0400 X-GND-Sasl: andrew@trop.in DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1686886119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jkBs9Ci0DgYMuQc/O4fQkXef8FhmJqkGr3o5gKfUUm8=; b=L/TOzWEa2ofeb36DlRc6vpJB/jdeD1E8fGX6w/EoTXOUHzP7XzWzdUHJhY0h/KO4Lny0i8 q9PPtu3JZvLMng8fVKF7gY3xp6dXupz9gWtSOY+uqS5FcJotb1U267GZ3uOxdzLp+8uznh JvOvUPtF1AjTr5EuYbVmmBK6PmcN57DhejKIKRQrC+HvonEeyBzmYc2fDkbRti6TuezzyF fuGn0j+62TBihFdJ6g8N5SI2oX5nD89Evrg+uJ5/i00MTMGHySfARwdswUmpPimVGZqq3u g5su0tEZIQGahKfLPOdEht104TooC/ydfwhFwSPyb4WaOi4ZN+INI64yFeJENg== X-GND-Sasl: andrew@trop.in X-GND-Sasl: andrew@trop.in X-GND-Sasl: andrew@trop.in Received: by mail.gandi.net (Postfix) with ESMTPSA id 3739DC0004; Fri, 16 Jun 2023 03:28:37 +0000 (UTC) From: Andrew Tropin In-Reply-To: References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> <87a5x1rrtv.fsf@trop.in> Date: Fri, 16 Jun 2023 07:28:32 +0400 Message-ID: <877cs4rspr.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-06-15 14:09, Philip McGrath wrote: > Hi, > > On Thu, Jun 15, 2023, at 5:35 AM, Andrew Tropin wrote: >> >> WDYT about adding (home-log-dir) function to (guix build utils)? >> So we can prevent copypasting the same code all over home modules. >> >> Something like: >> --8<---------------cut here---------------start------------->8--- >> (define (home-log-dir) >> "Returns a directory for user applications logs." >> (string-append >> (or (getenv "XDG_STATE_HOME") >> (format #f "~a/.local/state" >> (getenv "HOME"))) >> "/log")) >> --8<---------------cut here---------------end--------------->8--- >> > > I still think idiomatic XDG structure is NOT to have a "/log" > subdirectory like this, as I explained in > . With a brief look I didn't find information about this idiom in specification, but you can highlight it with quote or link. Anyway, I'm ok with storing logs in app subdirectory or "/log", not so ok with storing them in the root of state home. > > Aside from that, though, I thought the conclusion from > was that it is the > responsibility of Guix System or the installation mechanism for Guix > on a foreign distribution (e.g. "/etc/profile.d/zzz-guix.sh") to > initialize all of the XDG variables, so code like this can use > `(getenv "XDG_STATE_HOME")` unconditionally (or indeed with a checked > assertion). Maybe there's some context I'm forgetting, though. I've > been looking into these things again as I attempt to solve > : > I noticed in the attached environment variables that entries under > /home/philip/.guix-home/profile/ are duplicated in many search paths. home-state-dir function can also be useful, which can later become just (getenv ("XDG_STATE_HOME")). =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmSL1uAACgkQIgjSCVjB 3rBUwg//bJXnPFi5qqcYfmK3CicM/6SD3qLZKHzoLk3lTEjBX2sUJPNsBzfNI50r walBdw/DXdMtHv5S019GQKmFfmt8hs8H6v1qv9pV7spDAw8kxZzx1doG94wxKmuL ZStm2ehjQSnlk1aUoRy6/0TC1VvUtKok6gJMmPFfwPovIGU72L3B+XcG5kT3WYfm 9/2hmTdCycw66oCGbdr0Tb3yh6AqcVqFolchVRC3pBxyFyYjgFIHGTri+rTKQQRF LzDI5UpDrF4hqTiHVSc+GXIFd8DYwphSQSe8O8MHOQUA7mlKkVxyQ7PUyU3O5/VS XNNtfKGlMYietNx011iG0jwesJ0rFrwaWPSCOQjoV9747dveKYpuEJZHfFJQ0dk7 qIRXKZIPXRpXm/P8y897MxKNYagfpQf8aY2FSc9F5M6KhybHJEKT9+sxxkj08JIb 0UQ7kq1WP+D/CoI5XwuUq3WGHtLEZoF0PW8/2JTW/UMeSWRAJTLk8ZEZPFkczOnz 9c2lJhCNTY7OFkKAxxByMJcLGh1K1c267l1SMJbWVeRSR1LGZQfnG4lL3hS6KsX5 ni//1uGPDX4iYKKoocBrdEevjkZP3B/45sSM5b02qut+GufhemMSgu7JnSzP+hDA c/Ye6x5NEECt71O7dL936cVxzG6vgDhWaG2+CEIamH58U6mXs+I= =NXhi -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 14 21:50:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#61982] [PATCH 2/2] home: services: xdg-base-directories: Deprecate XDG_LOG_HOME. Resent-From: "Philip McGrath" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 17 Jun 2023 18:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61982 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "Andrew Tropin" , "Bruno Victal" , 61982@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 61982-submit@debbugs.gnu.org id=B61982.168702617717612 (code B ref 61982); Sat, 17 Jun 2023 18:23:02 +0000 Received: (at 61982) by debbugs.gnu.org; 17 Jun 2023 18:22:57 +0000 Received: from localhost ([127.0.0.1]:52590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAaZc-0004Zz-TS for submit@debbugs.gnu.org; Sat, 17 Jun 2023 14:22:57 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:48467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAaZZ-0004Zl-RW for 61982@debbugs.gnu.org; Sat, 17 Jun 2023 14:22:54 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C3A055C00D1; Sat, 17 Jun 2023 14:22:48 -0400 (EDT) Received: from imap52 ([10.202.2.102]) by compute1.internal (MEProxy); Sat, 17 Jun 2023 14:22:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1687026168; x= 1687112568; bh=BCN0yYxvud/vva5zhVkEiUEVXvRhPHLDDD97cPZd5js=; b=U mQV3ebJVKHaJqjgdxJcWzVdpmAc5PUz/CdyAgEcJCnO+HjRZNsuwuHaVee1W7XFE hOcNTLQEIqJXB+QJSj15Pc268wA4rSJ5f6zIgUGjOf3+3gqf8UUJAfqov118iJWh y2gSzj0iuTBxGvPq4syMoOS2ORKwu93QhV1k0ziDI1Bf87TxQSnLU12h3u8Tkprz 78rEOOvo9IyRbOcPrt9kA0RZK/0WX196yzGCp1Np1vM2XmQuySV1NWHUR89+qvaK /leLHdQOC9zzhrpktjS372NIfDPYvwHGhwHVxeF/7uahyj3HcuiQieAk+I5JQZtO u/Jb9CHTk42AwBXfXTI+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687026168; x=1687112568; bh=BCN0yYxvud/vv a5zhVkEiUEVXvRhPHLDDD97cPZd5js=; b=ksxpcXEpbt+TGUlgUqthpaPOERvlw VJnYdB2R7qIiXg51Ul59H6aorDa3eJXIqJBw0ySARm38IF2fgiwxcazNwZ54qrvY I2ZSuAAvAQLkozGV1BwGjal6Ul4YPhjOuZlp8aB04k7YPzGCx390Ty6KoanNJ0mQ /JNX4qyc5Ayts0Wrv7Wl38TbgGQ4j7tHAITRVKLbNF1l3qj7RVytGi+2yoUYZQFy Gzh7qFwfCnU2bSfO0TcTZzPhml9JFKAYF8Gd04QIYbEVn2ky/hA50FhzxzKM+rxD I3WwPQeKXo66dc+ZBgGSb531EZwRMnMS0lyMGcINtmBCJ93A9EovGPvzw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvjedguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfrfhh ihhlihhpucfotgfirhgrthhhfdcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthh drtghomheqnecuggftrfgrthhtvghrnhepiedvvdfghffgffehgfehvedvveeitdfggfeh leehvedvfeetvdfgveejgfdvgfehnecuffhomhgrihhnpehgnhhurdhorhhgpdhhohhmvg drlhhotggrlhdpghhnohhmvgdrohhrghdpghhtkhdrohhrghdprghrtghhlhhinhhugidr ohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 32F86C60091; Sat, 17 Jun 2023 14:22:48 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-496-g8c46984af0-fm-20230615.001-g8c46984a Mime-Version: 1.0 Message-Id: <4f059a7c-8ab8-4957-be1d-afc882a80739@app.fastmail.com> In-Reply-To: <877cs4rspr.fsf@trop.in> References: <3005f8a58ec5afc447f2baf40958956bd0d16099.1678029530.git.mirai@makinata.eu> <0a0764da3fa04f9a02f37a7960a0c9608782854d.1678029530.git.mirai@makinata.eu> <87a5x1rrtv.fsf@trop.in> <877cs4rspr.fsf@trop.in> Date: Sat, 17 Jun 2023 14:22:27 -0400 From: "Philip McGrath" Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, On Thu, Jun 15, 2023, at 11:28 PM, Andrew Tropin wrote: > On 2023-06-15 14:09, Philip McGrath wrote: > >> Hi, >> >> On Thu, Jun 15, 2023, at 5:35 AM, Andrew Tropin wrote: >>> >>> WDYT about adding (home-log-dir) function to (guix build utils)? >>> So we can prevent copypasting the same code all over home modules. >>> >>> Something like: >>> --8<---------------cut here---------------start------------->8--- >>> (define (home-log-dir) >>> "Returns a directory for user applications logs." >>> (string-append >>> (or (getenv "XDG_STATE_HOME") >>> (format #f "~a/.local/state" >>> (getenv "HOME"))) >>> "/log")) >>> --8<---------------cut here---------------end--------------->8--- >>> >> >> I still think idiomatic XDG structure is NOT to have a "/log" >> subdirectory like this, as I explained in >> . > > With a brief look I didn't find information about this idiom in > specification, but you can highlight it with quote or link. > > Anyway, I'm ok with storing logs in app subdirectory or "/log", not so > ok with storing them in the root of state home. > You are right that the idiomatic usage isn't made very explicit in the specification. In the specification itself, the idiom is implicit in the "Referencing this specification" section, which always uses a subdirectory: > > Other specifications may reference this specification by specifying the location of a data file as $XDG_DATA_DIRS/subdir/filename. This implies that: > > - Such file should be installed to $datadir/subdir/filename with $datadir defaulting to /usr/share. > > - A user-specific version of the data file may be created in $XDG_DATA_HOME/subdir/filename, taking into account the default value for $XDG_DATA_HOME if $XDG_DATA_HOME is not set. > > - Lookups of the data file should search for ./subdir/filename relative to all base directories specified by $XDG_DATA_HOME and $XDG_DATA_DIRS . If an environment variable is either not set or empty, its default value as defined by this specification should be used instead. > > Specifications may reference this specification by specifying the location of a configuration file as $XDG_CONFIG_DIRS/subdir/filename. This implies that: > > - Default configuration files should be installed to $sysconfdir/xdg/subdir/filename with $sysconfdir defaulting to /etc. > > - A user-specific version of the configuration file may be created in $XDG_CONFIG_HOME/subdir/filename, taking into account the default value for $XDG_CONFIG_HOME if $XDG_CONFIG_HOME is not set. > > - Lookups of the configuration file should search for ./subdir/filename relative to all base directories indicated by $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS . If an environment variable is either not set or empty, its default value as defined by this specification should be used instead. > (Obviously $HOME/.local/bin is a special case, since using subdirectories there would defeat the point.) More than the text of the specification, I'd look at actual observed usage and documented best practices. The relevant Gnome Goal [1] (despite outbound linkrot) is consistent with every other developer guide I've seen in showing the use of subdirectories, e.g. in the Glib example code: ``` const char *cache_dir = g_get_user_cache_dir (); char *mydir = g_build_filename (cache_dir, "myapp", NULL); /* use it */ g_free (mydir); ``` (Glib now provides g_get_user_state_dir, too. [2]) The Arch wiki has a survey of XDG support status [3] that consistently shows applications using appropriate subdirectories. [1]: https://wiki.gnome.org/Initiatives/GnomeGoals/XDGConfigFolders [2]: https://docs.gtk.org/glib/func.get_user_state_dir.html [3]: https://wiki.archlinux.org/title/XDG_Base_Directory >> >> Aside from that, though, I thought the conclusion from >> was that it is the >> responsibility of Guix System or the installation mechanism for Guix >> on a foreign distribution (e.g. "/etc/profile.d/zzz-guix.sh") to >> initialize all of the XDG variables, so code like this can use >> `(getenv "XDG_STATE_HOME")` unconditionally (or indeed with a checked >> assertion). Maybe there's some context I'm forgetting, though. I've >> been looking into these things again as I attempt to solve >> : >> I noticed in the attached environment variables that entries under >> /home/philip/.guix-home/profile/ are duplicated in many search paths. > > home-state-dir function can also be useful, which can later become just > (getenv ("XDG_STATE_HOME")). > I'm not at all opposed to providing functions rather that using getenv everywhere: they could guard against typos, check invariants, and all the other usual helpful things. But---though maybe I'm missing some context---how often is it actually needed to pass these default values? As long as the upstream software supports XDG directories properly, I would think it should just do the right thing without having to pass a bunch of explicit configuration options. -Philip