publish: remove last use of stats/ dir

This file can be treated like the other index files in repo/. This also has
the advantage that it will automatically get synced by @CiaranG's existing
sync scripts.
This commit is contained in:
Hans-Christoph Steiner 2025-03-19 21:49:18 +01:00
parent 38378ddfb7
commit 4b9100ae80
7 changed files with 50 additions and 18 deletions

View file

@ -326,6 +326,12 @@ class DeployTest(unittest.TestCase):
'repo/index.png',
'--exclude',
'repo/index.xml',
'--exclude',
'repo/signer-index.jar',
'--exclude',
'repo/signer-index.json',
'--exclude',
'repo/signer-index.json.asc',
'repo',
'example.com:/var/www/fdroid',
],
@ -413,6 +419,9 @@ class DeployTest(unittest.TestCase):
'repo/index.jar',
'repo/index.png',
'repo/index.xml',
'repo/signer-index.jar',
'repo/signer-index.json',
'repo/signer-index.json.asc',
'example.com:/var/www/fdroid/repo/',
],
)
@ -729,6 +738,12 @@ class DeployTest(unittest.TestCase):
'repo/index.png',
'--exclude',
'repo/index.xml',
'--exclude',
'repo/signer-index.jar',
'--exclude',
'repo/signer-index.json',
'--exclude',
'repo/signer-index.json.asc',
'--no-check-md5',
'--skip-existing',
repo_section,
@ -774,6 +789,12 @@ class DeployTest(unittest.TestCase):
'repo/index.png',
'--exclude',
'repo/index.xml',
'--exclude',
'repo/signer-index.jar',
'--exclude',
'repo/signer-index.json',
'--exclude',
'repo/signer-index.json.asc',
'--no-check-md5',
repo_section,
f"s3://{fdroidserver.deploy.config['awsbucket']}/fdroid/",
@ -880,6 +901,12 @@ class DeployTest(unittest.TestCase):
'repo/index.png',
'--include',
'repo/index.xml',
'--include',
'repo/signer-index.jar',
'--include',
'repo/signer-index.json',
'--include',
'repo/signer-index.json.asc',
'--delete-removed',
'--delete-after',
'--no-check-md5',

View file

@ -375,10 +375,10 @@ class IndexTest(unittest.TestCase):
"signer": "b33a601a9da97c82e6eb121eb6b90adab561f396602ec4dc8b0019fb587e2af6"
}
}
os.makedirs('stats')
jarfile = 'stats/publishsigkeys.jar'
os.mkdir('repo')
jarfile = 'repo/signer-index.jar'
with zipfile.ZipFile(jarfile, 'w', zipfile.ZIP_DEFLATED) as jar:
jar.writestr('publishsigkeys.json', json.dumps(sigkeyfps))
jar.writestr('signer-index.json', json.dumps(sigkeyfps))
publish.sign_sig_key_fingerprint_list(jarfile)
common.write_config_file('')
@ -387,7 +387,7 @@ class IndexTest(unittest.TestCase):
self.assertEqual(json.dumps(i, indent=2), json.dumps(o, indent=2))
# and test it still works with get_first_signer_certificate
outdir = os.path.join(self.testdir, 'publishsigkeys')
outdir = os.path.join(self.testdir, 'index-signer-fingerprints')
os.mkdir(outdir)
common.apk_extract_signatures(jarfile, outdir)
certs = glob.glob(os.path.join(outdir, '*.RSA'))

View file

@ -747,7 +747,6 @@ class IntegrationTest(unittest.TestCase):
self.update_yaml(common.CONFIG_FILE, {"archive_older": 3})
Path("metadata").mkdir()
Path("archive").mkdir()
Path("stats").mkdir()
shutil.copy(FILES / "repo/com.politedroid_6.apk", "repo")
shutil.copy(FILES / "repo/index-v2.json", "repo")
shutil.copy(FILES / "repo/com.politedroid_5.apk", "archive")