chiark / gitweb /
fdroidserver.git
8 years agogitignore: ignore all test-generated tmp dirs
Daniel Martí [Fri, 15 Jan 2016 11:39:37 +0000 (12:39 +0100)]
gitignore: ignore all test-generated tmp dirs

8 years agoFix detection of pyflakes3 found in Debian
Daniel Martí [Thu, 14 Jan 2016 23:19:11 +0000 (00:19 +0100)]
Fix detection of pyflakes3 found in Debian

8 years agometadata: slightly speed up post_metadata_parse
Daniel Martí [Mon, 11 Jan 2016 12:25:03 +0000 (13:25 +0100)]
metadata: slightly speed up post_metadata_parse

Iterating over all the fields and checking which are modified is slower
than just iterating over the modified ones.

8 years agometadata: Sorting builds twice is not necessary
Daniel Martí [Mon, 11 Jan 2016 12:22:13 +0000 (13:22 +0100)]
metadata: Sorting builds twice is not necessary

8 years agoUndo utf-8 text wrap workaround
Daniel Martí [Sun, 10 Jan 2016 17:35:06 +0000 (18:35 +0100)]
Undo utf-8 text wrap workaround

This was added to fix unicode support in Python2. No longer needed in
Python3.

8 years agoSwitch README and docs to indicate python 3
Daniel Martí [Mon, 4 Jan 2016 20:47:37 +0000 (21:47 +0100)]
Switch README and docs to indicate python 3

8 years agopep8: start obeying E226
Daniel Martí [Mon, 4 Jan 2016 20:42:34 +0000 (21:42 +0100)]
pep8: start obeying E226

We nearly did already anyway.

8 years agopep8: Don't ignore rules we already obey
Daniel Martí [Mon, 4 Jan 2016 20:38:22 +0000 (21:38 +0100)]
pep8: Don't ignore rules we already obey

8 years agoimport: switch to python3 urllib
Daniel Martí [Mon, 4 Jan 2016 20:35:17 +0000 (21:35 +0100)]
import: switch to python3 urllib

8 years agoupdate test: replace decode('hex') with unhexlify
Daniel Martí [Mon, 4 Jan 2016 20:31:22 +0000 (21:31 +0100)]
update test: replace decode('hex') with unhexlify

8 years agometadata test: load pickle in bytes, not str
Daniel Martí [Mon, 4 Jan 2016 20:22:06 +0000 (21:22 +0100)]
metadata test: load pickle in bytes, not str

8 years agoFix python headers in some source files
Daniel Martí [Mon, 4 Jan 2016 20:19:47 +0000 (21:19 +0100)]
Fix python headers in some source files

These were missing the python2 header, so they went under my radar when
doing the switch go python3.

8 years agotests: switch to python3
Daniel Martí [Mon, 4 Jan 2016 20:17:58 +0000 (21:17 +0100)]
tests: switch to python3

8 years agoupdate: fix encoding issues with the xml index
Daniel Martí [Mon, 4 Jan 2016 20:10:18 +0000 (21:10 +0100)]
update: fix encoding issues with the xml index

8 years agoupdate: get output bytes, not str, from keytool
Daniel Martí [Mon, 4 Jan 2016 18:02:21 +0000 (19:02 +0100)]
update: get output bytes, not str, from keytool

8 years agocommon: Introduce FDroidPopenBytes
Daniel Martí [Mon, 4 Jan 2016 17:59:19 +0000 (18:59 +0100)]
common: Introduce FDroidPopenBytes

* We can now get the output bytes directly if desired
* FDroidPopen remains with str output
* Ouptut is now buffered efficiently with a BytesIO instead of
  concatenating strings

8 years agoReplace iterkeys() with keys()
Daniel Martí [Mon, 4 Jan 2016 17:51:58 +0000 (18:51 +0100)]
Replace iterkeys() with keys()

8 years agoupdate: replace encode('hex') with hexlify
Daniel Martí [Mon, 4 Jan 2016 17:51:39 +0000 (18:51 +0100)]
update: replace encode('hex') with hexlify

8 years agopublish: fix hashing of strings
Daniel Martí [Mon, 4 Jan 2016 17:46:51 +0000 (18:46 +0100)]
publish: fix hashing of strings

