From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cF7vLUZMRmLa1AAAgWs5BA (envelope-from ) for ; Fri, 01 Apr 2022 02:50:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kDNIJkZMRmIMcgAAG6o9tA (envelope-from ) for ; Fri, 01 Apr 2022 02:50:14 +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 2FE70623D for ; Fri, 1 Apr 2022 02:50:14 +0200 (CEST) Received: from localhost ([::1]:58112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1na5UT-000794-AC for larch@yhetil.org; Thu, 31 Mar 2022 20:50:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1na5TO-0006TW-P7 for guix-patches@gnu.org; Thu, 31 Mar 2022 20:49:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46417) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1na5TN-0004Pz-6M for guix-patches@gnu.org; Thu, 31 Mar 2022 20:49:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1na5TN-0003Oz-5X for guix-patches@gnu.org; Thu, 31 Mar 2022 20:49:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#52790] [PATCH v2 7/7] gnu: docker: Switch to gexp and new input style. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Apr 2022 00:49:05 +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.164877410112975 (code B ref 52790); Fri, 01 Apr 2022 00:49:05 +0000 Received: (at 52790) by debbugs.gnu.org; 1 Apr 2022 00:48:21 +0000 Received: from localhost ([127.0.0.1]:40307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na5Se-0003N7-BM for submit@debbugs.gnu.org; Thu, 31 Mar 2022 20:48:21 -0400 Received: from mout.gmx.net ([212.227.17.22]:37393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1na5SR-0003Kq-Ac for 52790@debbugs.gnu.org; Thu, 31 Mar 2022 20:48:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648774081; bh=8IXyVPXuFauSLWdwZi0pa0g26lOvFjg9C+706UMSuwA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=C8qYWogy8fBMjppQMFkdHSyglNyP3KDKs3ddrm0PUXyx9E1TbfDC41GxIoeW6bHms Ay1caDctRQMmYnrhinmkRnDMRCuwmzUKjSsdtzzKSRi24BbkA+AhT+00zUBzgOGZFZ 8aoBrAvc2x/U5LRPlt4Y/faQP8TIFplckFpCFRr0= 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 1MZktj-1nUIQY1Oo3-00Woz2; Fri, 01 Apr 2022 02:48:01 +0200 From: Pierre Langlois Date: Fri, 1 Apr 2022 01:46:42 +0100 Message-Id: <20220401004642.14949-8-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:7TtLWnNUxdJYKS/zTAUf0S4EE8UUTaYHjC/jUuNq6A2AriqpXPd QhVBse848B5hBqVjXsn7AAJt4c4Bl84uKOYA0C0k7rzi15uEXnN2gmfxQRKxazt8we4R5qV b+JILbjRtW6hsIww0K83Fxwf0tKiktF5Pjjk74c5oF7dulOUXuH0h2g3bZfdDniqq+SLJSE U7aRs8dmtuYv7wBPuzk6Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:Pl/jTqmjbvs=:eU+s/sFeGSGteWkuagfauI 6pbspCETQ8szDEDsGgx0ojo1VgbPYY8yzhp9VU5L+rmtI1G1ofYNvxTQ4NvMFN5nceCiz0Ypb 9OnEJjADDf/Q2zAw3Uf/EpeR/4ibv1xIfF19Z42CpcAiqIEFdIgOdF3MkdIsTfxDvwb8q8z6k wSk8RnlB6SBabYKt1iO1lDbR/1sSRFdZSqBvEADgdfhWr94nXKe/x/TkMd520iCvFLq20shrz brMyAAN5QEDcE/rcLcOj9lvixUvcIaaefvXj7WrA4kgJMwnyY0CYqBDoI8F5ltcXIl7ASu/qK MuIdWszRoxdJnZo+Uifwmu5yuR8BNXYLzCa1+il0baV45xtp26xlyVsxON/bLKyJs+0opyKjW U0w4N2bzjciFoGWYyHSfhyug5pxGQLO5EAwcIrmtxOTJ29VM6k0cFIUrsV6FkN5lV5i0frfK8 W07UAtZIMv7GbTCmT6wKRIGVDeNxtdmeEWT5x0m5tyEqeIKmxqP03afhbMDi6GodMiBMc5sus kDjUfONadp/davMUoIl7k28B+Hghg24EDI9bKyA97vv++hD982Ywc8Mkpg4M4Li+f4BZcpgGs y2QXChZOR+a2Qnq3P0fU9mloHJTq7IwSqTJGIwmPGmWTG7nMmGK8CO4FBaXIYU836rvBvgAt1 FLRL8ZTs3WsTr0fnIThJLXlh6srV4GWGd40NSAcTGsCiI6837QCW5pidJ3v5nzf7mCCe3J6Hg rR4jrxmzr/Wl6V0WHM/jZbcTHlvIEg5HTvalgvmG07DsabcMy45TvTHqfnG7k0gJRR3CzErtB 8V9FPHzDGuy0VGb+ls/+Rl9wJlO7G+Jeo2abgnatns69/qlyb37AiwP7/1znSzPXGykY8hqbA +foer4IRFOLHkp4WW2S3yxfXdz2SRn59+WuhKx2IM8p2UZ13LOR4K9BHOdWUuwkeVL07rDoby 8CAnteCowD34r9YJiC+6v3JxBq0bmblsKQ0WTpckC2MkHvuPQSVJJ9MKGOIz4k5ZlUeJWN14c 2U+rh0Edcaf7tmb4a6d836odAXRxE3KNWwJBG3P6vyxhXbOO8hlEt68rrbVWD9Evd37ww7UEp lkai0GvubveVRk= 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=1648774214; 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=ErRvc5GSXU7otsw8YhMyHQ+XvIuwcLuCg/oCNlC902U=; b=hZ664dL3BZWlhcJOOhJWWFafZmVLu1SPe292FNt6UMyI6xiGxHmUfjagYf2/CahNKLFM59 zlnz5XzbXB1+s6etBcgmV8sXHH/7ZUNZrXJdVEe2W6lvFHVq0XnHO+XFY50FQaeQw8l+mv kTOGWbEA1BknCorS9cfzrcjjbqGZtFTY1HfNYm1t2Ry9P3iy5OtVgjKwvHM7x3ol8BbmZY ZvXvn9ji1BaJdLKeseo25XBbE9ZzPprehoMf+At4sfbHqKAqp6eWTdsZCPBBpluMCDtNLM uTVqgWk2bzLhxi/NJb/MwdElCozw07jt0/fLDk2oyUhzBSBUNgrUmWI8iemEJA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648774214; a=rsa-sha256; cv=none; b=fUshZezlOYlJWJqJT9k6W5Bw+65VOKtwsqPWIEqg5SYT3bE6GnvDzzZrLuUGym7fSYRcIP 9l+EGdlIVyeEcJvosP63xiA+QYWznFC6wBFJQhL3UwwYWUgrZzpJKm6TzfOL4UTmyzsUl/ JXPkfmWnY5Mer0z+92UsWWphqLAMNQj4zGteUR2u0jyRd7eTrj3uqNCtv9dVCH8MGlPZdz W1ByaY+XA42vI0xH1yx4wVkJku0J4WYfmn8uP3vjaMlf8GeJuMkVnJdHIWn9K20LF3OFMR 2c39dewMfWN266WVSE1aNqX8kchbY+j2ylwCmbVqMX7tqHyPJNBMS57O6cWB8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=C8qYWogy; 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=C8qYWogy; 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: 2FE70623D X-Spam-Score: 6.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: O+0L1jTkwP5Y * gnu/packages/docker.scm (docker)[arguments]: Rewrite as gexps. Switch to using search-input-file. [inputs]: Use new style inputs. =2D-- gnu/packages/docker.scm | 483 ++++++++++++++++++++-------------------- 1 file changed, 241 insertions(+), 242 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 020c89bb11..b4095eb00f 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -326,257 +326,256 @@ (define-public docker (base32 "18nid42p1n20mg7spz0knh4izkk8qgjz9xi6v54czvy7aaj336i3")))= ) (build-system gnu-build-system) (arguments - `(#:modules - ((guix build gnu-build-system) + (list + #:modules + '((guix build gnu-build-system) ((guix build go-build-system) #:prefix go:) (guix build union) (guix build utils)) - #:imported-modules - (,@%gnu-build-system-modules + #:imported-modules + `(,@%gnu-build-system-modules (guix build union) (guix build go-build-system)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-paths - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "builder/builder-next/executor_unix.go" - (("CommandCandidates:.*runc.*") - (string-append "CommandCandidates: []string{\"" - (assoc-ref inputs "runc") - "/sbin/runc\"},\n"))) - (substitute* "vendor/github.com/containerd/go-runc/runc.go" - (("DefaultCommand =3D .*") - (string-append "DefaultCommand =3D \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "vendor/github.com/containerd/containerd/runtim= e/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 inputs "containerd") - "/bin/containerd-shim\"\n"))) - (substitute* "daemon/daemon_unix.go" - (("DefaultShimBinary =3D .*") - (string-append "DefaultShimBinary =3D \"" - (assoc-ref inputs "containerd") - "/bin/containerd-shim\"\n")) - (("DefaultRuntimeBinary =3D .*") - (string-append "DefaultRuntimeBinary =3D \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "daemon/runtime_unix.go" - (("defaultRuntimeName =3D .*") - (string-append "defaultRuntimeName =3D \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) - (substitute* "daemon/config/config.go" - (("StockRuntimeName =3D .*") - (string-append "StockRuntimeName =3D \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("DefaultInitBinary =3D .*") - (string-append "DefaultInitBinary =3D \"" - (assoc-ref inputs "tini") - "/bin/tini-static\"\n"))) - (substitute* "daemon/config/config_common_unix_test.go" - (("expectedInitPath: \"docker-init\"") - (string-append "expectedInitPath: \"" - (assoc-ref inputs "tini") - "/bin/tini-static\""))) - (substitute* "vendor/github.com/moby/buildkit/executor/runce= xecutor/executor.go" - (("var defaultCommandCandidates =3D .*") - (string-append "var defaultCommandCandidates =3D []string= {\"" - (assoc-ref inputs "runc") "/sbin/runc\"}")= )) - (substitute* "vendor/github.com/docker/libnetwork/portmapper= /proxy.go" - (("var userlandProxyCommandName =3D .*") - (string-append "var userlandProxyCommandName =3D \"" - (assoc-ref inputs "docker-proxy") - "/bin/proxy\"\n"))) - (substitute* "pkg/archive/archive.go" - (("string\\{\"xz") - (string-append "string{\"" (assoc-ref inputs "xz") "/bin/= xz"))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "builder/builder-next/executor_unix.go" + (("CommandCandidates:.*runc.*") + (string-append "CommandCandidates: []string{\"" + (search-input-file inputs "/sbin/runc") + "\"},\n"))) + (substitute* "vendor/github.com/containerd/go-runc/runc.go" + (("DefaultCommand =3D .*") + (string-append "DefaultCommand =3D \"" + (search-input-file inputs "/sbin/runc") + "\"\n"))) + (substitute* "vendor/github.com/containerd/containerd/runti= me/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 \"" + (search-input-file inputs "/bin/container= d-shim") + "\"\n"))) + (substitute* "daemon/daemon_unix.go" + (("DefaultShimBinary =3D .*") + (string-append "DefaultShimBinary =3D \"" + (search-input-file inputs "/bin/container= d-shim") + "\"\n")) + (("DefaultRuntimeBinary =3D .*") + (string-append "DefaultRuntimeBinary =3D \"" + (search-input-file inputs "/sbin/runc") + "\"\n"))) + (substitute* "daemon/runtime_unix.go" + (("defaultRuntimeName =3D .*") + (string-append "defaultRuntimeName =3D \"" + (search-input-file inputs "/sbin/runc") + "\"\n"))) + (substitute* "daemon/config/config.go" + (("StockRuntimeName =3D .*") + (string-append "StockRuntimeName =3D \"" + (search-input-file inputs "/sbin/runc") + "\"\n")) + (("DefaultInitBinary =3D .*") + (string-append "DefaultInitBinary =3D \"" + (search-input-file inputs "/bin/tini-stat= ic") + "\"\n"))) + (substitute* "daemon/config/config_common_unix_test.go" + (("expectedInitPath: \"docker-init\"") + (string-append "expectedInitPath: \"" + (search-input-file inputs "/bin/tini-stat= ic") + "\""))) + (substitute* "vendor/github.com/moby/buildkit/executor/runc= executor/executor.go" + (("var defaultCommandCandidates =3D .*") + (string-append "var defaultCommandCandidates =3D []strin= g{\"" + (search-input-file inputs "/sbin/runc") "= \"}"))) + (substitute* "vendor/github.com/docker/libnetwork/portmappe= r/proxy.go" + (("var userlandProxyCommandName =3D .*") + (string-append "var userlandProxyCommandName =3D \"" + (search-input-file inputs "/bin/proxy") + "\"\n"))) + (substitute* "pkg/archive/archive.go" + (("string\\{\"xz") + (string-append "string{\"" (search-input-file inputs "/b= in/xz")))) - (let ((source-files (filter (lambda (name) - (not (string-contains name "te= st"))) - (find-files "." "\\.go$")))) - (let-syntax ((substitute-LookPath* - (syntax-rules () - ((_ (source-text package relative-path) ..= .) - (substitute* source-files - (((string-append "\\ .pc) go gotestsum pkg-config)) =2D- 2.34.0