unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: nils@landt.email
Cc: 65471@debbugs.gnu.org
Subject: bug#65471: home mcron service overwrites PATH with a GuixSD-only directory
Date: Mon, 20 Nov 2023 23:10:33 +0100	[thread overview]
Message-ID: <87jzqcoz3a.fsf@gnu.org> (raw)
In-Reply-To: <509099431.327298.1692786160360@office.mailbox.org> (nils@landt.email's message of "Wed, 23 Aug 2023 12:22:40 +0200 (CEST)")

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	other threads:[~2023-11-20 22:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 10:22 bug#65471: home mcron service overwrites PATH with a GuixSD-only directory nils
2023-11-20 22:10 ` Ludovic Courtès [this message]
2023-11-21  0:46   ` Oleg Pykhalov
2023-11-21 15:09   ` Nils Landt
2024-01-15 12:39     ` Tanguy LE CARROUR
2024-02-28 13:04 ` Gary Johnson via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzqcoz3a.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=65471@debbugs.gnu.org \
    --cc=nils@landt.email \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).