8 years agoinit: fix writing into file
Daniel Martí [Mon, 4 Jan 2016 17:44:46 +0000 (18:44 +0100)]
init: fix writing into file

8 years agoReplace md5 with hashlib.md5
Daniel Martí [Mon, 4 Jan 2016 17:36:47 +0000 (18:36 +0100)]
Replace md5 with hashlib.md5

8 years agocommon: fix str fetching from manifest xml
Daniel Martí [Mon, 4 Jan 2016 17:24:58 +0000 (18:24 +0100)]
common: fix str fetching from manifest xml

8 years agoPort urllib and HTMLParser imports to python3
Daniel Martí [Mon, 4 Jan 2016 17:02:36 +0000 (18:02 +0100)]
Port urllib and HTMLParser imports to python3

8 years agoReplace remaining file() usage
Daniel Martí [Mon, 4 Jan 2016 16:59:47 +0000 (17:59 +0100)]
Replace remaining file() usage

8 years agoFDroidPopen: return str again
Daniel Martí [Mon, 4 Jan 2016 16:55:37 +0000 (17:55 +0100)]
FDroidPopen: return str again

In the future we might want to instead return bytes, but for now the
easiest for the port to python3 is to continue to return str.

8 years agoReplace itervalues() with values()
Daniel Martí [Mon, 4 Jan 2016 16:43:22 +0000 (17:43 +0100)]
Replace itervalues() with values()

8 years agoPort to python3's configparser
Daniel Martí [Mon, 4 Jan 2016 16:43:13 +0000 (17:43 +0100)]
Port to python3's configparser

8 years agolint: remove sets usage
Daniel Martí [Mon, 4 Jan 2016 16:40:21 +0000 (17:40 +0100)]
lint: remove sets usage

8 years agocommon: update base64 encoding of bytes
Daniel Martí [Mon, 4 Jan 2016 16:32:58 +0000 (17:32 +0100)]
common: update base64 encoding of bytes

8 years agoPort all imports to python3
Daniel Martí [Mon, 4 Jan 2016 16:37:35 +0000 (17:37 +0100)]
Port all imports to python3

8 years agoupdate: replace ord() with bytearray
Daniel Martí [Mon, 4 Jan 2016 16:29:40 +0000 (17:29 +0100)]
update: replace ord() with bytearray

8 years agoMake pre-commit hook pass after python3 switch
Daniel Martí [Mon, 4 Jan 2016 16:28:55 +0000 (17:28 +0100)]
Make pre-commit hook pass after python3 switch

8 years agoRun 2to3 on makebuildserver
Daniel Martí [Mon, 4 Jan 2016 16:24:57 +0000 (17:24 +0100)]
Run 2to3 on makebuildserver

Mostly just print conversion.

8 years agopre-commit: port to python3
Daniel Martí [Mon, 4 Jan 2016 16:24:40 +0000 (17:24 +0100)]
pre-commit: port to python3

8 years agoRemove import workarounds for Python2
Daniel Martí [Mon, 4 Jan 2016 16:19:28 +0000 (17:19 +0100)]
Remove import workarounds for Python2

8 years agoRemove code that worked around python2 unicode
Daniel Martí [Mon, 4 Jan 2016 16:17:14 +0000 (17:17 +0100)]
Remove code that worked around python2 unicode

8 years agoGet readmeta and rewritemeta running under python3
Daniel Martí [Mon, 4 Jan 2016 16:11:39 +0000 (17:11 +0100)]
Get readmeta and rewritemeta running under python3

8 years agoReplace basestring with str
Daniel Martí [Mon, 4 Jan 2016 16:03:42 +0000 (17:03 +0100)]
Replace basestring with str

8 years agoReplace iteritems() with items()
Daniel Martí [Mon, 4 Jan 2016 16:02:28 +0000 (17:02 +0100)]
Replace iteritems() with items()

8 years agoReplace execfile with open+compile+exec
Daniel Martí [Mon, 4 Jan 2016 16:01:37 +0000 (17:01 +0100)]
Replace execfile with open+compile+exec

