Adar Dembo has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/12310 )

Change subject: [build] Fix mini cluster binary relocation on Mac OS
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/12310/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/12310/1//COMMIT_MSG@9
PS1, Line 9: On Mac OS the ssl libs like `libssl.1.0.0.dylib` are read only.
           : When relocate_binaries_for_mini_cluster.py tries to copy
           : these read only libs, the build fails because the file
           : already exists and cannot be replaced.
This explanation doesn't follow from the UNIX permission model. I presume 
shutil.copyfile overwrites by first unlink()ing the existing file (or by 
rename()ing the new file on top of it), and that doesn't mean the existing file 
needs to be writable; the _directory_ containing the existing file must be 
writable.

Could you take a look at all of the UNIX permissions involved and update this 
with more detail?


http://gerrit.cloudera.org:8080/#/c/12310/1//COMMIT_MSG@14
PS1, Line 14: This patch changes the copy_file method to ignore files
            : that already exist.
I don't think this is a good idea though; what if one of my dependencies 
(system or otherwise) changes? Don't I want that change to be reflected in the 
relocated output? If that copy is skipped, I'll wind up with relocated output 
that's a mix of old bits and new bits.


http://gerrit.cloudera.org:8080/#/c/12310/1/build-support/relocate_binaries_for_mini_cluster.py
File build-support/relocate_binaries_for_mini_cluster.py:

http://gerrit.cloudera.org:8080/#/c/12310/1/build-support/relocate_binaries_for_mini_cluster.py@225
PS1, Line 225:     shutil.copy(src, dest)
> shutil.copyfile + shutil.copymode = shutil.copy
I actually think copyfile+copymode (or maybe copy2) make more sense:
1. shutil.copy has the added "feature" that if 'dest' is a directory, it'll 
copy 'src' into it. That's more featureful than we need here.
2. More importantly, it doesn't preserve metadata (such as mtime); you'd need 
to use copy2() for that.



--
To view, visit http://gerrit.cloudera.org:8080/12310
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib653b175ba2d0e5563509aecac372c9829eca2f5
Gerrit-Change-Number: 12310
Gerrit-PatchSet: 1
Gerrit-Owner: Grant Henke <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Brian McDevitt <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Comment-Date: Wed, 30 Jan 2019 18:26:07 +0000
Gerrit-HasComments: Yes

Reply via email to