mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-14 19:20:29 +03:00
use jarsigner and keytool from same JDK as is being set in JAVA7_HOME
Using the same JDK throughout should prevent weird bugs where a setup might use Java8's jarsigner and Java7's keytool. This also allows the user to set java_paths and have jarsigner and keytool used from that specified JDK. This incorporates almost all of the patch that is in the Debian package that forces fdroidserver to use the default JDK on that Debian release. closes #93 https://gitlab.com/fdroid/fdroidserver/issues/93
This commit is contained in:
parent
fdf17e809c
commit
69c81c3817
5 changed files with 38 additions and 10 deletions
|
|
@ -42,6 +42,10 @@ class UpdateTest(unittest.TestCase):
|
|||
return None
|
||||
|
||||
def testGoodGetsig(self):
|
||||
# config needed to use jarsigner and keytool
|
||||
config = dict()
|
||||
fdroidserver.common.fill_config_defaults(config)
|
||||
fdroidserver.update.config = config
|
||||
apkfile = os.path.join(os.path.dirname(__file__), 'urzip.apk')
|
||||
sig = self.javagetsig(apkfile)
|
||||
self.assertIsNotNone(sig, "sig is None")
|
||||
|
|
@ -59,6 +63,10 @@ class UpdateTest(unittest.TestCase):
|
|||
self.assertTrue(False, 'TypeError!')
|
||||
|
||||
def testBadGetsig(self):
|
||||
# config needed to use jarsigner and keytool
|
||||
config = dict()
|
||||
fdroidserver.common.fill_config_defaults(config)
|
||||
fdroidserver.update.config = config
|
||||
apkfile = os.path.join(os.path.dirname(__file__), 'urzip-badsig.apk')
|
||||
sig = self.javagetsig(apkfile)
|
||||
self.assertIsNone(sig, "sig should be None: " + str(sig))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue