From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:50485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFpGD-0003Lo-Ii for guix-patches@gnu.org; Sun, 14 Apr 2019 20:14:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hFpGA-0001Rh-44 for guix-patches@gnu.org; Sun, 14 Apr 2019 20:14:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hFpG7-0001PY-86 for guix-patches@gnu.org; Sun, 14 Apr 2019 20:14:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hFpG6-0005cZ-UJ for guix-patches@gnu.org; Sun, 14 Apr 2019 20:14:03 -0400 Subject: [bug#35282] [PATCH] gnu: docker: Patch paths of xz and docker-proxy. Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:50225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hFpFA-0003Hq-8G for guix-patches@gnu.org; Sun, 14 Apr 2019 20:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hFpF7-000170-9d for guix-patches@gnu.org; Sun, 14 Apr 2019 20:13:04 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:37106) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hFpF5-00016E-Tk for guix-patches@gnu.org; Sun, 14 Apr 2019 20:13:01 -0400 Received: by mail-qt1-x82d.google.com with SMTP id z16so17285655qtn.4 for ; Sun, 14 Apr 2019 17:12:59 -0700 (PDT) Received: from kwak (dsl-10-136-224.b2b2c.ca. [72.10.136.224]) by smtp.gmail.com with ESMTPSA id u15sm34086857qth.54.2019.04.14.17.12.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Apr 2019 17:12:57 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 14 Apr 2019 20:12:56 -0400 Message-ID: <87h8b0nn1z.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: 35282@debbugs.gnu.org --=-=-= Content-Type: text/plain This patch series make a couple cosmetic/performance changes to the docker package, and then goes on to patch the references to the docker-proxy binary and the xz compression tool. Prior to this patch, importing a docker image compressed using xz such as in: --8<---------------cut here---------------start------------->8--- docker load < some-docker-image.tar.xz --8<---------------cut here---------------end--------------->8--- Would fail unless xz was found in the system's profile. Thanks, Maxim --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-docker-Fix-indentation.patch >From 1405716eff1c15bf2a44704f4a32e6e823f73bf2 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. --- 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 --- 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 - (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")))) + (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" - (("CommandCandidates:.*runc.*") - (string-append "CommandCandidates: []string{\"" - (assoc-ref inputs "runc") - "/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" - (("DefaultCommand = .*") - (string-append "DefaultCommand = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) + (("DefaultCommand = .*") + (string-append "DefaultCommand = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) (substitute* "vendor/github.com/containerd/containerd/runtime/v1/linux/runtime.go" - (("defaultRuntime[ \t]*=.*") - (string-append "defaultRuntime = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("defaultShim[ \t]*=.*") - (string-append "defaultShim = \"" - (assoc-ref inputs "containerd") - "/bin/containerd-shim\"\n"))) + (("defaultRuntime[ \t]*=.*") + (string-append "defaultRuntime = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n")) + (("defaultShim[ \t]*=.*") + (string-append "defaultShim = \"" + (assoc-ref inputs "containerd") + "/bin/containerd-shim\"\n"))) (substitute* "daemon/daemon_unix.go" - (("DefaultShimBinary = .*") - (string-append "DefaultShimBinary = \"" - (assoc-ref inputs "containerd") - "/bin/containerd-shim\"\n")) - (("DefaultRuntimeBinary = .*") - (string-append "DefaultRuntimeBinary = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n")) - (("DefaultRuntimeName = .*") - (string-append "DefaultRuntimeName = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) + (("DefaultShimBinary = .*") + (string-append "DefaultShimBinary = \"" + (assoc-ref inputs "containerd") + "/bin/containerd-shim\"\n")) + (("DefaultRuntimeBinary = .*") + (string-append "DefaultRuntimeBinary = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n")) + (("DefaultRuntimeName = .*") + (string-append "DefaultRuntimeName = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) (substitute* "daemon/config/config.go" - (("StockRuntimeName = .*") - (string-append "StockRuntimeName = \"" - (assoc-ref inputs "runc") - "/sbin/runc\"\n"))) + (("StockRuntimeName = .*") + (string-append "StockRuntimeName = \"" + (assoc-ref inputs "runc") + "/sbin/runc\"\n"))) (substitute* "vendor/github.com/moby/buildkit/executor/runcexecutor/executor.go" - (("var defaultCommandCandidates = .*") - (string-append "var defaultCommandCandidates = []string{\"" - (assoc-ref inputs "runc") "/sbin/runc\"}"))) + (("var defaultCommandCandidates = .*") + (string-append "var defaultCommandCandidates = []string{\"" + (assoc-ref inputs "runc") "/sbin/runc\"}"))) (let ((source-files (filter (lambda (name) - (not (string-contains name "test"))) - (find-files "." "\\.go$")))) + (not (string-contains name "test"))) + (find-files "." "\\.go$")))) (let-syntax ((substitute-LookPath (lambda (x) (syntax-case x () ((substitute-LookPath source-text package relative-path) #`(substitute* source-files - ((#,(string-append "exec\\.LookPath\\(\"" - (syntax->datum - #'source-text) - "\")")) - (string-append "\"" - (assoc-ref inputs package) - relative-path - "\", error(nil)"))))))) + ((#,(string-append "exec\\.LookPath\\(\"" + (syntax->datum + #'source-text) + "\")")) + (string-append "\"" + (assoc-ref inputs package) + relative-path + "\", error(nil)"))))))) (substitute-Command (lambda (x) (syntax-case x () ((substitute-LookPath source-text package relative-path) #`(substitute* source-files - ((#,(string-append "exec\\.Command\\(\"" - (syntax->datum - #'source-text) - "\"")) ; ) - (string-append "exec.Command(\"" - (assoc-ref inputs package) - relative-path - "\"")))))))) ; ) + ((#,(string-append "exec\\.Command\\(\"" + (syntax->datum + #'source-text) + "\"")) ; ) + (string-append "exec.Command(\"" + (assoc-ref inputs package) + relative-path + "\"")))))))) ; ) (substitute-LookPath "ps" "procps" "/bin/ps") (substitute-LookPath "mkfs.xfs" "xfsprogs" "/bin/mkfs.xfs") (substitute-LookPath "lvmdiskscan" "lvm2" "/sbin/lvmdiskscan") @@ -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/resize2fs") -; docker-mountfrom ?? -; docker -; docker-untar ?? -; docker-applyLayer ?? -; /usr/bin/uname -; grep -; 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 - ;; Search for Java in PATH. - (("\\ .pc) + `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc) ("go" ,go) ("pkg-config" ,pkg-config))) (synopsis "Docker container component library, and daemon") -- 2.20.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-docker-Cleanup-extraneous-comments.patch >From 64b8226b954c18aa9fd246c26b8c5958fa5d2e86 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. --- 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 --- 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) - "\"")) ; ) + "\"")) (string-append "exec.Command(\"" (assoc-ref inputs package) relative-path - "\"")))))))) ; ) + "\"")))))))) (substitute-LookPath "ps" "procps" "/bin/ps") (substitute-LookPath "mkfs.xfs" "xfsprogs" "/bin/mkfs.xfs") (substitute-LookPath "lvmdiskscan" "lvm2" "/sbin/lvmdiskscan") @@ -435,22 +435,22 @@ built-in registry server of Docker.") ;; substitute. (substitute* source-files ;; Search for Java in PATH. - (("\\From 4ec93a7d398693bc35584b7c287cd49cdfcf2d8f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer 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. --- gnu/packages/docker.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 10aa3aa5b4..6e598e4d18 100644 --- 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 - ((#,(string-append "exec\\.LookPath\\(\"" + ((#,(string-append "\\datum #'source-text) "\")")) @@ -389,7 +389,7 @@ built-in registry server of Docker.") ((substitute-LookPath source-text package relative-path) #`(substitute* source-files - ((#,(string-append "exec\\.Command\\(\"" + ((#,(string-append "\\datum #'source-text) "\"")) -- 2.20.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-docker-Make-macros-use-a-relative-path-as-argume.patch >From e6d6211902463da59ed4716c14334c88907c26c0 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 argument. * gnu/packages/docker.scm (docker)[phases]: Move implementation detail inside the SUBSTITUTE-LOOKPATH and SUBSTITUTE-COMMAND macros definition, so that the relative path argument can be given as a relative path. --- 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 6e598e4d18..0b602cee1d 100644 --- 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 package) - relative-path + "/" relative-path "\", error(nil)"))))))) (substitute-Command (lambda (x) @@ -395,29 +395,29 @@ built-in registry server of Docker.") "\"")) (string-append "exec.Command(\"" (assoc-ref inputs package) - relative-path + "/" relative-path "\"")))))))) - (substitute-LookPath "ps" "procps" "/bin/ps") - (substitute-LookPath "mkfs.xfs" "xfsprogs" "/bin/mkfs.xfs") - (substitute-LookPath "lvmdiskscan" "lvm2" "/sbin/lvmdiskscan") - (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/iptables") - (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_growfs") - (substitute-Command "mkfs.ext4" "e2fsprogs" "/sbin/mkfs.ext4") - (substitute-Command "tune2fs" "e2fsprogs" "/sbin/tune2fs") - (substitute-Command "blkid" "util-linux" "/sbin/blkid") - (substitute-Command "resize2fs" "e2fsprogs" "/sbin/resize2fs") + (substitute-LookPath "ps" "procps" "bin/ps") + (substitute-LookPath "mkfs.xfs" "xfsprogs" "bin/mkfs.xfs") + (substitute-LookPath "lvmdiskscan" "lvm2" "sbin/lvmdiskscan") + (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/iptables") + (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_growfs") + (substitute-Command "mkfs.ext4" "e2fsprogs" "sbin/mkfs.ext4") + (substitute-Command "tune2fs" "e2fsprogs" "sbin/tune2fs") + (substitute-Command "blkid" "util-linux" "sbin/blkid") + (substitute-Command "resize2fs" "e2fsprogs" "sbin/resize2fs") ;; docker-mountfrom ?? ;; docker ;; docker-untar ?? @@ -425,11 +425,11 @@ built-in registry server of Docker.") ;; /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") - (substitute-Command "dbus-launch" "dbus" "/bin/dbus-launch") - (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. -- 2.20.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-docker-Optimize-substitution-macros.patch >From aa63b48d0d4a5d48d745e9be8e7222e9f73f0af8 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*. --- gnu/packages/docker.scm | 120 ++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 61 deletions(-) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 0b602cee1d..912827b79b 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -369,67 +369,65 @@ built-in registry server of Docker.") (let ((source-files (filter (lambda (name) (not (string-contains name "test"))) (find-files "." "\\.go$")))) - (let-syntax ((substitute-LookPath - (lambda (x) - (syntax-case x () - ((substitute-LookPath source-text package - relative-path) - #`(substitute* source-files - ((#,(string-append "\\datum - #'source-text) - "\")")) - (string-append "\"" - (assoc-ref inputs package) - "/" relative-path - "\", error(nil)"))))))) - (substitute-Command - (lambda (x) - (syntax-case x () - ((substitute-LookPath source-text package - relative-path) - #`(substitute* source-files - ((#,(string-append "\\datum - #'source-text) - "\"")) - (string-append "exec.Command(\"" - (assoc-ref inputs package) - "/" relative-path - "\"")))))))) - (substitute-LookPath "ps" "procps" "bin/ps") - (substitute-LookPath "mkfs.xfs" "xfsprogs" "bin/mkfs.xfs") - (substitute-LookPath "lvmdiskscan" "lvm2" "sbin/lvmdiskscan") - (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/iptables") - (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_growfs") - (substitute-Command "mkfs.ext4" "e2fsprogs" "sbin/mkfs.ext4") - (substitute-Command "tune2fs" "e2fsprogs" "sbin/tune2fs") - (substitute-Command "blkid" "util-linux" "sbin/blkid") - (substitute-Command "resize2fs" "e2fsprogs" "sbin/resize2fs") - ;; 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") - (substitute-Command "dbus-launch" "dbus" "bin/dbus-launch") - (substitute-Command "git" "git" "bin/git")) + (let-syntax ((substitute-LookPath* + (syntax-rules () + ((_ (source-text package relative-path) ...) + (substitute* source-files + (((string-append "\\From a2d9cbcc7ad2c86767ff77e026956d07025c5e27 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer 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. --- gnu/packages/docker.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 912827b79b..9dde4c6cb0 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -366,6 +366,11 @@ built-in registry server of Docker.") (("var defaultCommandCandidates = .*") (string-append "var defaultCommandCandidates = []string{\"" (assoc-ref inputs "runc") "/sbin/runc\"}"))) + (substitute* "vendor/github.com/docker/libnetwork/portmapper/proxy.go" + (("var userlandProxyCommandName = .*") + (string-append "var userlandProxyCommandName = \"" + (assoc-ref inputs "docker-proxy") + "/bin/proxy\"\n"))) (let ((source-files (filter (lambda (name) (not (string-contains name "test"))) (find-files "." "\\.go$")))) @@ -513,6 +518,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) -- 2.20.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0007-gnu-docker-Refer-to-xz-by-its-absolute-path.patch >From 646c93fa6a2a75b877153da6c006fd3a17c8dd32 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. --- 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 9dde4c6cb0..78bff8a323 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -371,6 +371,9 @@ built-in registry server of Docker.") (string-append "var userlandProxyCommandName = \"" (assoc-ref inputs "docker-proxy") "/bin/proxy\"\n"))) + (substitute* "pkg/archive/archive.go" + (("string\\{\"xz") + (string-append "string{\"" (assoc-ref inputs "xz") "/bin/xz"))) (let ((source-files (filter (lambda (name) (not (string-contains name "test"))) (find-files "." "\\.go$")))) @@ -530,7 +533,8 @@ built-in registry server of Docker.") ("runc" ,runc) ("util-linux" ,util-linux) ("lvm2" ,lvm2) - ("xfsprogs" ,xfsprogs))) + ("xfsprogs" ,xfsprogs) + ("xz" ,xz))) (native-inputs `(("eudev" ,eudev) ; TODO: Should be propagated by lvm2 (.pc -> .pc) ("go" ,go) -- 2.20.1 --=-=-=--