From 4cf3727db7a94cf086aef618eb5e60b7a45e70e1 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 24 Sep 2025 16:44:00 +0200 Subject: [PATCH] use example.com as default repo domain name, closes admin#300 --- examples/config.yml | 6 +++--- fdroidserver/common.py | 2 +- tests/config.yml | 4 ++-- tests/repo/entry.json | 4 ++-- tests/repo/index-v1.json | 2 +- tests/repo/index-v2.json | 8 ++++---- tests/repo/index.xml | 2 +- tests/test_common.py | 16 ++++++++-------- tests/test_index.py | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/examples/config.yml b/examples/config.yml index ae4e7008..5d2ede4e 100644 --- a/examples/config.yml +++ b/examples/config.yml @@ -50,13 +50,13 @@ # Canonical URL of the repositoy, needs to end in /repo. Is is used to identity # the repo in the client, as well. -# repo_url: https://MyFirstFDroidRepo.org/fdroid/repo +# repo_url: https://example.com/fdroid/repo # # Base URL for per-package pages on the website of this repo, # i.e. https://f-droid.org/packages// This should be accessible # with a browser. Setting it to null or not setting this disables the # feature. -# repo_web_base_url: https://MyFirstFDroidRepo.org/packages/ +# repo_web_base_url: https://example.com/packages/ # # repo_name: My First F-Droid Repo Demo # repo_description: >- @@ -68,7 +68,7 @@ # As above, but for the archive repo. # -# archive_url: https://f-droid.org/archive +# archive_url: https://example.com/fdroid/archive # archive_web_base_url: # archive_name: My First F-Droid Archive Demo # archive_description: >- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 127976c3..a253fa16 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -209,7 +209,7 @@ default_config = { 'whatsNew': 500, }, 'keyaliases': {}, - 'repo_url': "https://MyFirstFDroidRepo.org/fdroid/repo", + 'repo_url': "https://example.com/fdroid/repo", 'repo_name': "My First F-Droid Repo Demo", 'repo_icon': "icon.png", 'repo_description': _("""This is a repository of apps to be used with F-Droid. Applications in this repository are either official binaries built by the original application developers, or are binaries built from source by the admin of f-droid.org using the tools on https://gitlab.com/fdroid."""), # type: ignore diff --git a/tests/config.yml b/tests/config.yml index 75b1eadf..e1304725 100644 --- a/tests/config.yml +++ b/tests/config.yml @@ -1,11 +1,11 @@ --- -repo_url: https://MyFirstFDroidRepo.org/fdroid/repo +repo_url: https://example.com/fdroid/repo repo_name: My First F-Droid Repo Demo repo_description: This is a repository of apps to be used with F-Droid. Applications in this repository are either official binaries built by the original application developers, or are binaries built from source by the admin of f-droid.org using the tools on https://gitlab.com/fdroid. archive_older: 3 -archive_url: https://f-droid.org/archive +archive_url: https://example.com/fdroid/archive archive_name: My First F-Droid Archive Demo archive_description: The repository of older versions of applications from the main demo repository. diff --git a/tests/repo/entry.json b/tests/repo/entry.json index 85b6b14f..9492801a 100644 --- a/tests/repo/entry.json +++ b/tests/repo/entry.json @@ -3,8 +3,8 @@ "version": 20002, "index": { "name": "/index-v2.json", - "sha256": "94dca5f4398d2a0167bbe69c790cdd66f1bc305ca5e362ee5e3f793e9f88e3cf", - "size": 53355, + "sha256": "dd0ac2615ffbe1dc89e12bd5f65e6a17d34cc428025a994dd658ab17d22fc17c", + "size": 53335, "numPackages": 11 }, "diffs": {} diff --git a/tests/repo/index-v1.json b/tests/repo/index-v1.json index 03f8f060..534c0eeb 100644 --- a/tests/repo/index-v1.json +++ b/tests/repo/index-v1.json @@ -4,7 +4,7 @@ "version": 20002, "name": "My First F-Droid Repo Demo", "icon": "icon.png", - "address": "https://MyFirstFDroidRepo.org/fdroid/repo", + "address": "https://example.com/fdroid/repo", "description": "This is a repository of apps to be used with F-Droid. Applications in this repository are either official binaries built by the original application developers, or are binaries built from source by the admin of f-droid.org using the tools on https://gitlab.com/fdroid.", "mirrors": [ "http://foobarfoobarfoobar.onion/fdroid/repo", diff --git a/tests/repo/index-v2.json b/tests/repo/index-v2.json index 263dffd2..7db2c984 100644 --- a/tests/repo/index-v2.json +++ b/tests/repo/index-v2.json @@ -9,15 +9,15 @@ "icon": { "en-US": { "name": "/icons/icon.png", - "sha256": "b1f27fa87f8cabca50cdcd462a0f500d79d883b965a498d0e49eea560b39be1f", - "size": 715 + "sha256": "53ca92e52a933733d2abcf6545f86c8eab56013524dc03ce9f5ea08488d62651", + "size": 700 } }, - "address": "https://MyFirstFDroidRepo.org/fdroid/repo", + "address": "https://example.com/fdroid/repo", "mirrors": [ { "isPrimary": true, - "url": "https://MyFirstFDroidRepo.org/fdroid/repo" + "url": "https://example.com/fdroid/repo" }, { "url": "http://foobarfoobarfoobar.onion/fdroid/repo" diff --git a/tests/repo/index.xml b/tests/repo/index.xml index 04e8f87d..a8a59d5e 100644 --- a/tests/repo/index.xml +++ b/tests/repo/index.xml @@ -1,6 +1,6 @@ - + This is a repository of apps to be used with F-Droid. Applications in this repository are either official binaries built by the original application developers, or are binaries built from source by the admin of f-droid.org using the tools on https://gitlab.com/fdroid. http://foobarfoobarfoobar.onion/fdroid/repo https://foo.bar/fdroid/repo diff --git a/tests/test_common.py b/tests/test_common.py index 3110b446..1dbe79ba 100755 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -1965,44 +1965,44 @@ class CommonTest(SetUpTearDownMixin, unittest.TestCase): fdroidserver.common.write_config_file( textwrap.dedent( """\ - repo_url: https://MyFirstFDroidRepo.org/fdroid/repo - archive_url: https://MyFirstFDroidRepo.org/fdroid/archive + repo_url: https://example.com/fdroid/repo + archive_url: https://example.com/fdroid/archive """ ) ) config = fdroidserver.common.read_config() self.assertEqual( - 'https://MyFirstFDroidRepo.org/fdroid/repo', config.get('repo_url') + 'https://example.com/fdroid/repo', config.get('repo_url') ) self.assertEqual( - 'https://MyFirstFDroidRepo.org/fdroid/archive', config.get('archive_url') + 'https://example.com/fdroid/archive', config.get('archive_url') ) def test_config_repo_url_extra_slash(self): """repo_url ends in /repo, archive_url ends in /archive.""" os.chdir(self.testdir) - fdroidserver.common.write_config_file('repo_url: https://MyFirstFDroidRepo.org/fdroid/repo/') + fdroidserver.common.write_config_file('repo_url: https://example.com/fdroid/repo/') with self.assertRaises(FDroidException): fdroidserver.common.read_config() def test_config_repo_url_not_repo(self): """repo_url ends in /repo, archive_url ends in /archive.""" os.chdir(self.testdir) - fdroidserver.common.write_config_file('repo_url: https://MyFirstFDroidRepo.org/fdroid/foo') + fdroidserver.common.write_config_file('repo_url: https://example.com/fdroid/foo') with self.assertRaises(FDroidException): fdroidserver.common.read_config() def test_config_archive_url_extra_slash(self): """repo_url ends in /repo, archive_url ends in /archive.""" os.chdir(self.testdir) - fdroidserver.common.write_config_file('archive_url: https://MyFirstFDroidRepo.org/fdroid/archive/') + fdroidserver.common.write_config_file('archive_url: https://example.com/fdroid/archive/') with self.assertRaises(FDroidException): fdroidserver.common.read_config() def test_config_archive_url_not_repo(self): """repo_url ends in /repo, archive_url ends in /archive.""" os.chdir(self.testdir) - fdroidserver.common.write_config_file('archive_url: https://MyFirstFDroidRepo.org/fdroid/foo') + fdroidserver.common.write_config_file('archive_url: https://example.com/fdroid/foo') with self.assertRaises(FDroidException): fdroidserver.common.read_config() diff --git a/tests/test_index.py b/tests/test_index.py index c8ff5cbe..49781fa5 100755 --- a/tests/test_index.py +++ b/tests/test_index.py @@ -705,7 +705,7 @@ class IndexTest(unittest.TestCase): self.assertEqual( repodict['mirrors'], [ - {'isPrimary': True, 'url': 'https://MyFirstFDroidRepo.org/fdroid/repo'}, + {'isPrimary': True, 'url': 'https://example.com/fdroid/repo'}, {'url': 'http://foobarfoobarfoobar.onion/fdroid/repo'}, {'url': 'https://foo.bar/fdroid/repo'}, ],