mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 22:40:12 +01:00
support manually adding per-build antiFeatures in metadata
For cases like the OpenVPN vuln that was recently announced, it is useful for fdroiddata maintainers to be able to mark builds that have known vulnerabilities.
This commit is contained in:
parent
20afa0e861
commit
df99c85ca6
@ -28,6 +28,7 @@ metadata_v0:
|
||||
- "sed -i -e '/AuthorWebSite/d'
|
||||
-e '/Description: No description available/d'
|
||||
-e \"/Description: ''/d\"
|
||||
-e '/antifeatures:/d'
|
||||
-e '/buildozer:/d'
|
||||
metadata/dump_*/*.yaml"
|
||||
- diff -uw metadata/dump_*
|
||||
|
@ -230,6 +230,7 @@ build_flags_order = [
|
||||
'gradleprops',
|
||||
'antcommands',
|
||||
'novcheck',
|
||||
'antifeatures',
|
||||
]
|
||||
|
||||
# old .txt format has version name/code inline in the 'Build:' line
|
||||
@ -271,6 +272,7 @@ class Build(dict):
|
||||
self.gradleprops = []
|
||||
self.antcommands = []
|
||||
self.novcheck = False
|
||||
self.antifeatures = []
|
||||
if copydict:
|
||||
super().__init__(copydict)
|
||||
return
|
||||
@ -339,6 +341,7 @@ flagtypes = {
|
||||
'forceversion': TYPE_BOOL,
|
||||
'forcevercode': TYPE_BOOL,
|
||||
'novcheck': TYPE_BOOL,
|
||||
'antifeatures': TYPE_LIST,
|
||||
}
|
||||
|
||||
|
||||
|
@ -593,6 +593,40 @@ def insert_obbs(repodir, apps, apks):
|
||||
break
|
||||
|
||||
|
||||
def translate_per_build_anti_features(apps, apks):
|
||||
"""Grab the anti-features list from the build metadata
|
||||
|
||||
For most Anti-Features, they are really most applicable per-APK,
|
||||
not for an app. An app can fix a vulnerability, add/remove
|
||||
tracking, etc. This reads the 'antifeatures' list from the Build
|
||||
entries in the fdroiddata metadata file, then transforms it into
|
||||
the 'antiFeatures' list of unique items for the index.
|
||||
|
||||
The field key is all lower case in the metadata file to match the
|
||||
rest of the Build fields. It is 'antiFeatures' camel case in the
|
||||
implementation, index, and fdroidclient since it is translated
|
||||
from the build 'antifeatures' field, not directly included.
|
||||
|
||||
"""
|
||||
|
||||
antiFeatures = dict()
|
||||
for packageName, app in apps.items():
|
||||
d = dict()
|
||||
for build in app['builds']:
|
||||
afl = build.get('antifeatures')
|
||||
if afl:
|
||||
d[int(build.versionCode)] = afl
|
||||
if len(d) > 0:
|
||||
antiFeatures[packageName] = d
|
||||
|
||||
for apk in apks:
|
||||
d = antiFeatures.get(apk['packageName'])
|
||||
if d:
|
||||
afl = d.get(apk['versionCode'])
|
||||
if afl:
|
||||
apk['antiFeatures'].update(afl)
|
||||
|
||||
|
||||
def _get_localized_dict(app, locale):
|
||||
'''get the dict to add localized store metadata to'''
|
||||
if 'localized' not in app:
|
||||
@ -1751,6 +1785,7 @@ def main():
|
||||
copy_triple_t_store_metadata(apps)
|
||||
insert_obbs(repodirs[0], apps, apks)
|
||||
insert_localized_app_metadata(apps)
|
||||
translate_per_build_anti_features(apps, apks)
|
||||
|
||||
# Scan the archive repo for apks as well
|
||||
if len(repodirs) > 1:
|
||||
|
@ -43,14 +43,16 @@ class MetadataTest(unittest.TestCase):
|
||||
fdroidserver.common.config = config
|
||||
|
||||
apps = fdroidserver.metadata.read_metadata(xref=True)
|
||||
for appid in ('org.smssecure.smssecure', 'org.adaway', 'org.videolan.vlc'):
|
||||
for appid in ('org.smssecure.smssecure', 'org.adaway',
|
||||
'org.videolan.vlc', 'com.politedroid'):
|
||||
savepath = os.path.join('metadata', 'dump', appid + '.yaml')
|
||||
frommeta = dict(apps[appid])
|
||||
self.assertTrue(appid in apps)
|
||||
with open(savepath, 'r') as f:
|
||||
frompickle = yaml.load(f)
|
||||
self.assertEqual(frommeta, frompickle)
|
||||
# Uncomment to overwrite
|
||||
# comment above assert and uncomment below to update test
|
||||
# files when new metadata fields are added
|
||||
# with open(savepath, 'w') as f:
|
||||
# yaml.add_representer(fdroidserver.metadata.Build, _build_yaml_representer)
|
||||
# yaml.dump(frommeta, f, default_flow_style=False)
|
||||
|
@ -16,6 +16,7 @@ Repo:https://github.com/miguelvps/PoliteDroid.git
|
||||
Build:1.2,3
|
||||
commit=6a548e4b19
|
||||
target=android-10
|
||||
antifeatures=KnownVuln,UpstreamNonFree,NonFreeAssets
|
||||
|
||||
Build:1.3,4
|
||||
commit=ad865b57bf3ac59580f38485608a9b1dda4fa7dc
|
||||
|
178
tests/metadata/dump/com.politedroid.yaml
Normal file
178
tests/metadata/dump/com.politedroid.yaml
Normal file
@ -0,0 +1,178 @@
|
||||
AntiFeatures: []
|
||||
ArchivePolicy: 4 versions
|
||||
AuthorEmail: null
|
||||
AuthorName: null
|
||||
AuthorWebSite: null
|
||||
AutoName: Polite Droid
|
||||
AutoUpdateMode: Version v%v
|
||||
Binaries: null
|
||||
Bitcoin: null
|
||||
Categories:
|
||||
- Time
|
||||
Changelog: ''
|
||||
CurrentVersion: '1.5'
|
||||
CurrentVersionCode: '6'
|
||||
Description: Activates silent mode during calendar events.
|
||||
Disabled: null
|
||||
Donate: null
|
||||
FlattrID: null
|
||||
IssueTracker: https://github.com/miguelvps/PoliteDroid/issues
|
||||
License: GPL-3.0
|
||||
Litecoin: null
|
||||
MaintainerNotes: ''
|
||||
Name: null
|
||||
NoSourceSince: ''
|
||||
Provides: null
|
||||
Repo: https://github.com/miguelvps/PoliteDroid.git
|
||||
RepoType: git
|
||||
RequiresRoot: false
|
||||
SourceCode: https://github.com/miguelvps/PoliteDroid
|
||||
Summary: Calendar tool
|
||||
UpdateCheckData: null
|
||||
UpdateCheckIgnore: null
|
||||
UpdateCheckMode: Tags
|
||||
UpdateCheckName: null
|
||||
VercodeOperation: null
|
||||
WebSite: ''
|
||||
added: null
|
||||
builds:
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures:
|
||||
- KnownVuln
|
||||
- UpstreamNonFree
|
||||
- NonFreeAssets
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
commit: 6a548e4b19
|
||||
disable: false
|
||||
encoding: null
|
||||
extlibs: []
|
||||
forcevercode: false
|
||||
forceversion: false
|
||||
gradle: []
|
||||
gradleprops: []
|
||||
init: ''
|
||||
kivy: false
|
||||
maven: false
|
||||
ndk: null
|
||||
novcheck: false
|
||||
oldsdkloc: false
|
||||
output: null
|
||||
patch: []
|
||||
preassemble: []
|
||||
prebuild: ''
|
||||
rm: []
|
||||
scandelete: []
|
||||
scanignore: []
|
||||
srclibs: []
|
||||
subdir: null
|
||||
submodules: false
|
||||
target: android-10
|
||||
versionCode: '3'
|
||||
versionName: '1.2'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
commit: ad865b57bf3ac59580f38485608a9b1dda4fa7dc
|
||||
disable: false
|
||||
encoding: null
|
||||
extlibs: []
|
||||
forcevercode: false
|
||||
forceversion: false
|
||||
gradle: []
|
||||
gradleprops: []
|
||||
init: ''
|
||||
kivy: false
|
||||
maven: false
|
||||
ndk: null
|
||||
novcheck: false
|
||||
oldsdkloc: false
|
||||
output: null
|
||||
patch: []
|
||||
preassemble: []
|
||||
prebuild: ''
|
||||
rm: []
|
||||
scandelete: []
|
||||
scanignore: []
|
||||
srclibs: []
|
||||
subdir: null
|
||||
submodules: false
|
||||
target: android-15
|
||||
versionCode: '4'
|
||||
versionName: '1.3'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
commit: 456bd615f3fbe6dff06433928cf7ea20073601fb
|
||||
disable: false
|
||||
encoding: null
|
||||
extlibs: []
|
||||
forcevercode: false
|
||||
forceversion: false
|
||||
gradle: []
|
||||
gradleprops: []
|
||||
init: ''
|
||||
kivy: false
|
||||
maven: false
|
||||
ndk: null
|
||||
novcheck: false
|
||||
oldsdkloc: false
|
||||
output: null
|
||||
patch: []
|
||||
preassemble: []
|
||||
prebuild: ''
|
||||
rm: []
|
||||
scandelete: []
|
||||
scanignore: []
|
||||
srclibs: []
|
||||
subdir: null
|
||||
submodules: false
|
||||
target: android-10
|
||||
versionCode: '5'
|
||||
versionName: '1.4'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
commit: v1.5
|
||||
disable: false
|
||||
encoding: null
|
||||
extlibs: []
|
||||
forcevercode: false
|
||||
forceversion: false
|
||||
gradle:
|
||||
- 'yes'
|
||||
gradleprops: []
|
||||
init: ''
|
||||
kivy: false
|
||||
maven: false
|
||||
ndk: null
|
||||
novcheck: false
|
||||
oldsdkloc: false
|
||||
output: null
|
||||
patch: []
|
||||
preassemble: []
|
||||
prebuild: ''
|
||||
rm: []
|
||||
scandelete: []
|
||||
scanignore: []
|
||||
srclibs: []
|
||||
subdir: null
|
||||
submodules: false
|
||||
target: null
|
||||
versionCode: '6'
|
||||
versionName: '1.5'
|
||||
comments: {}
|
||||
id: com.politedroid
|
||||
lastUpdated: null
|
||||
metadatapath: metadata/com.politedroid.txt
|
@ -61,6 +61,7 @@ added: null
|
||||
builds:
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -94,6 +95,7 @@ builds:
|
||||
versionName: '1.12'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -128,6 +130,7 @@ builds:
|
||||
versionName: '1.15'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -162,6 +165,7 @@ builds:
|
||||
versionName: '1.18'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -196,6 +200,7 @@ builds:
|
||||
versionName: '1.19'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -230,6 +235,7 @@ builds:
|
||||
versionName: '1.20'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -264,6 +270,7 @@ builds:
|
||||
versionName: '1.21'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -296,6 +303,7 @@ builds:
|
||||
versionName: '1.23'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -329,6 +337,7 @@ builds:
|
||||
versionName: '1.24'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -362,6 +371,7 @@ builds:
|
||||
versionName: '1.25'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -395,6 +405,7 @@ builds:
|
||||
versionName: '1.26'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -428,6 +439,7 @@ builds:
|
||||
versionName: '1.27'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -461,6 +473,7 @@ builds:
|
||||
versionName: '1.29'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -494,6 +507,7 @@ builds:
|
||||
versionName: '1.32'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -526,6 +540,7 @@ builds:
|
||||
versionName: '1.33'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -559,6 +574,7 @@ builds:
|
||||
versionName: '1.34'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -592,6 +608,7 @@ builds:
|
||||
versionName: '1.35'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -625,6 +642,7 @@ builds:
|
||||
versionName: '1.36'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -662,6 +680,7 @@ builds:
|
||||
- android-libs/ActionBarSherlock
|
||||
- android-libs/HtmlSpanner/htmlspanner
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -707,6 +726,7 @@ builds:
|
||||
- android-libs/ActionBarSherlock
|
||||
- android-libs/HtmlSpanner/htmlspanner
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -748,6 +768,7 @@ builds:
|
||||
versionName: '2.3'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -783,6 +804,7 @@ builds:
|
||||
versionName: '2.6'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -818,6 +840,7 @@ builds:
|
||||
versionName: '2.7'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -853,6 +876,7 @@ builds:
|
||||
versionName: '2.8'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -888,6 +912,7 @@ builds:
|
||||
versionName: 2.8.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -923,6 +948,7 @@ builds:
|
||||
versionName: '2.9'
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -958,6 +984,7 @@ builds:
|
||||
versionName: 2.9.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
@ -993,6 +1020,7 @@ builds:
|
||||
versionName: 2.9.2
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni:
|
||||
- 'yes'
|
||||
|
@ -58,6 +58,7 @@ added: null
|
||||
builds:
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -102,6 +103,7 @@ builds:
|
||||
versionName: 0.3.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -138,6 +140,7 @@ builds:
|
||||
versionName: 0.3.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -173,6 +176,7 @@ builds:
|
||||
versionName: 0.4.2
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -208,6 +212,7 @@ builds:
|
||||
versionName: 0.5.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -242,6 +247,7 @@ builds:
|
||||
versionName: 0.5.2
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -276,6 +282,7 @@ builds:
|
||||
versionName: 0.5.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -310,6 +317,7 @@ builds:
|
||||
versionName: 0.5.4
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: ''
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
|
@ -63,6 +63,7 @@ builds:
|
||||
- ../java-libs/SlidingMenu
|
||||
- ../java-libs/ActionBarSherlock
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -98,6 +99,7 @@ builds:
|
||||
- ../java-libs/SlidingMenu
|
||||
- ../java-libs/ActionBarSherlock
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -133,6 +135,7 @@ builds:
|
||||
- ../java-libs/SlidingMenu
|
||||
- ../java-libs/ActionBarSherlock
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -168,6 +171,7 @@ builds:
|
||||
- ../java-libs/SlidingMenu
|
||||
- ../java-libs/ActionBarSherlock
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=mips ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -200,6 +204,7 @@ builds:
|
||||
versionName: 0.0.11-mips
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=mips ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -234,6 +239,7 @@ builds:
|
||||
versionName: 0.1.3-MIPS
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -268,6 +274,7 @@ builds:
|
||||
versionName: 0.1.3-x86
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -302,6 +309,7 @@ builds:
|
||||
versionName: 0.1.3-ARM
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -336,6 +344,7 @@ builds:
|
||||
versionName: 0.1.3-ARMv7
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -369,6 +378,7 @@ builds:
|
||||
versionName: 0.9.0
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -402,6 +412,7 @@ builds:
|
||||
versionName: 0.9.0
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -435,6 +446,7 @@ builds:
|
||||
versionName: 0.9.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -468,6 +480,7 @@ builds:
|
||||
versionName: 0.9.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -501,6 +514,7 @@ builds:
|
||||
versionName: 0.9.5
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -534,6 +548,7 @@ builds:
|
||||
versionName: 0.9.5
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -567,6 +582,7 @@ builds:
|
||||
versionName: 0.9.6
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -600,6 +616,7 @@ builds:
|
||||
versionName: 0.9.6
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -633,6 +650,7 @@ builds:
|
||||
versionName: 0.9.7
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -666,6 +684,7 @@ builds:
|
||||
versionName: 0.9.7
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=mips ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -699,6 +718,7 @@ builds:
|
||||
versionName: 0.9.7.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -732,6 +752,7 @@ builds:
|
||||
versionName: 0.9.7.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -765,6 +786,7 @@ builds:
|
||||
versionName: 0.9.7.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -798,6 +820,7 @@ builds:
|
||||
versionName: 0.9.8
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -831,6 +854,7 @@ builds:
|
||||
versionName: 0.9.8
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -864,6 +888,7 @@ builds:
|
||||
versionName: 0.9.8
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -897,6 +922,7 @@ builds:
|
||||
versionName: 0.9.9
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -930,6 +956,7 @@ builds:
|
||||
versionName: 0.9.9
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -963,6 +990,7 @@ builds:
|
||||
versionName: 0.9.9
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -996,6 +1024,7 @@ builds:
|
||||
versionName: 0.9.10
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1029,6 +1058,7 @@ builds:
|
||||
versionName: 0.9.10
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1062,6 +1092,7 @@ builds:
|
||||
versionName: 0.9.10
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1095,6 +1126,7 @@ builds:
|
||||
versionName: 1.0.0
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1128,6 +1160,7 @@ builds:
|
||||
versionName: 1.0.0
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1161,6 +1194,7 @@ builds:
|
||||
versionName: 1.0.0
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=x86 ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1194,6 +1228,7 @@ builds:
|
||||
versionName: 1.0.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1227,6 +1262,7 @@ builds:
|
||||
versionName: 1.0.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ANDROID_ABI=armeabi-v7a ./compile.sh release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1260,6 +1296,7 @@ builds:
|
||||
versionName: 1.0.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1295,6 +1332,7 @@ builds:
|
||||
versionName: 1.1.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1330,6 +1368,7 @@ builds:
|
||||
versionName: 1.1.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1365,6 +1404,7 @@ builds:
|
||||
versionName: 1.1.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1400,6 +1440,7 @@ builds:
|
||||
versionName: 1.1.5
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1435,6 +1476,7 @@ builds:
|
||||
versionName: 1.1.5
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1470,6 +1512,7 @@ builds:
|
||||
versionName: 1.1.5
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1505,6 +1548,7 @@ builds:
|
||||
versionName: 1.1.6
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1540,6 +1584,7 @@ builds:
|
||||
versionName: 1.1.6
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1575,6 +1620,7 @@ builds:
|
||||
versionName: 1.1.6
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1610,6 +1656,7 @@ builds:
|
||||
versionName: 1.2.0
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1645,6 +1692,7 @@ builds:
|
||||
versionName: 1.2.0
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1680,6 +1728,7 @@ builds:
|
||||
versionName: 1.2.0
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1715,6 +1764,7 @@ builds:
|
||||
versionName: 1.2.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1750,6 +1800,7 @@ builds:
|
||||
versionName: 1.2.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1785,6 +1836,7 @@ builds:
|
||||
versionName: 1.2.1
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1820,6 +1872,7 @@ builds:
|
||||
versionName: 1.2.2
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1855,6 +1908,7 @@ builds:
|
||||
versionName: 1.2.2
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1890,6 +1944,7 @@ builds:
|
||||
versionName: 1.2.2
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1925,6 +1980,7 @@ builds:
|
||||
versionName: 1.2.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1960,6 +2016,7 @@ builds:
|
||||
versionName: 1.2.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -1995,6 +2052,7 @@ builds:
|
||||
versionName: 1.2.3
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -2030,6 +2088,7 @@ builds:
|
||||
versionName: 1.2.4
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -2065,6 +2124,7 @@ builds:
|
||||
versionName: 1.2.4
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -2100,6 +2160,7 @@ builds:
|
||||
versionName: 1.2.4
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -2135,6 +2196,7 @@ builds:
|
||||
versionName: 1.2.5
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -2170,6 +2232,7 @@ builds:
|
||||
versionName: 1.2.5
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -2205,6 +2268,7 @@ builds:
|
||||
versionName: 1.2.5
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -2240,6 +2304,7 @@ builds:
|
||||
versionName: 1.2.6
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "armeabi-v7a" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
@ -2275,6 +2340,7 @@ builds:
|
||||
versionName: 1.2.6
|
||||
- androidupdate: []
|
||||
antcommands: []
|
||||
antifeatures: []
|
||||
build: cd ../ && ./compile.sh -a "x86" --release
|
||||
buildjni: []
|
||||
buildozer: false
|
||||
|
@ -459,6 +459,38 @@ class UpdateTest(unittest.TestCase):
|
||||
self.assertIsNone(apk)
|
||||
self.assertFalse(cachechanged)
|
||||
|
||||
def test_translate_per_build_anti_features(self):
|
||||
os.chdir(os.path.join(localmodule, 'tests'))
|
||||
if os.path.basename(os.getcwd()) != 'tests':
|
||||
raise Exception('This test must be run in the "tests/" subdir')
|
||||
|
||||
config = dict()
|
||||
fdroidserver.common.fill_config_defaults(config)
|
||||
config['ndk_paths'] = dict()
|
||||
config['accepted_formats'] = ['json', 'txt', 'yml']
|
||||
fdroidserver.common.config = config
|
||||
fdroidserver.update.config = config
|
||||
|
||||
fdroidserver.update.options = type('', (), {})()
|
||||
fdroidserver.update.options.clean = True
|
||||
fdroidserver.update.options.delete_unknown = True
|
||||
fdroidserver.update.options.rename_apks = False
|
||||
fdroidserver.update.options.allow_disabled_algorithms = False
|
||||
|
||||
apps = fdroidserver.metadata.read_metadata(xref=True)
|
||||
knownapks = fdroidserver.common.KnownApks()
|
||||
apks, cachechanged = fdroidserver.update.process_apks({}, 'repo', knownapks, False)
|
||||
fdroidserver.update.translate_per_build_anti_features(apps, apks)
|
||||
self.assertEqual(len(apks), 11)
|
||||
foundtest = False
|
||||
for apk in apks:
|
||||
if apk['packageName'] == 'com.politedroid' and apk['versionCode'] == 3:
|
||||
antiFeatures = apk.get('antiFeatures')
|
||||
self.assertTrue('KnownVuln' in antiFeatures)
|
||||
self.assertEqual(3, len(antiFeatures))
|
||||
foundtest = True
|
||||
self.assertTrue(foundtest)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = optparse.OptionParser()
|
||||
|
Loading…
Reference in New Issue
Block a user