From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aMMcF4CleWIuKgAAbAwnHQ (envelope-from ) for ; Tue, 10 May 2022 01:36:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QLIfFoCleWIUdgEAG6o9tA (envelope-from ) for ; Tue, 10 May 2022 01:36:32 +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 ECC7D36C23 for ; Tue, 10 May 2022 01:36:31 +0200 (CEST) Received: from localhost ([::1]:45760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noCvX-0000Ik-2c for larch@yhetil.org; Mon, 09 May 2022 19:36:31 -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 Content-Transfer-Encoding: quoted-printable 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+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=1652139392; 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=mBdWdUchxVySlFpWP2cnaBSESVDvDNDPXhqEOc3isw0=; b=NZ846a6UJvsyZ7frwO4jR40yl9RVlpcSFp1YkygyrxZDTZETzd/be6Eoe58pEJKmb3R+8j 7uX7Q3rhN+Gt4i7IuU32hohjRUnutasqYgljr+iSLdyScUuga04/fr57zjsTbqUvQTgbsG 6UZ4pSM+pYKBUAx5FXQ4q0CcMWL8Yu17F+aAAsVKz3KGB9lmWnRFRdd4PQ9w8hq5d4emq2 gdW+PuQobfsQ+MVD8H6YDCi9N+gxuWSwB21Q8wuDF84cG71gwe/e6NUn+2rOwxorq0fXDM rXKtBoQYp88gcmFwnOjs09VTLUHWXgwpjCTVPDKOw4cG1ACS2F3xTietgtgOzg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652139392; a=rsa-sha256; cv=none; b=O/i07HiEO2URp3fc/p+JDUD7G5OMm5Cpl1Zi5OM08JyqL8l3wbJHyI18ckI76f5p61wbch hjZltLh52WtR6uve4/x+rEXcxPgMA1nYKKzHybdgE8ysVaOorp1UBR4P+5aPswl6boMe6Y 9eIHs8Gtoz1j3Ivd4T8WphDNUvKkI3GgE3UqxZMXOeRiTK9NQ1L3XcPMbQb28RrCawvfot HtMhnQjXaR+epNNKhMBnrMIIfSb8AwZMeQhrSKc+pV4eJpQs2Wktgm8jrgF8IYmslf4GB4 k9I5A+a//5bbmyC1lK9HI5l7KV4NUihLgIVv3iEwmP5E3CAnkSnV3M1KrFEnsQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=N3VqVKuh; 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: 7.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=N3VqVKuh; 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: ECC7D36C23 X-Spam-Score: 7.40 X-Migadu-Scanner: scn1.migadu.com X-TUID: pAhCdmWSH7He * 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 e95614cfae..aa5f4d523b 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 "1hy5jaf5x8lffh3p4hdkk6ar8i4w84i0b539k1h5baqx9gnq2l2s")))= ) (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.36.0