From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id AFxVEmrIXGXnkgAA9RJhRA:P1 (envelope-from ) for ; Tue, 21 Nov 2023 16:10:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AFxVEmrIXGXnkgAA9RJhRA (envelope-from ) for ; Tue, 21 Nov 2023 16:10:34 +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 BFBC225ECD for ; Tue, 21 Nov 2023 16:10:32 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=landt.email header.s=MBO0001 header.b=ZYyHC16j; dmarc=fail reason="SPF not aligned (relaxed)" header.from=landt.email (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700579434; a=rsa-sha256; cv=none; b=D+5avrGgGoAf8e3dAlabfmcKMK4RBrqDCzMFa1uL8YQ8CM2ARjkQoDg/SAa2g/MOCElrCT ehYLybs+MVD5CxGYb5vr2qz8yR4U9z3Pf2PjXEAF7N9TPxUtUIw9NyqW2w5aP9jDDT1YSH BvjptsZZAqSlDPXMTon9gzzEeMTR7IMnUiA0P/CItNKI77wkb7oNc1D14HwNnptG4v7Onc guWLJCvOzNSwZ1b+GAWG1yBDO3HB6E+nJV3VyXm2IxCScWFPckmpcJex4glGQ/gmcoOR+l BOQo+lzl5ZcRQgS7IyIwW5LRPR0/vNifg/pVqXyJ5axs9UgN97r0bNCeV/P6hA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=landt.email header.s=MBO0001 header.b=ZYyHC16j; dmarc=fail reason="SPF not aligned (relaxed)" header.from=landt.email (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700579434; 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=8to0NVp2f4xyW3uXFxOVs0diEELOM2qNaBtqp9aEZU4=; b=fHiqeg6u46p7zaHFWRaucRP0ojHgZAIvtZZabewvdWup19ZuHkGcHoT5hQHSRfHjF0vlll dAKqO/fp2eOxtvibG/sVuigBXjsPfE4nPpjgE7op91jSfoardKLrdDGD4R9YCThji6dBs+ UNt7oYOjSa+TYBTs/jTwKlhYSnGls6loNKbvZNUExu8tHazmjV8ORTHywqWTY1K6ZMA7Bu zeetXMiI+ruv5MWxkkUMsZ4SDFhcADc5z4aJwz8QTDYsE2G44ZgNImg28Jit1JBifyA3Zz btRRvN32jQLHRJP420dT5/wiIrPgPhChcUr4ozYpe8hbc2LHrSNobApkTfD5tw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5SO7-0006Am-Df; Tue, 21 Nov 2023 10:10:07 -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 ) id 1r5SO2-0006AB-BN for bug-guix@gnu.org; Tue, 21 Nov 2023 10:10:03 -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 ) id 1r5SNz-0006nr-JU for bug-guix@gnu.org; Tue, 21 Nov 2023 10:10:00 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r5SO2-0005N9-7j for bug-guix@gnu.org; Tue, 21 Nov 2023 10:10:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#65471: home mcron service overwrites PATH with a GuixSD-only directory Resent-From: Nils Landt Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 21 Nov 2023 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65471 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: "65471@debbugs.gnu.org" <65471@debbugs.gnu.org> Received: via spool by 65471-submit@debbugs.gnu.org id=B65471.170057935620553 (code B ref 65471); Tue, 21 Nov 2023 15:10:02 +0000 Received: (at 65471) by debbugs.gnu.org; 21 Nov 2023 15:09:16 +0000 Received: from localhost ([127.0.0.1]:57172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5SNI-0005LQ-2L for submit@debbugs.gnu.org; Tue, 21 Nov 2023 10:09:16 -0500 Received: from mout-p-102.mailbox.org ([80.241.56.152]:52804) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5SNF-0005L9-6Y for 65471@debbugs.gnu.org; Tue, 21 Nov 2023 10:09:14 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4SZSSs4MBPz9smn; Tue, 21 Nov 2023 16:09:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landt.email; s=MBO0001; t=1700579341; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=8to0NVp2f4xyW3uXFxOVs0diEELOM2qNaBtqp9aEZU4=; b=ZYyHC16jQ5+1Y/Wz3YgiZ11DPLuY3Zk44ZWb2EQYRZ3XOkUl+cmCV4yzM1iWzXaffLDGbT RioP+JbHiRMudWcBP9V+7opB1yNCBdE/rnW7JnlVXwpYaIDjofjhhMWeXGaOSkRwCzsNA4 7coTLFLd5tnVW2ErC1Zx0R6A2mGpi8BRkyMaBi3UD73zitK+mg0AQ8KblZIzWvWDI6lL7y FSNCh3Aq17awqU/4rBLmRoQHbJlmwVMohltWabin9NvhHkLs2iVWo/jAa/amQHuQVrEGBE wUmcCQ/BK43UUckqEXRNb9J241F+6R7qaTqZDbdOC/3F2cvWEfewQp2W9CVWAw== Date: Tue, 21 Nov 2023 16:09:01 +0100 (CET) From: Nils Landt Message-ID: <1041149717.395497.1700579341071@office.mailbox.org> In-Reply-To: <87jzqcoz3a.fsf@gnu.org> References: <509099431.327298.1692786160360@office.mailbox.org> <87jzqcoz3a.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: BFBC225ECD X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -5.11 X-Spam-Score: -5.11 X-TUID: PP9oqoz02QvZ > Ludovic Court=C3=A8s hat am 20.11.2023 23:10 CET geschrieb= en: > nils@landt.email skribis: >=20 > > when using the home-mcron-service, PATH is set to /run/current-system/p= rofile/bin . This directory is empty when using guix home on a foreign dist= ro, meaning all executable paths would need to be absolute. This includes s= tuff like /usr/bin/ssh, /usr/bin/nice etc.. > > =20 > > My guess for the culprit was 1c30d5a6bfc5d48137f4bdcc271189a06fdc6ed3 ,= which replaced the custom home-mcron-service-type with mapping it to mcron= -service-type.=20 > > The mcron shepherd service in old service type did not mess with the en= vironment 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))) >=20 > 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 do the same, but occasionally a program I call expects something to be av= ailable in PATH. For me (guix home in Debian 12), this includes Guix itself= . Running=20 /home/nl/.config/guix/current/bin/guix pull=20 in a terminal works perfectly fine, but unset PATH /home/nl/.config/guix/current/bin/guix pull=20 results in a stacktrace that ends in: In guix/scripts/pull.scm: 453:4 4 (_) In guix/build/utils.scm: 625:6 3 (which "guix") In unknown file: 2 (string-tokenize #f # =E2=80=A6) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure string-tokenize: Wrong type argument in position 1 (expecting = string): #f > 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? I think the previous behaviour was fine for a user level service. I'm guess= ing this was inheriting the environment variables from the shepherd process= that started mcron? Otherwise, adding /usr/local/bin:/usr/bin:/bin should be a good default I t= hink. I'm not emotionally invested either way, I have moved away from shepherd / = mcron.