mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-08-16 11:20:10 +02:00
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:
parent
4861595288
commit
af360199f1
@ -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
|
||||
|
@ -227,6 +227,8 @@ def main():
|
||||
elif not os.path.exists(keystore):
|
||||
# no existing or specified keystore, generate the whole thing
|
||||
keystoredir = os.path.dirname(keystore)
|
||||
if keystoredir is None or keystoredir == '':
|
||||
keystoredir = os.path.join(os.getcwd(), keystoredir)
|
||||
if not os.path.exists(keystoredir):
|
||||
os.makedirs(keystoredir, mode=0o700)
|
||||
password = common.genpassword()
|
||||
|
Loading…
Reference in New Issue
Block a user