From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gH6bFaMNM2SZrwAASxT56A (envelope-from ) for ; Sun, 09 Apr 2023 21:10:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +LiOFaMNM2Q9FAAA9RJhRA (envelope-from ) for ; Sun, 09 Apr 2023 21:10:27 +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 1BB23FD58 for ; Sun, 9 Apr 2023 21:10:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1plaQT-0000uf-4V; Sun, 09 Apr 2023 15:10:09 -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 1plaQO-0000uD-Ed for guix-patches@gnu.org; Sun, 09 Apr 2023 15:10:05 -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 1plaQM-0003Hj-VK for guix-patches@gnu.org; Sun, 09 Apr 2023 15:10:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1plaQM-0004PS-Fx for guix-patches@gnu.org; Sun, 09 Apr 2023 15:10: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: "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-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: , 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=1681067427; a=rsa-sha256; cv=none; b=rPPSixkIHN1xRyfF+21RmXbG+EKMI4RVwTT4AhiEsbKN2sWl1oJwKkckI67z/42H7Q64s0 EKJ4gZzjWkq7Lsqeq4+l2+aSTZFBbTgTWvuodaFmiClgEOorHBw3tZ/Y+5K0ZzF/MAqI9x ax3HtvidXQ56o4FdHcxmMDHb8JtLweIpD65/ccBbwtyVmFwd0dhCnyW1CqQuUg7DQLNlQm 1P+nLSLOG/BeXz0UuUZTz7Y97hpdmUWSuQJmLMixMkUckGvrMRP60gTOxsnRdtyw56VcJy fYcFxt+MMlhz/Eli3O8BNxcO2EVjbp9trjdNvVzq5PQmLkYhbOOSL34vn1ZINw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm2 header.b=eKMfVgqO; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=sITvRFSq; dmarc=none; 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=1681067427; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=ESiiyZH7th4O3WPr3FowaRr4ETKXo7l9P4Fjp/3kE/U=; b=DMw95CWOEWqGLfIKG3X0zlpxGfhp7XWHUbaynbx8Pq+vUOeXbWOEVch3CSUTYHClWov37i PQqEhOFr687TY3ppiBepn8FumcvAsFwpLaOrkvNg/j4WhllMU6EOZpmJEovYK3eF/e83vC BFdVEa0S4yo5EGq3tN73uC711YTiSEN/v0BEapXmoR5hBHGSihb8cHxXvXGUsAhu/s67Gl 7PmW/tcZFKt0PyOf3NX5ppg01eGK8/IsYKj40ml49Zh0eL8n8745mUrC2y4JrOW9vT6L9y eEI8X2olkEgPWLRydzptZUCKbCHWOF8J22Ob7S3MxmmbpXwgCwWP6kFrw+k0LA== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm2 header.b=eKMfVgqO; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=sITvRFSq; dmarc=none; 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: -3.21 X-Spam-Score: -3.21 X-Migadu-Queue-Id: 1BB23FD58 X-TUID: xVH/Tx1j9YA/ 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