GNU bug report logs - #78603
[PATCH] services: readymedia: Respect SUDO_HOME if configuring for home.

Previous Next

Package: guix-patches;

Reported by: Sughosha <sughosha <at> disroot.org>

Date: Tue, 27 May 2025 09:28:01 UTC

Severity: normal

Tags: patch

Full log


Message #23 received at 78603 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sughosha <sughosha <at> disroot.org>
Cc: 78603 <at> debbugs.gnu.org
Subject: Re: bug#78603: [PATCH] services: readymedia: Respect SUDO_HOME if
 configuring for home.
Date: Thu, 12 Jun 2025 09:58:32 +0200
Hi,

Sughosha <sughosha <at> disroot.org> writes:

> This fixes readymedia configured by a different user.
>
> * gnu/services/upnp.scm (readymedia-configuration)[cache-directory]: Update
> path.
> [log-directory]: Ditto.
>
> Change-Id: I629c937973ca46bcd6e60382aa7576b9859515be

[...]

>                     (default (if for-home?
> -                                (string-append (or (getenv "XDG_CACHE_HOME")
> -                                                   (string-append
> -                                                    (getenv "HOME") "/.cache"))
> -                                               "/readymedia")
> -                              %readymedia-default-cache-directory)))
> +                                ".cache/readymedia"
> +                                %readymedia-default-cache-directory)))

A better solution, to avoid brittleness associated with relative
file names, is to turn ‘cache-directory’ into a gexp that would ‘getenv’
as above and/or ‘getpw’ to determine the cache directory name.

The (shepherd support) module provides ‘%user-log-dir’ etc., but
unfortunately it lacks ‘%user-cache-dir’.

HTH,
Ludo’.




This bug report was last modified 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.