From 034e83bfcaf2c489000c38cc77c6644e58c4496d Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 11 Jun 2024 20:06:00 +0200 Subject: [PATCH 1/2] deploy: complete index-only support for awsbucket: --- fdroidserver/deploy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fdroidserver/deploy.py b/fdroidserver/deploy.py index 8d2b5dca..97f857df 100644 --- a/fdroidserver/deploy.py +++ b/fdroidserver/deploy.py @@ -1367,7 +1367,8 @@ def main(): # update_servergitmirrors will take care of multiple mirrors so don't need a foreach update_servergitmirrors(config['servergitmirrors'], repo_section) if config.get('awsbucket'): - update_awsbucket(repo_section, options.verbose, options.quiet) + index_only = config.get('awsbucket_index_only') + update_awsbucket(repo_section, index_only, options.verbose, options.quiet) if config.get('androidobservatory'): upload_to_android_observatory(repo_section) if config.get('virustotal_apikey'): From fbb6772e376c46834a98541fd51343a1e98446f8 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 11 Jun 2024 20:12:46 +0200 Subject: [PATCH 2/2] always use GitLab Pages, not Artifacts, with index-only mode If the repo is too large, then it'll hit the GitLab Pages limit. That is basically impossible in index-only mode, so it should always use Pages. --- fdroidserver/deploy.py | 5 ++++- fdroidserver/index.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fdroidserver/deploy.py b/fdroidserver/deploy.py index 97f857df..d84b4c77 100644 --- a/fdroidserver/deploy.py +++ b/fdroidserver/deploy.py @@ -797,7 +797,10 @@ def upload_to_servergitmirror( local_repo.index.commit("fdroidserver git-mirror") # only deploy to GitLab Artifacts if too big for GitLab Pages - if common.get_dir_size(fdroid_dir) <= common.GITLAB_COM_PAGES_MAX_SIZE: + if ( + is_index_only + or common.get_dir_size(fdroid_dir) <= common.GITLAB_COM_PAGES_MAX_SIZE + ): gitlab_ci_job_name = 'pages' else: gitlab_ci_job_name = 'GitLab Artifacts' diff --git a/fdroidserver/index.py b/fdroidserver/index.py index fc1b663c..3fe533bd 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -1534,7 +1534,10 @@ def get_mirror_service_urls(mirror): urls.append('/'.join(segments)) elif hostname == "gitlab.com": git_mirror_path = os.path.join('git-mirror', folder) - if common.get_dir_size(git_mirror_path) <= common.GITLAB_COM_PAGES_MAX_SIZE: + if ( + mirror.get('index_only') + or common.get_dir_size(git_mirror_path) <= common.GITLAB_COM_PAGES_MAX_SIZE + ): # Gitlab-like Pages segments "https://user.gitlab.io/repo/folder" gitlab_pages = ["https:", "", user + ".gitlab.io", repo, folder] urls.append('/'.join(gitlab_pages))