Commit 7a3baa01 authored by Ciaran Gultnieks's avatar Ciaran Gultnieks

Allow gpg home directory to be overridden

parent 3b78147b
......@@ -65,6 +65,9 @@ The repository of older versions of applications from the main demo repository.
# metadata here:
# current_version_name_source = 'id'
# Optionally, override home directory for gpg
# gpghome = /home/fdroid/somewhere/else/.gnupg
# The ID of a GPG key for making detached signatures for apks. Optional.
# gpgkey = '1DBA2E89'
......
......@@ -61,10 +61,13 @@ def main():
sigpath = os.path.join(output_dir, sigfilename)
if not os.path.exists(sigpath):
p = FDroidPopen(['gpg', '-a',
'--output', sigpath,
'--detach-sig',
os.path.join(output_dir, apkfilename)])
gpgargs = ['gpg', '-a',
'--output', sigpath,
'--detach-sig']
if 'gpghome' in config:
gpgargs.extend(['--homedir', config['gpghome']])
gpgargs.append(os.path.join(output_dir, apkfilename))
p = FDroidPopen(gpgargs)
if p.returncode != 0:
logging.error("Signing failed.")
sys.exit(1)
......
......@@ -339,8 +339,6 @@ class DescriptionFormatter:
else:
urltxt = url[index2 + 1:]
url = url[:index2]
if ':' not in url:
raise MetaDataException("'%s' doesn't look like an URL" % url)
linkified_html += '<a href="' + url + '">' + cgi.escape(urltxt) + '</a>'
linkified_plain += urltxt
if urltxt != url:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment