mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-13 02:30:30 +03:00
gpg-sign all valid files in the repo, including source tarballs
This makes sure there is a GPG signature on any file that is included in the repo, including APKs, OBB, source tarballs, media files, OTA update ZIPs, etc. Having a GPG signature is more important on non-APK files since they mostly do not have any signature mechanism of their own. This also adds basic tests of adding non-APK/OBB files to a repo with `fdroid update`. closes #232
This commit is contained in:
parent
84e09cd2a2
commit
56d51fcd6b
11 changed files with 35 additions and 11 deletions
BIN
tests/gnupghome/pubring.gpg
Normal file
BIN
tests/gnupghome/pubring.gpg
Normal file
Binary file not shown.
BIN
tests/gnupghome/random_seed
Normal file
BIN
tests/gnupghome/random_seed
Normal file
Binary file not shown.
BIN
tests/gnupghome/secring.gpg
Normal file
BIN
tests/gnupghome/secring.gpg
Normal file
Binary file not shown.
BIN
tests/gnupghome/trustdb.gpg
Normal file
BIN
tests/gnupghome/trustdb.gpg
Normal file
Binary file not shown.
BIN
tests/repo/fake.ota.update_1234.zip
Normal file
BIN
tests/repo/fake.ota.update_1234.zip
Normal file
Binary file not shown.
BIN
tests/repo/obb.main.twoversions_1101617_src.tar.gz
Normal file
BIN
tests/repo/obb.main.twoversions_1101617_src.tar.gz
Normal file
Binary file not shown.
|
|
@ -139,21 +139,33 @@ $fdroid update
|
|||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
echo_header "copy tests/repo, generate a keystore, and update"
|
||||
echo_header "copy tests/repo, generate java/gpg keys, update, and gpgsign"
|
||||
|
||||
REPOROOT=`create_test_dir`
|
||||
GNUPGHOME=$REPOROOT/gnupghome
|
||||
cd $REPOROOT
|
||||
$fdroid init
|
||||
cp -a $WORKSPACE/tests/metadata $WORKSPACE/tests/repo $REPOROOT/
|
||||
cp -a $WORKSPACE/tests/gnupghome $GNUPGHOME
|
||||
chmod 0700 $GNUPGHOME
|
||||
echo "accepted_formats = ['json', 'txt', 'xml', 'yml']" >> config.py
|
||||
echo "install_list = 'org.adaway'" >> config.py
|
||||
echo "uninstall_list = {'com.android.vending', 'com.facebook.orca',}" >> config.py
|
||||
echo "gpghome = '$GNUPGHOME'" >> config.py
|
||||
echo "gpgkey = 'CE71F7FB'" >> config.py
|
||||
$fdroid update --verbose
|
||||
test -e repo/index.xml
|
||||
test -e repo/index.jar
|
||||
grep -F '<application id=' repo/index.xml > /dev/null
|
||||
grep -F '<install packageName=' repo/index.xml > /dev/null
|
||||
grep -F '<uninstall packageName=' repo/index.xml > /dev/null
|
||||
$fdroid gpgsign --verbose
|
||||
$fdroid gpgsign --verbose
|
||||
test -e repo/obb.mainpatch.current_1619.apk.asc
|
||||
test -e repo/obb.main.twoversions_1101617_src.tar.gz.asc
|
||||
! test -e repo/obb.mainpatch.current_1619.apk.asc.asc
|
||||
! test -e repo/obb.main.twoversions_1101617_src.tar.gz.asc.asc
|
||||
! test -e repo/index.xml.asc
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue