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