Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(881)

Issue 5796064: code review 5796064: misc/dist: use archive/tar to generate tarballs (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by bradfitz
Modified:
13 years, 1 month ago
Reviewers:
dsymonds
CC:
golang-dev, adg
Visibility:
Public.

Description

misc/dist: use archive/tar to generate tarballs For people untarring with -p or as root, preserving file permissions. This way we don't make tars owned by adg/eng or adg/staff or whatever machine Andrew was on. Instead, we always build tarballs owned by predictable users. Except archive/tar doesn't seem to work. Updates issue 3209.

Patch Set 1 #

Patch Set 2 : diff -r 4c2fa40128af https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 4c2fa40128af https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 4 : diff -r 4c2fa40128af https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 5 : diff -r b26cfc77a66c https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -1 line) Patch
M misc/dist/bindist.go View 1 2 3 4 4 chunks +71 lines, -1 line 0 comments Download

Messages

Total messages: 6
bradfitz
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 1 month ago (2012-03-12 05:41:56 UTC) #1
adg
LGTM http://codereview.appspot.com/5796064/diff/2003/misc/dist/bindist.go File misc/dist/bindist.go (right): http://codereview.appspot.com/5796064/diff/2003/misc/dist/bindist.go#newcode512 misc/dist/bindist.go:512: zout := zlib.NewWriter(f) s/zlib/gzip/ http://codereview.appspot.com/5796064/diff/2003/misc/dist/bindist.go#newcode545 misc/dist/bindist.go:545: Uid: 0, ...
13 years, 1 month ago (2012-03-12 05:50:31 UTC) #2
bradfitz
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 1 month ago (2012-03-12 05:50:36 UTC) #3
adg
LGTM http://codereview.appspot.com/5796064/diff/6001/misc/dist/bindist.go File misc/dist/bindist.go (right): http://codereview.appspot.com/5796064/diff/6001/misc/dist/bindist.go#newcode38 misc/dist/bindist.go:38: // TODO(bradfitz,dsymonds,adg): remove this flag once archive/tar Writer ...
13 years, 1 month ago (2012-03-12 05:52:47 UTC) #4
bradfitz
*** Submitted as http://code.google.com/p/go/source/detail?r=c7af497373ff *** misc/dist: use archive/tar to generate tarballs For people untarring with ...
13 years, 1 month ago (2012-03-12 06:07:40 UTC) #5
dsymonds
13 years, 1 month ago (2012-03-12 06:08:30 UTC) #6
http://codereview.appspot.com/5796064/diff/6001/misc/dist/bindist.go
File misc/dist/bindist.go (right):

http://codereview.appspot.com/5796064/diff/6001/misc/dist/bindist.go#newcode547
misc/dist/bindist.go:547: Size:     fi.Size(),
This should be zero for the fi.IsDir() case, because you're not writing anything
after this header. That's what's causing the bad tar.

I'll make archive/tar return an error if you do a short write so that this will
break instead of silently producing a bad file.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b