1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-07 01:40:10 +02:00

Allow gpg home directory to be overridden

This commit is contained in:
Ciaran Gultnieks 2015-06-02 09:16:29 +01:00
parent 3b78147b2c
commit 7a3baa01ed
3 changed files with 10 additions and 6 deletions

View File

@ -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'

View File

@ -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)

View File

@ -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: