From patchwork Fri Apr 1 00:46:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Langlois X-Patchwork-Id: 38260 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 294B027BBEA; Fri, 1 Apr 2022 01:50:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 985A327BBE9 for ; Fri, 1 Apr 2022 01:50:19 +0100 (BST) Received: from localhost ([::1]:58082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1na5UY-00077t-MS for patchwork@mira.cbaines.net; Thu, 31 Mar 2022 20:50:18 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/docker.scm (containerd)[arguments]: Rewrite as gexps. Pass all flags via make-flags variable. Switch to using search-input-file. --- gnu/packages/docker.scm | 95 +++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 46 deletions(-) -- 2.34.0 diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 7a7594f2b1..d2c022f552 100644 --- 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=" version) - "REVISION=0"))) - `(#:import-path "github.com/containerd/containerd" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-paths - (lambda* (#:key inputs import-path outputs #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (substitute* "runtime/v1/linux/runtime.go" - (("defaultRuntime[ \t]*=.*") - (string-append "defaultRuntime = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("defaultShim[ \t]*=.*") - (string-append "defaultShim = \"" - (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]*=.*") - (string-append "DefaultCommand = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "vendor/github.com/containerd/continuity/testutil\ + (let ((make-flags #~(list (string-append "VERSION=" #$version) + (string-append "DESTDIR=" #$output) + "PREFIX=" + "REVISION=0"))) + (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-keys) + (with-directory-excursion (string-append "src/" import-path) + (substitute* "runtime/v1/linux/runtime.go" + (("defaultRuntime[ \t]*=.*") + (string-append "defaultRuntime = \"" + (search-input-file inputs "/sbin/runc") + "\"\n")) + (("defaultShim[ \t]*=.*") + (string-append "defaultShim = \"" + (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]*=.*") + (string-append "DefaultCommand = \"" + (search-input-file inputs "/sbin/runc") + "\"\n"))) + (substitute* "vendor/github.com/containerd/continuity/testutil\ /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-path) - (apply invoke "make" ',make-flags)))) - (replace 'install - (lambda* (#:key import-path outputs #:allow-other-keys) - (with-directory-excursion (string-append "src/" import-path) - (let* ((out (assoc-ref outputs "out"))) - (apply invoke "make" (string-append "DESTDIR=" out) - "PREFIX=" "install" ',make-flags))))))))) + (("exec\\.Command\\(\"losetup\"") + (string-append "exec.Command(\"" + (search-input-file inputs "/sbin/losetup") + "\""))) + (substitute* "archive/compression/compression.go" + (("exec\\.LookPath\\(\"unpigz\"\\)") + (string-append "\"" + (search-input-file inputs "/bin/unpigz") + "\", error(nil)")))))) + (replace 'build + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (apply invoke "make" #$make-flags)))) + (replace 'install + (lambda* (#:key import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (apply invoke "make" "install" #$make-flags)))))))) (inputs (list btrfs-progs libseccomp pigz runc util-linux)) (native-inputs