mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-08 16:30:28 +03:00
Validate publish-related file existence before proceeding
This commit is contained in:
parent
e4ad174399
commit
7f822b01bf
1 changed files with 8 additions and 3 deletions
|
|
@ -63,8 +63,13 @@ def main():
|
||||||
|
|
||||||
unsigned_dir = 'unsigned'
|
unsigned_dir = 'unsigned'
|
||||||
if not os.path.isdir(unsigned_dir):
|
if not os.path.isdir(unsigned_dir):
|
||||||
logging.info("No unsigned directory - nothing to do")
|
logging.warning("No unsigned directory - nothing to do")
|
||||||
sys.exit(0)
|
sys.exit(1)
|
||||||
|
|
||||||
|
for f in [config['keystorepassfile'], config['keystore'], config['keypassfile']]:
|
||||||
|
if not os.path.exists(f):
|
||||||
|
logging.error("Config error - missing '{0}'".format(f))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
# It was suggested at https://dev.guardianproject.info/projects/bazaar/wiki/FDroid_Audit
|
# It was suggested at https://dev.guardianproject.info/projects/bazaar/wiki/FDroid_Audit
|
||||||
# that a package could be crafted, such that it would use the same signing
|
# that a package could be crafted, such that it would use the same signing
|
||||||
|
|
@ -82,7 +87,7 @@ def main():
|
||||||
m.update(app['id'])
|
m.update(app['id'])
|
||||||
keyalias = m.hexdigest()[:8]
|
keyalias = m.hexdigest()[:8]
|
||||||
if keyalias in allaliases:
|
if keyalias in allaliases:
|
||||||
logging.info("There is a keyalias collision - publishing halted")
|
logging.error("There is a keyalias collision - publishing halted")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
allaliases.append(keyalias)
|
allaliases.append(keyalias)
|
||||||
logging.info("{0} apps, {0} key aliases".format(len(allapps), len(allaliases)))
|
logging.info("{0} apps, {0} key aliases".format(len(allapps), len(allaliases)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue