From 964ef996a01ceac8d6735668f2c9fd9119512346 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 6 Dec 2017 09:47:08 +0100 Subject: [PATCH] makebuildserver: make copy_caches_from_host do rsync like `fdroid build` This rsync hung because of an SSH unknown key prompt. Since this is just the vm host sshing to the vm guest, it is not essential to check the host keys. --- fdroidserver/build.py | 1 + makebuildserver | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fdroidserver/build.py b/fdroidserver/build.py index bbb5a2b4..d83342d5 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -100,6 +100,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force): # Helper to copy the contents of a directory to the server... def send_dir(path): logging.debug("rsyncing " + path + " to " + ftp.getcwd()) + # TODO this should move to `vagrant rsync` from >= v1.5 try: subprocess.check_output(['rsync', '--recursive', '--perms', '--links', '--quiet', '--rsh=' + 'ssh -o StrictHostKeyChecking=no' + diff --git a/makebuildserver b/makebuildserver index 7ce2e62d..b453d813 100755 --- a/makebuildserver +++ b/makebuildserver @@ -553,10 +553,16 @@ def main(): for d in ('.m2', '.gradle/caches', '.gradle/wrapper', '.pip_download_cache'): fullpath = os.path.join(os.getenv('HOME'), d) if os.path.isdir(fullpath): - # TODO newer versions of vagrant provide `vagrant rsync` + ssh_command = ' '.join('ssh -i {0} -p {1}'.format(key, port), + '-o StrictHostKeyChecking=no', + '-o UserKnownHostsFile=/dev/null', + '-o LogLevel=FATAL', + '-o IdentitiesOnly=yes', + '-o PasswordAuthentication=no') + # TODO vagrant 1.5+ provides `vagrant rsync` run_via_vagrant_ssh(v, ['cd ~ && test -d', d, '|| mkdir -p', d]) subprocess.call(['rsync', '-axv', '--progress', '--delete', '-e', - 'ssh -i {0} -p {1} -oIdentitiesOnly=yes'.format(key, port), + ssh_command, fullpath + '/', user + '@' + hostname + ':~/' + d + '/']) -- 2.30.2