From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 11 05:21:32 2020 Received: (at submit) by debbugs.gnu.org; 11 Oct 2020 09:21:32 +0000 Received: from localhost ([127.0.0.1]:39130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXXo-00067o-78 for submit@debbugs.gnu.org; Sun, 11 Oct 2020 05:21:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:43280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRXXl-00067g-HZ for submit@debbugs.gnu.org; Sun, 11 Oct 2020 05:21:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRXXl-0005lQ-Bv for guix-patches@gnu.org; Sun, 11 Oct 2020 05:21:29 -0400 Received: from flashner.co.il ([178.62.234.194]:45238) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRXXj-0005Ct-Ic for guix-patches@gnu.org; Sun, 11 Oct 2020 05:21:29 -0400 Received: from localhost (unknown [141.226.15.20]) by flashner.co.il (Postfix) with ESMTPSA id 4B378401E5; Sun, 11 Oct 2020 09:20:54 +0000 (UTC) From: Efraim Flashner To: guix-patches@gnu.org Subject: [SHEPHERD PATCH] shepherd: Move log file to XDG_CACHE_DIR. Date: Sun, 11 Oct 2020 12:20:17 +0300 Message-Id: <20201011092017.31901-1-efraim@flashner.co.il> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/11 05:20:54 X-ACL-Warn: Detected OS = ??? 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_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Efraim Flashner 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 (--) * modules/shepherd/support.scm (%user-log-dir): New variable. (user-default-log-file): Use it. * doc/shepherd.texi: (Invoking shepherd): Adjust listed default log file. * tests/basic.sh: Adjust for separate log directory. --- doc/shepherd.texi | 2 +- modules/shepherd/support.scm | 10 ++++++++-- tests/basic.sh | 4 ++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/shepherd.texi b/doc/shepherd.texi index 696477e..0c3901e 100644 --- a/doc/shepherd.texi +++ b/doc/shepherd.texi @@ -417,7 +417,7 @@ permissions are not as expected. Log output into @var{file}. For unprivileged users, the default log file is -@file{$XDG_CONFIG_HOME/shepherd/shepherd.log}. +@file{$XDG_CACHE_DIR/shepherd/shepherd.log}. @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 cdb7b35..008b280 100644 --- a/modules/shepherd/support.scm +++ b/modules/shepherd/support.scm @@ -271,6 +271,12 @@ There is NO WARRANTY, to the extent permitted by law."))) (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_CACHE_DIR") + (string-append user-homedir "/.cache")) + "/shepherd")) + (define %user-runtime-dir ;; Default runtime directory if shepherd is run as a normal user. (string-append (or (getenv "XDG_RUNTIME_DIR") @@ -302,8 +308,8 @@ TARGET should be a string representing a filepath + name." ;; Logging. (define (user-default-log-file) "Return the file name of the user's default log file." - (mkdir-p %user-config-dir #o700) - (string-append %user-config-dir "/shepherd.log")) + (mkdir-p %user-log-dir #o700) + (string-append %user-log-dir "/shepherd.log")) (define default-logfile-date-format ;; 'strftime' format string to prefix each entry in the log. diff --git a/tests/basic.sh b/tests/basic.sh index a6148fc..145c0d3 100644 --- a/tests/basic.sh +++ b/tests/basic.sh @@ -24,6 +24,7 @@ herd --version socket="t-socket-$$" conf="t-conf-$$" confdir="t-confdir-$$" +cachedir="t-cachedir-$$" log="t-log-$$" stamp="t-stamp-$$" pid="t-pid-$$" @@ -259,7 +260,9 @@ test -f "$log" # Set XDG_CONFIG_HOME for configuration files. export XDG_CONFIG_HOME=$confdir +export XDG_CACHE_DIR=$cachedir mkdir -p $confdir/shepherd +mkdir -p $cachedir/shepherd mv $conf $confdir/shepherd/init.scm rm -f "$pid" "$socket" shepherd -I -s "$socket" --pid="$pid" & @@ -281,3 +284,4 @@ $herd stop root ! kill -0 $shepherd_pid rm -rf $confdir +rm -rf $cachedir -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 10:24:08 2020 Received: (at 43920) by debbugs.gnu.org; 22 Oct 2020 14:24:08 +0000 Received: from localhost ([127.0.0.1]:53298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVbVf-0003JW-Us for submit@debbugs.gnu.org; Thu, 22 Oct 2020 10:24:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVbVe-0003J1-Fx for 43920@debbugs.gnu.org; Thu, 22 Oct 2020 10:24:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43922) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVbVY-0002uV-Qu; Thu, 22 Oct 2020 10:24:00 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51302 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kVbVY-0001a0-CF; Thu, 22 Oct 2020 10:24:00 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: [bug#43920] [SHEPHERD PATCH] shepherd: Move log file to XDG_CACHE_DIR. References: <20201011092017.31901-1-efraim@flashner.co.il> Date: Thu, 22 Oct 2020 16:23:57 +0200 In-Reply-To: <20201011092017.31901-1-efraim@flashner.co.il> (Efraim Flashner's message of "Sun, 11 Oct 2020 12:20:17 +0300") Message-ID: <87imb2tk3m.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 43920 Cc: 43920@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, Efraim Flashner skribis: > * modules/shepherd/support.scm (%user-log-dir): New variable. > (user-default-log-file): Use it. > * doc/shepherd.texi: (Invoking shepherd): Adjust listed default log > file. > * tests/basic.sh: Adjust for separate log directory. [...] > For unprivileged users, the default log file is > -@file{$XDG_CONFIG_HOME/shepherd/shepherd.log}. > +@file{$XDG_CACHE_DIR/shepherd/shepherd.log}. The previous location wasn=E2=80=99t perfect, but the proposed one isn=E2= =80=99t great either: one can generally assume =E2=80=9Crm -rf ~/.cache=E2=80=9D won=E2= =80=99t lose anything that cannot be reconstructed, and the log is something that cannot be reconstructed. Do the XDG spec have something else that might be more appropriate? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 23 18:17:29 2020 Received: (at 43920) by debbugs.gnu.org; 23 Oct 2020 22:17:30 +0000 Received: from localhost ([127.0.0.1]:58643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW5NJ-0001Ot-N9 for submit@debbugs.gnu.org; Fri, 23 Oct 2020 18:17:29 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:48408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW5NG-0001Oh-TZ for 43920@debbugs.gnu.org; Fri, 23 Oct 2020 18:17:28 -0400 Received: from nijino.local (217-149-162-161.nat.highway.telekom.at [217.149.162.161]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CHz9v3bHrz1DTkN; Sat, 24 Oct 2020 00:17:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4CHz9v3bHrz1DTkN DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1603491443; bh=bOYn0ENKXj0PLkogdNXATyucfXdMUXRtX8zHeJ8wMds=; h=Subject:From:To:Cc:Date:In-Reply-To:From; b=iHe7rkRZNYN8Q1aeZCcwC2VIgmhx+5sClTmDXjgeODS+ycZxZJVNwSLWfpZd59Mqd deUGAIl/MBBktbxGlRNEWMNrOfg+8CE+gvZM7Nmg/01dXSNcZy9nYk3vA1Hg1UKmL/ 9srUJu8hYTPPUrTWusr9vKoCg1k/M3AyBAipcrfo= Message-ID: Subject: [bug#43920] [SHEPHERD PATCH] shepherd: Move log file to XDG_CACHE_DIR. From: Leo Prikler To: ludo@gnu.org Date: Sat, 24 Oct 2020 00:17:22 +0200 In-Reply-To: 87imb2tk3m.fsf@gnu.org Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43920 Cc: 43920@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 (---) > The previous location wasn’t perfect, but the proposed one isn’t > great > either: one can generally assume “rm -rf ~/.cache” won’t lose > anything > that cannot be reconstructed, and the log is something that cannot be > reconstructed. That is actually not part of the XDG specification – it merely states, that non-essential files be put there. Whether or not one considers the shepherd log essential is debatable. You could alternatively put it under $XDG_DATA_HOME. Some projects like Xorg seem to do that. Of course, there always remains the option of having yet another environment variable or command line parameter for the placement of the log file. Regards, Leo From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 12:15:46 2020 Received: (at 43920) by debbugs.gnu.org; 24 Oct 2020 16:15:46 +0000 Received: from localhost ([127.0.0.1]:34622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWMCn-0003Qz-QF for submit@debbugs.gnu.org; Sat, 24 Oct 2020 12:15:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWMCl-0003QM-Pn for 43920@debbugs.gnu.org; Sat, 24 Oct 2020 12:15:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49337) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWMCd-0007Zu-LZ; Sat, 24 Oct 2020 12:15:35 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52098 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWMCd-0002IB-6p; Sat, 24 Oct 2020 12:15:35 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Leo Prikler Subject: Re: [bug#43920] [SHEPHERD PATCH] shepherd: Move log file to XDG_CACHE_DIR. References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 3 Brumaire an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 24 Oct 2020 18:15:33 +0200 In-Reply-To: (Leo Prikler's message of "Sat, 24 Oct 2020 00:17:22 +0200") Message-ID: <87h7qjiore.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 43920 Cc: "Jan \(janneke\) Nieuwenhuizen" , 43920@debbugs.gnu.org, Efraim Flashner 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, Leo Prikler skribis: >> The previous location wasn=E2=80=99t perfect, but the proposed one isn= =E2=80=99t >> great >> either: one can generally assume =E2=80=9Crm -rf ~/.cache=E2=80=9D won= =E2=80=99t lose >> anything >> that cannot be reconstructed, and the log is something that cannot be >> reconstructed. > That is actually not part of the XDG specification =E2=80=93 it merely st= ates, > that non-essential files be put there. Whether or not one considers > the shepherd log essential is debatable. Right, that=E2=80=99s my interpretation of what =E2=80=9Ccache=E2=80=9D mea= ns. > You could alternatively put it under $XDG_DATA_HOME. Some projects > like Xorg seem to do that. Of course, there always remains the option > of having yet another environment variable or command line parameter > for the placement of the log file. Yup, XDG_DATA_HOME would work for me; it seems to be rather in line with what the XDG states and what Xorg does, as you note. https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.h= tml WDYT, Efraim & Janneke? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 12:52:02 2020 Received: (at 43920) by debbugs.gnu.org; 24 Oct 2020 16:52:02 +0000 Received: from localhost ([127.0.0.1]:35030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWMlt-0004Pz-TU for submit@debbugs.gnu.org; Sat, 24 Oct 2020 12:52:02 -0400 Received: from flashner.co.il ([178.62.234.194]:55156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWMlr-0004Pk-MU for 43920@debbugs.gnu.org; Sat, 24 Oct 2020 12:52:00 -0400 Received: from [127.0.0.1] (unknown [141.226.13.8]) by flashner.co.il (Postfix) with ESMTPSA id 0B168400D1; Sat, 24 Oct 2020 16:51:52 +0000 (UTC) Date: Sat, 24 Oct 2020 16:51:20 +0000 From: Efraim Flashner To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= , Leo Prikler Subject: Re: [bug#43920] [SHEPHERD PATCH] shepherd: Move log file to XDG_CACHE_DIR. User-Agent: K-9 Mail for Android In-Reply-To: <87h7qjiore.fsf@gnu.org> References: <87h7qjiore.fsf@gnu.org> Message-ID: <5115DA89-FC2F-4B00-8F3B-D461908E1775@flashner.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 43920 Cc: 43920@debbugs.gnu.org, "Jan \(janneke\) Nieuwenhuizen" 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 (-) On October 24, 2020 4:15:33 PM UTC, "Ludovic Court=C3=A8s" wrote: >Hi, > >Leo Prikler skribis: > >>> The previous location wasn=E2=80=99t perfect, but the proposed one isn= =E2=80=99t >>> great >>> either: one can generally assume =E2=80=9Crm -rf ~/=2Ecache=E2=80=9D w= on=E2=80=99t lose >>> anything >>> that cannot be reconstructed, and the log is something that cannot be >>> reconstructed=2E >> That is actually not part of the XDG specification =E2=80=93 it merely = states, >> that non-essential files be put there=2E Whether or not one considers >> the shepherd log essential is debatable=2E > >Right, that=E2=80=99s my interpretation of what =E2=80=9Ccache=E2=80=9D m= eans=2E > I felt like it belongs in cache much more than in a config dir=2E >> You could alternatively put it under $XDG_DATA_HOME=2E Some projects >> like Xorg seem to do that=2E Of course, there always remains the optio= n >> of having yet another environment variable or command line parameter >> for the placement of the log file=2E > >Yup, XDG_DATA_HOME would work for me; it seems to be rather in line with >what the XDG states and what Xorg does, as you note=2E > > https://specifications=2Efreedesktop=2Eorg/basedir-spec/basedir-spec-la= test=2Ehtml > >WDYT, Efraim & Janneke? I don't think it's really data, it's not like it belongs in something/shar= e=2E As another data point keybase writes its (verbose) logs in =2Ecache/ke= ybase=2E > >Ludo=E2=80=99=2E --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 24 18:58:43 2020 Received: (at 43920) by debbugs.gnu.org; 24 Oct 2020 22:58:43 +0000 Received: from localhost ([127.0.0.1]:35420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWSUf-0000vf-Ns for submit@debbugs.gnu.org; Sat, 24 Oct 2020 18:58:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWSUd-0000vS-Fq for 43920@debbugs.gnu.org; Sat, 24 Oct 2020 18:58:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55101) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWSUU-0002iu-Ok; Sat, 24 Oct 2020 18:58:27 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=51794 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWSUS-0005Bb-U6; Sat, 24 Oct 2020 18:58:26 -0400 From: Jan Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#43920] [SHEPHERD PATCH] shepherd: Move log file to XDG_CACHE_DIR. Organization: AvatarAcademy.nl References: <87h7qjiore.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Sun, 25 Oct 2020 00:58:21 +0200 In-Reply-To: <87h7qjiore.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 24 Oct 2020 18:15:33 +0200") Message-ID: <87zh4b44fm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 43920 Cc: Leo Prikler , 43920@debbugs.gnu.org, Efraim Flashner 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 (-) Ludovic Court=C3=A8s writes: Hello, > Leo Prikler skribis: > >>> The previous location wasn=E2=80=99t perfect, but the proposed one isn= =E2=80=99t >>> great >>> either: one can generally assume =E2=80=9Crm -rf ~/.cache=E2=80=9D won= =E2=80=99t lose >>> anything >>> that cannot be reconstructed, and the log is something that cannot be >>> reconstructed. >> That is actually not part of the XDG specification =E2=80=93 it merely s= tates, >> that non-essential files be put there. Whether or not one considers >> the shepherd log essential is debatable. > > Right, that=E2=80=99s my interpretation of what =E2=80=9Ccache=E2=80=9D m= eans. Yes, essential is pretty vague; a cache is something that can be re-generated. >> You could alternatively put it under $XDG_DATA_HOME. Some projects >> like Xorg seem to do that. Of course, there always remains the option >> of having yet another environment variable or command line parameter >> for the placement of the log file. > > Yup, XDG_DATA_HOME would work for me; it seems to be rather in line with > what the XDG states and what Xorg does, as you note. > > https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest= .html > > WDYT, Efraim & Janneke? Data sounds a bit strong (I would consider a database to be data), and cache is too loose. Otoh, losing a log can be crucial; so I'd go for XDG_DATA_HOME. Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 26 06:28:09 2020 Received: (at 43920) by debbugs.gnu.org; 26 Oct 2020 10:28:09 +0000 Received: from localhost ([127.0.0.1]:38530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWzjV-0003tz-1w for submit@debbugs.gnu.org; Mon, 26 Oct 2020 06:28:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWzjS-0003td-Hs for 43920@debbugs.gnu.org; Mon, 26 Oct 2020 06:28:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51805) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWzjJ-0005wo-J8; Mon, 26 Oct 2020 06:27:58 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60774 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWzjH-0003Jy-El; Mon, 26 Oct 2020 06:27:57 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: [bug#43920] [SHEPHERD PATCH] shepherd: Move log file to XDG_CACHE_DIR. References: <87h7qjiore.fsf@gnu.org> <5115DA89-FC2F-4B00-8F3B-D461908E1775@flashner.co.il> Date: Mon, 26 Oct 2020 11:27:53 +0100 In-Reply-To: <5115DA89-FC2F-4B00-8F3B-D461908E1775@flashner.co.il> (Efraim Flashner's message of "Sat, 24 Oct 2020 16:51:20 +0000") Message-ID: <87pn55cmdy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 43920 Cc: Leo Prikler , 43920@debbugs.gnu.org, "Jan \(janneke\) Nieuwenhuizen" 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, Efraim Flashner skribis: > On October 24, 2020 4:15:33 PM UTC, "Ludovic Court=C3=A8s" = wrote: [...] >>>> The previous location wasn=E2=80=99t perfect, but the proposed one isn= =E2=80=99t >>>> great >>>> either: one can generally assume =E2=80=9Crm -rf ~/.cache=E2=80=9D won= =E2=80=99t lose >>>> anything >>>> that cannot be reconstructed, and the log is something that cannot be >>>> reconstructed. [...] > I don't think it's really data, it's not like it belongs in something/sha= re. As another data point keybase writes its (verbose) logs in .cache/keyba= se. To me the question whether it=E2=80=99s OK to lose the log. In a way, stor= ing the log in ~/.cache akin to storing it in /tmp. If we agree on that, then we have the choice between ~/.local/share aka. XDG_DATA_HOME (like Xorg does), or maybe using ~/.local/var/log or something similar that goes beyond XDG? Thoughts? Naming directories is hard. :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 18 16:35:56 2020 Received: (at 43920-done) by debbugs.gnu.org; 18 Nov 2020 21:35:56 +0000 Received: from localhost ([127.0.0.1]:36692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfV7M-0003r8-3D for submit@debbugs.gnu.org; Wed, 18 Nov 2020 16:35:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kfV7K-0003qt-9G for 43920-done@debbugs.gnu.org; Wed, 18 Nov 2020 16:35:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34409) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kfV7C-0002Vn-UC; Wed, 18 Nov 2020 16:35:46 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54722 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kfV7C-0000tG-BM; Wed, 18 Nov 2020 16:35:46 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Efraim Flashner Subject: Re: [bug#43920] [SHEPHERD PATCH] shepherd: Move log file to XDG_CACHE_DIR. References: <87h7qjiore.fsf@gnu.org> <5115DA89-FC2F-4B00-8F3B-D461908E1775@flashner.co.il> <87pn55cmdy.fsf@gnu.org> Date: Wed, 18 Nov 2020 22:35:43 +0100 In-Reply-To: <87pn55cmdy.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 26 Oct 2020 11:27:53 +0100") Message-ID: <87wnyijqkw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (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: 43920-done Cc: Leo Prikler , "Jan \(janneke\) Nieuwenhuizen" , 43920-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, Ludovic Court=C3=A8s skribis: > Efraim Flashner skribis: > >> On October 24, 2020 4:15:33 PM UTC, "Ludovic Court=C3=A8s" wrote: > > [...] > >>>>> The previous location wasn=E2=80=99t perfect, but the proposed one is= n=E2=80=99t >>>>> great >>>>> either: one can generally assume =E2=80=9Crm -rf ~/.cache=E2=80=9D wo= n=E2=80=99t lose >>>>> anything >>>>> that cannot be reconstructed, and the log is something that cannot be >>>>> reconstructed. > > [...] > >> I don't think it's really data, it's not like it belongs in something/sh= are. As another data point keybase writes its (verbose) logs in .cache/keyb= ase. > > To me the question whether it=E2=80=99s OK to lose the log. In a way, st= oring > the log in ~/.cache akin to storing it in /tmp. > > If we agree on that, then we have the choice between ~/.local/share > aka. XDG_DATA_HOME (like Xorg does), or maybe using ~/.local/var/log or > something similar that goes beyond XDG? I pushed a variant of your patch that uses XDG_DATA_HOME instead: https://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=3Dc6382a6898f28= 51d78b675f209787c5ff9ad4320 There=E2=80=99s a now =E2=80=98%user-log-dir=E2=80=99 so it=E2=80=99ll be e= asier to adjust going forward if we change our mind. Thanks, Ludo=E2=80=99. From unknown Tue Jun 17 22:08:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 17 Dec 2020 12:24:06 +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