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

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Mon, 15 Apr 2019 00:14:01 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35282 in the body.
You can then email your comments to 35282 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35282; Package guix-patches. (Mon, 15 Apr 2019 00:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 15 Apr 2019 00:14:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: guix-patches <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: docker: Patch paths of xz and docker-proxy.
Date: Sun, 14 Apr 2019 20:12:56 -0400
[Message part 1 (text/plain, inline)]
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

[0001-gnu-docker-Fix-indentation.patch (text/x-patch, attachment)]
[0002-gnu-docker-Cleanup-extraneous-comments.patch (text/x-patch, attachment)]
[0003-gnu-docker-Harmonize-LookPath-regexes.patch (text/x-patch, attachment)]
[0004-gnu-docker-Make-macros-use-a-relative-path-as-argume.patch (text/x-patch, attachment)]
[0005-gnu-docker-Optimize-substitution-macros.patch (text/x-patch, attachment)]
[0006-gnu-docker-Patch-the-reference-to-the-docker-proxy.patch (text/x-patch, attachment)]
[0007-gnu-docker-Refer-to-xz-by-its-absolute-path.patch (text/x-patch, attachment)]

Added blocking bug(s) 35281 Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 15 Apr 2019 00:15:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#35282; Package guix-patches. (Mon, 15 Apr 2019 05:57:02 GMT) Full text and rfc822 format available.

Message #10 received at 35282 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 35282 <at> debbugs.gnu.org
Subject: Re: [bug#35282] [PATCH] gnu: docker: Patch paths of xz and
 docker-proxy.
Date: Mon, 15 Apr 2019 07:56:32 +0200
[Message part 1 (text/plain, inline)]
>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)

Why did you change it?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35282; Package guix-patches. (Mon, 15 Apr 2019 19:07:02 GMT) Full text and rfc822 format available.

Message #13 received at 35282 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35282 <at> debbugs.gnu.org
Subject: Re: [bug#35282] [PATCH] gnu: docker: Patch paths of xz and
 docker-proxy.
Date: Mon, 15 Apr 2019 15:05:53 -0400
Hello Danny!

Danny Milosavljevic <dannym <at> scratchpost.org> 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




Information forwarded to guix-patches <at> gnu.org:
bug#35282; Package guix-patches. (Mon, 15 Apr 2019 20:20:02 GMT) Full text and rfc822 format available.

Message #16 received at 35282 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35282 <at> debbugs.gnu.org
Subject: Re: [bug#35282] [PATCHv2] gnu: docker: Patch paths of xz and
 docker-proxy.
Date: Mon, 15 Apr 2019 16:19:12 -0400
[Message part 1 (text/plain, inline)]
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).

[0001-gnu-docker-Fix-indentation.patch (text/x-patch, attachment)]
[0002-gnu-docker-Cleanup-extraneous-comments.patch (text/x-patch, attachment)]
[0003-gnu-docker-Harmonize-LookPath-regexes.patch (text/x-patch, attachment)]
[0004-gnu-docker-Make-macros-use-a-relative-path-as-argume.patch (text/x-patch, attachment)]
[0005-gnu-docker-Optimize-substitution-macros.patch (text/x-patch, attachment)]
[0006-gnu-docker-Patch-the-reference-to-the-docker-proxy.patch (text/x-patch, attachment)]
[0007-gnu-docker-Refer-to-xz-by-its-absolute-path.patch (text/x-patch, attachment)]
[Message part 9 (text/plain, inline)]
Thanks!

Maxim
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35282; Package guix-patches. (Mon, 15 Apr 2019 21:45:02 GMT) Full text and rfc822 format available.

Message #19 received at 35282 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 35282 <at> debbugs.gnu.org
Subject: Re: [bug#35282] [PATCHv2] gnu: docker: Patch paths of xz and
 docker-proxy.
Date: Mon, 15 Apr 2019 23:44:22 +0200
[Message part 1 (text/plain, inline)]
LGTM!
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35282; Package guix-patches. (Tue, 16 Apr 2019 14:56:01 GMT) Full text and rfc822 format available.

Message #22 received at 35282 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35282 <at> debbugs.gnu.org
Subject: Re: [bug#35282] [PATCHv2] gnu: docker: Patch paths of xz and
 docker-proxy.
Date: Tue, 16 Apr 2019 10:54:59 -0400
Danny Milosavljevic <dannym <at> scratchpost.org> writes:

> LGTM!

Thanks for the review, Danny!

These changes are blocked by #35263, which modifies the go-build-system
slightly, so I will wait for that one to be reviewed and merged first
before closing this one.

Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#35282; Package guix-patches. (Mon, 06 May 2019 01:44:02 GMT) Full text and rfc822 format available.

Message #25 received at 35282 <at> debbugs.gnu.org (full text, mbox):

From: T460s laptop <maxim.cournoyer <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 35282 <at> debbugs.gnu.org
Subject: Re: [bug#35282] [PATCHv2] gnu: docker: Patch paths of xz and
 docker-proxy.
Date: Sun, 05 May 2019 21:43:18 -0400
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Danny Milosavljevic <dannym <at> scratchpost.org> writes:
>
>> LGTM!
>
> Thanks for the review, Danny!
>
> These changes are blocked by #35263, which modifies the go-build-system
> slightly, so I will wait for that one to be reviewed and merged first
> before closing this one.
>
> Maxim

Push as commit 59781b32d8.

Thanks!

Maxim




Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Mon, 06 May 2019 14:50:01 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Mon, 06 May 2019 14:50:02 GMT) Full text and rfc822 format available.

Message #30 received at 35282-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: 35282-done <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#35282] [PATCHv2] gnu: docker: Patch paths of xz and
 docker-proxy.
Date: Mon, 06 May 2019 16:48:26 +0200
T460s laptop <maxim.cournoyer <at> gmail.com> writes:

> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:
>
>> Danny Milosavljevic <dannym <at> scratchpost.org> writes:
>>
>>> LGTM!
>>
>> Thanks for the review, Danny!
>>
>> These changes are blocked by #35263, which modifies the go-build-system
>> slightly, so I will wait for that one to be reviewed and merged first
>> before closing this one.
>>
>> Maxim
>
> Push as commit 59781b32d8.

I’m closing this.

-- 
Ricardo





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 04 Jun 2019 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.