publish: fix stupid error in repro-signing and add integration test

stoopid mistake in ea84014f reported
by @CiaranG
parent 7272689c
Pipeline #56314722 (#897) failed with stage
in 21 minutes and 48 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment