move default keystore location to keystore.jks, i.e. in the fdroid repo

This makes `fdroid init` create a complete, self-contained repo in a single
folder.  That makes it easily transferable, backupable, etc.  It also means
that `fdroid update` can add a keystore to an existing unsigned repo
without having to worry about finding the right folder or overwriting any
other existing files.
This commit is contained in:
Hans-Christoph Steiner 2015-04-20 19:29:50 -04:00
parent 4861595288
commit af360199f1
2 changed files with 4 additions and 1 deletions

View file

@ -63,7 +63,7 @@ default_config = {
'stats_to_carbon': False,
'repo_maxage': 0,
'build_server_always': False,
'keystore': os.path.join("$HOME", '.local', 'share', 'fdroidserver', 'keystore.jks'),
'keystore': 'keystore.jks',
'smartcardoptions': [],
'char_limits': {
'Summary': 50,
@ -2038,6 +2038,7 @@ def genkey(keystore, repo_keyalias, password, keydname):
'-keypass:file', config['keypassfile'],
'-dname', keydname])
# TODO keypass should be sent via stdin
os.chmod(keystore, 0o0600)
if p.returncode != 0:
raise BuildException("Failed to generate key", p.output)
# now show the lovely key that was just generated