From 0950cdac0969105c3ddcf4b2db6ee1a76a41b065 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 3 Apr 2014 21:44:40 -0400 Subject: [PATCH] make repo_keyalias like a config option: leave it commented out Before, the code relies on repo_keyalias being None, which does not feel conffile-like. Now, its commented out if its not set. --- examples/config.py | 7 ++++--- fdroidserver/update.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/config.py b/examples/config.py index 8eb1f266..3aa837f9 100644 --- a/examples/config.py +++ b/examples/config.py @@ -54,9 +54,10 @@ of applications from the main repository. """ -#The key (from the keystore defined below) to be used for signing the -#repository itself. Can be None for an unsigned repository. -repo_keyalias = None +# The key (from the keystore defined below) to be used for signing the +# repository itself. This is the same name you would give to keytool or +# jarsigner using -alias. (Not needed in an unsigned repository). +#repo_keyalias = "fdroidrepo" #The keystore to use for release keys when building. This needs to be #somewhere safe and secure, and backed up! diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 6e54bbc0..fb90c504 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -627,7 +627,7 @@ def make_index(apps, apks, repodir, archive, categories): repoel.setAttribute("version", "12") repoel.setAttribute("timestamp", str(int(time.time()))) - if config['repo_keyalias']: + if 'repo_keyalias' in config: # Generate a certificate fingerprint the same way keytool does it # (but with slightly different formatting) @@ -783,7 +783,7 @@ def make_index(apps, apks, repodir, archive, categories): of.write(output) of.close() - if config['repo_keyalias'] is not None: + if 'repo_keyalias' in config: logging.info("Creating signed index.") logging.info("Key fingerprint: %s" % repo_pubkey_fingerprint) -- 2.30.2