1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 02:50:12 +01:00
Commit Graph

5124 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
b0a5ec5c1a workaround crash in diffoscope when verifying APKs
On versions of diffoscope before 87, like the version included in Ubuntu
xenial LTS, it would crash saying:

ValueError: max_diff_block_lines (100) cannot be smaller than max_page_diff_block_lines (128)

https://bugs.debian.org/875451
2018-05-25 11:48:01 +02:00
Hans-Christoph Steiner
5afba57212 Merge branch 'fix-tests' into 'master'
Fix tests and polish release

See merge request fdroid/fdroidserver!508
2018-05-25 08:51:18 +00:00
Hans-Christoph Steiner
0a15a9b65b tests: fix and test fdroid deploy 2018-05-25 10:32:09 +02:00
Hans-Christoph Steiner
1daa1063c5 tests: keep strerr totally clean on successful runs
Debian's autopkgtest defaults to considering any output on stderr as a sign
that the tests failed.  it is simple to make this achieve that standard, so
it seems worth it for now at least.
2018-05-25 10:32:01 +02:00
Hans-Christoph Steiner
002a4ae50e fix including unicode test APK in source tarball 2018-05-25 10:32:01 +02:00
Hans-Christoph Steiner
cef73e5794 remove unused variable, as reported by pyflakes 2018-05-25 10:32:01 +02:00
Hans-Christoph Steiner
74fb07b302 gitlab-ci: switch pyup_io_safety_check to Alpine to be lighter 2018-05-25 09:54:08 +02:00
Hans-Christoph Steiner
00971941fd Merge branch 'reproducible-bug' into 'master'
Fix reproducible builds

See merge request fdroid/fdroidserver!505
2018-05-24 19:32:46 +00:00
Torsten Grote
c6f3aed003
Fix reproducible builds
This commit fixes two bugs with reproducible builds:
* Files added by the buildserver to META-INF (fdroidserverid and buildserverid)
  were causing signature verification to always fail when --on-server was used.
  Since they are not needed anymore, they are no longer added to APKs.
* When showing a diff between both APK files, `jar xf` did not extract
  the full APK properly which was causing useless diffs.
  Instead of using jar, python's zipfile library is used instead.
2018-05-24 16:09:10 -03:00
Marcus
d9417093f3 Merge branch 'platform-27_r3' into 'master'
makebuildserver: add platform-27_r03

See merge request fdroid/fdroidserver!507
2018-05-23 22:44:34 +00:00
Marcus Hoffmann
23ccbf2965
makebuildserver: add platform-27_r03 2018-05-24 00:27:40 +02:00
Hans-Christoph Steiner
bd6de3d755 Merge branch '492-Stop-using-eval' into 'master'
Resolve "Stop using `eval()`"

Closes #492

See merge request fdroid/fdroidserver!506
2018-05-22 14:21:43 +00:00
Michael Pöhn
6b1f242d25 added tests for common.calculate_math_string 2018-05-22 13:24:37 +02:00
Michael Pöhn
24b20d7668 use simple ast+operator based calculator for evaluating Vercode Operation 2018-05-22 13:08:14 +02:00
Marcus
79a022400f Merge branch 'patch-1' into 'master'
fixed typo vmtools.py

See merge request fdroid/fdroidserver!504
2018-05-21 15:53:54 +00:00
Michael Pöhn
f8a7c23485 fixed typo vmtools.py 2018-05-21 15:29:13 +00:00
Marcus
47cfeff87a Merge branch 'ndk17' into 'master'
makebuildserver: add ndk17

See merge request fdroid/fdroidserver!502
2018-05-17 21:10:14 +00:00
Marcus Hoffmann
c964dd49c8
makebuildserver: add ndk17 2018-05-17 22:37:06 +02:00
Marcus
280ddfb9e8 Merge branch 'spdx-4.0' into 'master'
Spdx 4.0

See merge request fdroid/fdroidserver!501
2018-05-16 21:13:41 +00:00
Marcus Hoffmann
a4b6549927
tests: adapt to spdx v4.0.0 2018-05-16 22:49:57 +02:00
Marcus Hoffmann
f4bb76f3a4
lint: update spdx tags to v4.0.0 2018-05-16 22:36:39 +02:00
Hans-Christoph Steiner
3cb4aa6c18 bump to 1.0.4 2018-05-15 12:39:18 +02:00
Hans-Christoph Steiner
f6bcf5cfe2 Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidserver!500
2018-05-15 10:31:31 +00:00
Hans-Christoph Steiner
d8d1d7774e Weblate 2018-05-15 10:31:31 +00:00
Hans-Christoph Steiner
a76c5cc0b3 Merge branch 'release-test-overhaul' into 'master'
release test overhaul

See merge request fdroid/fdroidserver!499
2018-05-15 09:59:11 +00:00
Hans-Christoph Steiner
f0795cc092 tests: git repo mirror tests require git >= 2.3 2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
6570e85a2b gitlab-ci: new test case of pip installs on Ubuntu/trusty
Ubuntu/trusty is used as the base image for CI systems like Travis, as well
as Microsoft Subsystem for Linux.  SO we need to provide working options.
2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
2d3e7ef950 tests: allow tests to run without any Android SDK installed 2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
43c61aecee fix pylint Unused argument 2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
6db9ba8334 androguard >= 3.1.0 is in pypi, so add it to install_requires 2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
54b21a6d22 move pylint run to standalone gitlab-ci job 2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
3c9cc59c38 gitlab-ci: include fdroiddata yml files in metadata_v0 test 2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
0bd276de1c gitlab-ci: add new security scanner pyup.io/safety
https://pyup.io/safety/
2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
feac3fa067 jenkins: remove most troublesome test case to avoid false fails 2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
5610b3f0d7 set pyasn1 required version to prevent conflict with pyasn1-modules
pyasn1-modules v0.2.1 requires pyasn1 <0.5.0, >=0.4.1 but for whatever
reason, `pip3 install` is not picking it up properly.  Perhaps because pip3
finds an older version of pyasn1 installed but does not upgrade it.

