kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From granthe...@apache.org
Subject [kudu] 01/03: [build] Fix mini cluster binary relocation on Mac OS
Date Wed, 30 Jan 2019 20:45:53 GMT
This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit f46d2202e19939d137be0e7ff1aad9525f2f54fa
Author: Grant Henke <granthenke@apache.org>
AuthorDate: Wed Jan 30 10:04:46 2019 -0600

    [build] Fix mini cluster binary relocation on Mac OS
    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 patch changes the copy_file method to stop matching
    the permissions of the copied files. Additionally it clears the
    artifact root on every run to ensure old files are not left behind.
    Change-Id: Ib653b175ba2d0e5563509aecac372c9829eca2f5
    Reviewed-on: http://gerrit.cloudera.org:8080/12310
    Reviewed-by: Mike Percy <mpercy@apache.org>
    Tested-by: Grant Henke <granthenke@apache.org>
 build-support/relocate_binaries_for_mini_cluster.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/build-support/relocate_binaries_for_mini_cluster.py b/build-support/relocate_binaries_for_mini_cluster.py
index 9b4cac8..aa12fc6 100755
--- a/build-support/relocate_binaries_for_mini_cluster.py
+++ b/build-support/relocate_binaries_for_mini_cluster.py
@@ -217,12 +217,11 @@ def prep_artifact_dirs(config):
 def copy_file(src, dest):
-  Copy the file with path 'src' to path 'dest', including the file mode.
+  Copy the file with path 'src' to path 'dest'.
   If 'src' is a symlink, the link will be followed and 'dest' will be written
   as a plain file.
   shutil.copyfile(src, dest)
-  shutil.copymode(src, dest)
 def chrpath(target, new_rpath):
@@ -344,6 +343,9 @@ def main():
   artifact_name = get_artifact_name()
   artifact_root = os.path.join(build_root, artifact_name)
+  # Clear the artifact root to ensure a clean build.
+  if os.path.exists(artifact_root):
+    shutil.rmtree(artifact_root)
   logging.info("Including targets and their dependencies in archive...")
   config = mkconfig(build_root, artifact_root)

View raw message