From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KMu/GqqC8GWkLwEAqHPOHw:P1 (envelope-from ) for ; Tue, 12 Mar 2024 17:28:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id KMu/GqqC8GWkLwEAqHPOHw (envelope-from ) for ; Tue, 12 Mar 2024 17:28:26 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=foundation-xyz.20230601.gappssmtp.com header.s=20230601 header.b=bgMbERaF; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=foundation.xyz (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710260906; 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=o4HRGES5gJUbi/tfh0kHUK8n9iv6P+tP0nfD2R+rxtE=; b=oVCnpyfPqT7oxphzGojzQuJLg6/7pmCQlZHElVq2PrniOu3L2MRfz7JLRV8FNfl1ii9GBI mcTexmVgiauRg0klK3XeCqggCU0+5rs8DTqAzbdHp1/8a/0wSvxOAN3GCrn7c3l1mxL62w Mxuv4lRUPivQs9/h2tp/mayQFdhBaLBuwntZLJpivfz7zypay+n8fGTseKpSq1fWOF/3Vr X8Qp3GNQkGFwjI8tAAZACzChkdVzH5FGIlSqJisteTj4VENwMoOOpA3AbmAhGIUfIEA7/4 NXIY/okiteMWTORB9tHJPnthgilBxHs+tfY5tzQXcEdmmV90xtULpSEbFGmDhQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=foundation-xyz.20230601.gappssmtp.com header.s=20230601 header.b=bgMbERaF; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=foundation.xyz (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710260906; a=rsa-sha256; cv=none; b=GtHcazls/nBjNpI7DDkFzJyWA957xNTXsizLvw6Hh8YXr/9hb3bKkk0iNLU7LR6ayGMpYu G5GELPnksSxTP345UKKc1z/JXFuMT2nOWI9SzcIoABkXuR2BDxCN/UMlB1TP2u+rwEoyOk 35xAbJIOzl4n9mv1dJnX+TnzEj0UIAq+R4DvHLhvl0u0kboA0AMOIN1F7D1NkO0xMIX/Tl 945LTVeXwplmEQ43eo9i7Ye6XtCSO716eCQZl/K81bcVRc3e0p8dIcGBvlmoU3u+Iawx83 A7F/gv3V4GqNKehcMZUimAn+h1ECN29a/pxaqOLOx/BgzU9kttMHf526YSUtrA== 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 E1506449E0 for ; Tue, 12 Mar 2024 17:28:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rk4yZ-0002a4-Pz; Tue, 12 Mar 2024 12:27:40 -0400 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 1rk4yR-0002Y8-MQ for guix-patches@gnu.org; Tue, 12 Mar 2024 12:27:32 -0400 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 1rk4yQ-0001qv-VZ for guix-patches@gnu.org; Tue, 12 Mar 2024 12:27:31 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rk4yz-00005a-FS for guix-patches@gnu.org; Tue, 12 Mar 2024 12:28:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69744] [PATCH 2/2] gnu: distrobox: Fix dependency usage. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Mar 2024 16:28:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69744 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69744@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 69744-submit@debbugs.gnu.org id=B69744.171026085332673 (code B ref 69744); Tue, 12 Mar 2024 16:28:05 +0000 Received: (at 69744) by debbugs.gnu.org; 12 Mar 2024 16:27:33 +0000 Received: from localhost ([127.0.0.1]:43487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rk4yQ-0008Um-3A for submit@debbugs.gnu.org; Tue, 12 Mar 2024 12:27:33 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:53278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rk1Eb-00047w-Tv for 69744@debbugs.gnu.org; Tue, 12 Mar 2024 08:27:59 -0400 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-33e1d327595so2338943f8f.2 for <69744@debbugs.gnu.org>; Tue, 12 Mar 2024 05:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundation-xyz.20230601.gappssmtp.com; s=20230601; t=1710246377; x=1710851177; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o4HRGES5gJUbi/tfh0kHUK8n9iv6P+tP0nfD2R+rxtE=; b=bgMbERaFQL6mZjuPhGv+zBeHLa3k5hf/5D5pgV2oXaIYk/PGl/7HTgsLt2SmAQmM0V lEmLq42GiXWsBrmTFM2RBUJHcOzcdrPp2Uum5gr4QkAfqzH94kdDZ5MCY9tsmEp5/ugV N0guQZ3ow+5Tt9Kt0N6jPBjW9Rwf+Px53b31MeUSLiAkDAYIbc21uovLimzM6weRIQyX WiG4yKVEwtCxBoibtw97zz1kWaT8E8MjV7hGjN2CqpAIb/ZInzNRheBqFxdzUI6j6oIB T39XcQne3ImUGpGqTUixfzRDYOQZoiNO5VhfJ8Hx1SbpJKcaN2n3F74CgcC9S1amjSdD RQGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710246377; x=1710851177; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o4HRGES5gJUbi/tfh0kHUK8n9iv6P+tP0nfD2R+rxtE=; b=eVvvUUFwhSAvmhEE7jKz/CHP9rmIDDKRIeyIXa/Q5fu2L9LrYmOWPmsaGEDbhTGXTX mGN/OdSGYvWS5vGnXgFxyqKWzhQAUA1Pb+wegIkxcnib6bw53kVrpd5CKZ8idwbTOMih ImJ3LR3op8YT233j/bheNyZoHxwa01Qk2CUnVWAEOBLHiE9Bgb7OkRKbiKdOfGRHAqJ4 PJGsiPn5hj/4B3HzF0p1aqjbzy8hQCt7ttbSuC9BDkwgGxx2HArhDbyjBVi9zIghUAIA H1YFx9HWJFogsMSKU8fvg0WdEDRk1xVGQSLfQ0xrSg4JAr4qCWyJ6pOa2hBY7OGLJaT7 CDBw== X-Gm-Message-State: AOJu0Yw1QY9y6Hkwr1TonpayU7VqQnfzQhjidkFYMDzLTIskKRamA9NS P+C2KRbPhMujB724ZkkhpojJMxgCrwC+N3rwLOKCoKYTUpU+99aqd0BDFCyGOnk+NtT0jYoSIw1 ds3Q= X-Google-Smtp-Source: AGHT+IExNEwkEmGktejTgqiizY3ujJtXSbQ0kxJxOl5dQaoel0NUD4wMgP7erie7XLG0EoixCGogug== X-Received: by 2002:a05:6000:24f:b0:33e:72be:43ab with SMTP id m15-20020a056000024f00b0033e72be43abmr5032848wrz.24.1710246377635; Tue, 12 Mar 2024 05:26:17 -0700 (PDT) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id q17-20020adffed1000000b0033cf5094fcesm8924692wrs.36.2024.03.12.05.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 05:26:17 -0700 (PDT) From: Jean-Pierre De Jesus DIAZ Date: Tue, 12 Mar 2024 13:26:02 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 12 Mar 2024 12:27:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.19 X-Spam-Score: -4.19 X-Migadu-Queue-Id: E1506449E0 X-Migadu-Scanner: mx13.migadu.com X-TUID: 6Zto9WYNamXL * gnu/packages/containers.scm (distrobox): Use WRAP-SCRIPT to patch the scripts to use system wget and podman. Change-Id: Ida9affcb212f64892e85dfa8bc4dd4d59f832f4f --- gnu/packages/containers.scm | 46 ++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index 21bd7e64bc..d93ca04960 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2023 Zongyuan Li ;;; Copyright © 2023 Ricardo Wurmus ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz> +;;; Copyright © 2024 Foundation Devices, Inc. ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,6 +44,7 @@ (define-module (gnu packages containers) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) + #:use-module (gnu packages guile) #:use-module (gnu packages linux) #:use-module (gnu packages python) #:use-module (gnu packages networking) @@ -160,20 +162,48 @@ (define-public distrobox (base32 "1g14q1sm3026h9n85v1gc3m2v9sgrac2mr9yrkh98qg5yahzmpc3")) (file-name (git-file-name name version)))) (build-system copy-build-system) - (inputs - (list podman wget)) (arguments (list #:phases #~(modify-phases %standard-phases - (add-before 'install 'refer-to-inputs - (lambda* (#:key inputs #:allow-other-keys) - (substitute* (find-files "." "^distrobox[^.]*[^1]$") - (("podman") (search-input-file inputs "/bin/podman")) - (("wget") (search-input-file inputs "/bin/wget")) - (("command -v") "test -x")))) + ;; Use WRAP-SCRIPT to wrap all of the scripts of distrobox, + ;; excluding the host side ones. + (add-after 'install 'wrap-scripts + (lambda _ + (let ((path (search-path-as-list + (list "bin") + (list #$(this-package-input "podman") + #$(this-package-input "wget"))))) + (for-each (lambda (script) + (wrap-script + (string-append #$output "/bin/distrobox-" + script) + `("PATH" ":" prefix ,path))) + '("assemble" + "create" + "enter" + "ephemeral" + "generate-entry" + "list" + "rm" + "stop" + "upgrade"))))) + ;; These scripts are used in the container side and the + ;; /gnu/store path is not shared with the containers. + (add-after 'patch-shebangs 'unpatch-shebangs + (lambda _ + (for-each (lambda (script) + (substitute* + (string-append #$output "/bin/distrobox-" + script) + (("#!.*/bin/sh") "#!/bin/sh\n"))) + '("export" "host-exec" "init")))) (replace 'install (lambda _ (invoke "./install" "--prefix" #$output)))))) + (inputs + (list guile-3.0 ; for wrap-script + podman + wget)) (home-page "https://distrobox.privatedns.org/") (synopsis "Create and start containers highly integrated with the hosts") (description -- 2.41.0