8 years agoSwitch to io.StringIO
Daniel Martí [Mon, 4 Jan 2016 16:00:21 +0000 (17:00 +0100)]
Switch to io.StringIO

8 years agoFix imports in Python 3
Daniel Martí [Mon, 4 Jan 2016 15:57:57 +0000 (16:57 +0100)]
Fix imports in Python 3

Since common and metadata import each other, we must import via
"fdroidserver.*".

8 years agoSwitch all headers to python3
Daniel Martí [Mon, 4 Jan 2016 15:33:20 +0000 (16:33 +0100)]
Switch all headers to python3

8 years agoMerge branch 'jenkins-makebs' into 'master'
Hans-Christoph Steiner [Thu, 10 Mar 2016 11:27:15 +0000 (11:27 +0000)]
Merge branch 'jenkins-makebs' into 'master'

Jenkins makebs improvements

See merge request !105

8 years agojenkins: build a variety of apps
Daniel Martí [Thu, 25 Feb 2016 15:03:06 +0000 (15:03 +0000)]
jenkins: build a variety of apps

8 years agojenkins: only build one version per app
Daniel Martí [Thu, 25 Feb 2016 14:48:51 +0000 (14:48 +0000)]
jenkins: only build one version per app

Use a specific vercode instead of --latest since we want this to be as
stable as possible.

8 years agojenkins: update fdroiddata if existing
Daniel Martí [Thu, 25 Feb 2016 14:47:31 +0000 (14:47 +0000)]
jenkins: update fdroiddata if existing

Also, when cloning, no need to specify the branch and only download that
one. We already have only a single branch. And forcing master isn't
necessary.

8 years agobuild: don't remove wrapper dir gradle/
Daniel Martí [Tue, 8 Mar 2016 23:50:14 +0000 (23:50 +0000)]
build: don't remove wrapper dir gradle/

The point of removing these was to make sure that gradlew wasn't used,
and that our gradle was used instead. Removing the scripts already
accomplishes this.

Removing gradle/ should be harmless, but some apps like I2P re-use this
directory to also hold other stuff that is actually needed. So be safer
and don't remove it at all.

8 years agolint: Also warn about gitlab links missing /issues
Daniel Martí [Mon, 7 Mar 2016 22:29:45 +0000 (22:29 +0000)]
lint: Also warn about gitlab links missing /issues

8 years agoREADME: Use new CI badge url
Daniel Martí [Mon, 7 Mar 2016 20:53:15 +0000 (20:53 +0000)]
README: Use new CI badge url

8 years agoMerge branch 'import' into 'master'
Daniel Martí [Sun, 6 Mar 2016 11:32:05 +0000 (11:32 +0000)]
Merge branch 'import' into 'master'

import: Fix usage of .git suffix for gitlab urls

See merge request !107

8 years agoimport: use .git suffix only for repo-url
Boris Kraut [Sun, 6 Mar 2016 10:14:14 +0000 (11:14 +0100)]
import: use .git suffix only for repo-url

8 years agoREADME: Fix CI badge
Daniel Martí [Sat, 5 Mar 2016 23:54:33 +0000 (23:54 +0000)]
README: Fix CI badge

The old /ci link no longer works. Use the builds page instead.

8 years agoCI: Install missing gcc and python-dev packages
Daniel Martí [Thu, 3 Mar 2016 15:21:14 +0000 (15:21 +0000)]
CI: Install missing gcc and python-dev packages

8 years agolint: error on `fdroid import` disable line
Daniel Martí [Thu, 3 Mar 2016 14:19:32 +0000 (14:19 +0000)]
lint: error on `fdroid import` disable line

8 years agoCI: No longer needed to install any deps
Daniel Martí [Mon, 29 Feb 2016 23:38:54 +0000 (23:38 +0000)]
CI: No longer needed to install any deps

All the deps come installed in the image now. This saves up a little
time (especially the apt-get update) and makes the CI script much
simpler.

8 years agoCI: Use our own image
Daniel Martí [Mon, 29 Feb 2016 19:56:02 +0000 (19:56 +0000)]
CI: Use our own image

8 years agoMerge branch 'p1' into 'master'
Daniel Martí [Sun, 28 Feb 2016 13:37:17 +0000 (13:37 +0000)]
Merge branch 'p1' into 'master'

