chiark / gitweb /
Allow gpg home directory to be overridden
authorCiaran Gultnieks <ciaran@ciarang.com>
Tue, 2 Jun 2015 08:16:29 +0000 (09:16 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Tue, 2 Jun 2015 08:17:08 +0000 (09:17 +0100)
examples/config.py
fdroidserver/gpgsign.py
fdroidserver/metadata.py

index 4ad5a32336c659175b7bc5c8566a28b420579480..b8c06d8ddcaa928a9b7b963ae0409ec54cfad914 100644 (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'
 
index fa874cb805500de201b09379c81f944aecc6b195..0358e99ed62ec1cb754d56fac262cf0bfc790fed 100644 (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)
index fada0eadbc3182a7f714858ef9d4894288ac07e1..d707ac6ec763ac0ad67f36613a5ac336bb49714a 100644 (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: