From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 15 05:43:24 2019 Received: (at submit) by debbugs.gnu.org; 15 Feb 2019 10:43:24 +0000 Received: from localhost ([127.0.0.1]:48612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guaxo-0008Br-8c for submit@debbugs.gnu.org; Fri, 15 Feb 2019 05:43:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guaxm-0008Bf-Ma for submit@debbugs.gnu.org; Fri, 15 Feb 2019 05:43:22 -0500 Received: from lists.gnu.org ([209.51.188.17]:58541) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guaxe-0005F5-Rp for submit@debbugs.gnu.org; Fri, 15 Feb 2019 05:43:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guaxe-0005Nw-3O for guix-patches@gnu.org; Fri, 15 Feb 2019 05:43:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guaxd-0005AU-GW for guix-patches@gnu.org; Fri, 15 Feb 2019 05:43:14 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:50364) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guaxb-0004pv-EM; Fri, 15 Feb 2019 05:43:11 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 82AF7F61A; Fri, 15 Feb 2019 11:43:06 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FubWdbvj3IU8; Fri, 15 Feb 2019 11:43:03 +0100 (CET) Received: from gnu.org (unknown [147.99.110.178]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 829E81B31; Fri, 15 Feb 2019 11:43:03 +0100 (CET) From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH 0/1] Add '--inherit' to 'guix environment' Date: Fri, 15 Feb 2019 11:42:57 +0100 Message-Id: <20190215104257.16275-1-ludo@gnu.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a0c:e300::1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, This new option allows to specify additional variables to be inherited in a =E2=80=9Cpure=E2=80=9D (semi-pure?) environment. The main motivation was the use of the SLURM batch scheduler, which defines environment variables that you need to preserve so that things like =E2=80=98mpirun=E2=80=99 work correctly. Thoughts? Ludo=E2=80=99. Ludovic Court=C3=A8s (1): environment: Add '--inherit'. doc/guix.texi | 21 ++++++++++++-- guix/scripts/environment.scm | 53 +++++++++++++++++++++++++----------- tests/guix-environment.sh | 15 +++++++++- 3 files changed, 69 insertions(+), 20 deletions(-) --=20 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 15 05:49:41 2019 Received: (at 34486) by debbugs.gnu.org; 15 Feb 2019 10:49:41 +0000 Received: from localhost ([127.0.0.1]:48618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gub3t-0008LR-1z for submit@debbugs.gnu.org; Fri, 15 Feb 2019 05:49:41 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:39650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gub3p-0008LH-30 for 34486@debbugs.gnu.org; Fri, 15 Feb 2019 05:49:38 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 6608AFFD3; Fri, 15 Feb 2019 11:49:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kdmAbMDyecer; Fri, 15 Feb 2019 11:49:33 +0100 (CET) Received: from gnu.org (unknown [147.99.110.178]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A9AB7FFCF; Fri, 15 Feb 2019 11:49:33 +0100 (CET) From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 34486@debbugs.gnu.org Subject: [PATCH 1/1] environment: Add '--inherit'. Date: Fri, 15 Feb 2019 11:49:28 +0100 Message-Id: <20190215104928.16509-1-ludo@gnu.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34486 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) From: Ludovic Courtès * guix/scripts/environment.scm (purify-environment): Add 'white-list' parameter and honor it. (create-environment): Add #:white-list parameter and honor it. (launch-environment): Likewise. (launch-environment/fork): Likewise. (show-help, %options): Add '--inherit'. (guix-environment): Define 'white-list' and pass it to 'launch-environment/fork'. * tests/guix-environment.sh: Test '--inherit'. * doc/guix.texi (Invoking guix environment): Document it. --- doc/guix.texi | 21 ++++++++++++-- guix/scripts/environment.scm | 53 +++++++++++++++++++++++++----------- tests/guix-environment.sh | 15 +++++++++- 3 files changed, 69 insertions(+), 20 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1ac077d98a..68d39ed02f 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4454,9 +4454,24 @@ default behavior. Packages appearing after are interpreted as packages that will be added to the environment directly. @item --pure -Unset existing environment variables when building the new environment. -This has the effect of creating an environment in which search paths -only contain package inputs. +Unset existing environment variables when building the new environment, except +those specified with @option{--inherit} (see below.) This has the effect of +creating an environment in which search paths only contain package inputs. + +@item --inherit=@var{regexp} +When used alongside @option{--pure}, inherit all the environment variables +matching @var{regexp}---in other words, put them on a ``white list'' of +environment variables that must be preserved. + +@example +guix environment --pure --inherit=^SLURM --ad-hoc openmpi @dots{} \ + -- mpirun @dots{} +@end example + +This example runs @command{mpirun} in a context where the only environment +variables defined are @code{PATH}, environment variables whose name starts +with @code{SLURM}, as well as the usual ``precious'' variables (@code{HOME}, +@code{USER}, etc.) @item --search-paths Display the environment variable definitions that make up the diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 3143ea9281..3966531efa 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -57,20 +57,27 @@ (define %default-shell (or (getenv "SHELL") "/bin/sh")) -(define (purify-environment) - "Unset almost all environment variables. A small number of variables such -as 'HOME' and 'USER' are left untouched." +(define (purify-environment white-list) + "Unset all environment variables except those that match the regexps in +WHITE-LIST and those listed in %PRECIOUS-VARIABLES. A small number of +variables such as 'HOME' and 'USER' are left untouched." (for-each unsetenv - (remove (cut member <> %precious-variables) + (remove (lambda (variable) + (or (member variable %precious-variables) + (find (cut regexp-exec <> variable) + white-list))) (match (get-environment-variables) (((names . _) ...) names))))) -(define* (create-environment profile manifest #:key pure?) - "Set the environment variables specified by MANIFEST for PROFILE. When PURE? -is #t, unset the variables in the current environment. Otherwise, augment -existing environment variables with additional search paths." - (when pure? (purify-environment)) +(define* (create-environment profile manifest + #:key pure? (white-list '())) + "Set the environment variables specified by MANIFEST for PROFILE. When +PURE? is #t, unset the variables in the current environment except those that +match the regexps in WHITE-LIST. Otherwise, augment existing environment +variables with additional search paths." + (when pure? + (purify-environment white-list)) (for-each (match-lambda ((($ variable _ separator) . value) (let ((current (getenv variable))) @@ -133,6 +140,8 @@ COMMAND or an interactive shell in that environment.\n")) of only their inputs")) (display (G_ " --pure unset existing environment variables")) + (display (G_ " + --inherit=REGEXP inherit environment variables that match REGEXP")) (display (G_ " --search-paths display needed environment variable definitions")) (display (G_ " @@ -206,6 +215,11 @@ COMMAND or an interactive shell in that environment.\n")) (option '("pure") #f #f (lambda (opt name arg result) (alist-cons 'pure #t result))) + (option '("inherit") #t #f + (lambda (opt name arg result) + (alist-cons 'inherit-regexp + (make-regexp* arg) + result))) (option '(#\E "exec") #t #f ; deprecated (lambda (opt name arg result) (alist-cons 'exec (list %default-shell "-c" arg) result))) @@ -397,25 +411,30 @@ and suitable for 'exit'." (define primitive-exit/status (compose primitive-exit status->exit-code)) (define* (launch-environment command profile manifest - #:key pure?) + #:key pure? (white-list '())) "Run COMMAND in a new environment containing INPUTS, using the native search paths defined by the list PATHS. When PURE?, pre-existing environment -variables are cleared before setting the new ones." +variables are cleared before setting the new ones, except those matching the +regexps in WHITE-LIST." ;; Properly handle SIGINT, so pressing C-c in an interactive terminal ;; application works. (sigaction SIGINT SIG_DFL) - (create-environment profile manifest #:pure? pure?) + (create-environment profile manifest + #:pure? pure? #:white-list white-list) (match command ((program . args) (apply execlp program program args)))) -(define* (launch-environment/fork command profile manifest #:key pure?) +(define* (launch-environment/fork command profile manifest + #:key pure? (white-list '())) "Run COMMAND in a new process with an environment containing PROFILE, with the search paths specified by MANIFEST. When PURE?, pre-existing environment -variables are cleared before setting the new ones." +variables are cleared before setting the new ones, except those matching the +regexps in WHITE-LIST." (match (primitive-fork) (0 (launch-environment command profile manifest - #:pure? pure?)) + #:pure? pure? + #:white-list white-list)) (pid (match (waitpid pid) ((_ . status) status))))) @@ -672,7 +691,8 @@ message if any test fails." ;; within the container. '("/bin/sh") (list %default-shell)))) - (mappings (pick-all opts 'file-system-mapping))) + (mappings (pick-all opts 'file-system-mapping)) + (white-list (pick-all opts 'inherit-regexp))) (when container? (assert-container-features)) @@ -741,4 +761,5 @@ message if any test fails." (return (exit/status (launch-environment/fork command profile manifest + #:white-list white-list #:pure? pure?)))))))))))))) diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh index 30b21028aa..ccbe027c7b 100644 --- a/tests/guix-environment.sh +++ b/tests/guix-environment.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès +# Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès # # This file is part of GNU Guix. # @@ -49,6 +49,19 @@ test -x `sed -r 's/^export PATH="(.*)"/\1/' "$tmpdir/a"`/guile cmp "$tmpdir/a" "$tmpdir/b" +# Check '--inherit'. +GUIX_TEST_ABC=1 +GUIX_TEST_DEF=2 +GUIX_TEST_XYZ=3 +export GUIX_TEST_ABC GUIX_TEST_DEF GUIX_TEST_XYZ +guix environment --bootstrap --ad-hoc guile-bootstrap --pure \ + --inherit='^GUIX_TEST_A' --inherit='^GUIX_TEST_D' \ + -- "$SHELL" -c set > "$tmpdir/a" +grep '^PATH=' "$tmpdir/a" +grep '^GUIX_TEST_ABC=' "$tmpdir/a" +grep '^GUIX_TEST_DEF=' "$tmpdir/a" +if grep '^GUIX_TEST_XYZ=' "$tmpdir/a"; then false; else true; fi + # Make sure the exit value is preserved. if guix environment --bootstrap --ad-hoc guile-bootstrap --pure \ -- guile -c '(exit 42)' -- 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 15 09:34:37 2019 Received: (at 34486) by debbugs.gnu.org; 15 Feb 2019 14:34:37 +0000 Received: from localhost ([127.0.0.1]:48698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gueZY-0007yU-P3 for submit@debbugs.gnu.org; Fri, 15 Feb 2019 09:34:36 -0500 Received: from mail-wr1-f54.google.com ([209.85.221.54]:38794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gueZV-0007yG-JA for 34486@debbugs.gnu.org; Fri, 15 Feb 2019 09:34:34 -0500 Received: by mail-wr1-f54.google.com with SMTP id v13so10567608wrw.5 for <34486@debbugs.gnu.org>; Fri, 15 Feb 2019 06:34:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hLTSqA94hz2Le3euc5NiJHvKgkMdkHeT77H2IwtY4zI=; b=tfnoi6tMeA9FpL7hJ8+zmVXa2sz+fzeGPRumGQTXBND1pINCUDFF+0wsAzd949ioF3 XOVeOv9jwCnutXf0Yv9GijlfaXabxejodPqzeb6NnGz6uv0uJERqofGEmI7ywUJ1jDls SOmZMywx+xXH0yRSG5afET5wtDBtsw1/p8l7mvoUzxBYhrhjeGSOcQquedDJX8z6QrNE +oIeMnvztO1vkHfFOJWtZm5FbAI2PMiCKWSacA6PibcywQ/ix8RA7/2cHh6pJw2RtvZl f7+0F/GfSNRGkCwAdcG4BLPAaXrLXqWW03ExtzRmQGJo7WkM///n3rfBuySlLTiPCHdp uniA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hLTSqA94hz2Le3euc5NiJHvKgkMdkHeT77H2IwtY4zI=; b=Ugyi82cZqqoK4yILQ0PYvp8RyvPf5wt3tBFRX0FN13vIY4sPdMutt+tG4Q1eVE7+h9 3NEi2IpOB55Zwq/ms97gAk40B0ZAZB2u7rPaBkleWX1V6BlYgvS6YX6BOorgVIiYqcyI ITbqq2wUIKZEqmRMCRQFXWrRIQ/3qxNs+WZ1PpXPz5DSnOrFkKvehcYPejQzWAem2OF9 hvaikHnadGzMe+l9ajS/hBr9HI2M0soOJLQUiqfkEzFwaCsmrpg+otNp0whzTo3Vcqhx F0hiwq5kNF3bOAsaGTdO7FSukj8rXhIghrCuLsB8kFUImRZYzVIJ6NY6q95RaLMSyllf JH9g== X-Gm-Message-State: AHQUAuYhqErWUUCAHUKahmcRTby9JelMz4qs3oVE1yE2bMFvum2zsQnb gm1xNoubXuCdO7tJP+m1quUNLtKFnINnl4UlowTIxw== X-Google-Smtp-Source: AHgI3IZzJqJARtW+eKrvUr+fnFuv4LVUKz2mS9YItzdJH/2SbgwbSo9dZgGzxjBauVqT8Q2vZzBu7IIZogA6OAVDfmc= X-Received: by 2002:adf:b784:: with SMTP id s4mr6967940wre.155.1550241267591; Fri, 15 Feb 2019 06:34:27 -0800 (PST) MIME-Version: 1.0 References: <20190215104257.16275-1-ludo@gnu.org> <20190215104928.16509-1-ludo@gnu.org> In-Reply-To: <20190215104928.16509-1-ludo@gnu.org> From: "Thompson, David" Date: Fri, 15 Feb 2019 09:34:16 -0500 Message-ID: Subject: Re: [bug#34486] [PATCH 1/1] environment: Add '--inherit'. To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org, =?UTF-8?Q?Ludovic_Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, On Fri, Feb 15, 2019 at 6:07 AM Ludovic Court=C3=A8s wrote: > > From: Ludovic Court=C3=A8s > > * guix/scripts/environment.scm (purify-environment): Add 'white-list' > parameter and honor it. > (create-environment): Add #:white-list parameter and honor it. > (launch-environment): Likewise. > (launch-environment/fork): Likewise. > (show-help, %options): Add '--inherit'. > (guix-environment): Define 'white-list' and pass it to > 'launch-environment/fork'. > * tests/guix-environment.sh: Test '--inherit'. > * doc/guix.texi (Invoking guix environment): Document it. Seems like a good addition to me! - Dave From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 15 09:55:01 2019 Received: (at 34486) by debbugs.gnu.org; 15 Feb 2019 14:55:01 +0000 Received: from localhost ([127.0.0.1]:48725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guetI-00007b-Se for submit@debbugs.gnu.org; Fri, 15 Feb 2019 09:55:01 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21051) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guetG-00007Q-Qt for 34486@debbugs.gnu.org; Fri, 15 Feb 2019 09:54:59 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1550242478; cv=none; d=zoho.com; s=zohoarc; b=CkVI7E6pEq73rEMncJXJLX9GkvV0SB05rT8mPiGeApeLafSBBgXuz3XydwjX7in1nHn7Z5ewH9osc5cNP7Iv8L+uF+5Q8DeeX1gaBXERnWSihuyUog0HvhVKSGSeEEtDty6SfvbR909bEMpIQr4/5WPMMGIm3wDYGKk4OMLNf1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1550242478; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=gmJqFKOAbXJBGZ51vkYq5gta4hgQHrra3OhWqutAp/o=; b=nC2VL6HYekb18C16Tu0WTb9HJJZ504LVzBYSOK89a9zuLAQEpN0O5YOorCbJoyn4jSUc/bUnYdEJ5ytt4MEw+0n6wn5U3Gk4vyNMHt1PPtHDNTK/AtRJzgow+2w97mcRv4jwppVrxK10eC9mNRvvomImVJEobNxzpznG7ejGZno= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1550242478; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1014; bh=gmJqFKOAbXJBGZ51vkYq5gta4hgQHrra3OhWqutAp/o=; b=QbcDrEzz8bv59jZVqntevIY7fZua31Ua0pwKGcxfrxqZUy8r09L/5W+Bqt0irYxd r/BcNRM9oISFzFXVnS+EoiMkvOptbOi09SgTKHROorZ3/hj1dpY+4B3msKKkBKQtxaY rE4nVeKP6nJxp9Ivlnm48s4cm/cKuLsgGymAYTSU= Received: from localhost (141.80.238.36 [141.80.238.36]) by mx.zohomail.com with SMTPS id 1550242476140369.51977886377824; Fri, 15 Feb 2019 06:54:36 -0800 (PST) References: <20190215104257.16275-1-ludo@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' In-reply-to: <20190215104257.16275-1-ludo@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Fri, 15 Feb 2019 15:54:33 +0100 Message-ID: <87va1lrtjq.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Ludovic Court=C3=A8s writes: > This new option allows to specify additional variables to be inherited > in a =E2=80=9Cpure=E2=80=9D (semi-pure?) environment. > > The main motivation was the use of the SLURM batch scheduler, which > defines environment variables that you need to preserve so that things > like =E2=80=98mpirun=E2=80=99 work correctly. Looks good to me. The same is needed for Grid Engine. Previously I would use =E2=80=9Cenv=E2=80=9D with an installed profile for the same effe= ct: --8<---------------cut here---------------start------------->8--- #!/bin/bash profile=3D/path/to/.guix-profile exec /bin/env - PATH=3D/opt/uge/bin/lx-amd64 \ SGE_CELL=3Ddefault \ SGE_ARCH=3Dlx-amd64 =E2=80=A6 GUIX_LOCPATH=3D=E2=80=A6 \ /bin/bash --init-file "$profile/etc/profile" --8<---------------cut here---------------end--------------->8--- I guess the only thing that=E2=80=99s missing now is to activate an install= ed environment. -- Ricardo From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 15 19:05:23 2019 Received: (at 34486-done) by debbugs.gnu.org; 16 Feb 2019 00:05:23 +0000 Received: from localhost ([127.0.0.1]:49902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gunTv-0000TH-0T for submit@debbugs.gnu.org; Fri, 15 Feb 2019 19:05:23 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:48654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gunTt-0000T5-Qp for 34486-done@debbugs.gnu.org; Fri, 15 Feb 2019 19:05:22 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id C7AFF10355; Sat, 16 Feb 2019 01:05:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jDw467xjGQ2X; Sat, 16 Feb 2019 01:05:18 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A28C3D4DE; Sat, 16 Feb 2019 01:05:18 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' References: <20190215104257.16275-1-ludo@gnu.org> <87va1lrtjq.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 =?utf-8?Q?Pluvi=C3=B4se?= an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 16 Feb 2019 01:05:17 +0100 In-Reply-To: <87va1lrtjq.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 15 Feb 2019 15:54:33 +0100") Message-ID: <87imxkion6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34486-done Cc: 34486-done@debbugs.gnu.org, "Thompson, David" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> This new option allows to specify additional variables to be inherited >> in a =E2=80=9Cpure=E2=80=9D (semi-pure?) environment. >> >> The main motivation was the use of the SLURM batch scheduler, which >> defines environment variables that you need to preserve so that things >> like =E2=80=98mpirun=E2=80=99 work correctly. > > Looks good to me. The same is needed for Grid Engine. Previously I > would use =E2=80=9Cenv=E2=80=9D with an installed profile for the same ef= fect: > > #!/bin/bash > > profile=3D/path/to/.guix-profile > exec /bin/env - PATH=3D/opt/uge/bin/lx-amd64 \ > SGE_CELL=3Ddefault \ > SGE_ARCH=3Dlx-amd64 =E2=80=A6 > GUIX_LOCPATH=3D=E2=80=A6 \ > /bin/bash --init-file "$profile/etc/profile" Oh so I guess this is an improvement. :-) Pushed as e6e599fa0106f57b9de15f90dcab3795ff1575b6. > I guess the only thing that=E2=80=99s missing now is to activate an insta= lled > environment. Something beyond --search-paths and etc/profile, right? I=E2=80=99m not su= re what it would look like. Thanks for your feedback David & Ricardo! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 16 04:13:24 2019 Received: (at 34486-done) by debbugs.gnu.org; 16 Feb 2019 09:13:24 +0000 Received: from localhost ([127.0.0.1]:49990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guw2F-0005X4-Cj for submit@debbugs.gnu.org; Sat, 16 Feb 2019 04:13:24 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guw2C-0005Ww-Ul for 34486-done@debbugs.gnu.org; Sat, 16 Feb 2019 04:13:21 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1550308340; cv=none; d=zoho.com; s=zohoarc; b=KL0dDSqTgxBLeyxD2upEB+y8s9eqpJ09QsKIH9/DfxlS/6MERduIMwpRERK+b4SzprBUCdM7vqF1x4FKwUp8eLAYpyKcjy3M3S6/+oDgyTPqC9NK3cUKglKpwTzZ+nDEN7A/+FNzqOJrWHi1dF9Or1QCFoOaGg4COyoTjlpBcqQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1550308340; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=vpLApT6VTl5Uv7coCrzswATeuO6dBoVjct0PI3cdCgg=; b=jeh3V5ucGJUcJ+XRvbWo5gr+pfFblOiymJcv3wOw+2nap+Keqm4+52Gr1aVNx9AfPY4o2jZYXXq8ps+vxWTEMS558kAYKY/X7DmzJ/CEwgLPmkp9FruCE00kUP3w+Ot5svWTAJaj0LVDedwyWDCbQ8XmNNA/7U2hfHP9c03Z8qo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1550308340; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1037; bh=vpLApT6VTl5Uv7coCrzswATeuO6dBoVjct0PI3cdCgg=; b=NgoXXarmdOeyM5c+9FHJ/NfGPYiTvd0aC9yE9pU5JfOpiQR+IByPXrM655oddWDA +ueTILfElvQxGQFNiHG1IGdKTHf7GVJiib7lrfJp9sfMEn+SDv+JRF2ZfZs7HjAek3f wz/6lmeNAu8tHrgdB43iuIrblF4clloNRjqfrFZY= Received: from localhost (p3E9E9189.dip0.t-ipconnect.de [62.158.145.137]) by mx.zohomail.com with SMTPS id 1550308337826996.2424658828052; Sat, 16 Feb 2019 01:12:17 -0800 (PST) References: <20190215104257.16275-1-ludo@gnu.org> <87va1lrtjq.fsf@elephly.net> <87imxkion6.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' In-reply-to: <87imxkion6.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sat, 16 Feb 2019 10:12:08 +0100 Message-ID: <87d0nsyu53.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34486-done Cc: 34486-done@debbugs.gnu.org, "Thompson, David" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: >> I guess the only thing that=E2=80=99s missing now is to activate an inst= alled >> environment. > > Something beyond --search-paths and etc/profile, right? I=E2=80=99m not = sure > what it would look like. It doesn=E2=80=99t need to be much. People can =E2=80=9Csave=E2=80=9D envi= ronments with =E2=80=9C--root=E2=80=9D but they have no built-in mechanism to =E2=80=9Clo= ad=E2=80=9D an environment that has been saved like that. Loading can be done with =E2=80=9Cenv /path/to/bash --init-file $profile/etc/profile=E2=80=9D for activating an environment without mixing = its environment variables into the current environment. Merging an environment can be done with =E2=80=9Csource $profile/etc/profile=E2=80=9D.= It would be nice if there was a simpler, unified interface for this. guix environment --load /my/.guix-profile guix environment --pure --load /my/.guix-profile guix environment --container --load /my/.guix-profile etc. -- Ricardo From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 16 11:23:42 2019 Received: (at 34486) by debbugs.gnu.org; 16 Feb 2019 16:23:42 +0000 Received: from localhost ([127.0.0.1]:50479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv2kg-0003d4-0m for submit@debbugs.gnu.org; Sat, 16 Feb 2019 11:23:42 -0500 Received: from mail.onyx.syn-alias.com ([206.152.134.66]:57739 helo=smtp.centurylink.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv2ke-0003co-Cp for 34486@debbugs.gnu.org; Sat, 16 Feb 2019 11:23:40 -0500 DKIM-Signature: v=1; a=rsa-sha1; d=centurylink.net; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@centurylink.net; t=1550334214; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=ztktAW3IUvG39p5a7G1xwkwSypQ=; b=rHF9C7IaT+Utcej/Kdw42WBxOeEVsNvSU0c++FAkxnpkAYbvlwGQzUPF4lpFpYw6 NybeqlFPUkb+DFzPje+uIzZG2fN6k43lsWoENfgMP4VMUhJGsRZNsZO1Zw7WANtP F4JzPgfDy/arDxj8vUu9qmBle4hJXQwW558a4gifT5HDUpuFcORhrlFWdlLWjvM+ CmX8mlCXDD4ZBny5EpUlioysY3L0nXs4LcyOglzS605mdHBH1gQkU0uYkJFAcjBt s/JsHz5dQ3QKQYPVV4py4SN35uWQXZ8P33I6AgVTxHMWf93QcRh8JPc9GJjrkwzs 4vc2DEd7m/9fj6ZO/xgnXw==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.3 cv=INN89TnG c=1 sm=1 tr=0 a=BfVlFhPyd91PDfmi2mD6hA==:117 a=BfVlFhPyd91PDfmi2mD6hA==:17 a=KGjhK52YXX0A:10 a=CFTnQlWoA9kA:10 a=zSv6zi-ZgakA:10 a=mDV3o1hIAAAA:8 a=LcNMAVQVQ6FORN5MghAA:9 a=QEXdDO2ut3YA:10 a=vl549wqV4LhS7hYNpigA:9 a=_FVE-zBwftR9WsbkzFJk:22 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: ZXJpY2JhdmllckBjZW50dXJ5bGluay5uZXQ= Authentication-Results: smtp02.onyx.dfw.sync.lan smtp.user=ericbavier@centurylink.net; auth=pass (LOGIN) Received: from [97.116.106.8] ([97.116.106.8:34514] helo=localhost) by smtp.centurylink.net (envelope-from ) (ecelerity 3.6.25.56547 r(Core:3.6.25.0)) with ESMTPSA (cipher=AES256-GCM-SHA384) id 11/63-15303-609386C5; Sat, 16 Feb 2019 11:23:34 -0500 Date: Sat, 16 Feb 2019 10:23:25 -0600 From: Eric Bavier To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' Message-ID: <20190216102325.3875f22b@centurylink.net> In-Reply-To: <20190215104257.16275-1-ludo@gnu.org> References: <20190215104257.16275-1-ludo@gnu.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/ge64ShxFfotyonQpDbpl82W"; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Sig_/ge64ShxFfotyonQpDbpl82W Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 15 Feb 2019 11:42:57 +0100 Ludovic Court=C3=A8s wrote: > Hello, >=20 > This new option allows to specify additional variables to be inherited > in a =E2=80=9Cpure=E2=80=9D (semi-pure?) environment. >=20 > The main motivation was the use of the SLURM batch scheduler, which > defines environment variables that you need to preserve so that things > like =E2=80=98mpirun=E2=80=99 work correctly. >=20 > Thoughts? >=20 > Ludo=E2=80=99. >=20 > Ludovic Court=C3=A8s (1): > environment: Add '--inherit'. >=20 > doc/guix.texi | 21 ++++++++++++-- > guix/scripts/environment.scm | 53 +++++++++++++++++++++++++----------- > tests/guix-environment.sh | 15 +++++++++- > 3 files changed, 69 insertions(+), 20 deletions(-) >=20 I wonder if the word "inherit" here might be too easily confused with the idea of package inheritance. Could we possibly use an option name that is familiar? Of-hand I'm thinking of sudo's '-E' and '--preserve-env'. SLURM itself uses '--export'. Both of these tools requires passing a list of individual environment variables, but supporting regexp-matching makes sense to me, especially with the SLURM use-case in mind. Now I'm having second thoughts. Since this will be invoked as 'guix environment --inherit' hopefully the proximity of the word 'environment' will be strong enough to dispell associations with other types of inheritance. Anyhow, sending this anyway just to share the concern. `~Eric --Sig_/ge64ShxFfotyonQpDbpl82W Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEoMXjUi7471xkzbfw/XPKxxnTJWYFAlxoOP0ACgkQ/XPKxxnT JWYmrg//SAqkAqgJPjpEPOVqsVIWitBd7xmpgKZ1gNtWrEkdU+/yWJ1Ua/U+jvxT O30s7V8Vl8ypv8e8Kk64+ewv9TVs4iKgFray/vR2rUj0HmMIGAPPrTpfh5c8eNwV DTfrxXK1E0tOBIm2ed0pWKiIaqL+jfDicp62aZp1myDD06lrRhKMl3TGg31f2RvJ hnp+u5ZU9XW0oFwdO5qOoWvi3ch3sYv3laeVOcSzXhB5S8F05As+ue5AarokiWdP LZJHIqaO52TaEHId4GuSRYelO5P10i5/p6AelzkeBrC2TeK1xKrAWApkCty0r2m0 7I7y4Vknhlx36EYiR2+loDea2X3h3+Bk5hvtYPJhnXBgVtivynUizxC0BJyQVEX2 y2sGmfc6AjQgeRKHvThdxBc0daCbSHabLnPWc3Gbu4XaUpCBS8ln/RQgELpRymtb aqmU9ErKtIg+xfFe39i5qIUyo3sUKjpj7EMuIluEKDxnlzzY/f2wpB/QBMoFkEE0 sYBZfUuO629EDD3KDWKea+Sgr/OoQrB046PmcDGw/Gmq79XX0yqTE+0CRmBzKu7d 1jxl5YWeFjXQpSexOa9tABVWa6D5GVNe9HrEfYBJ3idCchLs3Bsrw/VOhmzUPI38 wT+F7b5chG/Xc7VhoGRCxHCvGfTsFlyBPtBhXSVhRH9V0ePPDko= =GilV -----END PGP SIGNATURE----- --Sig_/ge64ShxFfotyonQpDbpl82W-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 16 17:45:15 2019 Received: (at 34486-done) by debbugs.gnu.org; 16 Feb 2019 22:45:16 +0000 Received: from localhost ([127.0.0.1]:50598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv8hv-0008KH-Jf for submit@debbugs.gnu.org; Sat, 16 Feb 2019 17:45:15 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]:57769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gv8ht-0008K6-Fk for 34486-done@debbugs.gnu.org; Sat, 16 Feb 2019 17:45:14 -0500 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id A795A12B162; Sat, 16 Feb 2019 17:45:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:date:message-id:mime-version:content-type :content-transfer-encoding; s=sasl; bh=JW7FWO7P8FaMJJoY6hYdlqwA1 dM=; b=OYfZO8xAEc3+YP1EFxoXv/TLliFpU3djiXEXn3ulZBQt6a+PBAxgb5bvL yzmC7nyyKdj0unH6GYfyTvoJB89eU+MaFwAVaw1dngViHSupNQPI8MHE2NWujfmN uXYaTDiw9NHY3m3WCGSh4vhrezRnSl6VpRFkkcZImh4I9Hkc/g= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 9FDC512B160; Sat, 16 Feb 2019 17:45:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:date:message-id:mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=HG+/flsgmzdhsDUPRuqDHb65XGrl77RpuUGXDz1n6eY=; b=tMsWe8Pstw7vNi7PIbBwbtu93MHoHBBPmoQeGZNguFphpfX5ZQrz/EXVJp7rlHN7I6rX/BiNnioH8xDYvw/0BsNueK9pfvN3lPpHYRtvmgdwuetppk5MDmjWtwoUnCpHOWmdIaE/pioiuwzfrzz+ivOfO+y9Aq1+r6aK5UPGfuM= Received: from localhost (unknown [76.118.43.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 2868112B15F; Sat, 16 Feb 2019 17:45:12 -0500 (EST) From: Kyle Meyer To: Ricardo Wurmus , Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' In-Reply-To: <87d0nsyu53.fsf@elephly.net> Date: Sat, 16 Feb 2019 17:45:11 -0500 Message-ID: <87imxjwdxk.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 84F8515A-323C-11E9-880D-DF19F34BB12D-24757444!pb-smtp2.pobox.com X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34486-done Cc: 34486-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Ricardo Wurmus writes: > It doesn=E2=80=99t need to be much. People can =E2=80=9Csave=E2=80=9D en= vironments with > =E2=80=9C--root=E2=80=9D but they have no built-in mechanism to =E2=80=9C= load=E2=80=9D an environment > that has been saved like that. > > Loading can be done with =E2=80=9Cenv /path/to/bash --init-file > $profile/etc/profile=E2=80=9D for activating an environment without mixin= g its > environment variables into the current environment. Merging an > environment can be done with =E2=80=9Csource $profile/etc/profile=E2=80= =9D. It would be > nice if there was a simpler, unified interface for this. > > guix environment --load /my/.guix-profile > guix environment --pure --load /my/.guix-profile > guix environment --container --load /my/.guix-profile I'd be very excited to see such an interface, especially the last form. I've been using the 'env ...' approach to work with profiles (say for a particular project or analysis), but it'd be great to have an easy way to point to an existing profile and say "use this profile to run this command in a container". I'm happy to take a stab at implementing --load (though I might know so little that I don't realize that that is over my head at the moment :>). --=20 Kyle From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 18 17:17:03 2019 Received: (at 34486) by debbugs.gnu.org; 18 Feb 2019 22:17:03 +0000 Received: from localhost ([127.0.0.1]:53345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvrDi-0001eB-Tk for submit@debbugs.gnu.org; Mon, 18 Feb 2019 17:17:03 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:36530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvrDg-0001db-Vx for 34486@debbugs.gnu.org; Mon, 18 Feb 2019 17:17:01 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 1508D111D3; Mon, 18 Feb 2019 23:16:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1ZFKOOG8HIKR; Mon, 18 Feb 2019 23:16:58 +0100 (CET) Received: from ribbon (100.red-2-137-89.dynamicip.rima-tde.net [2.137.89.100]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 0A48B1111B; Mon, 18 Feb 2019 23:16:57 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Eric Bavier Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' References: <20190215104257.16275-1-ludo@gnu.org> <20190216102325.3875f22b@centurylink.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 =?utf-8?Q?Pluvi=C3=B4se?= an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 18 Feb 2019 23:16:57 +0100 In-Reply-To: <20190216102325.3875f22b@centurylink.net> (Eric Bavier's message of "Sat, 16 Feb 2019 10:23:25 -0600") Message-ID: <87va1g91ye.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Eric, Eric Bavier skribis: > I wonder if the word "inherit" here might be too easily confused with > the idea of package inheritance. Could we possibly use an option name > that is familiar? Of-hand I'm thinking of sudo's '-E' and > '--preserve-env'. SLURM itself uses '--export'. Both of these tools > requires passing a list of individual environment variables, but > supporting regexp-matching makes sense to me, especially with the SLURM > use-case in mind. That=E2=80=99s a good point, I did wonder too and spent some time thinking = about the choice of words (=E2=80=9Cinherit=E2=80=9D, =E2=80=9Cpreserve=E2=80=9D,= =E2=80=9Ckeep=E2=80=9D, and more elaborate phrases) and in the end settled with =E2=80=9Cinherit=E2=80=9D. > Now I'm having second thoughts. Since this will be invoked as 'guix > environment --inherit' hopefully the proximity of the word > 'environment' will be strong enough to dispell associations with > other types of inheritance. Yeah, hopefully. If it sounds confusing or unclear at first, then perhaps we should change. What do people think? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 19 09:33:54 2019 Received: (at 34486-done) by debbugs.gnu.org; 19 Feb 2019 14:33:54 +0000 Received: from localhost ([127.0.0.1]:54030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw6T3-00075l-Ox for submit@debbugs.gnu.org; Tue, 19 Feb 2019 09:33:53 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gw6T0-00075S-8d for 34486-done@debbugs.gnu.org; Tue, 19 Feb 2019 09:33:52 -0500 Received: by mail-wr1-f65.google.com with SMTP id o17so22249119wrw.3 for <34486-done@debbugs.gnu.org>; Tue, 19 Feb 2019 06:33:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Jl3MqkE6O1bWIPHI99XQFIcO7oKc0IFLK9c8n2/ufQc=; b=lkB4n4uMlAU3ADtj3w3ri+/D/hUOKxGWSDCD3bnLnidd/4EhyA1Z14aIuCX87LspmD MwjjLJtSqQJZGcNQ61InJ7W2y5wtIIpKVy0bpz2ghgtRK4BflJ8QnUulrcx389m3lzbV rzwQeaW3PugsEpngzcA+QeDiabl08uu4irJC1NyWZUdThSGLMiPCXaYEpghtO7vuxhff vANbXtInZhaL1BHi/84bXHr2zizdySHdArAIpllW5xW2sZbsM2JO1pft1IvtpP5kl2mp YH41TP4h5eHDsRZcdS1DRqRcnVYWwcGtOZ2xXC2wv3EngXeVcZ0jYNYCUJOPHLXUaO7O NfsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Jl3MqkE6O1bWIPHI99XQFIcO7oKc0IFLK9c8n2/ufQc=; b=TwJO0EoTPcjrb2ouReThY+8HqLpnzvbn+/xd8uEXEo0qLgJqqhNfTUn/lpP4S9eodb gbbx0q9FUKxT3Nt5lKH++h5u/ljV4IZaoT9MeOl00v7upqrDrw5Ad/TWLoLYlnj705zc VuRbjlIFX8psar4DYP2yTPkyu5TN3AE7te4xY5p0+Ye2tiL6iUFYaVkogAI5ZvGSS+Cm E5BHoL0CxAgyI6Oo5vhxcs4oywiLry2zkmXYsdk75OZOm72MBgDQfM23kHMG83vpVrH3 sJpglm9uXqwwgvBKLexLlRFOpQ0m1M+xR4Yqw4tGdO8ThNgrXmaMuIoVZnleHLWdbdUs Ra9g== X-Gm-Message-State: AHQUAubhBYSu9LoFKeevb/MJws1o8qTG879hLs9tNgMutzSX707uqFov 02hZQiTOmBSXukdWju/uRKTjO7T5MIFsckj5AYL5rNrg X-Google-Smtp-Source: AHgI3IZIi6k0hoiqP/daPnQTLQg/8HF/IT2YrhYtW6OzUjvK58lZo079rxYwPwHzM2xBA/E3vs0Tk05IpoZygiNt8j8= X-Received: by 2002:adf:e90b:: with SMTP id f11mr21420921wrm.36.1550586824199; Tue, 19 Feb 2019 06:33:44 -0800 (PST) MIME-Version: 1.0 References: <20190215104257.16275-1-ludo@gnu.org> <87va1lrtjq.fsf@elephly.net> <87imxkion6.fsf@gnu.org> <87d0nsyu53.fsf@elephly.net> In-Reply-To: <87d0nsyu53.fsf@elephly.net> From: "Thompson, David" Date: Tue, 19 Feb 2019 09:33:31 -0500 Message-ID: Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' To: Ricardo Wurmus Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 34486-done Cc: =?UTF-8?Q?Ludovic_Court=C3=A8s?= , 34486-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat, Feb 16, 2019 at 4:13 AM Ricardo Wurmus wrote: > > > Ludovic Court=C3=A8s writes: > > >> I guess the only thing that=E2=80=99s missing now is to activate an in= stalled > >> environment. > > > > Something beyond --search-paths and etc/profile, right? I=E2=80=99m no= t sure > > what it would look like. > > It doesn=E2=80=99t need to be much. People can =E2=80=9Csave=E2=80=9D en= vironments with > =E2=80=9C--root=E2=80=9D but they have no built-in mechanism to =E2=80=9C= load=E2=80=9D an environment > that has been saved like that. > > Loading can be done with =E2=80=9Cenv /path/to/bash --init-file > $profile/etc/profile=E2=80=9D for activating an environment without mixin= g its > environment variables into the current environment. Merging an > environment can be done with =E2=80=9Csource $profile/etc/profile=E2=80= =9D. It would be > nice if there was a simpler, unified interface for this. > > guix environment --load /my/.guix-profile > guix environment --pure --load /my/.guix-profile > guix environment --container --load /my/.guix-profile I never got around to implementing this, but I think we should use some sane defaults to make 'guix environment' save and load environments without the user having to figure out a bunch of flags. For example, running 'guix environment' with no flags should automatically load up the saved profile in the current directory and instantiate it. I know about --root, but I never actually use it because it's kind of a pain. I'd use persistent environments all the time if it "just worked". - Dave From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 20 13:46:44 2019 Received: (at 34486) by debbugs.gnu.org; 20 Feb 2019 18:46:44 +0000 Received: from localhost ([127.0.0.1]:58444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gwWtH-0000zQ-C7 for submit@debbugs.gnu.org; Wed, 20 Feb 2019 13:46:43 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gwWtD-0000zG-NZ for 34486@debbugs.gnu.org; Wed, 20 Feb 2019 13:46:40 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1550682021; cv=none; d=zoho.com; s=zohoarc; b=UAyCc2iLVoBi47k08jcwLlNoMerhvvV7tu21JTSd+f3DIbnNwM9eAwvoWCzS8vgmJ8KSDAliRR14sebxI+vBN/Q/cPNCcrfPcOQTsjcK4QvcwcqsNI8K4muiJnhB7jbDrYpfwRRu8XFyxF7lGobsqDuWCX8rXVV0ZH/b3tfDuKo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1550682021; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=v4L7xCoe7OiV7VWnZ4I6mAQXgvonXR+5+btExI7OxyU=; b=iyihQU13LdK4/8mZeDoSHV60gUqrAvNfLTIBQhjsczK84bVk7YHJQY64az+4UkcxT7+rDXFaot91ZuKWLa/h0vjx7yd19YIqKEWHJHfMul6Q+EnqP8bhMSV9mAWrx5WmCeaRVjrZpMi3naHLhT1LVeiJ/r39UQA94qWiXvpv/SI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1550682021; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1113; bh=v4L7xCoe7OiV7VWnZ4I6mAQXgvonXR+5+btExI7OxyU=; b=Yup76tTETDevy5y6f9vPdU4K8/YgF8EzQd5LVNphnCimX9+9xaiAN8L+JACTC876 ckk6+o3nevzy+2arbboM+kmJ3YUmqnbuFvFSLV+66RRHEqKvC0k/roR1QBWBedxH6aq MiFnu6dddye8E/FUbhczarbZciDOqaCaAAgu8YcQ= Received: from localhost (141.80.247.231 [141.80.247.231]) by mx.zohomail.com with SMTPS id 155068202017076.40910298957124; Wed, 20 Feb 2019 09:00:20 -0800 (PST) References: <20190215104257.16275-1-ludo@gnu.org> <20190216102325.3875f22b@centurylink.net> User-agent: mu4e 1.0; emacs 26.1 From: Ricardo Wurmus To: Eric Bavier Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' In-reply-to: <20190216102325.3875f22b@centurylink.net> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Wed, 20 Feb 2019 18:00:11 +0100 Message-ID: <87ef82tmxw.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34486 Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= , 34486@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eric Bavier writes: > I wonder if the word "inherit" here might be too easily confused with > the idea of package inheritance. Could we possibly use an option name > that is familiar? Of-hand I'm thinking of sudo's '-E' and > '--preserve-env'. SLURM itself uses '--export'. Both of these tools > requires passing a list of individual environment variables, but > supporting regexp-matching makes sense to me, especially with the SLURM > use-case in mind. I think =E2=80=9Cexport=E2=80=9D is a worse name, especially in combination= with =E2=80=9Cguix environment=E2=80=9D, which sounds like the Guix environment is to be expor= ted. =E2=80=9Cpreserve=E2=80=9D sounds good to me, but it=E2=80=99s also a chara= cter longer than =E2=80=9Cinherit=E2=80=9D ;) I=E2=80=99m not a big fan of =E2=80=9Cinherit=E2=80=9D because to me it see= ms to imply that the existing environment is to be inherited fully, while the actual intent is to keep only the selected variables. =E2=80=9Ckeep=E2=80=9D or =E2=80=9Callow=E2=80=9D sound also good to me. -- Ricardo From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 04 05:10:55 2019 Received: (at 34486) by debbugs.gnu.org; 4 Mar 2019 10:10:56 +0000 Received: from localhost ([127.0.0.1]:58969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0kYh-0002eV-LA for submit@debbugs.gnu.org; Mon, 04 Mar 2019 05:10:55 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:33406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0kYf-0002eM-Kv for 34486@debbugs.gnu.org; Mon, 04 Mar 2019 05:10:54 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id C853E9A8B; Mon, 4 Mar 2019 11:10:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 95kzjWKxwe79; Mon, 4 Mar 2019 11:10:50 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1911F9A88; Mon, 4 Mar 2019 11:10:50 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' References: <20190215104257.16275-1-ludo@gnu.org> <20190216102325.3875f22b@centurylink.net> <87ef82tmxw.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 =?utf-8?Q?Vent=C3=B4se?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 04 Mar 2019 11:10:49 +0100 In-Reply-To: <87ef82tmxw.fsf@elephly.net> (Ricardo Wurmus's message of "Wed, 20 Feb 2019 18:00:11 +0100") Message-ID: <87tvgjt0eu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org, Eric Bavier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi! Ricardo Wurmus skribis: > Eric Bavier writes: >> I wonder if the word "inherit" here might be too easily confused with >> the idea of package inheritance. Could we possibly use an option name >> that is familiar? Of-hand I'm thinking of sudo's '-E' and >> '--preserve-env'. SLURM itself uses '--export'. Both of these tools >> requires passing a list of individual environment variables, but >> supporting regexp-matching makes sense to me, especially with the SLURM >> use-case in mind. > > I think =E2=80=9Cexport=E2=80=9D is a worse name, especially in combinati= on with =E2=80=9Cguix > environment=E2=80=9D, which sounds like the Guix environment is to be exp= orted. > > =E2=80=9Cpreserve=E2=80=9D sounds good to me, but it=E2=80=99s also a cha= racter longer than > =E2=80=9Cinherit=E2=80=9D ;) > > I=E2=80=99m not a big fan of =E2=80=9Cinherit=E2=80=9D because to me it s= eems to imply that the > existing environment is to be inherited fully, while the actual intent > is to keep only the selected variables. > > =E2=80=9Ckeep=E2=80=9D or =E2=80=9Callow=E2=80=9D sound also good to me. So, what about adding =E2=80=98--preserve=E2=80=99 (or =E2=80=98--keep=E2= =80=99? I slightly prefer =E2=80=9Cpreserve=E2=80=9D) and keeping =E2=80=98--inherit=E2=80=99 as a de= precated alias? We could perhaps add =E2=80=98-E=E2=80=99 as well, reclaiming the long-depr= ecated =E2=80=98--exec=E2=80=99, WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 04 06:01:30 2019 Received: (at 34486) by debbugs.gnu.org; 4 Mar 2019 11:01:30 +0000 Received: from localhost ([127.0.0.1]:58998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0lLe-0005tQ-G0 for submit@debbugs.gnu.org; Mon, 04 Mar 2019 06:01:30 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0lLb-0005tH-UZ for 34486@debbugs.gnu.org; Mon, 04 Mar 2019 06:01:28 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1551697268; cv=none; d=zoho.com; s=zohoarc; b=AeTfEP+ANfcH0QnwAXZi9Jz1uwOeo/lmWvstK2M/CuyvnwguUwd44TUegK91/HJ064cd3bmy5DYYjqgpr9eWTIb+osg0ol4UyRvaKONPN4n77z+BQpuTh727WX1MNhEou7T27WS20oTNKXoQR7/s2Is5H525l82kzr03RAYENEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1551697268; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=Y12fKRYlRzSp+T2swIyIFaa580P37t8e7eoOo3eQeK8=; b=jyUlbvDm17vEyG0cyid48Y+/qADB1gy/HensppEIdzab7RGyyTOUer0JXOKmDWtGxZsuw+K4rAPjapV+C8WPdRVeelusBVt5jC3hcP8Q23cZPQ9UwyIa/RmUQ1PRNfWamEVovRkzcAFkoNhvU6q8AwPpi/MrqPsWFkSWWh4J4JE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1551697268; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1776; bh=Y12fKRYlRzSp+T2swIyIFaa580P37t8e7eoOo3eQeK8=; b=UesSw8Uhq3LdHp7lzcbQMn8AAb7/Dp24Q1u4yxH187xSWkCiCcT710s+cK92fCyJ BBPru1eC108p6VO3bmQb+1IkVT7BjWb0XluqhPau3/gahK3xcKXLwgMZsxB/KvV8/A6 1TyTMVE2rEYS9vSrv6r1cQX530WEHAHxAzD75piA= Received: from localhost (p54AD4711.dip0.t-ipconnect.de [84.173.71.17]) by mx.zohomail.com with SMTPS id 1551697267748920.6888068028; Mon, 4 Mar 2019 03:01:07 -0800 (PST) References: <20190215104257.16275-1-ludo@gnu.org> <20190216102325.3875f22b@centurylink.net> <87ef82tmxw.fsf@elephly.net> <87tvgjt0eu.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' In-reply-to: <87tvgjt0eu.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Mon, 04 Mar 2019 12:01:02 +0100 Message-ID: <87d0n6x5sh.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org, Eric Bavier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > Hi! > > Ricardo Wurmus skribis: > >> Eric Bavier writes: >>> I wonder if the word "inherit" here might be too easily confused with >>> the idea of package inheritance. Could we possibly use an option name >>> that is familiar? Of-hand I'm thinking of sudo's '-E' and >>> '--preserve-env'. SLURM itself uses '--export'. Both of these tools >>> requires passing a list of individual environment variables, but >>> supporting regexp-matching makes sense to me, especially with the SLURM >>> use-case in mind. >> >> I think =E2=80=9Cexport=E2=80=9D is a worse name, especially in combinat= ion with =E2=80=9Cguix >> environment=E2=80=9D, which sounds like the Guix environment is to be ex= ported. >> >> =E2=80=9Cpreserve=E2=80=9D sounds good to me, but it=E2=80=99s also a ch= aracter longer than >> =E2=80=9Cinherit=E2=80=9D ;) >> >> I=E2=80=99m not a big fan of =E2=80=9Cinherit=E2=80=9D because to me it = seems to imply that the >> existing environment is to be inherited fully, while the actual intent >> is to keep only the selected variables. >> >> =E2=80=9Ckeep=E2=80=9D or =E2=80=9Callow=E2=80=9D sound also good to me. > > So, what about adding =E2=80=98--preserve=E2=80=99 (or =E2=80=98--keep=E2= =80=99? I slightly prefer > =E2=80=9Cpreserve=E2=80=9D) and keeping =E2=80=98--inherit=E2=80=99 as a = deprecated alias? Sounds good to me, though in my opinion =E2=80=9C--inherit=E2=80=9D hasn=E2= =80=99t been around long enough to warrant deprecation. > We could perhaps add =E2=80=98-E=E2=80=99 as well, reclaiming the long-de= precated > =E2=80=98--exec=E2=80=99, WDYT? --preserve/-E would be equivalent? -- Ricardo From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 04 06:15:04 2019 Received: (at 34486) by debbugs.gnu.org; 4 Mar 2019 11:15:04 +0000 Received: from localhost ([127.0.0.1]:59017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0lYl-0006DJ-U5 for submit@debbugs.gnu.org; Mon, 04 Mar 2019 06:15:04 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:34548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0lYj-0006Cc-7c for 34486@debbugs.gnu.org; Mon, 04 Mar 2019 06:15:02 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D7C1C9AE6; Mon, 4 Mar 2019 12:14:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c4eewydqoTfm; Mon, 4 Mar 2019 12:14:58 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A793D5F4C; Mon, 4 Mar 2019 12:14:58 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' References: <20190215104257.16275-1-ludo@gnu.org> <20190216102325.3875f22b@centurylink.net> <87ef82tmxw.fsf@elephly.net> <87tvgjt0eu.fsf@gnu.org> <87d0n6x5sh.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 =?utf-8?Q?Vent=C3=B4se?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 04 Mar 2019 12:14:58 +0100 In-Reply-To: <87d0n6x5sh.fsf@elephly.net> (Ricardo Wurmus's message of "Mon, 04 Mar 2019 12:01:02 +0100") Message-ID: <87lg1usxfx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org, Eric Bavier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> Hi! >> >> Ricardo Wurmus skribis: >> >>> Eric Bavier writes: >>>> I wonder if the word "inherit" here might be too easily confused with >>>> the idea of package inheritance. Could we possibly use an option name >>>> that is familiar? Of-hand I'm thinking of sudo's '-E' and >>>> '--preserve-env'. SLURM itself uses '--export'. Both of these tools >>>> requires passing a list of individual environment variables, but >>>> supporting regexp-matching makes sense to me, especially with the SLURM >>>> use-case in mind. >>> >>> I think =E2=80=9Cexport=E2=80=9D is a worse name, especially in combina= tion with =E2=80=9Cguix >>> environment=E2=80=9D, which sounds like the Guix environment is to be e= xported. >>> >>> =E2=80=9Cpreserve=E2=80=9D sounds good to me, but it=E2=80=99s also a c= haracter longer than >>> =E2=80=9Cinherit=E2=80=9D ;) >>> >>> I=E2=80=99m not a big fan of =E2=80=9Cinherit=E2=80=9D because to me it= seems to imply that the >>> existing environment is to be inherited fully, while the actual intent >>> is to keep only the selected variables. >>> >>> =E2=80=9Ckeep=E2=80=9D or =E2=80=9Callow=E2=80=9D sound also good to me. >> >> So, what about adding =E2=80=98--preserve=E2=80=99 (or =E2=80=98--keep= =E2=80=99? I slightly prefer >> =E2=80=9Cpreserve=E2=80=9D) and keeping =E2=80=98--inherit=E2=80=99 as a= deprecated alias? > > Sounds good to me, though in my opinion =E2=80=9C--inherit=E2=80=9D hasn= =E2=80=99t been around > long enough to warrant deprecation. Well, it=E2=80=99s safer and doesn=E2=80=99t cost much to deprecate it prop= erly. >> We could perhaps add =E2=80=98-E=E2=80=99 as well, reclaiming the long-d= eprecated >> =E2=80=98--exec=E2=80=99, WDYT? > > --preserve/-E would be equivalent? Yes. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 04 06:20:06 2019 Received: (at 34486) by debbugs.gnu.org; 4 Mar 2019 11:20:06 +0000 Received: from localhost ([127.0.0.1]:59037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0ldd-0006Lq-SD for submit@debbugs.gnu.org; Mon, 04 Mar 2019 06:20:06 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0ldc-0006Lh-96 for 34486@debbugs.gnu.org; Mon, 04 Mar 2019 06:20:04 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1551698377; cv=none; d=zoho.com; s=zohoarc; b=EyLFXD0zOiyzKdpDaLG1VK47cN+DKGZrw0cWsF4mWY66XuW65CSMq0ivBXqHTkxZPhfM/iSBwNVJVnPt8Zb3ZvIdCzwrzvF/SJGY9w7umX1GIpLBPZoGAAb8gQWmzz07DxJLjE/zFhcXpqj11OEhSD5q/UTzmL6/839MX2JD6yc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1551698377; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=WPr2v0jxvY/CFm0mPn0ZqaB9/jZ5tcibiNxwH+iCRqw=; b=QFTILqmHS9j3VKqp7ealjsmzOls4G466S6xTnPQCgJKKRNO894vIloA6wHDAxKaDM04oQtvs9k/6QgfvzusG19BCU4hPb6kdSKTMqxWRRledTm7Gb1br5Fy0/wvlqXDYU2g/Vz0gS4Qv3gzljTauUqjAQzXiVzm92yg5+XenacQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1551698377; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=734; bh=WPr2v0jxvY/CFm0mPn0ZqaB9/jZ5tcibiNxwH+iCRqw=; b=djlBpdPTTL4KeU2rdDOul19nBqyQNeWDFMT3UAxku4BJoOhe/Li0DwVvajK9Eh4Z m3RN5jrEEv3KZPq/vJajbHl7SM6HMOhijEziedVAfp2jwla3Fhys3HZVEbPaQpOrkrb b858eTtU/drNKBWbiP50hTvgkHLuToQfvjpHz06Q= Received: from localhost (p54AD4711.dip0.t-ipconnect.de [84.173.71.17]) by mx.zohomail.com with SMTPS id 1551698376082239.79409266029313; Mon, 4 Mar 2019 03:19:36 -0800 (PST) References: <20190215104257.16275-1-ludo@gnu.org> <20190216102325.3875f22b@centurylink.net> <87ef82tmxw.fsf@elephly.net> <87tvgjt0eu.fsf@gnu.org> <87d0n6x5sh.fsf@elephly.net> <87lg1usxfx.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' In-reply-to: <87lg1usxfx.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Mon, 04 Mar 2019 12:19:32 +0100 Message-ID: <87bm2qx4xn.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org, Eric Bavier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: >>> So, what about adding =E2=80=98--preserve=E2=80=99 (or =E2=80=98--keep= =E2=80=99? I slightly prefer >>> =E2=80=9Cpreserve=E2=80=9D) and keeping =E2=80=98--inherit=E2=80=99 as = a deprecated alias? >> >> Sounds good to me, though in my opinion =E2=80=9C--inherit=E2=80=9D hasn= =E2=80=99t been around >> long enough to warrant deprecation. > > Well, it=E2=80=99s safer and doesn=E2=80=99t cost much to deprecate it pr= operly. True. >>> We could perhaps add =E2=80=98-E=E2=80=99 as well, reclaiming the long-= deprecated >>> =E2=80=98--exec=E2=80=99, WDYT? >> >> --preserve/-E would be equivalent? > > Yes. Neat. Let=E2=80=99s do it! :) --=20 Ricardo From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 04 09:24:41 2019 Received: (at 34486) by debbugs.gnu.org; 4 Mar 2019 14:24:41 +0000 Received: from localhost ([127.0.0.1]:59251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0oWH-0004kA-Fy for submit@debbugs.gnu.org; Mon, 04 Mar 2019 09:24:41 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:37748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h0oWF-0004k1-Pf for 34486@debbugs.gnu.org; Mon, 04 Mar 2019 09:24:40 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 56B329CAB; Mon, 4 Mar 2019 15:24:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bre84S0rD5oK; Mon, 4 Mar 2019 15:24:37 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id EED2B9CA9; Mon, 4 Mar 2019 15:24:36 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: [bug#34486] [PATCH 0/1] Add '--inherit' to 'guix environment' References: <20190215104257.16275-1-ludo@gnu.org> <20190216102325.3875f22b@centurylink.net> <87ef82tmxw.fsf@elephly.net> <87tvgjt0eu.fsf@gnu.org> <87d0n6x5sh.fsf@elephly.net> <87lg1usxfx.fsf@gnu.org> <87bm2qx4xn.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 14 =?utf-8?Q?Vent=C3=B4se?= an 227 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 04 Mar 2019 15:24:36 +0100 In-Reply-To: <87bm2qx4xn.fsf@elephly.net> (Ricardo Wurmus's message of "Mon, 04 Mar 2019 12:19:32 +0100") Message-ID: <87k1hera3f.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34486 Cc: 34486@debbugs.gnu.org, Eric Bavier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >>>> So, what about adding =E2=80=98--preserve=E2=80=99 (or =E2=80=98--keep= =E2=80=99? I slightly prefer >>>> =E2=80=9Cpreserve=E2=80=9D) and keeping =E2=80=98--inherit=E2=80=99 as= a deprecated alias? >>> >>> Sounds good to me, though in my opinion =E2=80=9C--inherit=E2=80=9D has= n=E2=80=99t been around >>> long enough to warrant deprecation. >> >> Well, it=E2=80=99s safer and doesn=E2=80=99t cost much to deprecate it p= roperly. > > True. > >>>> We could perhaps add =E2=80=98-E=E2=80=99 as well, reclaiming the long= -deprecated >>>> =E2=80=98--exec=E2=80=99, WDYT? >>> >>> --preserve/-E would be equivalent? >> >> Yes. > > Neat. Let=E2=80=99s do it! :) Done in dca58219584c1163a9fbf88fccea885eb53bf2af, thanks! Ludo=E2=80=99. From unknown Fri Jun 13 06:11:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 02 Apr 2019 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator