mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
Add option to not use rsync --checksum
This commit is contained in:
parent
52de223435
commit
e8d7e69630
2 changed files with 9 additions and 4 deletions
|
@ -250,7 +250,7 @@ __complete_stats() {
|
||||||
__complete_server() {
|
__complete_server() {
|
||||||
opts="-i -v -q"
|
opts="-i -v -q"
|
||||||
lopts="--identity-file --local-copy-dir --sync-from-local-copy-dir
|
lopts="--identity-file --local-copy-dir --sync-from-local-copy-dir
|
||||||
--verbose --quiet update"
|
--verbose --quiet --no-checksum update"
|
||||||
__complete_options
|
__complete_options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# server.py - part of the FDroid server tools
|
# server.py - part of the FDroid server tools
|
||||||
# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
|
# Copyright (C) 2010-15, Ciaran Gultnieks, ciaran@ciarang.com
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU Affero General Public License as published by
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
@ -123,7 +123,9 @@ def update_awsbucket(repo_section):
|
||||||
def update_serverwebroot(serverwebroot, repo_section):
|
def update_serverwebroot(serverwebroot, repo_section):
|
||||||
# use a checksum comparison for accurate comparisons on different
|
# use a checksum comparison for accurate comparisons on different
|
||||||
# filesystems, for example, FAT has a low resolution timestamp
|
# filesystems, for example, FAT has a low resolution timestamp
|
||||||
rsyncargs = ['rsync', '--archive', '--delete', '--checksum']
|
rsyncargs = ['rsync', '--archive', '--delete']
|
||||||
|
if not options.nochecksum:
|
||||||
|
rsyncargs.append('--checksum')
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
rsyncargs += ['--verbose']
|
rsyncargs += ['--verbose']
|
||||||
if options.quiet:
|
if options.quiet:
|
||||||
|
@ -164,7 +166,8 @@ def _local_sync(fromdir, todir):
|
||||||
'--one-file-system', '--delete', '--chmod=Da+rx,Fa-x,a+r,u+w']
|
'--one-file-system', '--delete', '--chmod=Da+rx,Fa-x,a+r,u+w']
|
||||||
# use stricter rsync checking on all files since people using offline mode
|
# use stricter rsync checking on all files since people using offline mode
|
||||||
# are already prioritizing security above ease and speed
|
# are already prioritizing security above ease and speed
|
||||||
rsyncargs += ['--checksum']
|
if not options.nochecksum:
|
||||||
|
rsyncargs.append('--checksum')
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
rsyncargs += ['--verbose']
|
rsyncargs += ['--verbose']
|
||||||
if options.quiet:
|
if options.quiet:
|
||||||
|
@ -202,6 +205,8 @@ def main():
|
||||||
help="Spew out even more information than normal")
|
help="Spew out even more information than normal")
|
||||||
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
parser.add_option("-q", "--quiet", action="store_true", default=False,
|
||||||
help="Restrict output to warnings and errors")
|
help="Restrict output to warnings and errors")
|
||||||
|
parser.add_option("--no-checksum", action="store_true", default=False,
|
||||||
|
help="Don't use rsync checksums")
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
config = common.read_config(options)
|
config = common.read_config(options)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue