From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 04 11:21:47 2022 Received: (at submit) by debbugs.gnu.org; 4 Feb 2022 16:21:47 +0000 Received: from localhost ([127.0.0.1]:60901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nG1LG-0001v5-SO for submit@debbugs.gnu.org; Fri, 04 Feb 2022 11:21:47 -0500 Received: from lists.gnu.org ([209.51.188.17]:54586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nG1LF-0001uy-8w for submit@debbugs.gnu.org; Fri, 04 Feb 2022 11:21:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nG1LF-0002V6-1p for guix-patches@gnu.org; Fri, 04 Feb 2022 11:21:45 -0500 Received: from [2a00:1450:4864:20::642] (port=37451 helo=mail-ej1-x642.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nG1LC-0005pS-DE for guix-patches@gnu.org; Fri, 04 Feb 2022 11:21:44 -0500 Received: by mail-ej1-x642.google.com with SMTP id ah7so20835675ejc.4 for ; Fri, 04 Feb 2022 08:21:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:to:content-transfer-encoding:message-id :mime-version; bh=uC2G/41eDVlOuBOZjkgMABAR0m6iOo+64NhD1jQN4SE=; b=TVDZDYHG38uesswiV+RrZqqQoFgltJPIr9dauKrUMaVYLBo4UH+aTIbqW019RJn6Gm In6iE3xxGBqlQpDKUSion6DXHujxGxNaKatsXF8v99f3GgMlkA+VORfWAyb6mdF3c2kC +GF8Eb8heZ8E9+GE0JM40tHRdtWPGfK2+5bTSUbcwjJIdaZfdHxIMZx+bAAeELg/8gvp mHE72clZvdSdsebJWpEpfTUrch3i4fMV9yLLLCGdlFUCKWG/RCQdEC2dHI2THarZrlpC OuOrLOrX1PpJLZ4lssRcjS5O0HZRMxC5gC859EiO7ndt8SBlZjauUx2EvKz7kp4GUavi k3BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:content-transfer-encoding :message-id:mime-version; bh=uC2G/41eDVlOuBOZjkgMABAR0m6iOo+64NhD1jQN4SE=; b=EKh0N46GWM87bzyOnslwuidC52IfM+CZgiytOG2aD35geJhfygPlbAGTuVffqTlwL4 Nxf3/uYMLlsjZ0JRCb56WwDg8fa33Rv/oY53VijNrIehOdRuItE+bT1k5beE1MPZFkqS DE1t61ceiPJhpFqXeu+QXickZ9P1LVHmeK2NbcOtbADmW+6aKELwg+NeLT4NevMvupZE 8VHanqk2tA70rnl2MWjrBVQJ7k6CNMm+tQNBo+wvNfh8Yj7XaLRUBNXAyEzRC7v/HNLq ltjKadROwRiqIjZVrlHOoJQV+EEgCte2IbVLKtk8xNl/QTeMcFb723rYtjv2ziYveDET GsQw== X-Gm-Message-State: AOAM530+KsKtV9L5FRzM/cAiT2wNCAR2/IIpHA6aToB1r2OJkD0h4WJU pjOpwuXfMyjGPQ33qXpHYI+7yO0+Q3o= X-Google-Smtp-Source: ABdhPJxswq2tefbCSBaXel3u2CAGgl3HfAfEP/tnCZR6n/IksN9JnYaldh+OJeSp7HQOG10BIlTQhg== X-Received: by 2002:a17:907:7b87:: with SMTP id ne7mr3167588ejc.556.1643991700546; Fri, 04 Feb 2022 08:21:40 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id g7sm1019555edr.71.2022.02.04.08.21.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Feb 2022 08:21:39 -0800 (PST) From: Liliana Marie Prikler Date: Fri, 4 Feb 2022 09:07:09 +0100 Subject: [PATCH shepherd] support: Use XDG_STATE_HOME for log files. to: guix-patches@gnu.org Content-Transfer-Encoding: 7bit Message-ID: <062d00aaa485dd2c8524f6822a524cb3cb3bdc55.camel@gmail.com> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::642 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=liliana.prikler@gmail.com; helo=mail-ej1-x642.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: As per XDG Base Directory Specification 0.8, "action history" (such as logs) ought to be stored in $XDG_STATE_HOME, defaulting to $HOME/.local/state. Respect this specification. * modules/shepherd/support.scm (%user-log-dir): Define in terms of XDG_STATE_HOME. * doc/shepherd.texi: Adjust accordingly. * tests/basic.sh: Adjust accordingly. --- doc/shepherd.texi | 3 ++- modules/ [...] Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liliana.prikler[at]gmail.com) 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. 1.5 SPOOFED_FREEMAIL No description available. 0.8 SPOOF_GMAIL_MID From Gmail but it doesn't seem to be... X-Debbugs-Envelope-To: submit 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.2 (-) As per XDG Base Directory Specification 0.8, "action history" (such as logs) ought to be stored in $XDG_STATE_HOME, defaulting to $HOME/.local/state. Respect this specification. * modules/shepherd/support.scm (%user-log-dir): Define in terms of XDG_STATE_HOME. * doc/shepherd.texi: Adjust accordingly. * tests/basic.sh: Adjust accordingly. --- doc/shepherd.texi | 3 ++- modules/shepherd/support.scm | 4 ++-- tests/basic.sh | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/shepherd.texi b/doc/shepherd.texi index 94f6131..b779a5f 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi @@ -419,7 +419,8 @@ permissions are not as expected. Log output into @var{file}. For unprivileged users, the default log file is -@file{$XDG_DATA_DIR/.local/share/shepherd/shepherd.log}. +@file{$XDG_STATE_HOME/shepherd/shepherd.log} with @file{$XDG_STATE_HOME} +defaulting to @file{$HOME/.local/state}. @cindex syslog When running as root, the default behavior is to connect to diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm index 21c59f7..72b74ba 100644 --- a/modules/shepherd/support.scm +++ b/modules/shepherd/support.scm @@ -277,8 +277,8 @@ There is NO WARRANTY, to the extent permitted by law."))) (define %user-log-dir ;; Default log directory if shepherd is run as a normal user. - (string-append (or (getenv "XDG_DATA_DIR") - (string-append user-homedir "/.local/share")) + (string-append (or (getenv "XDG_STATE_HOME") + (string-append user-homedir "/.local/state")) "/shepherd")) (define %user-runtime-dir diff --git a/tests/basic.sh b/tests/basic.sh index 5079aa1..5ef1fb0 100644 --- a/tests/basic.sh +++ b/tests/basic.sh @@ -260,7 +260,9 @@ test -f "$log" # Set XDG_CONFIG_HOME for configuration files. export XDG_CONFIG_HOME=$confdir -export XDG_DATA_DIR=$datadir +export XDG_DATA_HOME=$datadir +# Reuse XDG_DATA_HOME as XDG_STATE_HOME for backwards compatibility. +export XDG_STATE_HOME=$datadir mkdir -p $confdir/shepherd mkdir -p $datadir/shepherd mv $conf $confdir/shepherd/init.scm -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 12 05:37:38 2022 Received: (at 53781) by debbugs.gnu.org; 12 Feb 2022 10:37:38 +0000 Received: from localhost ([127.0.0.1]:33568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIpmc-0008Uu-E4 for submit@debbugs.gnu.org; Sat, 12 Feb 2022 05:37:38 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:33727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIpma-0008Ug-5j for 53781@debbugs.gnu.org; Sat, 12 Feb 2022 05:37:37 -0500 Received: (Authenticated sender: brice@waegenei.re) by mail.gandi.net (Postfix) with ESMTPSA id 4E29540002; Sat, 12 Feb 2022 10:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waegenei.re; s=gm1; t=1644662249; 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=xKzgbXTQuXbrfgbYvlM1vHD2/3R7SnJXaAkzGuGmDoY=; b=XnJomd8jxQBGAwTLCxQcMEOC5D8bpRGAaTCMxQE9Rmb0+m0VIXd8LqZR+IABfXOZuy8EnU 9aRi5V+GDXkeL8jkO9vGZm/pgEoWW3x8Tm1o+holJypxH2iESOUHt90B/QFW3f+tVfldS9 nG9/Q/cz1rrRt8xkR7JeyW3R/BCutt8ZXJ2d0fQGVaoxh4jw+QiF3kV6iTVonXCpQJI3kR tvU+PIq2/OOhPp6Al4ZP72VCxSU/N80AAbVzZXTRLLI99iBiHcZl84is2DqKSDWUIWmXgh tPXjxIYIBq2I8oYjbC7Cg/g3Z5VF1oE5OTy8b1mDc37OCxrLQAuz/2pnJegBcw== From: Brice Waegeneire To: Liliana Marie Prikler Subject: Re: bug#53781: [PATCH shepherd] support: Use XDG_STATE_HOME for log files. References: <062d00aaa485dd2c8524f6822a524cb3cb3bdc55.camel@gmail.com> Date: Sat, 12 Feb 2022 11:37:26 +0100 In-Reply-To: <062d00aaa485dd2c8524f6822a524cb3cb3bdc55.camel@gmail.com> (Liliana Marie Prikler's message of "Fri, 4 Feb 2022 09:07:09 +0100") Message-ID: <87leygweu1.fsf@waegenei.re> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 53781 Cc: 53781@debbugs.gnu.org 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 (-) Hello Liliana, Liliana Marie Prikler writes: > As per XDG Base Directory Specification 0.8, "action history" (such as logs) > ought to be stored in $XDG_STATE_HOME, defaulting to $HOME/.local/state. > Respect this specification. > > * modules/shepherd/support.scm (%user-log-dir): Define in terms of > XDG_STATE_HOME. > * doc/shepherd.texi: Adjust accordingly. > * tests/basic.sh: Adjust accordingly. > --- > doc/shepherd.texi | 3 ++- > modules/shepherd/support.scm | 4 ++-- > tests/basic.sh | 4 +++- > 3 files changed, 7 insertions(+), 4 deletions(-) [...] > diff --git a/tests/basic.sh b/tests/basic.sh > index 5079aa1..5ef1fb0 100644 > --- a/tests/basic.sh > +++ b/tests/basic.sh > @@ -260,7 +260,9 @@ test -f "$log" > > # Set XDG_CONFIG_HOME for configuration files. > export XDG_CONFIG_HOME=$confdir > -export XDG_DATA_DIR=$datadir > +export XDG_DATA_HOME=$datadir > +# Reuse XDG_DATA_HOME as XDG_STATE_HOME for backwards compatibility. > +export XDG_STATE_HOME=$datadir > mkdir -p $confdir/shepherd > mkdir -p $datadir/shepherd > mv $conf $confdir/shepherd/init.scm I don't get why you define XDG_DATA_HOME here, as it wasn't used before and it is a test and shouldn't need to be backward compatible except for testing such backward compatibility. Otherwise it LGTM! Thank you for the patch. Cheers, - Brice From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 24 18:10:56 2022 Received: (at 53781-done) by debbugs.gnu.org; 24 Mar 2022 22:10:56 +0000 Received: from localhost ([127.0.0.1]:49588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXVfU-0000wQ-ER for submit@debbugs.gnu.org; Thu, 24 Mar 2022 18:10:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXVfS-0000wC-8W for 53781-done@debbugs.gnu.org; Thu, 24 Mar 2022 18:10:54 -0400 Received: from [2001:470:142:3::e] (port=52630 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXVfF-0004gm-GD; Thu, 24 Mar 2022 18:10:49 -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=9qDdOfw9B9yeoSExZZehBWFL8ZmPiAD1uT5Qq4l6A+8=; b=n59SY9iQcQImUly7YQCq N1XJdqo4NzqdFNHrZu+K43Z4nkM7MLlIJehpw3RfPOxUi6G1KYJEJHB8YOme1OYZMWWkHXf582Opc ETqXh+lZsCYxNacXDTBcEnJj/UzPM2JxOlR0MuRGm8XJoyuLNWXWCGPs+IypAkfUjcyHZS44C4qAa C2rTiErD4FoHUUQiaOV+xf14Rq1A5jTjSMuc+WRLQUyNGrSqnIBfWg52fQC+Dt0EO87k8d4vmMrDY Zc+y/VDZJejAuALPwYuuI3mQXKvnNGuSt2dMUu6GkkBFZN1IUOzl9TfiCoDJFz8loTbTr1BmogI+2 gCIBhrVQEJH+nw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52129 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXVf6-0002Gc-Kj; Thu, 24 Mar 2022 18:10:40 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Subject: Re: bug#53781: [PATCH shepherd] support: Use XDG_STATE_HOME for log files. References: <062d00aaa485dd2c8524f6822a524cb3cb3bdc55.camel@gmail.com> Date: Thu, 24 Mar 2022 23:10:30 +0100 In-Reply-To: <062d00aaa485dd2c8524f6822a524cb3cb3bdc55.camel@gmail.com> (Liliana Marie Prikler's message of "Fri, 4 Feb 2022 09:07:09 +0100") Message-ID: <8735j79f3d.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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-Debbugs-Envelope-To: 53781-done Cc: 53781-done@debbugs.gnu.org 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, Liliana Marie Prikler skribis: > As per XDG Base Directory Specification 0.8, "action history" (such as lo= gs) > ought to be stored in $XDG_STATE_HOME, defaulting to $HOME/.local/state. > Respect this specification. > > * modules/shepherd/support.scm (%user-log-dir): Define in terms of > XDG_STATE_HOME. > * doc/shepherd.texi: Adjust accordingly. > * tests/basic.sh: Adjust accordingly. Pushed as ec2a0b07a6dedcbec3cf6bb7328b144a117873e8, thanks! Ludo=E2=80=99. From unknown Sat Jun 14 19:43:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 22 Apr 2022 11:24:10 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator