Skip to content

vendor: add local copy of archive/tar#40672

Merged
AkihiroSuda merged 2 commits intomoby:masterfrom
tiborvass:19.03.8-forwardport-to-master
May 7, 2020
Merged

vendor: add local copy of archive/tar#40672
AkihiroSuda merged 2 commits intomoby:masterfrom
tiborvass:19.03.8-forwardport-to-master

Conversation

@tiborvass
Copy link
Contributor

This version avoids doing name lookups on creating tarball that
should be avoided in to not hit loading glibc shared libraries.

Signed-off-by: Tonis Tiigi [email protected]
(cherry picked from commit aa6a989)
Signed-off-by: Tibor Vass [email protected]

Couple of changes from the commit that I cherry-picked:

  • I completed the instructions at the end of vendor.conf (PTAL)
  • I reran them inside the dev container (which uses go 1.13.8).

@tiborvass tiborvass requested a review from tianon as a code owner March 11, 2020 22:15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this description isn't accurate given we're patching archive/tar again in a post-1.11 Go version?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We reused the same commit that we used in the past (but at the time for a different reason)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, that makes sense, but shouldn't we update the description? From a naive reading it looks like this patch existing again is a mistake, since it's "fixed" in 1.11+. 😅

Is there an issue filed on https://github.com/golang/go we could link to for further discussion? Are they open to a knob for disabling this behavior in a future Go version that could re-deprecate this patch in the future?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no issue for making this behavior configurable afaik

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, AFAIK no one filed it. Makes sense to do so (at least to start a conversation). I'm pretty busy atm though :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonistiigi could you open a ticket? You're probably better at describing the problem than I am

@thaJeztah
Copy link
Member

This fixes #40211 and #39449 on master

@thaJeztah
Copy link
Member

@tonistiigi or @kolyshkin could one of you look at #40672 (comment) ?

@tianon would you like to have the patch description updated as part of this PR (probably an extra commit, because this was cherry-picked from the release branch), or in a follow-up?

@thaJeztah thaJeztah added this to the 20.03.0 milestone Mar 26, 2020
@tianon
Copy link
Member

tianon commented Mar 26, 2020

Well, for context, I've already had two people see this patch description in the diff for the security update and get confused enough about whether it applies (given the description implies the problem the patch is fixing is already fixed in newer Go releases) that they reached out and asked me about it privately, so IMO the description really should be updated before this merges at the very least to make it clear it's an old patch being used to fix a new issue and is not in fact fixed by newer Go versions. 😅

@tonistiigi
Copy link
Member

Yes, this doesn't patch go but switches tar package from stdlib to our fork. Because vndr does not support stdlib packages natively some hackery is needed. An earlier version of this just used my fork branch like we do with some other vendors, but for better visibility of the changes, it was switched to using patch files.

@AkihiroSuda
Copy link
Member

What's current status?

@AkihiroSuda
Copy link
Member

needs rebase

@tianon
Copy link
Member

tianon commented Apr 20, 2020

IMO the description in the patch file should either be updated or simply removed since it no longer applies to our usage, but otherwise I'm fine with this. 👍

tonistiigi and others added 2 commits April 24, 2020 11:22
This version avoids doing name lookups on creating tarball that
should be avoided in to not hit loading glibc shared libraries.

Signed-off-by: Tonis Tiigi <[email protected]>
(cherry picked from commit aa6a989)
Signed-off-by: Tibor Vass <[email protected]>
This blurb exists because we reused the same commit from an old patch,
and thus got the commit message with it. However the message is
confusing in this context.
It was suggested in review that we should remove the confusing message.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83 cpuguy83 force-pushed the 19.03.8-forwardport-to-master branch from 702dfef to 841c1f3 Compare April 24, 2020 18:25
@cpuguy83
Copy link
Member

This is rebased and the g1.11 message was removed (in a new commit).

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ❤️

@@ -11,10 +11,6 @@ on NULL pointer dereference).

For much more details, see https://github.com/golang/go/issues/23265
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link is also misleading, but at least it's not quite as confusing. 👍 ❤️

@AkihiroSuda
Copy link
Member

Ready to merge?

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants