From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:49729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hG85G-0006Dz-G5 for guix-patches@gnu.org; Mon, 15 Apr 2019 16:20:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hG85D-0006Ru-9n for guix-patches@gnu.org; Mon, 15 Apr 2019 16:20:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hG85C-0006Rh-E6 for guix-patches@gnu.org; Mon, 15 Apr 2019 16:20:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hG85C-0003JW-3b for guix-patches@gnu.org; Mon, 15 Apr 2019 16:20:02 -0400 Subject: [bug#35282] [PATCHv2] gnu: docker: Patch paths of xz and docker-proxy. Resent-Message-ID: From: Maxim Cournoyer References: <87h8b0nn1z.fsf@gmail.com> <20190415075632.3a5802e8@scratchpost.org> Date: Mon, 15 Apr 2019 16:19:12 -0400 In-Reply-To: <20190415075632.3a5802e8@scratchpost.org> (Danny Milosavljevic's message of "Mon, 15 Apr 2019 07:56:32 +0200") Message-ID: <87bm17m37j.fsf_-_@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 35282@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello again, Actually, the proposed change was not sufficient, as it would transform reexec.Command -> exec.Command. The attached series fixes it (patch 0003, with the other rebased). --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-docker-Fix-indentation.patch Content-Transfer-Encoding: quoted-printable From=201405716eff1c15bf2a44704f4a32e6e823f73bf2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 11 Apr 2019 21:55:48 -0400 Subject: [PATCH 1/7] gnu: docker: Fix indentation. * gnu/packages/docker.scm (docker): Fix indentation using Emacs. =2D-- gnu/packages/docker.scm | 184 ++++++++++++++++++++-------------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 1067555296..7445856347 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -299,17 +299,17 @@ built-in registry server of Docker.") (version %docker-version) (source (origin =2D (method git-fetch) =2D (uri (git-reference =2D (url "https://github.com/docker/engine.git") =2D (commit (string-append "v" version)))) =2D (file-name (git-file-name name version)) =2D (sha256 =2D (base32 "06yr5xwr181lalh8z1lk07nxlp7hn38aq8cyqjk617dfy4lz0ixx")) =2D (patches =2D (search-patches "docker-engine-test-noinstall.patch" =2D "docker-fix-tests.patch" =2D "docker-use-fewer-modprobes.patch")))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/docker/engine.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "06yr5xwr181lalh8z1lk07nxlp7hn38aq8cyqjk617dfy4lz0ixx")) + (patches + (search-patches "docker-engine-test-noinstall.patch" + "docker-fix-tests.patch" + "docker-use-fewer-modprobes.patch")))) (build-system gnu-build-system) (arguments `(#:modules @@ -326,77 +326,77 @@ built-in registry server of Docker.") (add-after 'unpack 'patch-paths (lambda* (#:key inputs #:allow-other-keys) (substitute* "builder/builder-next/executor_unix.go" =2D (("CommandCandidates:.*runc.*") =2D (string-append "CommandCandidates: []string{\"" =2D (assoc-ref inputs "runc") =2D "/sbin/runc\"},\n"))) + (("CommandCandidates:.*runc.*") + (string-append "CommandCandidates: []string{\"" + (assoc-ref inputs "runc") + "/sbin/runc\"},\n"))) (substitute* "vendor/github.com/containerd/go-runc/runc.go" =2D (("DefaultCommand =3D .*") =2D (string-append "DefaultCommand =3D \"" =2D (assoc-ref inputs "runc") =2D "/sbin/runc\"\n"))) + (("DefaultCommand =3D .*") + (string-append "DefaultCommand =3D \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) (substitute* "vendor/github.com/containerd/containerd/runtime= /v1/linux/runtime.go" =2D (("defaultRuntime[ \t]*=3D.*") =2D (string-append "defaultRuntime =3D \"" =2D (assoc-ref inputs "runc") =2D "/sbin/runc\"\n")) =2D (("defaultShim[ \t]*=3D.*") =2D (string-append "defaultShim =3D \"" =2D (assoc-ref inputs "containerd") =2D "/bin/containerd-shim\"\n"))) + (("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" =2D (("DefaultShimBinary =3D .*") =2D (string-append "DefaultShimBinary =3D \"" =2D (assoc-ref inputs "containerd") =2D "/bin/containerd-shim\"\n")) =2D (("DefaultRuntimeBinary =3D .*") =2D (string-append "DefaultRuntimeBinary =3D \"" =2D (assoc-ref inputs "runc") =2D "/sbin/runc\"\n")) =2D (("DefaultRuntimeName =3D .*") =2D (string-append "DefaultRuntimeName =3D \"" =2D (assoc-ref inputs "runc") =2D "/sbin/runc\"\n"))) + (("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")) + (("DefaultRuntimeName =3D .*") + (string-append "DefaultRuntimeName =3D \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) (substitute* "daemon/config/config.go" =2D (("StockRuntimeName =3D .*") =2D (string-append "StockRuntimeName =3D \"" =2D (assoc-ref inputs "runc") =2D "/sbin/runc\"\n"))) + (("StockRuntimeName =3D .*") + (string-append "StockRuntimeName =3D \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) (substitute* "vendor/github.com/moby/buildkit/executor/runcex= ecutor/executor.go" =2D (("var defaultCommandCandidates =3D .*") =2D (string-append "var defaultCommandCandidates =3D []string= {\"" =2D (assoc-ref inputs "runc") "/sbin/runc\"}")= )) + (("var defaultCommandCandidates =3D .*") + (string-append "var defaultCommandCandidates =3D []string{= \"" + (assoc-ref inputs "runc") "/sbin/runc\"}"))) (let ((source-files (filter (lambda (name) =2D (not (string-contains name "test"))) =2D (find-files "." "\\.go$")))) + (not (string-contains name "tes= t"))) + (find-files "." "\\.go$")))) (let-syntax ((substitute-LookPath (lambda (x) (syntax-case x () ((substitute-LookPath source-text package relative-path) #`(substitute* source-files =2D ((#,(string-append "exec\\.LookPath= \\(\"" =2D (syntax->datum =2D #'source-text) =2D "\")")) =2D (string-append "\"" =2D (assoc-ref inputs p= ackage) =2D relative-path =2D "\", error(nil)")))= )))) + ((#,(string-append "exec\\.LookPath\= \(\"" + (syntax->datum + #'source-text) + "\")")) + (string-append "\"" + (assoc-ref inputs pa= ckage) + relative-path + "\", error(nil)"))))= ))) (substitute-Command (lambda (x) (syntax-case x () ((substitute-LookPath source-text package relative-path) #`(substitute* source-files =2D ((#,(string-append "exec\\.Command\= \(\"" =2D (syntax->datum =2D #'source-text) =2D "\"")) ; ) =2D (string-append "exec.Command(\"" =2D (assoc-ref inputs p= ackage) =2D relative-path =2D "\"")))))))) ; ) + ((#,(string-append "exec\\.Command\\= (\"" + (syntax->datum + #'source-text) + "\"")) ; ) + (string-append "exec.Command(\"" + (assoc-ref inputs pa= ckage) + relative-path + "\"")))))))) ; ) (substitute-LookPath "ps" "procps" "/bin/ps") (substitute-LookPath "mkfs.xfs" "xfsprogs" "/bin/mkfs.xfs= ") (substitute-LookPath "lvmdiskscan" "lvm2" "/sbin/lvmdisks= can") @@ -418,13 +418,13 @@ built-in registry server of Docker.") (substitute-Command "tune2fs" "e2fsprogs" "/sbin/tune2fs") (substitute-Command "blkid" "util-linux" "/sbin/blkid") (substitute-Command "resize2fs" "e2fsprogs" "/sbin/resize= 2fs") =2D; docker-mountfrom ?? =2D; docker =2D; docker-untar ?? =2D; docker-applyLayer ?? =2D; /usr/bin/uname =2D; grep =2D; apparmor_parser + ;; docker-mountfrom ?? + ;; docker + ;; docker-untar ?? + ;; docker-applyLayer ?? + ;; /usr/bin/uname + ;; grep + ;; apparmor_parser (substitute-Command "ps" "procps" "/bin/ps") (substitute-Command "losetup" "util-linux" "/sbin/losetup= ") (substitute-Command "uname" "coreutils" "/bin/uname") @@ -434,24 +434,24 @@ built-in registry server of Docker.") ;; invokes other programs we don't know about and thus don't ;; substitute. (substitute* source-files =2D ;; Search for Java in PATH. =2D (("\\ .pc) + `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> = .pc) ("go" ,go) ("pkg-config" ,pkg-config))) (synopsis "Docker container component library, and daemon") =2D-=20 2.20.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-docker-Cleanup-extraneous-comments.patch Content-Transfer-Encoding: quoted-printable From=2064b8226b954c18aa9fd246c26b8c5958fa5d2e86 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 11 Apr 2019 22:08:52 -0400 Subject: [PATCH 2/7] gnu: docker: Cleanup extraneous comments. * gnu/packages/docker.scm (docker): Remove "parenthesis-balancing" comments. =2D-- gnu/packages/docker.scm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 7445856347..10aa3aa5b4 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -392,11 +392,11 @@ built-in registry server of Docker.") ((#,(string-append "exec\\.Command\\= (\"" (syntax->datum #'source-text) =2D "\"")) ; ) + "\"")) (string-append "exec.Command(\"" (assoc-ref inputs pa= ckage) relative-path =2D "\"")))))))) ; ) + "\"")))))))) (substitute-LookPath "ps" "procps" "/bin/ps") (substitute-LookPath "mkfs.xfs" "xfsprogs" "/bin/mkfs.xfs= ") (substitute-LookPath "lvmdiskscan" "lvm2" "/sbin/lvmdisks= can") @@ -435,22 +435,22 @@ built-in registry server of Docker.") ;; substitute. (substitute* source-files ;; Search for Java in PATH. =2D (("\\ Date: Thu, 11 Apr 2019 22:12:00 -0400 Subject: [PATCH 3/7] gnu: docker: Harmonize LookPath regexes. * gnu/packages/docker.scm (docker)[phases]: In the patch-paths phase, update the regexes used by SUBSTITUTE-LOOKPATH and SUBSTITUTE-COMMAND to match at = the start of the word, like it's done later. =2D-- gnu/packages/docker.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 10aa3aa5b4..ce9d4d4643 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -375,7 +375,7 @@ built-in registry server of Docker.") ((substitute-LookPath source-text package relative-path) #`(substitute* source-files =2D ((#,(string-append "exec\\.LookPat= h\\(\"" + ((#,(string-append "\\datum #'source-text) "\")")) @@ -389,11 +389,12 @@ built-in registry server of Docker.") ((substitute-LookPath source-text package relative-path) #`(substitute* source-files =2D ((#,(string-append "exec\\.Command= \\(\"" + ((#,(string-append "\\<(re)?exec\\.C= ommand\\(\"" (syntax->datum #'source-text) =2D "\"")) =2D (string-append "exec.Command(\"" + "\"") _ re?) + (string-append (if re? re? "") + "exec.Command(\"" (assoc-ref inputs pa= ckage) relative-path "\"")))))))) =2D-=20 2.20.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-docker-Make-macros-use-a-relative-path-as-argume.patch Content-Transfer-Encoding: quoted-printable From=208776742130efab07e2f00287d039ec2fbf5e21bf Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 11 Apr 2019 22:57:33 -0400 Subject: [PATCH 4/7] gnu: docker: Make macros use a relative path as argume= nt. * gnu/packages/docker.scm (docker)[phases]: Move implementation detail insi= de the SUBSTITUTE-LOOKPATH and SUBSTITUTE-COMMAND macros definition, so that t= he relative path argument can be given as a relative path. =2D-- gnu/packages/docker.scm | 56 ++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index ce9d4d4643..f6e0e813ba 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -381,7 +381,7 @@ built-in registry server of Docker.") "\")")) (string-append "\"" (assoc-ref inputs pa= ckage) =2D relative-path + "/" relative-path "\", error(nil)"))))= ))) (substitute-Command (lambda (x) @@ -396,29 +396,29 @@ built-in registry server of Docker.") (string-append (if re? re? "") "exec.Command(\"" (assoc-ref inputs pa= ckage) =2D relative-path + "/" relative-path "\"")))))))) =2D (substitute-LookPath "ps" "procps" "/bin/ps") =2D (substitute-LookPath "mkfs.xfs" "xfsprogs" "/bin/mkfs.x= fs") =2D (substitute-LookPath "lvmdiskscan" "lvm2" "/sbin/lvmdis= kscan") =2D (substitute-LookPath "pvdisplay" "lvm2" "/sbin/pvdispla= y") =2D (substitute-LookPath "blkid" "util-linux" "/sbin/blkid") =2D (substitute-LookPath "unpigz" "pigz" "/bin/unpigz") =2D (substitute-LookPath "iptables" "iptables" "/sbin/iptab= les") =2D (substitute-LookPath "iptables-legacy" "iptables" "/sbi= n/iptables") =2D (substitute-LookPath "ip" "iproute2" "/sbin/ip") =2D (substitute-Command "modprobe" "kmod" "/bin/modprobe") =2D (substitute-Command "pvcreate" "lvm2" "/sbin/pvcreate") =2D (substitute-Command "vgcreate" "lvm2" "/sbin/vgcreate") =2D (substitute-Command "lvcreate" "lvm2" "/sbin/lvcreate") =2D (substitute-Command "lvconvert" "lvm2" "/sbin/lvconvert= ") =2D (substitute-Command "lvchange" "lvm2" "/sbin/lvchange") =2D (substitute-Command "mkfs.xfs" "xfsprogs" "/sbin/mkfs.x= fs") =2D (substitute-Command "xfs_growfs" "xfsprogs" "/sbin/xfs_= growfs") =2D (substitute-Command "mkfs.ext4" "e2fsprogs" "/sbin/mkfs= .ext4") =2D (substitute-Command "tune2fs" "e2fsprogs" "/sbin/tune2f= s") =2D (substitute-Command "blkid" "util-linux" "/sbin/blkid") =2D (substitute-Command "resize2fs" "e2fsprogs" "/sbin/resi= ze2fs") + (substitute-LookPath "ps" "procps" "bin/ps") + (substitute-LookPath "mkfs.xfs" "xfsprogs" "bin/mkfs.xfs") + (substitute-LookPath "lvmdiskscan" "lvm2" "sbin/lvmdisksc= an") + (substitute-LookPath "pvdisplay" "lvm2" "sbin/pvdisplay") + (substitute-LookPath "blkid" "util-linux" "sbin/blkid") + (substitute-LookPath "unpigz" "pigz" "bin/unpigz") + (substitute-LookPath "iptables" "iptables" "sbin/iptables= ") + (substitute-LookPath "iptables-legacy" "iptables" "sbin/i= ptables") + (substitute-LookPath "ip" "iproute2" "sbin/ip") + (substitute-Command "modprobe" "kmod" "bin/modprobe") + (substitute-Command "pvcreate" "lvm2" "sbin/pvcreate") + (substitute-Command "vgcreate" "lvm2" "sbin/vgcreate") + (substitute-Command "lvcreate" "lvm2" "sbin/lvcreate") + (substitute-Command "lvconvert" "lvm2" "sbin/lvconvert") + (substitute-Command "lvchange" "lvm2" "sbin/lvchange") + (substitute-Command "mkfs.xfs" "xfsprogs" "sbin/mkfs.xfs") + (substitute-Command "xfs_growfs" "xfsprogs" "sbin/xfs_gro= wfs") + (substitute-Command "mkfs.ext4" "e2fsprogs" "sbin/mkfs.ex= t4") + (substitute-Command "tune2fs" "e2fsprogs" "sbin/tune2fs") + (substitute-Command "blkid" "util-linux" "sbin/blkid") + (substitute-Command "resize2fs" "e2fsprogs" "sbin/resize2= fs") ;; docker-mountfrom ?? ;; docker ;; docker-untar ?? @@ -426,11 +426,11 @@ built-in registry server of Docker.") ;; /usr/bin/uname ;; grep ;; apparmor_parser =2D (substitute-Command "ps" "procps" "/bin/ps") =2D (substitute-Command "losetup" "util-linux" "/sbin/loset= up") =2D (substitute-Command "uname" "coreutils" "/bin/uname") =2D (substitute-Command "dbus-launch" "dbus" "/bin/dbus-lau= nch") =2D (substitute-Command "git" "git" "/bin/git")) + (substitute-Command "ps" "procps" "bin/ps") + (substitute-Command "losetup" "util-linux" "sbin/losetup") + (substitute-Command "uname" "coreutils" "bin/uname") + (substitute-Command "dbus-launch" "dbus" "bin/dbus-launch= ") + (substitute-Command "git" "git" "bin/git")) ;; Make compilation fail when, in future versions, Docker ;; invokes other programs we don't know about and thus don't ;; substitute. =2D-=20 2.20.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-docker-Optimize-substitution-macros.patch Content-Transfer-Encoding: quoted-printable From=206599410beb1b71bfdd71658554cecc08d7471e3a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 13 Apr 2019 22:00:45 -0400 Subject: [PATCH 5/7] gnu: docker: Optimize substitution macros. This change halves the time needed to patch the paths. * gnu/packages/docker.scm (docker)[phases]{patch-paths}: Allow passing multiple SOURCE-TEXT, PACKAGE and RELATIVE-PATH tuples so that the rewrite rules can be generated and processed by a single use of the SUBSTITUTE* macro. Rename SUBSTITUTE-LOOKPATH to SUBSTITUTE-LOOKPATH* and substitute-Command to SUBSTITUTE-COMMAND* to denote the change. Adapt the uses of SUBSTITUTE-LOOKPATH* and SUBSTITUTE-COMMAND*. =2D-- gnu/packages/docker.scm | 122 ++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index f6e0e813ba..3cd989cfcb 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -369,68 +369,66 @@ built-in registry server of Docker.") (let ((source-files (filter (lambda (name) (not (string-contains name "tes= t"))) (find-files "." "\\.go$")))) =2D (let-syntax ((substitute-LookPath =2D (lambda (x) =2D (syntax-case x () =2D ((substitute-LookPath source-text packa= ge =2D relative-path) =2D #`(substitute* source-files =2D ((#,(string-append "\\datum =2D #'source-text) =2D "\")")) =2D (string-append "\"" =2D (assoc-ref inputs = package) =2D "/" relative-path =2D "\", error(nil)"))= ))))) =2D (substitute-Command =2D (lambda (x) =2D (syntax-case x () =2D ((substitute-LookPath source-text packa= ge =2D relative-path) =2D #`(substitute* source-files =2D ((#,(string-append "\\<(re)?exec\\= .Command\\(\"" =2D (syntax->datum =2D #'source-text) =2D "\"") _ re?) =2D (string-append (if re? re? "") =2D "exec.Command(\"" =2D (assoc-ref inputs = package) =2D "/" relative-path =2D "\"")))))))) =2D (substitute-LookPath "ps" "procps" "bin/ps") =2D (substitute-LookPath "mkfs.xfs" "xfsprogs" "bin/mkfs.xf= s") =2D (substitute-LookPath "lvmdiskscan" "lvm2" "sbin/lvmdisk= scan") =2D (substitute-LookPath "pvdisplay" "lvm2" "sbin/pvdisplay= ") =2D (substitute-LookPath "blkid" "util-linux" "sbin/blkid") =2D (substitute-LookPath "unpigz" "pigz" "bin/unpigz") =2D (substitute-LookPath "iptables" "iptables" "sbin/iptabl= es") =2D (substitute-LookPath "iptables-legacy" "iptables" "sbin= /iptables") =2D (substitute-LookPath "ip" "iproute2" "sbin/ip") =2D (substitute-Command "modprobe" "kmod" "bin/modprobe") =2D (substitute-Command "pvcreate" "lvm2" "sbin/pvcreate") =2D (substitute-Command "vgcreate" "lvm2" "sbin/vgcreate") =2D (substitute-Command "lvcreate" "lvm2" "sbin/lvcreate") =2D (substitute-Command "lvconvert" "lvm2" "sbin/lvconvert") =2D (substitute-Command "lvchange" "lvm2" "sbin/lvchange") =2D (substitute-Command "mkfs.xfs" "xfsprogs" "sbin/mkfs.xf= s") =2D (substitute-Command "xfs_growfs" "xfsprogs" "sbin/xfs_g= rowfs") =2D (substitute-Command "mkfs.ext4" "e2fsprogs" "sbin/mkfs.= ext4") =2D (substitute-Command "tune2fs" "e2fsprogs" "sbin/tune2fs= ") =2D (substitute-Command "blkid" "util-linux" "sbin/blkid") =2D (substitute-Command "resize2fs" "e2fsprogs" "sbin/resiz= e2fs") =2D ;; docker-mountfrom ?? =2D ;; docker =2D ;; docker-untar ?? =2D ;; docker-applyLayer ?? =2D ;; /usr/bin/uname =2D ;; grep =2D ;; apparmor_parser =2D (substitute-Command "ps" "procps" "bin/ps") =2D (substitute-Command "losetup" "util-linux" "sbin/losetu= p") =2D (substitute-Command "uname" "coreutils" "bin/uname") =2D (substitute-Command "dbus-launch" "dbus" "bin/dbus-laun= ch") =2D (substitute-Command "git" "git" "bin/git")) + (let-syntax ((substitute-LookPath* + (syntax-rules () + ((_ (source-text package relative-path) ...) + (substitute* source-files + (((string-append "\\ Date: Sat, 13 Apr 2019 22:48:09 -0400 Subject: [PATCH 6/7] gnu: docker: Patch the reference to the docker proxy. * gnu/packages/docker.scm (docker)[inputs]: Add docker-libnetwork-cmd-proxy. * gnu/packages/docker.scm (docker)[phases]{patch-paths}: Patch proxy.go to refer to the docker-proxy binary by its absolute path. =2D-- gnu/packages/docker.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 3cd989cfcb..16bc812dd7 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -366,6 +366,11 @@ built-in registry server of Docker.") (("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"))) (let ((source-files (filter (lambda (name) (not (string-contains name "tes= t"))) (find-files "." "\\.go$")))) @@ -514,6 +519,7 @@ built-in registry server of Docker.") ("containerd" ,containerd) ; for containerd-shim ("coreutils" ,coreutils) ("dbus" ,dbus) + ("docker-proxy" ,docker-libnetwork-cmd-proxy) ("e2fsprogs" ,e2fsprogs) ("git" ,git) ("iproute2" ,iproute) =2D-=20 2.20.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0007-gnu-docker-Refer-to-xz-by-its-absolute-path.patch Content-Transfer-Encoding: quoted-printable From=209809ec36652d4949af65eb75755e9dd6d8da5c40 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 13 Apr 2019 22:58:55 -0400 Subject: [PATCH 7/7] gnu: docker: Refer to xz by its absolute path. * gnu/packages/docker.scm (docker)[inputs]: Add xz. [phases]{patch-paths}: Patch the reference to xz. =2D-- gnu/packages/docker.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 16bc812dd7..43071775e4 100644 =2D-- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -371,6 +371,9 @@ built-in registry server of Docker.") (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/x= z"))) (let ((source-files (filter (lambda (name) (not (string-contains name "tes= t"))) (find-files "." "\\.go$")))) @@ -531,7 +534,8 @@ built-in registry server of Docker.") ("runc" ,runc) ("util-linux" ,util-linux) ("lvm2" ,lvm2) =2D ("xfsprogs" ,xfsprogs))) + ("xfsprogs" ,xfsprogs) + ("xz" ,xz))) (native-inputs `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> = .pc) ("go" ,go) =2D-=20 2.20.1 --=-=-= Content-Type: text/plain Thanks! Maxim --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJ9WGpPiQCFQyn/CfEmDkZILmNWIFAly050AACgkQEmDkZILm NWJPGw//TbQ4cR0nzVMHaXRetzimwTch8HvhbI0gPQFFsaVJoMTnjLcpF5+J3pdA ip//mTjc/caoAy4bPMblTHdtbXJa19vGwRWCxsvDPrz95KW6LRKilyTdXL0TRAJW KcuP6h0vYj7TOtfdwBE6S8gYwfR57rPgOmD7sANRM3uBY61HD+s5F1ZIo3oHJ6/n SVVI0HdSgOrWgPbPHMN9gbuLZx3AbayLL3knnE8VM9BlHGVMWcYojE3CJGtSn1pX 3mFv+dEGNubfCnJ07Gea1NCtp8hvBqRjdPFobYXi640cPvrNPdQ5qaNhLOVwqZ4O WB+MMbBTtqiBLPhJI0BplwIvkfRbKGRkdW/badieXWPuclNiK1l3xWuuCXYBUnTg kbxnlrTPa1DfEtBADp/ngMhCrclSOon24YJBEIocqfQkI/0ir6N4s+3h9vS3nqLY gR/7h+Wv7DuvbDd5mCJ2YqTpxz4nAPFwSyrOcplVZdchHmvPPOmBL7VuFpgpxk7A BCtrwaUo5DL8R4t+w8i4QizFvdRN43MPsuYKm1136KYM1e065fEE+lnarqvmpCGO MOXr5lq1qEjLXdHRqIKo1C/QpD/gwRwwaKHJ07eWcTfuIt5mzTgNo9rC1ZN5E1Dv NsDJRB62QALD+Nr+oOxn2AgZ3hBKUPBGPnCqnYyRTCIG8Vl8I2g= =1xjU -----END PGP SIGNATURE----- --==-=-=--