Fix pubkey extraction on update

Replacement of !86.

Fix pubkey extraction in case of non-empty _JAVA_OPTIONS. Fixes #133.

I didn't actually run the test suite (it looks like there are some preparations to be done for that), but I checked the commands from `test_fdroid_popen_stderr_redirect` in ipython.

See merge request !103

8 years agoMerge branch 'faster-ci' into 'master'
Daniel Martí [Sun, 28 Feb 2016 13:35:57 +0000 (13:35 +0000)]
Merge branch 'faster-ci' into 'master'

CI: Install Android SDK only if necessary

See merge request !106

8 years agoCI: Install Android SDK only if necessary
Daniel Martí [Sat, 27 Feb 2016 19:56:32 +0000 (19:56 +0000)]
CI: Install Android SDK only if necessary

8 years agocommon: make jdk detection more strict
Daniel Martí [Tue, 23 Feb 2016 12:42:47 +0000 (12:42 +0000)]
common: make jdk detection more strict

We weren't using ^ and $, so stuff like java-8-openjdk-i386 would match
both the Arch and the Debian regexes. A list with one regex per line in
the same format is also easier to read and maintain.

This might be why java8 isn't being detected properly on our Debian
stable buildserver.

8 years agoconfig.buildserver.py: use new java_paths keys
Daniel Martí [Tue, 23 Feb 2016 12:26:00 +0000 (12:26 +0000)]
config.buildserver.py: use new java_paths keys

8 years agobuild: don't error on .fdroid* files in fdroiddata
Daniel Martí [Tue, 23 Feb 2016 12:03:26 +0000 (12:03 +0000)]
build: don't error on .fdroid* files in fdroiddata

This avoids the following incorrect error:

fdroidserver.common.FDroidException: Only one local metadata file allowed! Found: .fdroid.keystorepass.txt .fdroid.keypass.txt

8 years agoMerge branch 'scanner-repos' into 'master'
Daniel Martí [Sat, 20 Feb 2016 07:29:12 +0000 (07:29 +0000)]
Merge branch 'scanner-repos' into 'master'

Allow commonsware and gradle plugin repos

This is in a MR because I'm uneasy about adding a semi-random AWS url to the list. But seems like the commonsware guy only publishes jars there, which doesn't make any sense to me.

Any idea @eighthave?

See merge request !102

8 years agodocs: add missing maven repos
Daniel Martí [Sat, 20 Feb 2016 06:21:17 +0000 (07:21 +0100)]
docs: add missing maven repos

8 years agoMerge branch 'p2' into 'master'
Daniel Martí [Thu, 18 Feb 2016 13:35:33 +0000 (13:35 +0000)]
Merge branch 'p2' into 'master'

Fix update crash in case of unset dates in APK; add an option to use APK's entry date

