1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-08-15 19:00:11 +02:00
Commit Graph

4823 Commits

Author SHA1 Message Date
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
Hans-Christoph Steiner
c225e0c363 Merge branch 'first-working-localization' into 'master'
First working localization

See merge request fdroid/fdroidserver!340
2017-09-19 18:12:41 +00:00
Hans-Christoph Steiner
8e0b424bc8 update translation template with latest strings 2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
86cf1c9800 add Makefile to handle refreshing translation template
To generate the translation files, run `make -C locale`or
`cd locale && make`

To update the template, run `make -C locale template` or
`cd locale && make fdroidserver.pot`
2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
6c7b987239 fix string formats that are ambiguous for translators 2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
255932453c ensure _ is used only for gettext strings
_ is often used for variables that are ignored, this makes that a bit more
explicit
!338
2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
53e4ec47a7 English source string corrections
From @monolifed <monolifed@gmail.com>
2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
9712fac011 "No config.py found" should warning level, until people get use to it
Since !335 changed the long standing behavior, now allowing `fdroid` to
work without a config.py being present, this message should be quite
visible in case people are expecting `fdroid` to fail when there is no
config.py present.
2017-09-16 11:11:49 +02:00
Hans-Christoph Steiner
c7d45b9515 Merge branch 'plural' into 'master'
Correct plurals

See merge request fdroid/fdroidserver!334
2017-09-16 08:11:06 +00:00
Hans-Christoph Steiner
acac15f74d Merge branch 'newcomers' into 'master'
allow starting without config.py

See merge request fdroid/fdroidserver!335
2017-09-16 08:07:56 +00:00
Hans-Christoph Steiner
f144cae11c Merge branch 'weblate' into 'master'
Weblate

See merge request fdroid/fdroidserver!339
2017-09-15 21:00:33 +00:00
Hans-Christoph Steiner
5ca2997daf Weblate 2017-09-15 21:00:33 +00:00
Hans-Christoph Steiner
a2eaf37394 Merge branch 'implement-gettext' into 'master'
first implementation of localization using gettext

Closes #342

See merge request fdroid/fdroidserver!338
2017-09-15 19:29:12 +00:00
Jan Berkel
4723cff0c8 Correct plurals 2017-09-15 14:16:30 +02:00
Hans-Christoph Steiner
fa0d618d2f rename 'app-id' to standard Android 'applicationId'
* https://developer.android.com/studio/build/application-id.html
* https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/applicationid-vs-packagename

This only changes the term in the human texts, not var names or CLI flags.
2017-09-15 11:41:51 +02:00
Hans-Christoph Steiner
278d67d960 implement gettext localization
This allows all the text to be localized via Weblate.  This is a quick
overview of all the strings, but there are certainly some that were left
out.

closes #342
2017-09-15 11:39:00 +02:00
Hans-Christoph Steiner
e4ca82d80c tests: support running on platforms with old java
In order to test on travis-ci's OSX setup, its easiest to support the old
version of Java that is installed there by default.  It is pretty old, so
it does not include the April 2017 update that disables MD5:

https://blogs.oracle.com/java-platform-group/oracle-jre-will-no-longer-trust-md5-signed-code-by-default
https://www.bleepingcomputer.com/news/security/oracle-to-block-jar-files-signed-with-md5-starting-with-april-2017
https://support.ca.com/us/knowledge-base-articles.TEC1691042.html

#292 #323
2017-09-15 11:37:24 +02:00
Hans-Christoph Steiner
cb10f0df09 standardize os.walk() var names based on Python 3.5 docs
There were multiple conventions used in the code, but mostly it was already
using the convention from the docs, so this converts things to using that
convention:

https://docs.python.org/3/library/os.html#os.walk
2017-09-15 11:37:21 +02:00
Hans-Christoph Steiner
96e71bfdb3 set minimum Python version to 3.4
We use contructs introduced in 3.4, and 3.4 is really widely available.

