From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WCdoGJSleWLofgEAbAwnHQ (envelope-from ) for ; Tue, 10 May 2022 01:36:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sKlCGJSleWIcJQAAauVa8A (envelope-from ) for ; Tue, 10 May 2022 01:36:52 +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 03E0E17141 for ; Tue, 10 May 2022 01:36:52 +0200 (CEST) Received: from localhost ([::1]:47098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noCvr-0001HN-7N for larch@yhetil.org; Mon, 09 May 2022 19:36:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noCv6-0000Fs-Bo for guix-patches@gnu.org; Mon, 09 May 2022 19:36:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noCv6-0001Ss-0T for guix-patches@gnu.org; Mon, 09 May 2022 19:36:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1noCv5-0003z1-Uq for guix-patches@gnu.org; Mon, 09 May 2022 19:36:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#52790] [PATCH v3 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: Mon, 09 May 2022 23:36: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.165213934415232 (code B ref 52790); Mon, 09 May 2022 23:36:03 +0000 Received: (at 52790) by debbugs.gnu.org; 9 May 2022 23:35:44 +0000 Received: from localhost ([127.0.0.1]:59749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noCuk-0003xW-FR for submit@debbugs.gnu.org; Mon, 09 May 2022 19:35:43 -0400 Received: from mout.gmx.net ([212.227.17.20]:35955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noCub-0003vy-Tb for 52790@debbugs.gnu.org; Mon, 09 May 2022 19:35:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1652139328; bh=T7UvKtpyEWBjUIFQvSshKc6kmRtmWLSIjnKG2efdJFs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=CEdVoWXYL0Uz9hhFp9rtt51JyRjMBp/VYv1Kofgrb5mIOVlo1DkXW42n7n8z2R7XO 1PL8SQ73F6r/YOwpwEVz5XpXY4hwyJyFfNVt6w3X9jczzEbGcgBBUXJrNkJBehDglo fkyvxdK19CT81Uv/3ZD+ed751T5HGW2JNMhWfW2s= 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 1MsHnm-1o46CL41n8-00tkK9; Tue, 10 May 2022 01:35:28 +0200 From: Pierre Langlois Date: Tue, 10 May 2022 00:35:19 +0100 Message-Id: <20220509233519.26703-7-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:WK6eTdUXRrjGeNloaIOGSOaFWhYOh6Yd3YvoojPKl99QSgpkGZx scniUEoequtpQv1D2ClZXT/JR/QJ+eZwlsLr5kMqVTrqF+FClF7Na/o5gHLfwbk68XhnGLt Oc0XOLU7j8/X03e4ysftzyDsleRhw9aH+MmgaFS15rmYja33nCQHjbclJS6cG8ueYdPlHcd Ag3+22d8Pem7mqtorYCMg== X-UI-Out-Filterresults: notjunk:1;V03:K0:2VhmABSr5dM=:QmSB25rArL3Pbl8032uhTp nQo/O75qeNf2VK9BSIj35/PQjToinj8Cp9WsWACu/P+tulTfwj9bFPz4nh0PurFu/WyNf2Ztv eshrERJIYKTMNxsig0lL/oKLP9ExcmcHBfS1aRC1txtm9mAT6h7uz0KfI8AI2/ItFmWctouvv GoI/V0kXL2f7vdjs/GwnFcQOwddIg177hybyap8MjXOwsoLxDe4zO/rT7N7S5Y4Wt3jBxiCul 9NJai04H3aWySqroeOHcJDG3gIV+8bQu4ZQAT1ZCYlbEUInw9qla/+PSekwmGdJf6IfCniKbv w7TgX+BqpXARUJWUtV6tC07k7xCe0yQzn+EuHKdQfo30pmTf2dviulBlx7ao9AkUygToouxPw 7Ww8R+EV7Hi7jE9PtqRD2dxH3U8cZfDyfxyk8oHo1LGP5g2Y75jK+KgAKll9Yav0eKimQ2G5h VAaK1AfWhj+F5WuFAJmgcqWBsbH3L3Urr6jlfjFe4VMpdBhJz5vtvtxDyViz0by6Q3ESiwson Hd+JPDk82ZlyP93hEcY2fASMfZLmlhTl/OLT/UfXxZSO91GWfuRF+2lqXGGFwxNvYMvu+IsBn 1Tvigluk3C6nf+yGQ/G6fSJF/vIkx67QjkLL4eJRtFqQPG962UvBz+Oy9xqKUyuOLWJzkoXPC Ty7hQXPeSMsiGZ5dUNbzRO/ELF5jwAKOHUM7ktWWr5PPD7Upw1QUr7qAbhwMKB6dS0V6q6++8 oFBGiHeArKbSIai5h/i0KJ0kxgmOevjLpUe7QTPtqNzE/Hqv98tTeak32lOHzYcfV7e5NWjkt XrFSxmiheYkIMMeij292djOLab5u6K4FYkjuxWZmz6MZpwBUoXRwbQfhb5MlIOJs2doqDuuXv cCm8pGGVUj59VxCQmV75SVYoO5cndbVQLif/3/4E5OXsx+5a6uRWKXEol3KsF01M7tSzYNlFT wNqVOIVyHtcylfHWvHF+JzB5RgjbWC+2JC8lBMcPcmGsjDyY0Att9dpkD1XbSnGIIG7pnUXr3 UYKCqJbFZHiHmRWaj+0UG+l054SZ6Q+D19wW7ILfUKhwq1JoSR36RFAiNAxYWhcBMj7nFqVf8 haZhecJzay9J2c= 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=1652139412; 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=VTsi+vj1wTazz44XAsQtfNJF8wvvRMPIfe/uH40lLow=; b=WZcNijC+Z7hTVlzQgqulpp2jKJzifquA/4xoOLM88ssYoN4rLBV1/JNkgxWtA3YQ0mST+o QM3GYQy0sqtIuanU7lXJ1pb9bX+yup+QiFeBQignk4iXkkI06vxV0PlrM2HTIs1Oh9e6mm CRPiL+x8ECBhiw6vBk0t3L5ypH/B0h4V579IQmD9SDRI6pNlJgP/szs5YwLH375DHpbSB5 y0/E3oHEZY28CKBCFluKC/fPNk3DMVFippI6h7FsgPmUSdDX4j+9yyXm3vCxljC4XI9UYm olEM0bax/YaQLQuSQWW4rwq4DFqugJtg3O4P1SxsX4grNY1oqQx0C+/maulpXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652139412; a=rsa-sha256; cv=none; b=BXiTmyA6yrBd2u11pm1NEedX2mDVfqK7OWmasIahLg9MtAdD8WbN7zjvWne0qgOUxTEx0v WYyL9LSDDf9lLLU66e7mOzPfrQN6uI9Ezlk3rnPAkMK3iWxStVxvnwqDuC9KhHW8m/+eMW yNhgHX1LWyYgaW0liMC67OTRDJEhGgPY/XFGgG1u9e572UmSazJmqPIs6Zc2gCljBTGarw KEuVSy/eGRc0xi78WngMF/1aTirbToVzP8MQz12qa5p+dwWt4FRGsuX461vAuC2z0wcv+7 /XqQSJefKIqHHprBtkN/LG21mf1zlWBl7EbiZ5p8hJoung7/EMway9JxhefhTQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=CEdVoWXY; 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: 5.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=CEdVoWXY; 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: 03E0E17141 X-Spam-Score: 5.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: H5XgTu9Gn7Ra * 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 a3d3e5fb51..2df4cdb98a 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -326,260 +326,259 @@ (define-public docker (base32 "1z816496aqla4nq0aksf0kpy8qk8x1a6y5hrazzkqliycbjnqizq")))= ) (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 "\\ isn't found. ;; FIXME: We might need to package buildkit and docker's ;; buildx plugin, to support qemu-based docker container= s. - (("\\ .pc) go gotestsum pkg-config)) =2D- 2.36.0