mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 14:30:30 +03:00 
			
		
		
		
	Merge branch 'example.com-default' into 'master'
use example.com as default repo domain name, closes admin#300 Closes admin#300 See merge request fdroid/fdroidserver!1704
This commit is contained in:
		
						commit
						98aaf1ba7c
					
				
					 9 changed files with 23 additions and 23 deletions
				
			
		| 
						 | 
				
			
			@ -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/<appid>/ 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: >-
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,8 +3,8 @@
 | 
			
		|||
  "version": 20002,
 | 
			
		||||
  "index": {
 | 
			
		||||
    "name": "/index-v2.json",
 | 
			
		||||
    "sha256": "94dca5f4398d2a0167bbe69c790cdd66f1bc305ca5e362ee5e3f793e9f88e3cf",
 | 
			
		||||
    "size": 53355,
 | 
			
		||||
    "sha256": "dd0ac2615ffbe1dc89e12bd5f65e6a17d34cc428025a994dd658ab17d22fc17c",
 | 
			
		||||
    "size": 53335,
 | 
			
		||||
    "numPackages": 11
 | 
			
		||||
  },
 | 
			
		||||
  "diffs": {}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<fdroid>
 | 
			
		||||
	<repo icon="icon.png" name="My First F-Droid Repo Demo" pubkey="308204e1308202c9a003020102020434597643300d06092a864886f70d01010b050030213110300e060355040b1307462d44726f6964310d300b06035504031304736f7661301e170d3136303931333230313930395a170d3434303133303230313930395a30213110300e060355040b1307462d44726f6964310d300b06035504031304736f766130820222300d06092a864886f70d01010105000382020f003082020a028202010086ef94b5aacf2ba4f38c875f4194b44f5644392e3715575d7c92828577e692c352b567172823851c8c72347fbc9d99684cd7ca3e1db3e4cca126382c53f2a5869fb4c19bdec989b2930501af3e758ff40588915fe96b10076ce3346a193a0277d79e83e30fd8657c20e35260dd085aa32eac7c4b85786ffefbf1555cafe2bc928443430cdbba48cfbe701e12ae86e676477932730d4fc7c00af820aef85038a5b4df084cf6470d110dc4c49ea1b749b80b34709d199b3db516b223625c5de4501e861f7d261b3838f8f616aa78831d618d41d25872dc810c9b2087b5a9e146ca95be740316dcdbcb77314e23ab87d4487913b800b1113c0603ea2294188b71d3e49875df097b56f9151211fc6832f9790c5c83d17481f14ad37915fd164f4fd713f6732a15f4245714b84cd665bdbd085660ea33ad7d7095dcc414f09e3903604a40facc2314a115c0045bb50e9df38efb57e1b8e7cc105f340a26eeb46aba0fa6672953eee7f1f92dcb408e561909bbd4bdf4a4948c4d57c467d21aa238c34ba43be050398be963191fa2b49828bc1e4eeed224b40dbe9dc3e570890a71a974a2f4527edb1b07105071755105edcb2af2f269facfb89180903a572a99b46456e80d4a01685a80b233278805f2c876678e731f4ec4f52075aeef6b2b023efbb8a3637ef507c4c37c27e428152ec1817fcba640ad601cb09f72f0fbe2d274a2410203010001a321301f301d0603551d0e04160414c28bf33dd5a9a17338e5b1d1a6edd8c7d141ed0b300d06092a864886f70d01010b0500038202010084e20458b2aafd7fc27146b0986f9324f4260f244920417a77c9bf15e2e2d22d2725bdd8093ec261c3779c3ca03312516506f9410075b90595b41345956d8eb2786fb5994f195611382c2b99dba13381b0100a30bc9e6e47248bf4325e2f6eec9d789216dc7536e753bf1f4be603d9fa2e6f5e192b4eb988b8cdb0bb1e8668a9225426f7d4636479f73ed24ad1d2657c31e63c93d9679b9080171b3bd1bf10a3b92b80bd790fbf62d3644900cd08eae8b9bf9c2567be98dc8cdd2ae19a8d57a3e3e2de899f81f1279f578989e6af906f80c8c2b67651730ee7e568c1af5bcb845b6d685dc55332a9984aeceaea3b7e883447edf1c76b155d95253e39b9710eaa22efa6c81468829702b5dce7126538f3ca70c2f0ad9a5795435fdb1f715f20d60359ef9a9926c7050116e802df651727447848827815f70bd82af3cedd08783156102d2d8ce995c4c43b8e47e91a3e6927f3505a5d395e6bebb84542c570903eeab4382a1c2151f1471c7a06a34dc4d268d8fa72e93bdcd2dccc4302ecac47b9e7e3d8bc9b46d21cd097874a24d529548018dc190ff568c6aa428f0a5eedff1a347730931c74f19277538e49647a4ad7254f4c1ec7d4da12cce9e1fad9607534e66ab40a56b473d9d7e3d563fd03cad2052bad365c5a29f8ae54f09b60dbca3ea768d7767cbe1c133ca08ce725c1c1370f4aab8e5b6e286f52dc0be8d0982b5a" timestamp="1676634233" url="https://MyFirstFDroidRepo.org/fdroid/repo" version="20002">
 | 
			
		||||
	<repo icon="icon.png" name="My First F-Droid Repo Demo" pubkey="308204e1308202c9a003020102020434597643300d06092a864886f70d01010b050030213110300e060355040b1307462d44726f6964310d300b06035504031304736f7661301e170d3136303931333230313930395a170d3434303133303230313930395a30213110300e060355040b1307462d44726f6964310d300b06035504031304736f766130820222300d06092a864886f70d01010105000382020f003082020a028202010086ef94b5aacf2ba4f38c875f4194b44f5644392e3715575d7c92828577e692c352b567172823851c8c72347fbc9d99684cd7ca3e1db3e4cca126382c53f2a5869fb4c19bdec989b2930501af3e758ff40588915fe96b10076ce3346a193a0277d79e83e30fd8657c20e35260dd085aa32eac7c4b85786ffefbf1555cafe2bc928443430cdbba48cfbe701e12ae86e676477932730d4fc7c00af820aef85038a5b4df084cf6470d110dc4c49ea1b749b80b34709d199b3db516b223625c5de4501e861f7d261b3838f8f616aa78831d618d41d25872dc810c9b2087b5a9e146ca95be740316dcdbcb77314e23ab87d4487913b800b1113c0603ea2294188b71d3e49875df097b56f9151211fc6832f9790c5c83d17481f14ad37915fd164f4fd713f6732a15f4245714b84cd665bdbd085660ea33ad7d7095dcc414f09e3903604a40facc2314a115c0045bb50e9df38efb57e1b8e7cc105f340a26eeb46aba0fa6672953eee7f1f92dcb408e561909bbd4bdf4a4948c4d57c467d21aa238c34ba43be050398be963191fa2b49828bc1e4eeed224b40dbe9dc3e570890a71a974a2f4527edb1b07105071755105edcb2af2f269facfb89180903a572a99b46456e80d4a01685a80b233278805f2c876678e731f4ec4f52075aeef6b2b023efbb8a3637ef507c4c37c27e428152ec1817fcba640ad601cb09f72f0fbe2d274a2410203010001a321301f301d0603551d0e04160414c28bf33dd5a9a17338e5b1d1a6edd8c7d141ed0b300d06092a864886f70d01010b0500038202010084e20458b2aafd7fc27146b0986f9324f4260f244920417a77c9bf15e2e2d22d2725bdd8093ec261c3779c3ca03312516506f9410075b90595b41345956d8eb2786fb5994f195611382c2b99dba13381b0100a30bc9e6e47248bf4325e2f6eec9d789216dc7536e753bf1f4be603d9fa2e6f5e192b4eb988b8cdb0bb1e8668a9225426f7d4636479f73ed24ad1d2657c31e63c93d9679b9080171b3bd1bf10a3b92b80bd790fbf62d3644900cd08eae8b9bf9c2567be98dc8cdd2ae19a8d57a3e3e2de899f81f1279f578989e6af906f80c8c2b67651730ee7e568c1af5bcb845b6d685dc55332a9984aeceaea3b7e883447edf1c76b155d95253e39b9710eaa22efa6c81468829702b5dce7126538f3ca70c2f0ad9a5795435fdb1f715f20d60359ef9a9926c7050116e802df651727447848827815f70bd82af3cedd08783156102d2d8ce995c4c43b8e47e91a3e6927f3505a5d395e6bebb84542c570903eeab4382a1c2151f1471c7a06a34dc4d268d8fa72e93bdcd2dccc4302ecac47b9e7e3d8bc9b46d21cd097874a24d529548018dc190ff568c6aa428f0a5eedff1a347730931c74f19277538e49647a4ad7254f4c1ec7d4da12cce9e1fad9607534e66ab40a56b473d9d7e3d563fd03cad2052bad365c5a29f8ae54f09b60dbca3ea768d7767cbe1c133ca08ce725c1c1370f4aab8e5b6e286f52dc0be8d0982b5a" timestamp="1676634233" url="https://example.com/fdroid/repo" version="20002">
 | 
			
		||||
		<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.</description>
 | 
			
		||||
		<mirror>http://foobarfoobarfoobar.onion/fdroid/repo</mirror>
 | 
			
		||||
		<mirror>https://foo.bar/fdroid/repo</mirror>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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()
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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'},
 | 
			
		||||
            ],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue