mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 02:50:12 +01:00
publish: fix stupid error in repro-signing and add integration test
stoopid mistake in ea84014f9b
reported
by @CiaranG
This commit is contained in:
parent
7272689ced
commit
dd2f9d60f8
@ -280,7 +280,7 @@ def main():
|
||||
signaturefile, signedfile, manifest = signingfiles
|
||||
|
||||
with open(signaturefile, 'rb') as f:
|
||||
devfp = common.signer_fingerprint_short(common.get_signature(f.read()))
|
||||
devfp = common.signer_fingerprint_short(common.get_certificate(f.read()))
|
||||
devsigned = '{}_{}_{}.apk'.format(appid, vercode, devfp)
|
||||
devsignedtmp = os.path.join(tmp_dir, devsigned)
|
||||
shutil.copy(apkfile, devsignedtmp)
|
||||
|
@ -1104,6 +1104,35 @@ if have_git_2_3; then
|
||||
fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
echo_header 'test extracting and publishing with developer signature'
|
||||
|
||||
REPOROOT=`create_test_dir`
|
||||
cd $REPOROOT
|
||||
fdroid_init_with_prebuilt_keystore
|
||||
echo "accepted_formats = ['txt']" >> config.py
|
||||
echo 'keydname = "CN=Birdman, OU=Cell, O=Alcatraz, L=Alcatraz, S=California, C=US"' >> config.py
|
||||
test -d metadata || mkdir metadata
|
||||
cp $WORKSPACE/tests/metadata/com.politedroid.txt metadata/
|
||||
test -d repo || mkdir repo
|
||||
test -d unsigned || mkdir unsigned
|
||||
cp $WORKSPACE/tests/repo/com.politedroid_6.apk unsigned/
|
||||
$fdroid signatures unsigned/com.politedroid_6.apk
|
||||
test -d metadata/com.politedroid/signatures/6
|
||||
test -f metadata/com.politedroid/signatures/6/MANIFEST.MF
|
||||
test -f metadata/com.politedroid/signatures/6/RELEASE.RSA
|
||||
test -f metadata/com.politedroid/signatures/6/RELEASE.SF
|
||||
! test -f repo/com.politedroid_6.apk
|
||||
$fdroid publish
|
||||
test -f repo/com.politedroid_6.apk
|
||||
if which jarsigner; then
|
||||
jarsigner -verify repo/com.politedroid_6.apk
|
||||
fi
|
||||
if which apksigner; then
|
||||
apksigner verify repo/com.politedroid_6.apk
|
||||
fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
|
||||
# remove this to prevent git conflicts and complaining
|
||||
|
Loading…
Reference in New Issue
Block a user