https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords
2017-09-15 11:35:30 +02:00
Hans-Christoph Steiner
30c0d5f4d5 gitlab-ci: ensure release tag is present for metadata_v0 tests
Forks won't necessarily have all the tags, so this ensures that they are
present.
2017-09-15 11:35:30 +02:00
Hans-Christoph Steiner
9cb074cb08 Merge branch 'buildserver-verbose' into 'master'
print build-server output when verbose flag is set

Closes #213

See merge request fdroid/fdroidserver!219
2017-09-15 09:10:07 +00:00
Hans-Christoph Steiner
7aebf7a33f Merge branch '368-makebuildserver-fails-checkey-101' into 'master'
remove checkey from jenkins-build-makebuildserver

Closes #368

See merge request fdroid/fdroidserver!337
2017-09-15 09:01:12 +00:00
Michael Pöhn
23b45c68c1 remove checkey from jenkins-build-makebuildserver 2017-09-14 11:28:12 +02:00
Marcus Hoffmann
34f79b876c tests: don't touch config.py, no config is fine now 2017-09-14 02:15:57 +02:00
Marcus Hoffmann
190a2fde81 common: allow starting without a config file
There is no reason this should be disallowed as the default config often
works well when building simple apps.
2017-09-14 02:15:57 +02:00
Marcus Hoffmann
feadc6a565 make sure config exists before writing to it 2017-09-14 02:15:57 +02:00
Marcus Hoffmann
de1afc3c7e bash_completion: add update --create-key option 2017-09-14 02:15:57 +02:00
Michael Pöhn
5770e1d3ef log build-server output when verbose flag is set 2017-09-14 01:38:34 +02:00
Marcus Hoffmann
237973a1d6 bash_completion: fix option completion
Line breaks need to be escaped in the command list.
2017-09-13 14:02:04 +02:00
Hans-Christoph Steiner
7db6997eea add all subcommands to bash completion
The bash completion needs a modernization, but this at least makes all the
subcommands work.
#374
2017-09-13 09:53:26 +02:00
Hans-Christoph Steiner
a4a7b99760 Merge branch 'fix_gplay_check' into 'master'
Fix gplay check

See merge request !333
2017-09-13 07:18:46 +00:00
Marcus Hoffmann
5ebde251b1 checkupdates: use html.unescape instead of HTMLParser.unescape
HTMLParser.unescape is only an internal method and deprecated.
This requires Pyhton 3.4.
2017-09-13 01:42:15 +02:00
Marcus Hoffmann
921524081c checkupdates: fix google play check method
This has never worked with python3 and was also not properly adapted to
apps as objects. So we fix both of these issues.
2017-09-13 01:40:09 +02:00
Hans-Christoph Steiner
253bd92df3 Merge branch 'refuse-publishing-duplicate-apks' into 'master'
proper error message when publishing with the same app in repo and unsigned

See merge request !329
2017-09-12 15:33:51 +00:00
Hans-Christoph Steiner
7513432a41 Merge branch 'warn_on_aar' into 'master'
scanner: warn on aar files

See merge request !332
2017-09-12 15:29:29 +00:00
Hans-Christoph Steiner
9461dd0f3d Merge branch 'scanner_refactoring' into 'master'
Scanner refactoring

See merge request !330
2017-09-11 15:47:57 +00:00
Marcus Hoffmann
5f5d3ea896 scanner: promote jar and aar files present in the repo to errors
This makes sure we we don't include any prebuilt code in the build process.
2017-09-11 17:05:24 +02:00
Marcus Hoffmann
15c4492625 remove gradle-wrapper.jar during scan
We make sure to not use the gradle wrapper anyway so this should have no
impact.
2017-09-11 17:05:21 +02:00
Marcus Hoffmann
af2eb2bd50 scanner: warn on aar files 2017-09-11 17:05:16 +02:00
Marcus Hoffmann
5d9eb9b295 scanner: rename variables, use os.path.relpath
* rename fd -> path_in_build_dir
* rename fp -> filepath
* use os.path.reldir instead of string manipulation
2017-09-11 16:49:39 +02:00