$ ./hooks/pre-commit || export EXITVALUE=1
WARNING: ruby is not installed, using dummy placeholder!
fdroidserver/metadata.py:1180: use ==/!= to compare str, bytes, and int literals
fdroidserver/metadata.py:1184: use ==/!= to compare str, bytes, and int literals
fdroidserver/metadata.py:1186: use ==/!= to compare str, bytes, and int literals
fdroidserver/metadata.py:1189: use ==/!= to compare str, bytes, and int literals
ERROR: pyflakes tests failed!
buildserver: include build-tools 28.0.3
Added test aapt output files for build-tools 28.0.3
update.py: Still aapt output parsing, setting regex to catch 'name=' without prefixes, needed for build-tools 28.0.3
fdroid/fdroidserver!591
build-tools 28.0.3 added a new field in the end 'compileSdkVersionCodename=', which also accidentally ends with the string 'name='.
The purpose of this regex was to catch the 'packageName' field, which is in ht eaapt ouput the exact ' name=', therefore added whe non-caracter \W prefix match.
sample aapt output (28.0.3):
package: name='com.a.b.app' versionCode='1' versionName='1.0' compileSdkVersion='28' compileSdkVersionCodename='9'
previously, regex was catching second occurence, so '9'
See merge request !582
This has to do custom dict/encoder/decoder tricks in order to make sure
that each run of `fdroid verify` on the same files doesn't add duplicate
entries.
The build command has to use some threading stuff to handle the timeout and
locks. This seems to prevent the command from exiting, unless this hack is
used.
Fastlane/Triple-T app store metadata files must be in UTF-8. Before this
would crash if they were not. This changes the handling to just replace
the non-UTF8 chars with a �. Here's the stacktrace:
CRITICAL: Unknown exception found!
Traceback (most recent call last):
File "/var/lib/jenkins/userContent/reproducible/reproducible_fdroid_build_apps/fdroid", line 164, in <module>
main()
File "/var/lib/jenkins/userContent/reproducible/reproducible_fdroid_build_apps/fdroid", line 159, in main
raise e
File "/var/lib/jenkins/userContent/reproducible/reproducible_fdroid_build_apps/fdroid", line 138, in main
mod.main()
File "/var/lib/jenkins/userContent/reproducible/reproducible_fdroid_build_apps/fdroidserver/update.py", line 2010, in main
insert_localized_app_metadata(apps)
File "/var/lib/jenkins/userContent/reproducible/reproducible_fdroid_build_apps/fdroidserver/update.py", line 885, in insert_localized_app_metadata
os.path.join(root, f))
File "/var/lib/jenkins/userContent/reproducible/reproducible_fdroid_build_apps/fdroidserver/update.py", line 700, in _set_localized_text_entry
text = fp.read()[:limit]
File "/usr/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 94: invalid start byte
699b3e4c69 got it wrong for targetSdkVersion.
Also, one confusing thing is that aapt outputs "sdkVersion: '3'" for
com.politedroid_3.apk but no "sdkVersion:" for no.min.target.sdk_987.apk.
F-Droid never really supported running on android-1 or android-2, so it
seems pointless to debug support for them.
androguard parses the whole APK before handing the instance back, this uses
the primitives to just find the <application android:debuggable=""> value,
then stop parsing.
#557
Normally, androguard parses the entire APK before it is possible to get any
values from it. This uses androguard primitives to only attempt to parse
the AndroidManifest.xml, then to quit as soon as it gets what it needs.
This greatly speeds up the parsing (1 minute vs 60 minutes).
fdroid/fdroidserver#557
Stop expensive aapt parsing after the first line when looking with
APK_ID_TRIPLET_REGEX. As is seen with the `aapt dump badging` output files
in tests/build-tools/, the first line is the only line that will ever match.
#557
When we don't have an already working builder/.vagrant directory
look for available buildserver vagrant boxes because we'll need to
import one.
Abort if there's no buildserver box.
Fixes: #497