From patchwork Tue Jul 2 08:37:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 14453 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B384717180; Tue, 2 Jul 2019 09:38:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 7C7A21715A for ; Tue, 2 Jul 2019 09:38:10 +0100 (BST) Received: from localhost ([::1]:50670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiEIk-0006eM-5a for patchwork@mira.cbaines.net; Tue, 02 Jul 2019 04:38:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55809) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiEId-0006az-FD for guix-patches@gnu.org; Tue, 02 Jul 2019 04:38:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiEIc-0003Cl-Id for guix-patches@gnu.org; Tue, 02 Jul 2019 04:38:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hiEIc-0003CY-E1 for guix-patches@gnu.org; Tue, 02 Jul 2019 04:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hiEIc-0004CN-An for guix-patches@gnu.org; Tue, 02 Jul 2019 04:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36469] [PATCH 0/2] 'guix pack' records environment variables Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Jul 2019 08:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36469 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36469@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156205666816118 (code B ref -1); Tue, 02 Jul 2019 08:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jul 2019 08:37:48 +0000 Received: from localhost ([127.0.0.1]:46538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiEIO-0004Bt-74 for submit@debbugs.gnu.org; Tue, 02 Jul 2019 04:37:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:37569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiEIL-0004Bl-GL for submit@debbugs.gnu.org; Tue, 02 Jul 2019 04:37:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55711) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiEIJ-0006DL-Ip for guix-patches@gnu.org; Tue, 02 Jul 2019 04:37:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hiEII-00035j-BT; Tue, 02 Jul 2019 04:37:42 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=50374 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hiEIH-00059o-Sc; Tue, 02 Jul 2019 04:37:42 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 2 Jul 2019 10:37:31 +0200 Message-Id: <20190702083731.10354-1-ludo@gnu.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello Guix! With these patches, images created by ‘guix pack -f docker’ or ‘guix pack -f singularity’ define the right environment variables for the profile. For instance, if you do: guix pack -f docker guile guile-json --entry-point=bin/guile Then: docker run THE-IMAGE will spawn Guile in an environment with $GUILE_LOAD_PATH pointing to the profile, such that the (json) module is automatically found. The change for Singularity is similar. I’ve tested it with an instance of Singularity 3.2.0. Unfortunately, we still have 2.x in Guix and that doesn’t quite support the environment file, so I’ve chosen to punt on this one. Thoughts? Ludo’. Ludovic Courtès (2): pack: 'docker' backend records the profile's search paths. pack: 'squashfs' backend records the profile's search paths. gnu/tests/docker.scm | 16 ++++++---- gnu/tests/singularity.scm | 18 ++++++++++- guix/docker.scm | 17 ++++++++--- guix/scripts/pack.scm | 64 ++++++++++++++++++++++++++++++++++++--- 4 files changed, 99 insertions(+), 16 deletions(-)