...
 
Commits (4)
......@@ -177,7 +177,7 @@ fedora_latest:
- useradd -m -c "test account" --password "fakepassword" testuser
- su testuser --login --command "cd `pwd`; pip3 install --user dist/fdroidserver-*.tar.gz"
- test -e ~testuser/.local/share/locale/de/LC_MESSAGES/fdroidserver.mo
- wget --no-verbose -O tools.zip https://dl.google.com/android/repository/tools_r25.2.4-linux.zip
- wget --no-verbose -O tools.zip https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
- unzip -q tools.zip
- rm tools.zip
- export AAPT_VERSION=`sed -n "s,^MINIMUM_AAPT_VERSION\s*=\s*['\"]\(.*\)[['\"],\1,p" fdroidserver/common.py`
......@@ -186,7 +186,7 @@ fedora_latest:
- mkdir $ANDROID_HOME
- mv tools $ANDROID_HOME/
- mkdir -p $ANDROID_HOME/licenses/
- printf "\n8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e" > $ANDROID_HOME/licenses/android-sdk-license
- printf "\n8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee" > $ANDROID_HOME/licenses/android-sdk-license
- printf "\n84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license
- printf "\n79120722343a6f314e0719f863036c702b0e6b2a\n84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license-old
- mkdir ~/.android
......
......@@ -6,6 +6,10 @@ matrix:
include:
- os: linux
language: android
- os: osx
osx_image: xcode10.2
env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
env: ANDROID_HOME=/usr/local/share/android-sdk
- os: osx
osx_image: xcode9.3
env: ANDROID_SDK_ROOT=/usr/local/share/android-sdk
......@@ -36,7 +40,7 @@ addons:
android:
components:
- android-23 # required for `fdroid build` test
- build-tools-27.0.3 # required for `fdroid build` test
- build-tools-28.0.3 # required for `fdroid build` test
licenses:
- 'android-sdk-preview-.+'
- 'android-sdk-license-.+'
......@@ -70,6 +74,7 @@ install:
mkdir -p "$ANDROID_HOME/licenses";
echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license";
echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> "$ANDROID_HOME/licenses/android-sdk-license";
echo -e "\n24333f8a63b6825ea9c5514f83c2829b004d1fee" >> "$ANDROID_HOME/licenses/android-sdk-license";
echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license";
echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools";
echo y | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;$AAPT_VERSION";
......
......@@ -7,9 +7,9 @@ ndk_paths = {
'r14b': "/home/vagrant/android-ndk/r14b",
'r15c': "/home/vagrant/android-ndk/r15c",
'r16b': "/home/vagrant/android-ndk/r16b",
'r17b': "/home/vagrant/android-ndk/r17b",
'r17c': "/home/vagrant/android-ndk/r17c",
'r18b': "/home/vagrant/android-ndk/r18b",
'r19b': "/home/vagrant/android-ndk/r19b",
'r19c': "/home/vagrant/android-ndk/r19c",
}
java_paths = {
'8': "/usr/lib/jvm/java-8-openjdk-amd64",
......
......@@ -15,7 +15,7 @@ if [ ! -e $NDK_BASE/r10e ]; then
mv android-ndk-r10e r10e
fi
for version in r11c r12b r13b r14b r15c r16b r17b r18b r19b; do
for version in r11c r12b r13b r14b r15c r16b r17c r18b r19c; do
if [ ! -e ${NDK_BASE}/${version} ]; then
unzip /vagrant/cache/android-ndk-${version}-linux-x86_64.zip > /dev/null
mv android-ndk-${version} ${version}
......
......@@ -101,6 +101,8 @@ cat << EOF > $ANDROID_HOME/licenses/android-sdk-license
8933bad161af4178b1185d1a37fbf41ea5269c55
d56f5187479451eabf01fb78af6dfcb131a6481e
24333f8a63b6825ea9c5514f83c2829b004d1fee
EOF
cat <<EOF > $ANDROID_HOME/licenses/android-sdk-preview-license
......@@ -109,6 +111,7 @@ cat <<EOF > $ANDROID_HOME/licenses/android-sdk-preview-license
EOF
cat <<EOF > $ANDROID_HOME/licenses/android-sdk-preview-license-old
79120722343a6f314e0719f863036c702b0e6b2a
84831b9409646a918e30573bab4c9c91346d8abd
......
......@@ -18,9 +18,9 @@
# 'r14b': None,
# 'r15c': None,
# 'r16b': None,
# 'r17b': None,
# 'r17c': None,
# 'r18b': None,
# 'r19b': None,
# 'r19c': None,
# }
# Directory to store downloaded tools in (i.e. gradle versions)
......@@ -32,7 +32,7 @@
# }
# Build tools version to be used
# build_tools = "25.0.2"
# build_tools = "28.0.3"
# Force all build to use the above version of build -tools, good for testing
# builds without having all of the possible build-tools installed.
......
......@@ -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)
......
......@@ -116,6 +116,8 @@ get_sha() {
["5.1.1"]="4953323605c5d7b89e97d0dc7779e275bccedefcdac090aec123375eae0cc798" \
["5.2"]="ff322863250159595e93b5a4d17a6f0d21c59a1a0497c1e1cf1d53826485503f" \
["5.2.1"]="748c33ff8d216736723be4037085b8dc342c6a0f309081acf682c9803e407357" \
["5.3"]="bed2bdd3955be5a09ca7e0201e9d131f194f7f6c466e1795a733733ccfb09f25" \
["5.3.1"]="1c59a17a054e9c82f0dd881871c9646e943ec4c71dd52ebc6137d17f82337436" \
)
[ ! ${gradle_hashes[$1]+abc} ] && exit 1
echo "${gradle_hashes["$1"]}"
......@@ -137,7 +139,7 @@ d_plugin_k=(3.3 3.2 3.1 3.0 2.3 2.2 2.1.3 2.1 2.0 1.5 1.3 1.2 1.1 1.0
d_plugin_v=(4.10.1 4.6 4.4 4.1 3.3 2.14.1 2.14.1 2.12 2.12 2.4 2.4 2.3 2.2.1 2.2.1 2.1 2.1 1.12 1.12 1.12 1.11 1.10 1.9 1.8 1.6 1.6 1.4 1.4)
# All gradle versions we know about
plugin_v=(5.2.1 5.2 5.1.1 5.1 5.0 4.10.3 4.10.2 4.10.1 4.10 4.9 4.8.1 4.8 4.7 4.6 4.5.1 4.5 4.4.1 4.4 4.3.1 4.3 4.2.1 4.2 4.1 4.0.2 4.0.1 4.0 3.5.1 3.5 3.4.1 3.4 3.3 3.2.1 3.2 3.1 3.0 2.14.1 2.14 2.13 2.12 2.11 2.10 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2.1 2.2 2.1 1.12 1.11 1.10 1.9 1.8 1.7 1.6 1.4)
plugin_v=(5.3.1 5.3 5.2.1 5.2 5.1.1 5.1 5.0 4.10.3 4.10.2 4.10.1 4.10 4.9 4.8.1 4.8 4.7 4.6 4.5.1 4.5 4.4.1 4.4 4.3.1 4.3 4.2.1 4.2 4.1 4.0.2 4.0.1 4.0 3.5.1 3.5 3.4.1 3.4 3.3 3.2.1 3.2 3.1 3.0 2.14.1 2.14 2.13 2.12 2.11 2.10 2.9 2.8 2.7 2.6 2.5 2.4 2.3 2.2.1 2.2 2.1 1.12 1.11 1.10 1.9 1.8 1.7 1.6 1.4)
v_all=${plugin_v[@]}
......
......@@ -346,6 +346,8 @@ CACHE_FILES = [
'4953323605c5d7b89e97d0dc7779e275bccedefcdac090aec123375eae0cc798'),
('https://downloads.gradle.org/distributions/gradle-5.2.1-bin.zip',
'748c33ff8d216736723be4037085b8dc342c6a0f309081acf682c9803e407357'),
('https://downloads.gradle.org/distributions/gradle-5.3.1-bin.zip',
'1c59a17a054e9c82f0dd881871c9646e943ec4c71dd52ebc6137d17f82337436'),
('https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin',
'102d6723f67ff1384330d12c45854315d6452d6510286f4e5891e00a5a8f1d5a'),
('https://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip',
......@@ -360,12 +362,12 @@ CACHE_FILES = [
'f01788946733bf6294a36727b99366a18369904eb068a599dde8cca2c1d2ba3c'),
('https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip',
'bcdea4f5353773b2ffa85b5a9a2ae35544ce88ec5b507301d8cf6a76b765d901'),
('https://dl.google.com/android/repository/android-ndk-r17b-linux-x86_64.zip',
'5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd'),
('https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip',
'3f541adbd0330a9205ba12697f6d04ec90752c53d6b622101a2a8a856e816589'),
('https://dl.google.com/android/repository/android-ndk-r18b-linux-x86_64.zip',
'4f61cbe4bbf6406aa5ef2ae871def78010eed6271af72de83f8bd0b07a9fd3fd'),
('https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip',
'0fbb1645d0f1de4dde90a4ff79ca5ec4899c835e729d692f433fda501623257a'),
('https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip',
'4c62514ec9c2309315fd84da6d52465651cdb68605058f231f1e480fcf2692e1'),
]
......
......@@ -107,10 +107,10 @@ class CommonTest(unittest.TestCase):
'/usr/lib/jvm/java-1.8.0-openjdk-amd64',
], '/usr/lib/jvm/java-8-openjdk-amd64'),
([ # OSX
'/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk',
'/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk',
'/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk',
'/System/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk',
], '/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk'),
'/System/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk',
], '/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk'),
]
for pathlist, choice in all_pathlists:
......
......@@ -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
......