* https://github.com/etingof/pyasn1-modules/issues/10
* https://gitlab.com/eighthave/fdroidserver/-/jobs/67781548
2018-05-14 15:25:33 +02:00
Hans-Christoph Steiner
b3f45ca024 split pip tests to run separately for Ubuntu/trusty and Debian/stretch
Trying to reuse the pip test run is now a lot more work than just
writing it cutstom for each target platform.

Ubuntu/trusty does not have androguard 3.1.x nor aapt >= 26.x, so
using trusty's aapt will always have errors scraping some names from
APKs.  This continues to use Google's binary.

`apt-get update` is now disabled by default by Travis, this adds it
back so that the latest files from the PPA are used.

Here's one example of an issue with pip on trusty:
https://github.com/requests/requests/issues/4006

    pip3 install --quiet -e /home/travis/build/fdroidtravis/fdroidserver
    Exception:
    Traceback (most recent call last):
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2482, in _dep_map
        return self.__dep_map
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2344, in __getattr__
        raise AttributeError(attr)
    AttributeError: _DistInfoDistribution__dep_map

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
        status = self.run(options, args)
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/commands/install.py", line 278, in run
        requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python3.4/site-packages/pip/req.py", line 1266, in prepare_files
        req_to_install.extras):
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2291, in requires
        dm = self._dep_map
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2484, in _dep_map
        self.__dep_map = self._compute_dependencies()
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2517, in _compute_dependencies
        common = frozenset(reqs_for_extra(None))
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/pkg_resources.py", line 2514, in reqs_for_extra
        if req.marker_fn(override={'extra':extra}):
      File "/home/travis/build/fdroidtravis/fdroidserver/env/lib/python-wheels/setuptools-3.3-py2.py3-none-any.whl/_markerlib/markers.py", line 113, in marker_fn
        return eval(compiled_marker, environment)
      File "<environment marker>", line 1, in <module>
    NameError: name 'platform_system' is not defined
2018-05-14 15:25:33 +02:00
Marcus
3e0fa5c80e Merge branch 'master' into 'master'
allow running without aapt, support Java versions newer than 9

Closes #474

See merge request fdroid/fdroidserver!497
2018-05-08 18:37:38 +00:00
Hans-Christoph Steiner
040b8d8d5d prefer latest version of Java, its no longer necessary to prefer 7
closes #474
2018-05-04 21:38:06 +02:00
Hans-Christoph Steiner
7eb622930e update Java path searches to also match v10, v11, etc.
This is still pretty conversative, since its not easy to test on all those
platforms.

#474
2018-05-04 21:37:41 +02:00
Hans-Christoph Steiner
77f7ca2f25 tests: allow the full suite to run without aapt, only androguard 2018-05-04 15:11:25 +02:00
Hans-Christoph Steiner
cf1ce46e5c init: make work with only androguard, no Android SDK 2018-05-04 15:11:25 +02:00
Hans-Christoph Steiner
9cc8826a79 tests: allow running with only androguard, no Android SDK 2018-05-04 15:11:25 +02:00
Hans-Christoph Steiner
21a18cf26b gitlab-ci: fix ubuntu_lts test now that its bionic rather than xenial
The new ubuntu:latest image is not set up for non-interactive, so this
gitlab-ci job now needs to do that.
2018-05-04 15:11:25 +02:00
Hans-Christoph Steiner
d2af293bb7 travis-ci: update to only recent OSX versions, well supported by brew 2018-05-04 15:11:25 +02:00
Hans-Christoph Steiner
18a7dddd23 Merge branch 'master' into 'master'
Fix applicationIdSuffix / versionNameSuffix not understood #455

Closes #455

See merge request fdroid/fdroidserver!484
2018-05-04 12:58:29 +00:00
J-Jamet
d6f1de2649 Fix applicationIdSuffix / versionNameSuffix #455 2018-05-04 12:24:16 +02:00
Hans-Christoph Steiner
62a187607d Merge branch 'master' into 'master'
Three random fixes

See merge request fdroid/fdroidserver!496
2018-05-03 12:11:48 +00:00
Hans-Christoph Steiner
27a5cce832 implement common.get_apk_id() using androguard 2018-05-03 13:46:42 +02:00
Hans-Christoph Steiner
98a2f70e38 fix intermittent test failure
For some reason, the parser stopped working intermittently, even
though the format has been the same since aapt 23 or earlier.  Then
also, some of the test cases pointed to symlinks that were no longer
generated, and one test app now has a blank versionName.

Strange that this wasn't caught in the gitlab-ci runs.  !484

FAIL: test_get_api_id_aapt (__main__.CommonTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./common.TestCase", line 578, in testA_get_api_id_aapt
    self.assertEqual(versionName, vn)
AssertionError: '0.1' != "0.1' platformBuildVersionName='4.3.1-1425645"
- 0.1
+ 0.1' platformBuildVersionName='4.3.1-1425645
2018-05-03 13:46:42 +02:00
Hans-Christoph Steiner
cc1e10a37a delete .java.security after checking MD5 signatures
This file is written freshly each time before use, so it does not need
to be ekpt around.  It was the only file making the fdroiddata.git
repo dirty on the f-droid.org infrastructure.

This also adds stricter file permissions to avoid an attacker changing
those settings during operation.
2018-05-03 13:46:36 +02:00