1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-06-02 22:00:12 +02:00

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.
This commit is contained in:
Hans-Christoph Steiner 2017-12-06 09:47:08 +01:00
parent a0a68c7a13
commit 964ef996a0
2 changed files with 9 additions and 2 deletions

View File

@ -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' +

View File

@ -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 + '/'])