guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#35282] [PATCH] gnu: docker: Patch paths of xz and docker-proxy.


From: Maxim Cournoyer
Subject: [bug#35282] [PATCH] gnu: docker: Patch paths of xz and docker-proxy.
Date: Mon, 15 Apr 2019 15:05:53 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello Danny!

Danny Milosavljevic <address@hidden> writes:

>>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 
>>"\\<exec\\.LookPath\\(\""
>>                                                          (syntax->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 
>>"\\<exec\\.Command\\(\""
>>                                                          (syntax->datum
>>                                                           #'source-text)
>                                                           "\"")
> Then it wouldn't match those:
>
> ./builder/dockerfile/copy_windows.go:   cmd := 
> reexec.Command("windows-fix-permissions", source, destination, identity.SID)
> ./daemon/graphdriver/overlay2/mount.go: cmd := 
> reexec.Command("docker-mountfrom", dir)
> ./daemon/graphdriver/windows/windows.go:                cmd := 
> reexec.Command(append([]string{"docker-windows-write-layer", d.info.HomeDir, 
> id}, parentLayerPaths...)...)
> ./pkg/chrootarchive/archive_unix.go:    cmd := reexec.Command("docker-untar", 
> dest)
> ./pkg/chrootarchive/diff_unix.go:       cmd := 
> reexec.Command("docker-applyLayer", dest)

Those are currently commented out (not in the actual code), so it was
working with the change, but thanks for bringing this to my attention.

> Why did you change it?

As the commit message says, it was to harmonize the macros' regexes with
the other regexes found in later substitute* uses.  I didn't see the
need to have different flavors of the same.

I suggest amending my patch with:

--8<---------------cut here---------------start------------->8---
@@ -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 
"\\<(re)?exec\\.Command\\(\""
                                                          (syntax->datum
                                                           #'source-text)
                                                          "\""))
--8<---------------cut here---------------end--------------->8---

To be future proof.

What do you think?

Maxim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]