From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yITgCdYYM2T90wAASxT56A (envelope-from ) for ; Sun, 09 Apr 2023 21:58:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CLbdCdYYM2RUmwAA9RJhRA (envelope-from ) for ; Sun, 09 Apr 2023 21:58:14 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B1B392F819 for ; Sun, 9 Apr 2023 21:58:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plbAq-000894-Uc; Sun, 09 Apr 2023 15:58:04 -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 1plbAo-00088c-Ry for guix-patches@gnu.org; Sun, 09 Apr 2023 15:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1plbAo-0005GV-Ej for guix-patches@gnu.org; Sun, 09 Apr 2023 15:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1plbAo-00064e-8l for guix-patches@gnu.org; Sun, 09 Apr 2023 15:58:02 -0400 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: 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" From: "\( via Guix-patches" via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681070293; a=rsa-sha256; cv=none; b=m1anqrfGLt8qcCyvsPVeZDcIg4oLZR8sQwPqPmE4LVhl2N82gJ/K64Po6jZDV0U3HLw7yN G0SEXN8KYC9rKuq/CX19y2AOrMJL3lUNluaATO1JRy90dyFnvEl16qFSfyB7qK8vjun6Uk KKaSyZJhm9A4JfdA85F/NC929ctNc+CnU9dMSVcwITIdAz05aI6UNGni3mxF5juf8xruxF nQCfl30MpHc0UnpHXMvtejS+aHBixPfh0OYn4ynWZhc7NinrP3V1+JyoF4TIdZ9ou/uocU ltHJ2pu7aD5pVRqEv+p536kS9tGx1O2QMRwiGpT9MbiAoaDgkAe4umixMWSnTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=eHq5ZaZo; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681070293; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:content-type:content-type:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3wcy2QjNR5M/LGzwAyQiyr7yO/4Pj4wLjPUsmmIAIjA=; b=uxoDRY+a5EbcSWfwF2kMcSiNaz9AOIoT9znz186FZDsjApdbEh3V5JOri7OSg4XMIH3Rtt wEExnPC0LziBF0kxnmzwn82cYx5dDiwtEUNYj9t1UgtUanh5lkAwGgVild3E6UNGbeeclP DFfxlDHXb37W5Dm3X59tY5iyEJ9fYyJkDY78bWKpZR2GPeRu4VcOVpCKkmPSZHF5toFHYK UgLU8aytgAqWFqGRmh6xSvo5rLKEnUk1Ze6QOp8D9lbXZNF6HciftHj8ycKhUmGPpyyFSh rGrHRjRkgprjV+V3RkwTBeY4cOf8rxCJTX2xrXUeSk0Jf9Xn8bnkyF8PgWCIcw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=eHq5ZaZo; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.12 X-Spam-Score: -4.12 X-Migadu-Queue-Id: B1B392F819 X-TUID: MOulULIracbA --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--