mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 07:10:12 +02:00
Merge branch 'four-bug-fixes' into 'master'
three bug fixes: let apps build with Debian-local repos, nightly fixes See merge request fdroid/fdroidserver!642
This commit is contained in:
commit
64275356e4
3
.weblate
Normal file
3
.weblate
Normal file
@ -0,0 +1,3 @@
|
||||
[weblate]
|
||||
url = https://hosted.weblate.org/api/
|
||||
translation = f-droid/fdroidserver
|
@ -275,7 +275,7 @@ __complete_mirror() {
|
||||
|
||||
__complete_nightly() {
|
||||
opts="-v -q"
|
||||
lopts="--show-secret-var"
|
||||
lopts="--show-secret-var --archive-older"
|
||||
__complete_options
|
||||
}
|
||||
|
||||
@ -288,7 +288,7 @@ __complete_stats() {
|
||||
__complete_deploy() {
|
||||
opts="-i -v -q"
|
||||
lopts="--identity-file --local-copy-dir --sync-from-local-copy-dir
|
||||
--verbose --quiet --no-checksum"
|
||||
--verbose --quiet --no-checksum --no-keep-git-mirror-archive"
|
||||
__complete_options
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,8 @@ def main():
|
||||
help=_('The file to be included in the repo (path or glob)'))
|
||||
parser.add_argument("--no-checksum", action="store_true", default=False,
|
||||
help=_("Don't use rsync checksums"))
|
||||
parser.add_argument("--archive-older", default=20,
|
||||
help=_("Set maximum releases in repo before older ones are archived"))
|
||||
# TODO add --with-btlog
|
||||
options = parser.parse_args()
|
||||
|
||||
@ -233,6 +235,7 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||
config += "archive_name = '%s'\n" % (repo_git_base + ' archive')
|
||||
config += "archive_url = '%s'\n" % (repo_base + '/archive')
|
||||
config += "archive_icon = 'icon.png'\n"
|
||||
config += "archive_older = %i\n" % options.archive_older
|
||||
config += "servergitmirrors = '%s'\n" % servergitmirror
|
||||
config += "keystore = '%s'\n" % KEYSTORE_FILE
|
||||
config += "repo_keyalias = '%s'\n" % KEY_ALIAS
|
||||
@ -293,7 +296,8 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||
|
||||
if not options.no_deploy:
|
||||
try:
|
||||
subprocess.check_call(['fdroid', 'server', 'update', '--verbose'], cwd=repo_basedir)
|
||||
cmd = ['fdroid', 'server', 'update', '--verbose', '--no-keep-git-mirror-archive']
|
||||
subprocess.check_call(cmd, cwd=repo_basedir)
|
||||
except subprocess.CalledProcessError:
|
||||
logging.error(_('cannot publish update, did you set the deploy key?')
|
||||
+ '\n' + deploy_key_url)
|
||||
|
@ -110,6 +110,7 @@ def scan_source(build_dir, build=metadata.Build()):
|
||||
's3.amazonaws.com/repo.commonsware.com', # CommonsWare
|
||||
'plugins.gradle.org/m2', # Gradle plugin repo
|
||||
'maven.google.com', # Google Maven Repo, https://developer.android.com/studio/build/dependencies.html#google-maven
|
||||
'file:///usr/share/maven-repo', # local repo on Debian installs
|
||||
]
|
||||
]
|
||||
|
||||
|
@ -355,6 +355,10 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
||||
if os.path.isdir(dotgit) and _get_size(git_mirror_path) > 1000000000:
|
||||
logging.warning('Deleting git-mirror history, repo is too big (1 gig max)')
|
||||
shutil.rmtree(dotgit)
|
||||
if options.no_keep_git_mirror_archive and _get_size(git_mirror_path) > 1000000000:
|
||||
logging.warning('Deleting archive, repo is too big (1 gig max)')
|
||||
archive_path = os.path.join(git_mirror_path, 'fdroid', 'archive')
|
||||
shutil.rmtree(archive_path, ignore_errors=True)
|
||||
|
||||
# rsync is very particular about trailing slashes
|
||||
common.local_rsync(options,
|
||||
@ -629,6 +633,8 @@ def main():
|
||||
help=_("Specify a local folder to sync the repo to"))
|
||||
parser.add_argument("--no-checksum", action="store_true", default=False,
|
||||
help=_("Don't use rsync checksums"))
|
||||
parser.add_argument("--no-keep-git-mirror-archive", action="store_true", default=False,
|
||||
help=_("If a git mirror gets to big, allow the archive to be deleted"))
|
||||
options = parser.parse_args()
|
||||
|
||||
config = common.read_config(options)
|
||||
|
Loading…
Reference in New Issue
Block a user