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

4962 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
5567182629 Merge branch 'fix-dot-gradle-removal' into 'master'
build: fix build/ and .gradle/ removal after cleaning

Closes #384

See merge request fdroid/fdroidserver!346
2017-10-03 13:19:47 +00:00
Hans-Christoph Steiner
ad10bfcad2 Merge branch '291-include-apk-signatures-in-build-metadata-file' into 'master'
include APK signatures in build metadata file

Closes #291

See merge request fdroid/fdroidserver!287
2017-10-03 12:57:34 +00:00
relan
aad4bd89d8 build: fix build/ and .gradle/ removal after cleaning
An app may not have a top-level build.gradle file, while Gradle still
creates top-level .gradle/ directory. When build.gradle is absent,
fdroidserver will not remove .gradle/, scanner will find binaries in it
and fail the whole build.

Fix this by also checking for settings.gradle file (should always exist
in the top-level directory) in addition to build.gradle.
2017-10-01 10:11:37 +03:00
Michael Pöhn
89d9d0c45b use OrderedDict for localization data in index-v1 2017-09-26 14:15:48 +02:00
Michael Pöhn
26192a00e2 make sure all timestamps in index-v1 are utc 2017-09-26 14:15:27 +02:00
Michael Pöhn
290b9050e0 convert apk timestamp from filesystem to utc before storing 2017-09-26 14:13:08 +02:00
Michael Pöhn
50c17f99d1 make sure apk-added datetime only gets returned rounded to days 2017-09-26 14:13:04 +02:00
Michael Pöhn
a2d361dec8 add test for index-v1.json 2017-09-26 14:12:59 +02:00
Michael Pöhn
dfc6261ccb sort antiFeatures list in index-v1.json 2017-09-26 14:12:53 +02:00
Michael Pöhn
b6b79edf11 store fdroid signing-key-fp-list in stats dir 2017-09-26 14:11:09 +02:00
Michael Pöhn
75c5fa6355 added some docstrings and error messages 2017-09-26 14:11:09 +02:00
Michael Pöhn
6fc968f7cd choose best apk version vor index v0 2017-09-26 14:11:09 +02:00
Michael Pöhn
6930edf889 sort index-v1; publish now creates and stores a list of signature fingerprints 2017-09-26 14:11:09 +02:00
Michael Pöhn
bca07f794f added functions for storing/loading signer fingerprints to stats 2017-09-26 14:11:09 +02:00
Michael Pöhn
5a524d4d0c added some developer-signing key metadata to tests 2017-09-26 14:11:09 +02:00
Michael Pöhn
ba3844e97e function for finding developer signature in metadata 2017-09-26 14:11:09 +02:00
Michael Pöhn
6a4a78429f add signer to index v1 2017-09-26 14:11:09 +02:00
Michael Pöhn
7c4b8bcac4 added parse release filename function 2017-09-26 14:11:09 +02:00
Michael Pöhn
b993d93395 skip singing apks which ar not validating with signatures from metadata 2017-09-26 14:11:09 +02:00
Michael Pöhn
04daa7a03a test for common.get_app_id_aapt 2017-09-26 14:11:09 +02:00
Michael Pöhn
91369dacfb try injecting signatures for metadata when publishing 2017-09-26 14:11:09 +02:00
Michael Pöhn
08627d70a7 check file existance before trying to verify apks; use centext manager for zips when verifying apk 2017-09-26 14:11:09 +02:00
Michael Pöhn
efb0bf6ee5 add common functions for dealing with apk signatures 2017-09-26 14:11:09 +02:00
Michael Pöhn
45688bfe42 refactored publishing source tarball into a function 2017-09-26 14:11:09 +02:00
Michael Pöhn
c196f7dd7a common function for fetching sha256 signing-key fingerprint 2017-09-26 14:11:09 +02:00
Hans-Christoph Steiner
d44d48285b Merge branch 'build-drozer-syntax-error' into 'master'
building with --dscanner now exits gracefully when repo dir not present

See merge request fdroid/fdroidserver!344
2017-09-26 08:49:51 +00:00
Hans-Christoph Steiner
eaca20675c tests: test setting up app git repo like fdroid build does
I wrote this to try to find #379 but this test didn't trigger that bug.
2017-09-25 16:35:18 +02:00
Hans-Christoph Steiner
cbf7ba0414 tests: add setUp() method to common to handle standard stuff 2017-09-25 16:35:18 +02:00
Hans-Christoph Steiner
beb79d613d move lots of comments to function doc strings 2017-09-25 16:35:18 +02:00
Hans-Christoph Steiner
628fa134f1 travis-ci: quiet output for pip/sdkmanager installs
The log was getting way too long.
2017-09-25 16:35:18 +02:00
Hans-Christoph Steiner
d757902f9c update MANIFEST.in
There were a number of new files missing.  Some files still manually
excluded.  Generated using:

 for f in `git ls-tree -r master --name-only | sort`; do echo include $f; done
