From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ALneA05MRmJ90wAAgWs5BA (envelope-from ) for ; Fri, 01 Apr 2022 02:50:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YMFvAE5MRmKgKwEAauVa8A (envelope-from ) for ; Fri, 01 Apr 2022 02:50:22 +0200 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 B8A6121320 for ; Fri, 1 Apr 2022 02:50:21 +0200 (CEST) Received: from localhost ([::1]:58082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1na5Ua-00077t-CI for larch@yhetil.org; Thu, 31 Mar 2022 20:50:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1na5TM-0006Su-RR for guix-patches@gnu.org; Thu, 31 Mar 2022 20:49:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1na5TM-0004Pb-1r for guix-patches@gnu.org; Thu, 31 Mar 2022 20:49:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1na5TM-0003Oc-0G for guix-patches@gnu.org; Thu, 31 Mar 2022 20:49:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#52790] [PATCH v2 4/7] gnu: containerd: Switch to gexp arguments. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Apr 2022 00:49:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52790 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52790@debbugs.gnu.org Cc: Pierre Langlois Received: via spool by 52790-submit@debbugs.gnu.org id=B52790.164877409512948 (code B ref 52790); Fri, 01 Apr 2022 00:49:03 +0000 Received: (at 52790) by debbugs.gnu.org; 1 Apr 2022 00:48:15 +0000 Received: from localhost ([127.0.0.1]:40301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na5SZ-0003Mg-0j for submit@debbugs.gnu.org; Thu, 31 Mar 2022 20:48:15 -0400 Received: from mout.gmx.net ([212.227.17.20]:56229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na5SQ-0003Kf-9W for 52790@debbugs.gnu.org; Thu, 31 Mar 2022 20:48:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648774080; bh=wpuY0jE0Kjgp3uAXlwWTpSxzbEmYcwYp2LaBjQfdYP0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=l4xhw07el7vSIa5puavUIjejxTSg3rf6sU4FoG9jvckzZwIcPbw265+o8LEksOoVG RqTa5o7q3adq5yPB8X790GAs++EpvtYcBnipIqHsLkNGzP1dRukA30HZ8D0LYBbqCy G7B7m68Uy17s/+C2Q4PE2ffer/OHd26UvBgTTEis= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([82.69.64.142]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MrQJ5-1oLIaV1eXX-00oUMK; Fri, 01 Apr 2022 02:48:00 +0200 From: Pierre Langlois Date: Fri, 1 Apr 2022 01:46:39 +0100 Message-Id: <20220401004642.14949-5-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220401004642.14949-1-pierre.langlois@gmx.com> References: <20220401004642.14949-1-pierre.langlois@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:jlYTAVBc9bg+Bb6YKCqodi5HHFXPhWQcf7TCoTVryUXYb/SQUCW VzU6xsmloqbQz1P0i/QmXKvWKSUrt0f9/o/hdWJTsM8LVv6iUDrpGY9ixtZ+RTM1cBaof5G 80njqMIQlXk9Jpbry9ETBEVHHDQdY5T+o7uFHUVN5fJnscoYkpDvtMo4BHZ1Pgs0cJ+rx2h IA8CpaJhl4/v3VCneX8DQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:7MzxoOmavMY=:EO+qVzEIpH/hl0uU0HSA2e T/NIhEhQWK+EFEL1twrfilsM47dSsZTjAhOuMGmc6VOCS8QlJQgQf9Cux3lLr+Zhb7dU+m/cT FhYTUekSiGi3Nd7raKj7U4KUG1YU6ez5U0dzwwG/hg/73Zc6AlysLZQX3NYfHvU6OI83JThOF YmrctpDjhVGCzJCCejnAJKh35dChzfrA09XVMjJbrz1CbVmDq1cCC+9X1DHaM0qyGP7RVRSIn Qj0fDbwsqemmjQwI0jO+IL0buGPhYo7msNjVULasc6YF8x7JkLtWQJZsEHT6qF3io2gtUZXQt Kc5vhleJBPtXJgg184jaEeSkaPl4UOOEFiJE6l3dkleuRYYKe9q6jWG5+hSe7vUDZkYg+Kg9f 2H8Zq1JQJkXobHNZByHfDu0keNAkIWut96XI35R5Kc4LGDbj1oGGGKT4gXPhkknFNgyP109+e dfgXbck8E9fCik2dtcMUACCotlqCeJPT3GWtOTnkPftx1MlZUIoEl45pSHn9jvCjNi94HrlL3 n4UUE0YbhpoD465idJFPwYxwOuDFlfgqM3y9uxeel1bu3OT/a/ji4kx0xiETGcED75TybRkzv I5sr41jg1F78PhmOaJwyFRGqfXm2JPCbQbTSpvetDXd/VD3x2e1v8sXfng6gv/FpZr2pNO6Zt Lz5H6YXprYb1IyC0tDr4xiy783tJX8j5bBnZolWEThcotEsqEkhHV4ZlA4R2Rg7UIanAh8E6q B2pFcXVC0nXzYyaeudJ92VeJQ4GRzu1S2Mp5hN5fIhMqtHNJLUUASbEXQc7RkmkPj/9yWi/bo 43K6SCFSOkK9LnoekfxIlsto3esMLT7/d2a2A4safRAgUZ50PDAHyukXzpt7+41hOnC7V2hlF C+lkGGw52b077pdoQqGFCEhJwvZzXoMySpcYnty1QWRF2bS7lDVNJAFt0nrRe7xjd/nGzZpmh 5RmxI+7pfET0lGQXssAbNzwlYlPLksubdUG0q4l3Y3m8SIpS9PYsTuRcWz4vTOLdRuyHjfrpl W9IrtY2QQjMbP57azfEYEfXjPm0tKk1DILR8+ZeGK4gjdwbu56BQsHdQjpp1bRKcR/jr8aO9U 8RFayiMtAV49Yo= 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648774221; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=fmzRzLgQyOOScto1RGV0KmqSoewiRBPswi9PPIlRcts=; b=le0ovb3whnt+ZUqQmwdx7tj73vWKhSbCgS+9sHWZPAaC6BSECYEPWufJiG+H/6xQrWseZZ Idz+psdaJMwGscm/Ox6smBL/KVddmdlAnz9u+/534aRBYICljz85RqmmPSALvIQY/s8VOh uQJf62YMoenG3ClhYqKYX/0I9sFUFQmpsOp75kRLokDlARo8NFAtOjCjrBfqi3NTT031CT Dh6qTr3HoQ9awE5/tRRt5iHEbVJ264KhSH5B9cR13CF12zpdyik0mIgDoogD5GUhaFgyXq u88z43T6h+m2EUssPiXbhFvqRUPSIWCXiP2hg0sMFMdTx3DqAmiEBfIGlZZxEw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648774221; a=rsa-sha256; cv=none; b=BPYuE/FQFXlNTwz9R5lhIJA0xxRdPMh7lMomUsx1QzlJAtR4RCCtbndSiFA8K9A+xU3HLa Mv24kPP+cG2PQrtdtlIDP011aF+gx+KZ4Kym35GXsNX/+WcotJ3zI9IxZC3q5kDxBHy7w5 /kn05MQxuVsb/RpNu4fYQnuJ6N1LF3VBVYHWll3iRhOOcupO9NxEzCFZtzcchAF/fAPuay K7tGvPuyD5V5WCaknjrM69uxcsEyqKNrzZ+NZODF2hzqVvlN18mSvmsFIDoEbCUJzFp+yH juoIiuRRzn3uqWkC5aztouSB0ZMdt+wR9RYNEwwbTkOs1NLmI+Oq0ZP6yeKh6w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=l4xhw07e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); 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" X-Migadu-Spam-Score: 6.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=l4xhw07e; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); 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" X-Migadu-Queue-Id: B8A6121320 X-Spam-Score: 6.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: JJtUNriyWZf+ * gnu/packages/docker.scm (containerd)[arguments]: Rewrite as gexps. Pass all flags via make-flags variable. Switch to using search-input-file. =2D-- gnu/packages/docker.scm | 95 +++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 46 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 7a7594f2b1..d2c022f552 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -29,6 +29,7 @@ (define-module (gnu packages docker) #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) @@ -186,53 +187,55 @@ (define-public containerd (base32 "0fw62aya0gwxaa2kkcjkbifp8n0xmk1x0qzjahlsls6g0pmh5pkq")))= ) (build-system go-build-system) (arguments - (let ((make-flags (list (string-append "VERSION=3D" version) - "REVISION=3D0"))) - `(#:import-path "github.com/containerd/containerd" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-paths - (lambda* (#:key inputs import-path outputs #:allow-other-key= s) - (with-directory-excursion (string-append "src/" import-pat= h) - (substitute* "runtime/v1/linux/runtime.go" - (("defaultRuntime[ \t]*=3D.*") - (string-append "defaultRuntime =3D \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("defaultShim[ \t]*=3D.*") - (string-append "defaultShim =3D \"" - (assoc-ref outputs "out") - "/bin/containerd-shim\"\n"))) - (substitute* "pkg/cri/config/config_unix.go" - (("DefaultRuntimeName: \"runc\"") - (string-append "DefaultRuntimeName: \"" - (assoc-ref inputs "runc") - "/sbin/runc\""))) - (substitute* "vendor/github.com/containerd/go-runc/runc.= go" - (("DefaultCommand[ \t]*=3D.*") - (string-append "DefaultCommand =3D \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "vendor/github.com/containerd/continuity/te= stutil\ + (let ((make-flags #~(list (string-append "VERSION=3D" #$version) + (string-append "DESTDIR=3D" #$output) + "PREFIX=3D" + "REVISION=3D0"))) + (list + #:import-path "github.com/containerd/containerd" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs import-path outputs #:allow-other-ke= ys) + (with-directory-excursion (string-append "src/" import-pa= th) + (substitute* "runtime/v1/linux/runtime.go" + (("defaultRuntime[ \t]*=3D.*") + (string-append "defaultRuntime =3D \"" + (search-input-file inputs "/sbin/runc= ") + "\"\n")) + (("defaultShim[ \t]*=3D.*") + (string-append "defaultShim =3D \"" + (assoc-ref outputs "out") + "/bin/containerd-shim\"\n"))) + (substitute* "pkg/cri/config/config_unix.go" + (("DefaultRuntimeName: \"runc\"") + (string-append "DefaultRuntimeName: \"" + (search-input-file inputs "/sbin/runc= ") + "\""))) + (substitute* "vendor/github.com/containerd/go-runc/runc= .go" + (("DefaultCommand[ \t]*=3D.*") + (string-append "DefaultCommand =3D \"" + (search-input-file inputs "/sbin/runc= ") + "\"\n"))) + (substitute* "vendor/github.com/containerd/continuity/t= estutil\ /loopback/loopback_linux.go" - (("exec\\.Command\\(\"losetup\"") - (string-append "exec.Command(\"" - (assoc-ref inputs "util-linux") - "/sbin/losetup\""))) - (substitute* "archive/compression/compression.go" - (("exec\\.LookPath\\(\"unpigz\"\\)") - (string-append "\"" (assoc-ref inputs "pigz") - "/bin/unpigz\", error(nil)")))))) - (replace 'build - (lambda* (#:key import-path #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-pat= h) - (apply invoke "make" ',make-flags)))) - (replace 'install - (lambda* (#:key import-path outputs #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-pat= h) - (let* ((out (assoc-ref outputs "out"))) - (apply invoke "make" (string-append "DESTDIR=3D" out) - "PREFIX=3D" "install" ',make-flags))))))))) + (("exec\\.Command\\(\"losetup\"") + (string-append "exec.Command(\"" + (search-input-file inputs "/sbin/lose= tup") + "\""))) + (substitute* "archive/compression/compression.go" + (("exec\\.LookPath\\(\"unpigz\"\\)") + (string-append "\"" + (search-input-file inputs "/bin/unpig= z") + "\", error(nil)")))))) + (replace 'build + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-pa= th) + (apply invoke "make" #$make-flags)))) + (replace 'install + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-pa= th) + (apply invoke "make" "install" #$make-flags)))))))) (inputs (list btrfs-progs libseccomp pigz runc util-linux)) (native-inputs =2D- 2.34.0