mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-02 09:10:11 +02:00
Merge branch 'rsync_improvements' into 'master'
Rsync improvements See merge request fdroid/fdroidserver!400
This commit is contained in:
commit
8e1c39f791
@ -100,18 +100,20 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
|||||||
# Helper to copy the contents of a directory to the server...
|
# Helper to copy the contents of a directory to the server...
|
||||||
def send_dir(path):
|
def send_dir(path):
|
||||||
logging.debug("rsyncing " + path + " to " + ftp.getcwd())
|
logging.debug("rsyncing " + path + " to " + ftp.getcwd())
|
||||||
subprocess.check_call(['rsync', '-rple',
|
try:
|
||||||
'ssh -o StrictHostKeyChecking=no' +
|
subprocess.check_output(['rsync', '--recursive', '--perms', '--links', '--quiet', '--rsh=' +
|
||||||
' -o UserKnownHostsFile=/dev/null' +
|
'ssh -o StrictHostKeyChecking=no' +
|
||||||
' -o LogLevel=FATAL' +
|
' -o UserKnownHostsFile=/dev/null' +
|
||||||
' -o IdentitiesOnly=yes' +
|
' -o LogLevel=FATAL' +
|
||||||
' -o PasswordAuthentication=no' +
|
' -o IdentitiesOnly=yes' +
|
||||||
' -p ' + str(sshinfo['port']) +
|
' -o PasswordAuthentication=no' +
|
||||||
' -i ' + sshinfo['idfile'],
|
' -p ' + str(sshinfo['port']) +
|
||||||
path,
|
' -i ' + sshinfo['idfile'],
|
||||||
sshinfo['user'] +
|
path,
|
||||||
"@" + sshinfo['hostname'] +
|
sshinfo['user'] + "@" + sshinfo['hostname'] + ":" + ftp.getcwd()],
|
||||||
":" + ftp.getcwd()])
|
stderr=subprocess.STDOUT)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
raise FDroidException(str(e), e.output.decode())
|
||||||
|
|
||||||
logging.info("Preparing server for build...")
|
logging.info("Preparing server for build...")
|
||||||
serverpath = os.path.abspath(os.path.dirname(__file__))
|
serverpath = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
Loading…
Reference in New Issue
Block a user