mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-19 21:30:10 +01:00
Merge branch 'nightly-fix-resign' into 'master'
nightly: stop stripping APKs before signing, apksigner handles that See merge request fdroid/fdroidserver!1078
This commit is contained in:
commit
8e02c52a45
@ -206,7 +206,7 @@ def main():
|
||||
clone_url = os.getenv('CI_PROJECT_URL') + NIGHTLY
|
||||
repo_base = clone_url + '/raw/master/fdroid'
|
||||
servergitmirror = 'git@' + urlparse(clone_url).netloc + ':' + repo_git_base
|
||||
deploy_key_url = clone_url + '/settings/repository'
|
||||
deploy_key_url = clone_url + '/-/settings/repository#js-deploy-keys-settings'
|
||||
git_user_name = os.getenv('GITLAB_USER_NAME')
|
||||
git_user_email = os.getenv('GITLAB_USER_EMAIL')
|
||||
elif 'TRAVIS_REPO_SLUG' in os.environ:
|
||||
@ -349,7 +349,6 @@ Last updated: {date}'''.format(repo_git_base=repo_git_base,
|
||||
'Resigning {apkfilename} with provided debug.keystore'
|
||||
).format(apkfilename=os.path.basename(apkfilename))
|
||||
)
|
||||
common.apk_strip_v1_signatures(apkfilename, strip_manifest=True)
|
||||
common.sign_apk(apkfilename, destapk, KEY_ALIAS)
|
||||
|
||||
if options.verbose:
|
||||
|
@ -1025,14 +1025,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "ཁུངས་ལྡན་མིན་པའི་རྒྱབ་ལྗོངས་ཡིག་ཆའི་ནང་།%s 1:%d 2"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "ངོས་འཛིན་མི་ཐུབ་པའི་རྒྱབ་ལྗོངས་ཡིག་ཆའི་སྒྲིག་བཀོད། : {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1034,14 +1034,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Incluir en el espejo los archivos tarball de código fuente"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Metadatos no válidos en %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "Formato de metadatos desconocido: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1053,9 +1053,9 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Inclure au miroir les tarballs de source"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Métadonnées non valides dans %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
|
@ -1027,9 +1027,9 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "A forráscsomagok belevétele a tükörbe"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Érvénytelen metaadatok itt: %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, python-brace-format
|
||||
|
@ -1035,14 +1035,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Includere i tarball dei sorgenti nel mirror"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Metadati non validi in %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "Formato dei metadati sconosciuto: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1013,14 +1013,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "%s:%d에서 잘못된 메타데이터"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "알 수 없는 메타데이터 형식: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1055,14 +1055,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Inkluder kildetjæreballene i avspeilingen"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Ugyldig metadata i %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "Ukjent metadataformat: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1028,14 +1028,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Incluir os tarballs de fontes no espelho"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Metadados inválidos em %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "Formato de metadados desconhecido: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1033,14 +1033,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Inclui os tarballs fonte no espelho"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Metadados inválidos em %s: %d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "Formato de metadados desconhecido: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1030,14 +1030,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Incluir os tarballs de fontes no espelho"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Metadados inválidos em %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "Formato de metadados desconhecido: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1031,14 +1031,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Includeți tarball-urile sursă în oglindă"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Metadate nevalabile în %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "Format de metadate necunoscut: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1104,14 +1104,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "Përfshi te pasqyra paketa tarball"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "Tejtëdhëna të pavlefshme te %s:%d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "Format i panjohur tejtëdhënash: {path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -1043,14 +1043,14 @@ msgid "Include the source tarballs in the mirror"
|
||||
msgstr "在鏡像中加入軟體的源代碼包。"
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-format
|
||||
#, python-format
|
||||
msgid "Including metadata from %s@%s"
|
||||
msgstr "%s 中有無效的中介資料 : %d"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/metadata.py
|
||||
#, fuzzy, python-brace-format
|
||||
#, python-brace-format
|
||||
msgid "Including metadata from {path}"
|
||||
msgstr "未知的中介資料格式t:{path}"
|
||||
msgstr ""
|
||||
|
||||
#: ../fdroidserver/common.py
|
||||
msgid "Initialising submodules"
|
||||
|
@ -870,6 +870,46 @@ class CommonTest(unittest.TestCase):
|
||||
self.assertFalse(os.path.isfile(unsigned))
|
||||
self.assertTrue(fdroidserver.common.verify_apk_signature(signed))
|
||||
|
||||
def test_resign_apk(self):
|
||||
"""When using apksigner, it should resign signed APKs"""
|
||||
config = fdroidserver.common.read_config(fdroidserver.common.options)
|
||||
if 'apksigner' not in config:
|
||||
self.skipTest('SKIPPING test_resign_apk, apksigner not installed!')
|
||||
|
||||
config['keyalias'] = 'sova'
|
||||
config['keystorepass'] = 'r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI='
|
||||
config['keypass'] = 'r9aquRHYoI8+dYz6jKrLntQ5/NJNASFBacJh7Jv2BlI='
|
||||
config['keystore'] = os.path.join(self.basedir, 'keystore.jks')
|
||||
fdroidserver.common.config = config
|
||||
fdroidserver.signindex.config = config
|
||||
|
||||
testdir = tempfile.mkdtemp(
|
||||
prefix=inspect.currentframe().f_code.co_name, dir=self.tmpdir
|
||||
)
|
||||
os.chdir(testdir)
|
||||
os.mkdir('unsigned')
|
||||
os.mkdir('repo')
|
||||
|
||||
for apk in (
|
||||
'org.bitbucket.tickytacky.mirrormirror_4.apk',
|
||||
'v2.only.sig_2.apk',
|
||||
'SystemWebView-repack.apk',
|
||||
):
|
||||
original = os.path.join(self.basedir, apk)
|
||||
unsigned = os.path.join('unsigned', apk)
|
||||
resign = os.path.join('repo', apk)
|
||||
shutil.copy(original, unsigned)
|
||||
fdroidserver.common.sign_apk(unsigned, resign, config['keyalias'])
|
||||
self.assertTrue(
|
||||
fdroidserver.common.verify_apk_signature(resign), apk + " verifies"
|
||||
)
|
||||
self.assertTrue(os.path.isfile(resign))
|
||||
self.assertFalse(os.path.isfile(unsigned))
|
||||
self.assertNotEqual(
|
||||
fdroidserver.common.get_first_signer_certificate(original),
|
||||
fdroidserver.common.get_first_signer_certificate(resign)
|
||||
)
|
||||
|
||||
def test_get_apk_id(self):
|
||||
config = dict()
|
||||
fdroidserver.common.fill_config_defaults(config)
|
||||
|
Loading…
Reference in New Issue
Block a user