2017-09-25 16:35:18 +02:00
Hans-Christoph Steiner
31e81e83da use pandoc to convert README.md to PyPI's reST format
PyPI and Python packages expect the description to be in reST format, which
is a lot different than Markdown.  This does the conversion if pandoc is
installed.
2017-09-25 16:35:18 +02:00
Michael Pöhn
d8485f7123 build+drozer: error message instead of crash when repo-folder missing 2017-09-25 16:09:57 +02:00
Hans-Christoph Steiner
faeecf0b07 Merge branch 'gradle-4.2' into 'master'
makebuildserver: add Gradle 4.2

See merge request fdroid/fdroidserver!342
2017-09-25 12:17:34 +00:00
relan
3fdddd1179 makebuildserver: add Gradle 4.2 2017-09-23 10:04:39 +03:00
Hans-Christoph Steiner
ca069d941d Merge branch 'port-to-osx-and-trusty' into 'master'
port to OSX and Ubuntu/trusty

See merge request fdroid/fdroidserver!341
2017-09-20 15:24:57 +00:00
Hans-Christoph Steiner
86a3ef5355 travis-ci: always reinstall Java on OSX to get recent version
The Travis images have quite old versions of Java currently.
2017-09-19 20:16:08 +02:00
Hans-Christoph Steiner
a9a696b199 travis-ci: test on older OSX versions 2017-09-19 20:16:08 +02:00
Hans-Christoph Steiner
2764c43fa2 tests: use ci-test-app with current Gradle Android Plugin
This works around the gradle 2.x bug where versions newer than 2.9 cannot
run things.  This also then specifies the version of Gradle Android Plugin
that is included in Debian/stretch.
2017-09-19 20:16:08 +02:00
Hans-Christoph Steiner
dc569b9c18 tests: support Java setups where MD5 is not disabled by default
For platforms using Java < 1.8.0_133, MD5 is still enabled for JAR
signatures.  Its just too painful to manage all this, so support this
in the tests.
2017-09-19 20:16:08 +02:00
Hans-Christoph Steiner
373b46ab3f tests: don't run gpgsign tests on Travis CI's OSX, gpg always fails 2017-09-19 20:16:08 +02:00
Hans-Christoph Steiner
2b5edf2434 travis-ci: make Trusty builds a first class citizen
Trusty is used in Travis-CI, Windows Subsystem for Linux, and many other
places, so its an important target platform to test on.  This provides
testing for the backports in the Launchpad PPAs like:

* https://launchpad.net/~fdroid/+archive/ubuntu/fdroidserver
* https://launchpad.net/~fdroid/+archive/ubuntu/buildserver
2017-09-19 20:16:08 +02:00
Hans-Christoph Steiner
0a88a97881 travis-ci: update OSX CI build to work again 2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
d1f6126dea tests: support Ubuntu/trusty's python3.4-venv 2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
bc192b6be0 tests: prefer GNU sed on BSD/OSX, BSD's sed has lame syntax
https://blog.remibergsma.com/2012/09/18/sed-inline-editing-different-on-mac-osx/
2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
176f539647 allow spaces in filenames
This fixes all the bugs I could find that prevented fdroid from
handling files with spaces in them.  This is more important now that
fdroid supports random media files, and Repomaker
2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
6adf309bef tests: move test APK with bad unicode filename to separate test
This filename has some messed up bytes related to bi-directional script
that is included (Left-to-Right and Right-to-Left).  GNU/Linux always
interprets filenames as pure byte sequences.  Windows and OSX store
filenames as Unicode strings.  So on OSX, the invalid filename gets
converted to a valid name.  That works fine, but the test fails because it
is compared to a file generated on Ubuntu, where it preserves the byte
sequence.

This includes an APK with a valid Unicode filename that includes
bi-directional script.
2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
5dcb48831f index: always use jarsigner for verifying JAR signatures
apksigner v0.7 (build-tools 26.0.1), Google made it require that the
AndroidManifest.xml was present in the archive before it verifies the
signature.  So this needs to stick with the jarsigner hack for JARs.
2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
535f2afe90 init: prompt user for Android SDK path using platform-specific default 2017-09-19 20:13:36 +02:00
Hans-Christoph Steiner
1d4e3a254d create blank config.py using cross-platform technique
os.mknod() fails on OSX with:

Traceback (most recent call last):

  File "/Users/travis/build/fdroidtravis/fdroidserver/tests/../fdroid", line 154, in <module>
    main()
  File "/Users/travis/build/fdroidtravis/fdroidserver/tests/../fdroid", line 130, in main
    mod.main()
  File "/Users/travis/build/fdroidtravis/fdroidserver/fdroidserver/update.py", line 1768, in main
    common.write_to_config(config, 'repo_keyalias', config['repo_keyalias'])
  File "/Users/travis/build/fdroidtravis/fdroidserver/fdroidserver/common.py", line 2328, in write_to_config
    os.mknod(cfg)
PermissionError: [Errno 1] Operation not permitted
2017-09-19 20:13:36 +02:00