I encountered an error when I tried to add [TrackID APK](https://play.google.com/store/apps/details?id=com.sonyericsson.trackid) (files in the APK don't have dates set): as far as I can remember `datetime(*manifest.date_time)` was raising `ValueError`.

Also add an option to use date from APK as this APK's entry date (may be useful in case of a simple binary repo): `fdroid update --use-date-from-apk`.

I should have split this commit, but I hope this would be OK too.

See merge request !104

8 years agoAdd '--use-date-from-apk' option to bash-completion
Dmitriy Bogdanov [Thu, 18 Feb 2016 12:11:18 +0000 (16:11 +0400)]
Add '--use-date-from-apk' option to bash-completion

8 years agoAdd an option to use dates from APK
Dmitriy Bogdanov [Thu, 18 Feb 2016 12:41:43 +0000 (16:41 +0400)]
Add an option to use dates from APK

8 years agoFix update crash in case of unset dates in APK
Dmitriy Bogdanov [Thu, 18 Feb 2016 12:40:51 +0000 (16:40 +0400)]
Fix update crash in case of unset dates in APK

8 years agosetup.py: fix missing comma in classifiers 0.6.0
Hans-Christoph Steiner [Thu, 18 Feb 2016 10:47:02 +0000 (11:47 +0100)]
setup.py: fix missing comma in classifiers

8 years ago`python setup.py release` alias for making official releases
Hans-Christoph Steiner [Thu, 18 Feb 2016 10:40:47 +0000 (11:40 +0100)]
`python setup.py release` alias for making official releases

8 years agoBump to 0.6.0
Daniel Martí [Thu, 18 Feb 2016 09:15:47 +0000 (09:15 +0000)]
Bump to 0.6.0

8 years agoAdd FDroidPopen usage test
Dmitriy Bogdanov [Wed, 17 Feb 2016 20:45:06 +0000 (00:45 +0400)]
Add FDroidPopen usage test

8 years agoFix pubkey extraction on update
Dmitriy Bogdanov [Wed, 17 Feb 2016 18:22:57 +0000 (22:22 +0400)]
Fix pubkey extraction on update

Fix pubkey extraction in case of non-empty _JAVA_OPTIONS

8 years agoChange can't update category name - closes #80
Ciaran Gultnieks [Wed, 17 Feb 2016 14:37:46 +0000 (14:37 +0000)]
Change can't update category name - closes #80

8 years agoAllow commonsware and gradle plugin repos
Daniel Martí [Wed, 17 Feb 2016 13:00:05 +0000 (13:00 +0000)]
Allow commonsware and gradle plugin repos

8 years agoMerge branch 'debian-import-freeze' into 'master'
Daniel Martí [Wed, 17 Feb 2016 11:40:12 +0000 (11:40 +0000)]
Merge branch 'debian-import-freeze' into 'master'

Debian import freeze

These are the issues as discussed in today's meeting.  More in the commit messages, and mostly, in the related issues.

See merge request !101

8 years agomake "Current Version Code" default to most recent APK
Hans-Christoph Steiner [Tue, 16 Feb 2016 23:11:22 +0000 (00:11 +0100)]
make "Current Version Code" default to most recent APK

closes #36 https://gitlab.com/fdroid/fdroidserver/issues/36

8 years agoadded 'mirrors' option to config for giving official mirror URLs
Hans-Christoph Steiner [Tue, 16 Feb 2016 22:43:23 +0000 (23:43 +0100)]
added 'mirrors' option to config for giving official mirror URLs

serverwebroot has long supported uploading to multiple servers, this bit of
metadata communicates those official mirrors to the client so that it can
automatically do something useful with that information.

closes #14 https://gitlab.com/fdroid/fdroidserver/issues/14

8 years agouse utf-8 as default encoding for config.py
Hans-Christoph Steiner [Tue, 16 Feb 2016 22:36:27 +0000 (23:36 +0100)]
use utf-8 as default encoding for config.py

This makes it easy to add all languages to the description.

8 years agoMerge branch 'full-bsd-osx-port' into 'master'
Hans-Christoph Steiner [Mon, 15 Feb 2016 22:09:55 +0000 (22:09 +0000)]
Merge branch 'full-bsd-osx-port' into 'master'

Full BSD/OSX port

This finishes up the OSX port by getting the full test suite running on OSX.  It also sets up an OSX CI job travis-ci.org, run as part of the github mirror here: https://github.com/f-droid/fdroidserver  You can see those CI builds here: https://travis-ci.org/f-droid/fdroidserver

This should translate entirely to *BSD since OSX's user land is merged with FreeBSD.

See merge request !100

8 years agotravis-ci: make pip install deps based on setup.py
Hans-Christoph Steiner [Mon, 15 Feb 2016 22:06:23 +0000 (23:06 +0100)]
travis-ci: make pip install deps based on setup.py

8 years agoPEP8 fix E225 missing whitespace around operator
Hans-Christoph Steiner [Mon, 15 Feb 2016 19:22:17 +0000 (20:22 +0100)]
PEP8 fix E225 missing whitespace around operator

8 years agotravis-ci: run test suite on OSX and GNU/Linux
Hans-Christoph Steiner [Mon, 15 Feb 2016 13:00:52 +0000 (14:00 +0100)]
travis-ci: run test suite on OSX and GNU/Linux

8 years agoinit: check if examples/ exists in layout before using the path
Hans-Christoph Steiner [Mon, 15 Feb 2016 18:58:05 +0000 (19:58 +0100)]
init: check if examples/ exists in layout before using the path

There is definitely some odd stuff that happens in all these paths, so
let's just check that examples/ exists, and move on from there.

8 years agopre-commit: make pyflakes optional to support older platforms
Hans-Christoph Steiner [Mon, 15 Feb 2016 15:25:43 +0000 (16:25 +0100)]
pre-commit: make pyflakes optional to support older platforms

Travis-CI defaults to Ubuntu/precise, which has a very old version of
pyflakes that throws false positives.

8 years agosupport BSD and GNU sed in tests
Hans-Christoph Steiner [Mon, 15 Feb 2016 15:17:24 +0000 (16:17 +0100)]
support BSD and GNU sed in tests

8 years agorun-tests: use OSX/BSD compatible `mktemp -d`
Hans-Christoph Steiner [Mon, 15 Feb 2016 14:29:11 +0000 (15:29 +0100)]
run-tests: use OSX/BSD compatible `mktemp -d`

-d requires an arg on BSD

8 years agoonly test ./gendocs on GNU/Linux
Hans-Christoph Steiner [Mon, 15 Feb 2016 13:33:27 +0000 (14:33 +0100)]
only test ./gendocs on GNU/Linux

This helps with getting the tests running on OSX and other platforms.

8 years agocomplete-ci-tests: exit with error if setup is not correct
Hans-Christoph Steiner [Mon, 15 Feb 2016 10:40:35 +0000 (11:40 +0100)]
complete-ci-tests: exit with error if setup is not correct

8 years agoForgot to remove the output= debug prints
Daniel Martí [Mon, 15 Feb 2016 13:49:12 +0000 (13:49 +0000)]
Forgot to remove the output= debug prints

8 years agopre-commit: fix multiple file issue
Daniel Martí [Mon, 15 Feb 2016 12:01:43 +0000 (12:01 +0000)]
pre-commit: fix multiple file issue

When using -z, you should always quote. If not, stuff like this happens:

.git/hooks/pre-commit: line 10: [: too many arguments

8 years agooutput= is now a glob path and can do gradle
Daniel Martí [Mon, 15 Feb 2016 12:01:38 +0000 (12:01 +0000)]
output= is now a glob path and can do gradle

8 years agoAdd gradle 2.11
Daniel Martí [Mon, 15 Feb 2016 11:44:07 +0000 (11:44 +0000)]
Add gradle 2.11

8 years agogradle wrapper script: add plugin 1.5
Daniel Martí [Mon, 15 Feb 2016 11:37:56 +0000 (11:37 +0000)]
gradle wrapper script: add plugin 1.5

8 years agoMerge branch 'master' into 'master'
Daniel Martí [Fri, 12 Feb 2016 09:13:53 +0000 (09:13 +0000)]
Merge branch 'master' into 'master'

a couple fixes

these are three fixes, one related to my previous merge request, as discussed with @mvdan in IRC

See merge request !99

8 years agofix PEP9 E713 test for membership should be 'not in'
Hans-Christoph Steiner [Thu, 11 Feb 2016 23:39:54 +0000 (00:39 +0100)]
fix PEP9 E713 test for membership should be 'not in'

8 years agofix errors in pre-commit hook when run in test suite
Hans-Christoph Steiner [Thu, 11 Feb 2016 23:27:17 +0000 (00:27 +0100)]
fix errors in pre-commit hook when run in test suite

8 years agobuild: check that metadata is present before creating tmp dirs
Hans-Christoph Steiner [Tue, 4 Aug 2015 14:09:44 +0000 (16:09 +0200)]
build: check that metadata is present before creating tmp dirs

Before, `fdroid build` would create some subdirs, then fail when it could
not read the metadata via metadata.read_metadata().  This checks before
whether there is any metadata available, and warns the user accordingly.

8 years agocommon: do not crash if the java_paths are not what is expected
Hans-Christoph Steiner [Thu, 11 Feb 2016 22:49:54 +0000 (23:49 +0100)]
common: do not crash if the java_paths are not what is expected

Many commands work without the JDK installed, and it is also possible that
someone is using only JDK 8 or 9.