From commits-return-6901-archive-asf-public=cust-asf.ponee.io@kudu.apache.org Wed Jan 30 20:45:54 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id BA905180677 for ; Wed, 30 Jan 2019 21:45:53 +0100 (CET) Received: (qmail 20499 invoked by uid 500); 30 Jan 2019 20:45:52 -0000 Mailing-List: contact commits-help@kudu.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kudu.apache.org Delivered-To: mailing list commits@kudu.apache.org Received: (qmail 20488 invoked by uid 99); 30 Jan 2019 20:45:52 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2019 20:45:52 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 5569585733; Wed, 30 Jan 2019 20:45:52 +0000 (UTC) Date: Wed, 30 Jan 2019 20:45:53 +0000 To: "commits@kudu.apache.org" Subject: [kudu] 01/03: [build] Fix mini cluster binary relocation on Mac OS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: granthenke@apache.org In-Reply-To: <154888115227.14375.17045899480466362784@gitbox.apache.org> References: <154888115227.14375.17045899480466362784@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: kudu X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: f46d2202e19939d137be0e7ff1aad9525f2f54fa X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20190130204552.5569585733@gitbox.apache.org> 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 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 Tested-by: Grant Henke --- 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)