bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65471: home mcron service overwrites PATH with a GuixSD-only directo


From: Ludovic Courtès
Subject: bug#65471: home mcron service overwrites PATH with a GuixSD-only directory
Date: Mon, 20 Nov 2023 23:10:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi,

Apologies for the delay.

nils@landt.email skribis:

> when using the home-mcron-service, PATH is set to 
> /run/current-system/profile/bin . This directory is empty when using guix 
> home on a foreign distro, meaning all executable paths would need to be 
> absolute. This includes stuff like /usr/bin/ssh, /usr/bin/nice etc..
>  
> My guess for the culprit was 1c30d5a6bfc5d48137f4bdcc271189a06fdc6ed3 , which 
> replaced the custom home-mcron-service-type with mapping it to 
> mcron-service-type. 
> The mcron shepherd service in old service type did not mess with the 
> environment variables, the inherited one does:
> #:environment-variables
> (cons* "GUILE_AUTO_COMPILE=0"
> "PATH=/run/current-system/profile/bin"
> (remove (cut string-prefix? "PATH=" <>)
> (environ)))

As a rule of thumb, I personally always provide absolute file names, as
in #~(job … #$(file-append coreutils "/bin/ls") …).

I wonder what the preferred behavior would be.  Restore PATH to whatever
value it had when the user ‘shepherd’ process was started, at the
expense of making things harder to track/less reproducible?  Should we
leave it unset, possibly breaking programs that expect it to be set?
Should we set it to “/run/current-system/profile/bin:/usr/bin” or
similar?

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]