From patchwork Mon May 9 23:35:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Langlois X-Patchwork-Id: 2252 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 9BF7627BBEA; Tue, 10 May 2022 00:36:31 +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 1C34427BBE9 for ; Tue, 10 May 2022 00:36:31 +0100 (BST) Received: from localhost ([::1]:45760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noCvW-0000Ik-7c for patchwork@mira.cbaines.net; Mon, 09 May 2022 19:36:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noCv5-0000EP-5G for guix-patches@gnu.org; Mon, 09 May 2022 19:36:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noCv4-0001Se-Sh for guix-patches@gnu.org; Mon, 09 May 2022 19:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1noCv4-0003yf-Qx for guix-patches@gnu.org; Mon, 09 May 2022 19:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#52790] [PATCH v3 4/7] gnu: containerd: Switch to gexp arguments. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 May 2022 23:36:02 +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.165213934115210 (code B ref 52790); Mon, 09 May 2022 23:36:02 +0000 Received: (at 52790) by debbugs.gnu.org; 9 May 2022 23:35:41 +0000 Received: from localhost ([127.0.0.1]:59743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noCui-0003x9-Np for submit@debbugs.gnu.org; Mon, 09 May 2022 19:35:41 -0400 Received: from mout.gmx.net ([212.227.17.20]:48059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noCua-0003vt-RI for 52790@debbugs.gnu.org; Mon, 09 May 2022 19:35:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1652139327; bh=Dhy2AQoYBE800tmU6GY9PyKj+4POxKBXCi2L+TwZAG4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=N3VqVKuhG9PXsprC3mMZcfwCe9A0Vv1K7ywaLpAkgACNi4Fr848YNAoJf6O0KvZBk 1DVbQJUYVy4TkICSY4H3cZlTI8v2yfSHTgjiL2vIlpY2RRxoEfGOKyDgoam4xsppNm +4pQhDI99A+7M8lWK+uirnz47ZQN5boZMYgeCmZY= 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 1N7zFj-1nsnW947Od-014xfE; Tue, 10 May 2022 01:35:27 +0200 From: Pierre Langlois Date: Tue, 10 May 2022 00:35:16 +0100 Message-Id: <20220509233519.26703-4-pierre.langlois@gmx.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220509233519.26703-1-pierre.langlois@gmx.com> References: <87wneu1dyz.fsf@gmx.com> <20220509233519.26703-1-pierre.langlois@gmx.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:6bNye7AoCoeH+ukW2WeIfM48WSJR0q+jHm1y0YX3lqSq9wqom64 g+HWbytjXh1ANgfmGI2Hs93wqxW+lCrFySvfvN8GJP2oHbZ4ElF7Y0N/bRGnzNB39UkH+Ga yaapXS/wegWxRwzb8wlOppaLPzZYl+zdQjH2Nzi2q2f28OaeuqWK1dFD9u3n+x+lhdMr5yX juvJ63wDR30UqzLD67oGg== X-UI-Out-Filterresults: notjunk:1;V03:K0:6bHX3lZjk1Y=:95rEHjzE5IoAur8vQwICVm SBm+sLZwkhp06jA5TZ8YbXQ/vS6Hz8YbTBIYARx4kUI5z5MMgybtut2WnsOlwQBJbnLuI5qJI dEKJ+E3lP6K3rvCun+/qxRvQBQBgci0j6A3Qpr27pEfyU8AyjeIZEVqyi5Nz1u6dd3NrzvP8M kk7+dbrS4SLNAbwrkWwCO77LPWUyABDnBKLCksvMkrTeySyWkY+CFOuptJOZY+Zer16CgFQ44 GFuJy+nR7oWPQvoxp9xidICJo25GaUPJLfvIp9XIanSi3DdfkoOLgrSu2yhvN1T9bDOrj4LU7 JRVeYifNiMZNzfd9SFQKGXEk0W5lLZcSdD8fZ89XDK8gpyDn/qxOjZfx2SyQYkmp2DLjOoftH SNoWZtNv/uSyxyMBSzEtmJK5Onh2/5GpoTs3905a8lFvgAydHZ1qCjS2r8IZRRI+GD5QTeL7s taOpf8B8xkWLOaOhsOhW4yWi98Q9wdmDcF7KDfJqBDttj/z/EGaDxfkOCcISL9+Bvetx/J6T7 RMKcgvVVhCmnz0NDib3nsewGREe05qqR+nJsD8bypFbWJsZT2lHK2Ie6f+DuGFJR9uTHGlhC+ GIPa5f9LqHlhv5WGGzMqoanb/0fcsQrgpZiOCURWc/SIWl5ZTFxgViX55Zw7PEKQmXEIyokUW mgBUUVb6umNcIbNbvCTm2Rwk2BxIJWWy11763dcpmzqis9KLp/DB6FN6QR+gtytdc8/0WAkWG VW3EFb9YSKD/y6gwArzmcIN77dmo5757As8jLSWzD/gfGPh1dZHAU2/oaphnqWK2YeAOY6/mq hf20tAC+/P16HSpPzUXLuC2prH2TDgWqvQvDN1Hb7C+h8l/lv89tpkFI014H5foooLZkU1Fjn 3eYPeossYeeVCkIPKRoh+9P6gcXWSJURF2DspQPEVOkp5k9uq0HTssVXsDttvFxSi4cKr54KF 3SxMemqsIEYGeK6/sRCiCaiR4ZP8VXMD+SakkfQ9gilqYQvB31KKSFUUwripKMwJKK3S5jEKO ogz0oBBlKitW4rDmhLhIPXREE2kodz+J+AmdnfH3gZs7Bzb8cREnPhq6q6OyVwTN9GN1kD7EL JkQ7g+FgZuLW3I= 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.36.0 diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index e95614cfae..aa5f4d523b 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 "1hy5jaf5x8lffh3p4hdkk6ar8i4w84i0b539k1h5baqx9gnq2l2s")))) (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