From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bug-guix-bounces+larch=yhetil.org@gnu.org>
Received: from mp10.migadu.com ([2001:41d0:403:4876::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms8.migadu.com with LMTPS
	id 2KIgCozZW2UmpwAAG6o9tA:P1
	(envelope-from <bug-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 20 Nov 2023 23:11:24 +0100
Received: from aspmx1.migadu.com ([2001:41d0:403:4876::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp10.migadu.com with LMTPS
	id 2KIgCozZW2UmpwAAG6o9tA
	(envelope-from <bug-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 20 Nov 2023 23:11:24 +0100
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 C593726A79
	for <larch@yhetil.org>; Mon, 20 Nov 2023 23:11:23 +0100 (CET)
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=h7tYB5Lb;
	spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gnu.org
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1700518284;
	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:
	 content-transfer-encoding:content-transfer-encoding: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=iUKHmJRxFCJs52U4OUTBPNvIP1mK70JD4sA/VuhccAo=;
	b=CHqdLwpQTif3BUUyzLpypzq1X4DsqyXjHHc1eeiFgWr6cJVyucizG4Jx3wJY/N4pQofVp0
	m5reCjplNmayY80tbcCxv4Iqd3hKxgOO2ZZS6EP2OegLADzxQZSUY1Jckiy4Y+f0eEUDG9
	lvsjbOu8KWmgmt16HryEgbgPDMEErSZwirGvggcOktQPvtqtjDmr3R5t7d1r+KhEh2v0BW
	GN+eEQu+k+h9v8dob9MQNG1siolLUcgy/W/dHJgyOuqa7dNbSuyvRrhIoLS+nW78zkOGl2
	6f2Xo/pU2ULbrJ2QYsKyxnV8GTzAg5eXp42quN4m9gmyWM4ifzOoeFtlUnwosQ==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=h7tYB5Lb;
	spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gnu.org
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700518284; a=rsa-sha256; cv=none;
	b=u8MGoYHaLv7KACef3FiUeHoq1KGoH9bepYXfOKMd3EiS09VilJPqtjyGizOYCO3APMygDQ
	21KAEISoALUIioSuRjarszRmPgv0i17ZJVEsHsXReVTsJDfBz5gyNb9yE3TVoKuY6iEIzm
	2/QbaJZbdHE8zVYwHhNxScpvk5jzIS+bjF3qxSf4sVuCakMaxHoU1QCVuppM4Ce8ebty+e
	ocOfcvQPED3RuwucgcxgR/HUmogh2FZMaNpcWGGx2IwGKIL+PD6lFfgLNLyz9W7FMyyL1I
	fVbBX9l+I6kvIsHzWai1yMieeNcV3ZsZvSj/yZp2UO6Yq1cfVX2rQgESxVTaeQ==
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-guix-bounces@gnu.org>)
	id 1r5CTu-00025I-L7; Mon, 20 Nov 2023 17:11:02 -0500
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 <Debian-debbugs@debbugs.gnu.org>)
 id 1r5CTs-00024t-JD
 for bug-guix@gnu.org; Mon, 20 Nov 2023 17:11:00 -0500
Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1r5CTs-0006G4-9V
 for bug-guix@gnu.org; Mon, 20 Nov 2023 17:11:00 -0500
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1r5CTu-0000ju-5i
 for bug-guix@gnu.org; Mon, 20 Nov 2023 17:11:02 -0500
X-Loop: help-debbugs@gnu.org
Subject: bug#65471: home mcron service overwrites PATH with a GuixSD-only
 directory
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-guix@gnu.org
Resent-Date: Mon, 20 Nov 2023 22:11:02 +0000
Resent-Message-ID: <handler.65471.B65471.17005182512824@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 65471
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: nils@landt.email
Cc: 65471@debbugs.gnu.org
Received: via spool by 65471-submit@debbugs.gnu.org id=B65471.17005182512824
 (code B ref 65471); Mon, 20 Nov 2023 22:11:02 +0000
Received: (at 65471) by debbugs.gnu.org; 20 Nov 2023 22:10:51 +0000
Received: from localhost ([127.0.0.1]:54785 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1r5CTj-0000jT-C0
 for submit@debbugs.gnu.org; Mon, 20 Nov 2023 17:10:51 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:39204)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@gnu.org>) id 1r5CTf-0000jD-BA
 for 65471@debbugs.gnu.org; Mon, 20 Nov 2023 17:10:50 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@gnu.org>)
 id 1r5CTV-00068s-Bn; Mon, 20 Nov 2023 17:10:37 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=iUKHmJRxFCJs52U4OUTBPNvIP1mK70JD4sA/VuhccAo=; b=h7tYB5LbrEpitnhvVnCY
 UiBMC0AQORN5dlILHhd+NtN2wfsyMe7GfRGt7bHPqLd0tUgkzXnX334tppxNOMk538nYtTIN5i7gx
 kFHdBxCh7v0jtS1Z0QlOZ/kvmYMi6U4fww8z3QURI9iF1NUJJ2hstM6I1N5Iwx5bH6lUPsY4mWzVI
 kIMohqgeHn8zXRoDn7hq0Bo2fecHaf2M00CVtqV/nwV9M8JZa1oQaOxvKIwZzv47QKNPeKbHQCFgK
 mKNujbVFv5oZnzoJEI67CN+/rD5EPMEYR3PGt+VBZbM3m4zlA04WXsb22s8ibxos+nyAvevvodnj3
 UtduqenAZLfPPQ==;
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@gnu.org>
In-Reply-To: <509099431.327298.1692786160360@office.mailbox.org>
 (nils@landt.email's message of "Wed, 23 Aug 2023 12:22:40 +0200
 (CEST)")
References: <509099431.327298.1692786160360@office.mailbox.org>
Date: Mon, 20 Nov 2023 23:10:33 +0100
Message-ID: <87jzqcoz3a.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-guix@gnu.org
List-Id: Bug reports for GNU Guix <bug-guix.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-guix>,
 <mailto:bug-guix-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-guix>
List-Post: <mailto:bug-guix@gnu.org>
List-Help: <mailto:bug-guix-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-guix>,
 <mailto:bug-guix-request@gnu.org?subject=subscribe>
Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org
Sender: bug-guix-bounces+larch=yhetil.org@gnu.org
X-Migadu-Country: US
X-Migadu-Flow: FLOW_IN
X-Migadu-Spam-Score: -6.79
X-Spam-Score: -6.79
X-Migadu-Queue-Id: C593726A79
X-Migadu-Scanner: mx10.migadu.com
X-TUID: 1ttfjshQTZx/

Hi,

Apologies for the delay.

nils@landt.email skribis:

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

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

I wonder what the preferred behavior would be.  Restore PATH to whatever
value it had when the user =E2=80=98shepherd=E2=80=99 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 =E2=80=9C/run/current-system/profile/bin:/usr/bin=E2=80=
=9D or
similar?

Thanks,
Ludo=E2=80=99.