chiark / gitweb /
fdroidserver.git
7 years agomakebuildserver: use original names for downloaded SDK components
Hans-Christoph Steiner [Fri, 10 Jun 2016 09:42:42 +0000 (11:42 +0200)]
makebuildserver: use original names for downloaded SDK components

It will make it a lot easier to manage the cache if we use the original
file names, which often include the file version.  This also changes the
download process to be resumable if there is a partial file in the cache,
and switches from calling wget on the command line to using the python libs
'requests' and 'clint' to provide a similar experience.  While its not so
important for this particular bit of code to use those libraries, I think
those two will allow us to provide a better user experience throughout the
whole of fdroidserver.

In this case, it is already doing special tricks fetching the file size
from the server before trying to download it.  I suppose this code could
instead check if the file exists, and if so, check the hash sum.  I think
that would be slower for most people since checking the hash on large files
takes a noticeable about of time, while a HTTP HEAD request is pretty tiny.

7 years agoMerge branch 'targetSdkVersion' into 'master'
Hans-Christoph Steiner [Tue, 14 Jun 2016 10:39:50 +0000 (10:39 +0000)]
Merge branch 'targetSdkVersion' into 'master'

support targetSdkVersion

In order to provide the proper Android-6 permissions experience, the client needs to know which `targetSdkVersion` any APK has before it downloads it.  So this adds it to the metadata.

https://gitlab.com/fdroid/fdroidclient/issues/682

See merge request !128

7 years agoparse targetSdkVersion from APKs
Hans-Christoph Steiner [Tue, 14 Jun 2016 09:43:07 +0000 (11:43 +0200)]
parse targetSdkVersion from APKs

The default targetSdkVersion is minSdkVersion, according to the docs:
https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#target

https://gitlab.com/fdroid/fdroidclient/issues/682

7 years agoofficial Android default minSdkVersion is 1 not 0
Hans-Christoph Steiner [Mon, 6 Jun 2016 18:17:41 +0000 (20:17 +0200)]
official Android default minSdkVersion is 1 not 0

https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#min

7 years agorename 'sdkversion' var to 'minSdkVersion' to avoid confusion
Hans-Christoph Steiner [Mon, 6 Jun 2016 18:13:57 +0000 (20:13 +0200)]
rename 'sdkversion' var to 'minSdkVersion' to avoid confusion

'sdkversion' is confusing when there is also 'targetSdkVersion' and
'maxSdkVersion'.

7 years agorename maxSdkVersion variables to match Android
Hans-Christoph Steiner [Mon, 6 Jun 2016 18:09:15 +0000 (20:09 +0200)]
rename maxSdkVersion variables to match Android

Since this variable is already different than the XML name ('maxsdkver'),
this eliminates one more name for the same thing.

7 years agofix "DeprecationWarning: Please use assertEqual instead."
Hans-Christoph Steiner [Fri, 10 Jun 2016 10:02:03 +0000 (12:02 +0200)]
fix "DeprecationWarning: Please use assertEqual instead."

They've been deprecated since python 3.2, which was released a long time
ago.

7 years agoCI: bump docker image
Daniel Martí [Mon, 13 Jun 2016 18:45:12 +0000 (19:45 +0100)]
CI: bump docker image

7 years agoCI: remove debug ls
Daniel Martí [Mon, 13 Jun 2016 18:44:52 +0000 (19:44 +0100)]
CI: remove debug ls

7 years agoMerge branch 'fix-file-read-write-encoding' into 'master'
Daniel Martí [Thu, 9 Jun 2016 15:13:27 +0000 (15:13 +0000)]
Merge branch 'fix-file-read-write-encoding' into 'master'

Fix file read/write encoding

This hopefully provides a reasonably complete set of fixes for handling file encoding when reading and writing files.  It is not perfect since it does not handle _.java_, _.gradle_, or _pom.xml_ in any encoding, as is allowed.  But I think it should only be an improvement of the current state, and at worst, should work only as bad as the current setup for most language setups

See merge request !129

7 years agogitlab-ci: make sure pip3 install dirs exist
Hans-Christoph Steiner [Thu, 9 Jun 2016 10:15:11 +0000 (12:15 +0200)]
gitlab-ci: make sure pip3 install dirs exist

It doesn't want to create them itself.

7 years agouse UTF8 as default instead of ASCII for .java .gradle pom.xml
Hans-Christoph Steiner [Tue, 7 Jun 2016 18:13:54 +0000 (20:13 +0200)]
use UTF8 as default instead of ASCII for .java .gradle pom.xml

.java .gradle and XML files all can use any encoding.  Most code is ASCII,
but authors' names, etc. can easily be non-ASCII.  UTF-8 is by far the most
common file encoding.  While UTF-8 is the default encoding inside the code
in Python 3, it still has to deal with the real world, so the encoding
needs to be explicitly set when reading and writing files. So this switches
fdroidserver to expect UTF-8 instead of ASCII when parsing these files. For
now, this commit means that we only support UTF-8 encoded *.java, pom.xml
or *.gradle files.  Ideally, the code would detect the encoding and use the
actual one, but that's a lot more work, and its something that will not
happen often. We can cross that bridge when we come to it.

One approach, which is taken in the commit when possible, is to keep the
data as `bytes`, in which case the encoding doesn't matter.

This also fixes this crash when parsing gradle and maven files with
non-ASCII chars:

ERROR: test_adapt_gradle (__main__.BuildTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/fdroidserver-eighthave/tests/build.TestCase", line 59, in test_adapt_gradle
    fdroidserver.build.adapt_gradle(testsdir)
  File "/var/lib/jenkins/workspace/fdroidserver-eighthave/fdroidserver/build.py", line 445, in adapt_gradle
    path)
  File "/var/lib/jenkins/workspace/fdroidserver-eighthave/fdroidserver/common.py", line 188, in regsub_file
    text = f.read()
  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9460: ordinal not in range(128)

7 years agoread/write F-Droid files always as UTF-8
Hans-Christoph Steiner [Tue, 7 Jun 2016 11:35:13 +0000 (13:35 +0200)]
read/write F-Droid files always as UTF-8

This makes UTF-8 the sole supported encoding for F-Droid's files. This is
mostly codifying the already existing practice for config.py and index.xml.
The other files where always just ASCII before.

* config.py
* metadata/*.txt
* known_apks.txt
* categories.txt
* latestapps.txt
* latestapps.dat
* index.xml

Note: this does not change the read/write encoding of stats files.  That is
still ASCII.

7 years agoread/write Java .properties files in proper encoding
Hans-Christoph Steiner [Tue, 7 Jun 2016 11:26:40 +0000 (13:26 +0200)]
read/write Java .properties files in proper encoding

They are officially defined as always in ISO 8859-1:
https://docs.oracle.com/javase/6/docs/api/java/util/Properties.html

7 years agoREADME: fix badge
Daniel Martí [Fri, 3 Jun 2016 15:59:24 +0000 (16:59 +0100)]
README: fix badge

7 years agoAdd extra debug logging for move to/from archive
Ciaran Gultnieks [Sun, 29 May 2016 14:36:58 +0000 (15:36 +0100)]
Add extra debug logging for move to/from archive

7 years agoMerge branch 'bs-updates' into 'master'
Ciaran Gultnieks [Fri, 27 May 2016 13:14:52 +0000 (13:14 +0000)]
Merge branch 'bs-updates' into 'master'

buildserver updates

See merge request !127

7 years agoBump platform-23 to r03
Daniel Martí [Thu, 26 May 2016 15:05:39 +0000 (16:05 +0100)]
Bump platform-23 to r03

7 years agoDo not install extra-android-support in the VM
Daniel Martí [Thu, 26 May 2016 14:50:46 +0000 (15:50 +0100)]
Do not install extra-android-support in the VM

It's m2repository that is actually used by maven-based builds. This one
is pretty much useless.

7 years agoUpdate android sdk version
Daniel Martí [Thu, 26 May 2016 14:49:19 +0000 (15:49 +0100)]
Update android sdk version

Install version 25 now. Also use the smaller tools zip. While at it,
also remove the tools re-install - it's not worth it, as long as we keep
the initial tools zip up to date.

7 years agoAdd gradle 2.13
Daniel Martí [Thu, 26 May 2016 14:45:54 +0000 (15:45 +0100)]
Add gradle 2.13

7 years agoMerge branch 'libtool' into 'master'
Daniel Martí [Thu, 26 May 2016 16:33:39 +0000 (16:33 +0000)]
Merge branch 'libtool' into 'master'

Add libtool to deps list

See merge request !126

7 years agoAdd libtool to deps list
Boris Kraut [Tue, 17 May 2016 21:04:20 +0000 (23:04 +0200)]
Add libtool to deps list

8 years agoMerge branch 'lint-unused-files' into 'master'
Daniel Martí [Thu, 5 May 2016 23:31:04 +0000 (23:31 +0000)]
Merge branch 'lint-unused-files' into 'master'

lint: error on unused files

For now, this is just patch files.

See merge request !124

8 years agolint: Add check for missing and unused extlibs
Daniel Martí [Thu, 5 May 2016 12:35:17 +0000 (13:35 +0100)]
lint: Add check for missing and unused extlibs

8 years agolint: make the check for format a regular check
Daniel Martí [Thu, 5 May 2016 12:23:30 +0000 (13:23 +0100)]
lint: make the check for format a regular check

8 years agolint: error on unused files
Daniel Martí [Thu, 5 May 2016 11:40:16 +0000 (12:40 +0100)]
lint: error on unused files

For now, this is just patch files.

8 years agoMerge branch 'ci-bump' into 'master'
Daniel Martí [Thu, 5 May 2016 11:14:27 +0000 (11:14 +0000)]
Merge branch 'ci-bump' into 'master'

CI: Bump image

This is basically just an SDK update. We're now using the tools zip,
which is about 200MB smaller. Not entirely sure why, but things still
work.

See merge request !123

8 years agoCI: Update image, not using base anymore
Daniel Martí [Fri, 29 Apr 2016 18:20:15 +0000 (19:20 +0100)]
CI: Update image, not using base anymore

Since base is now 200MB smaller, this one is smaller too. The
fdroidserver-only deps are now in the client image - mainly python3-dev,
gcc and all the build deps for stuff like pillow.

8 years agolint: gradle does have target= support
Daniel Martí [Wed, 20 Apr 2016 10:21:41 +0000 (11:21 +0100)]
lint: gradle does have target= support

8 years agoMerge branch 'fix-ci' into 'master'
Daniel Martí [Fri, 15 Apr 2016 10:30:24 +0000 (10:30 +0000)]
Merge branch 'fix-ci' into 'master'

CI: Install venv instead of virtualenv

See merge request !122

8 years agogradle: forgot to actually install 2.12
Daniel Martí [Thu, 14 Apr 2016 15:19:35 +0000 (16:19 +0100)]
gradle: forgot to actually install 2.12

8 years agoCI: Install venv instead of virtualenv
Daniel Martí [Thu, 14 Apr 2016 15:16:58 +0000 (16:16 +0100)]
CI: Install venv instead of virtualenv

8 years agoMerge branch 'defaults' into 'master'
Daniel Martí [Thu, 14 Apr 2016 08:35:54 +0000 (08:35 +0000)]
Merge branch 'defaults' into 'master'

docs: add archive-policy default

See merge request !121

8 years agodocs: add archive-policy default
Boris Kraut [Thu, 14 Apr 2016 08:25:55 +0000 (10:25 +0200)]
docs: add archive-policy default

8 years agoMerge branch 'fix-virtualenv' into 'master'
Daniel Martí [Thu, 14 Apr 2016 08:04:28 +0000 (08:04 +0000)]
Merge branch 'fix-virtualenv' into 'master'

Prefer pyvenv instead of virtualenv for Python 3.3+

`virtualenv` uses python2 by default on my machine.
Using `pyvenv` (see https://docs.python.org/3/library/venv.html#module-venv) instead of `virtualenv` fixes the problem and let's me perform `python3 setup.py install` in the virtual environment.

See merge request !119

8 years agoPrefer pyvenv instead of virtualenv for Python 3.3+
Lode Hoste [Wed, 6 Apr 2016 17:46:21 +0000 (19:46 +0200)]
Prefer pyvenv instead of virtualenv for Python 3.3+

8 years agoMerge branch 'apkcache_compatibility' into 'master'
Daniel Martí [Tue, 12 Apr 2016 18:35:23 +0000 (18:35 +0000)]
Merge branch 'apkcache_compatibility' into 'master'

Add a workaround to open apkcache created with Py2

A workaround for #163.
*May* help in some rare cases, should not break anything.

See merge request !120

8 years agoAdd an encoding parameter to open apkcache created with Py2
Dmitriy Bogdanov [Fri, 8 Apr 2016 18:09:49 +0000 (22:09 +0400)]
Add an encoding parameter to open apkcache created with Py2

8 years agoFix gradle download url for 2.12
Ciaran Gultnieks [Thu, 7 Apr 2016 07:28:43 +0000 (08:28 +0100)]
Fix gradle download url for 2.12

8 years agoMerge branch 'fix-jpeg' into 'master'
Daniel Martí [Wed, 6 Apr 2016 06:56:32 +0000 (06:56 +0000)]
Merge branch 'fix-jpeg' into 'master'

Added libjpeg and zlib dependency in README

It seems these dependencies are also required.

See https://github.com/python-pillow/Pillow/issues/1457

See merge request !118

8 years agoAdded libjpeg and zlib dependency in README
Lode Hoste [Tue, 5 Apr 2016 22:46:48 +0000 (00:46 +0200)]
Added libjpeg and zlib dependency in README

See https://github.com/python-pillow/Pillow/issues/1457

8 years agoMerge branch 'ci-update' into 'master'
Hans-Christoph Steiner [Tue, 5 Apr 2016 10:42:59 +0000 (10:42 +0000)]
Merge branch 'ci-update' into 'master'

Gradle 2.12, build-tools 23.0.3

See merge request !117

8 years agoAdd and switch to build-tools 23.0.3
Daniel Martí [Tue, 5 Apr 2016 09:49:30 +0000 (10:49 +0100)]
Add and switch to build-tools 23.0.3

Also bump to the CI image which contains it.

8 years agoAdd Gradle 2.12 to the buildserver
Daniel Martí [Tue, 5 Apr 2016 09:49:15 +0000 (10:49 +0100)]
Add Gradle 2.12 to the buildserver

8 years agocommon: never pass None to replace_config_vars
Daniel Martí [Sat, 2 Apr 2016 12:43:49 +0000 (13:43 +0100)]
common: never pass None to replace_config_vars

This fixes fdroid build com.umang.dashnotifier:18:

ERROR: Could not build app com.umang.dashnotifier due to unknown error: Traceback (most recent call last):
  File "/home/mvdan/git/fsr/fdroidserver/build.py", line 1121, in main
    options.onserver, options.refresh):
  File "/home/mvdan/git/fsr/fdroidserver/build.py", line 950, in trybuild
    build_local(app, build, vcs, build_dir, output_dir, srclib_dir, extlib_dir, tmp_dir, force, onserver, refresh)
  File "/home/mvdan/git/fsr/fdroidserver/build.py", line 480, in build_local
    extlib_dir, onserver, refresh)
  File "/home/mvdan/git/fsr/fdroidserver/common.py", line 1335, in prepare_source
    srclibpaths.append(getsrclib(lib, srclib_dir, build, preponly=onserver, refresh=refresh))
  File "/home/mvdan/git/fsr/fdroidserver/common.py", line 1258, in getsrclib
    cmd = replace_config_vars(srclib["Prepare"], None)
  File "/home/mvdan/git/fsr/fdroidserver/common.py", line 1822, in replace_config_vars
    cmd = cmd.replace('$$NDK$$', build.ndk_path())
AttributeError: 'NoneType' object has no attribute 'ndk_path'

8 years agoFix build crash introduced in 3768d7a4
Daniel Martí [Wed, 30 Mar 2016 21:54:37 +0000 (22:54 +0100)]
Fix build crash introduced in 3768d7a4

get_ndk_path was removed long ago when App and Build were introduced.
Now Build.ndk_path() should be used. Trying to use the object as a dict
resulted in a nasty crash:

TypeError: 'Build' object is not subscriptable

This is probably a result from faulty rebasing and not enough test
coverage.

8 years agoMerge branch 'base-image' into 'master'
Hans-Christoph Steiner [Tue, 29 Mar 2016 16:53:51 +0000 (16:53 +0000)]
Merge branch 'base-image' into 'master'

CI: Use the new base image

Lighter, since it doesn't include all the stuff required to build and
test the client that we don't need here.

See merge request !116

8 years agoCI: Use the new base image
Daniel Martí [Tue, 29 Mar 2016 11:44:00 +0000 (12:44 +0100)]
CI: Use the new base image

Lighter, since it doesn't include all the stuff required to build and
test the client that we don't need here.

8 years agoMerge branch 'master' into 'master'
Hans-Christoph Steiner [Mon, 28 Mar 2016 08:01:00 +0000 (08:01 +0000)]
Merge branch 'master' into 'master'

Fix error in build.py

See merge request !115

8 years agoFix error in build.py
mimi89999 [Sun, 27 Mar 2016 19:36:16 +0000 (21:36 +0200)]
Fix error in build.py

8 years agorewritemeta: fix after !62 breakage
Daniel Martí [Thu, 24 Mar 2016 19:48:15 +0000 (19:48 +0000)]
rewritemeta: fix after !62 breakage

8 years agoMerge branch 'fdroid-build-in-git-repo' into 'master'
Hans-Christoph Steiner [Wed, 23 Mar 2016 20:12:22 +0000 (20:12 +0000)]
Merge branch 'fdroid-build-in-git-repo' into 'master'

run `fdroid build` straight out of an app's git repo

This creates a new metadata file type that is meant to be included in the git repo of the app to be built.  It uses the same formats as `metadata/`, e.g. `.txt`, JSON, XML, YAML.  The filename is instead `.fdroid.(json|txt|xml|yml)`.  This metadata then lets the user run `fdroid build` directly in the git repo of the app, and it will run the build as any other fdroid build.

@mvdan @CiaranG @krt @pserwylo @NicoAlt @parmegv feedback, flames, comments wanted

Given the very raw state of testing Android apps with gitlab-ci, I think this is a great opportunity for fdroidserver to become the standard method for testing Android apps with gitlab-ci, starting with this merge request to provide fdroid metadata embedded in the project.  What still needs to added is something like `fdroid builddepends debian` and `fdroid builddepends android` which reads the metadata and dumps out a list to be fed to `apt-get install` and `android update sdk --no-ui --filter` respectively, so that a *.gitlab-ci.yml* can look like:

```
apt-get -y install fdroidserver
apt-get -y install `fdroid builddepends debian`
echo y | android update sdk --no-ui --all --filter `fdroid builddepends android`
fdroid build
```

Then that would become a template *.gitlab-ci.yml* that should work on most Android apps.

This was marked Work-In-Progress because it depends on !57

See merge request !62

8 years agostandardize on .yml as the file extension for YAML
Hans-Christoph Steiner [Mon, 21 Mar 2016 20:51:23 +0000 (21:51 +0100)]
standardize on .yml as the file extension for YAML

Though the YAML people recommend .yaml for the file extension, in Android
land it seems clear that .yml has won out:

* .travis.yml
* .gitlab-ci.yml
* .circle.yml
* Ansible main.yml

8 years agoimport app into fdroid directly from git clone
Hans-Christoph Steiner [Mon, 21 Mar 2016 20:00:12 +0000 (21:00 +0100)]
import app into fdroid directly from git clone

This adds a new method for `fdroid import` that will generate the fdroidserver
metadata based on a local git repo.  This new mode generates the metadata in
the new .fdroid.yaml format in the git repo itself.  It is intended as a quick
way to get starting building apps using the fdroidserver tools.

8 years agorename metadata.write_metadata() to match metadata.parse_*_metadata()
Hans-Christoph Steiner [Mon, 10 Aug 2015 20:29:17 +0000 (22:29 +0200)]
rename metadata.write_metadata() to match metadata.parse_*_metadata()

This changes the function name to include the format of the metadata file,
and also changes the order of the args to match the parse_*_metadata()
functions.

8 years agodocument new `fdroid build` behavior with .fdroid.* metadata
Hans-Christoph Steiner [Wed, 5 Aug 2015 13:19:14 +0000 (15:19 +0200)]
document new `fdroid build` behavior with .fdroid.* metadata

8 years agobuild: set default config for .fdroid.* metadata
Hans-Christoph Steiner [Wed, 5 Aug 2015 13:18:22 +0000 (15:18 +0200)]
build: set default config for .fdroid.* metadata

The default config for .fdroid.* metadata that is included in a git repo is
different than for the standard metadata/ layout because the expectations
are different.  In this case, the most common user will be the app
developer working on the latest update of the app on their own machine.

8 years agodo not require if config.py if using local metadata
Hans-Christoph Steiner [Wed, 5 Aug 2015 12:42:41 +0000 (14:42 +0200)]
do not require if config.py if using local metadata

Since you can have a .fdroid.* metadata file included directly in an
app's git repo, it seems annoying to force developers to also include
a blank config.py in order to run `fdroid build` from their git repo.

The next step after this is some kind of global config file for
setting paths and things that need to be customized that would apply
to all git repos, for example, to enable using a buildserver.

This also required moving all of the env setting for FDroidPopen into
a single place so that it is properly setup when using the local
metadata.

8 years agorefactor env handling for FDroidPopen to support .fdroid.* metadata
Hans-Christoph Steiner [Wed, 5 Aug 2015 12:39:58 +0000 (14:39 +0200)]
refactor env handling for FDroidPopen to support .fdroid.* metadata

The start up sequence of processes that are based on the .fdroid.* metadata
is a bit different, so this ensures that the environment variables get
properly initialized in all cases.

This also creates a single function where the environment is set.  Before
it was being set in multiple places across multiple files.

8 years agosupport .fdroid.* metadata file in source root of app being built
Hans-Christoph Steiner [Wed, 5 Aug 2015 08:55:54 +0000 (10:55 +0200)]
support .fdroid.* metadata file in source root of app being built

This allows app makers to include a .fdroid.(json|xml|yaml|txt) metadata
file in the root of the git repo of their app, then they can build it using
`fdroid build`.  This is useful for developers who want to maintain the
fdroid build recipe themselves, and run the fdroid build process for their
own builds.

8 years agoMerge branch 'master' into 'master'
Hans-Christoph Steiner [Mon, 21 Mar 2016 22:01:54 +0000 (22:01 +0000)]
Merge branch 'master' into 'master'

Remove extra blank lines in makebuildserver output

These seem to have appeared during the py3 conversion.

See merge request !114

8 years agoRemove extra blank lines in makebuildserver output
Ciaran Gultnieks [Mon, 21 Mar 2016 08:45:42 +0000 (08:45 +0000)]
Remove extra blank lines in makebuildserver output

These seem to have appeared during the py3 conversion.

8 years agoMerge branch 'ci-image' into 'master'
Daniel Martí [Thu, 17 Mar 2016 14:14:45 +0000 (14:14 +0000)]
Merge branch 'ci-image' into 'master'

CI: Bump image, now has -dev and gcc

Also, use a specific tag instead of "latest" to avoid breaking old
tags/commits when updating the image.

See merge request !111

8 years agoCI: Bump image, now has -dev and gcc
Daniel Martí [Mon, 14 Mar 2016 17:33:58 +0000 (17:33 +0000)]
CI: Bump image, now has -dev and gcc

Also, use a specific tag instead of "latest" to avoid breaking old
tags/commits when updating the image.

8 years agocheckupdates: don't ignore repeated tags
Daniel Martí [Wed, 16 Mar 2016 16:40:26 +0000 (16:40 +0000)]
checkupdates: don't ignore repeated tags

If multiple tags point at the same commit, limiting the regex search to
one tag per line would only catch one tag. This broke org.wikipedia's
update check.

8 years agoMerge branch 'master' into 'master'
Daniel Martí [Wed, 16 Mar 2016 13:06:31 +0000 (13:06 +0000)]
Merge branch 'master' into 'master'

py3 fixes for the buildserver

some fixes to get the buildserver working with the new py3 changes.  I'm assigning it to @mvdan since he did most of the py3 stuff, but @CiaranG will probably be the user of these changes.

See merge request !113

8 years agoupdate buildserver debian packages for py3
Hans-Christoph Steiner [Tue, 15 Mar 2016 19:04:50 +0000 (20:04 +0100)]
update buildserver debian packages for py3

8 years agojenkins-build-makebuildserver: com.amaze.filemanager instead of org.xcsoar
Hans-Christoph Steiner [Tue, 15 Mar 2016 12:47:56 +0000 (13:47 +0100)]
jenkins-build-makebuildserver: com.amaze.filemanager instead of org.xcsoar

org.xcsoar hosts its own git repo.  Self-hosted git repos can be flaky, and
they are blocked by the Guardian Project jenkins server, so use an app from
github.com instead.

8 years agojenkins-build-makebuildserver: throw error if app build fails
Hans-Christoph Steiner [Tue, 15 Mar 2016 12:37:06 +0000 (13:37 +0100)]
jenkins-build-makebuildserver: throw error if app build fails

8 years agofix py3 bug when running `fdroid build` with a buildserver
Hans-Christoph Steiner [Tue, 15 Mar 2016 12:21:19 +0000 (13:21 +0100)]
fix py3 bug when running `fdroid build` with a buildserver

File "/var/lib/jenkins/workspace/fdroidserver-makebuildserver/fdroidserver/build.py", line 1119, in main
    options.onserver, options.refresh):
  File "/var/lib/jenkins/workspace/fdroidserver-makebuildserver/fdroidserver/build.py", line 954, in trybuild
    build_server(app, build, vcs, build_dir, output_dir, force)
  File "/var/lib/jenkins/workspace/fdroidserver-makebuildserver/fdroidserver/build.py", line 403, in build_server
    output += get
TypeError: Can't convert 'bytes' object to str implicitly

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

8 years agofix stab at a Cygwin port (aaaahh Windows!)
Hans-Christoph Steiner [Tue, 15 Mar 2016 10:30:27 +0000 (11:30 +0100)]
fix stab at a Cygwin port (aaaahh Windows!)

This gets `fdroid init` and `fdroid readmeta` working on Cygwin.

8 years agoMerge branch 'master' into 'master'
Daniel Martí [Mon, 14 Mar 2016 23:37:51 +0000 (23:37 +0000)]
Merge branch 'master' into 'master'

makebuildserver: buildserverid should always be a string

missed one subprocess issue in !110

See merge request !112

8 years agoFix python3 checkupdates crashes
Ciaran Gultnieks [Mon, 14 Mar 2016 22:13:58 +0000 (22:13 +0000)]
Fix python3 checkupdates crashes

8 years agoFix another python3 build crash
Ciaran Gultnieks [Mon, 14 Mar 2016 22:23:19 +0000 (22:23 +0000)]
Fix another python3 build crash

8 years agomakebuildserver: buildserverid should always be a string
Hans-Christoph Steiner [Mon, 14 Mar 2016 16:33:06 +0000 (17:33 +0100)]
makebuildserver: buildserverid should always be a string

8 years agoMerge branch 'master' into 'master'
Daniel Martí [Mon, 14 Mar 2016 12:54:10 +0000 (12:54 +0000)]
Merge branch 'master' into 'master'

post-py3 fixes

This is a collection of fixes related to running on py3 on various platforms.

See merge request !110

8 years agonot all UNIX `echo` commands support -n
Hans-Christoph Steiner [Mon, 14 Mar 2016 10:33:07 +0000 (11:33 +0100)]
not all UNIX `echo` commands support -n

FreeBSD and OSX's does not, for example, and the shell should just treat
the '\n' as white space in the command line.

8 years agoalways parse versions as strings, not bytes
Hans-Christoph Steiner [Mon, 14 Mar 2016 10:05:06 +0000 (11:05 +0100)]
always parse versions as strings, not bytes

Fixes a couple errors like:
  File "./makebuildserver", line 30, in vagrant
    out += line
  TypeError: Can't convert 'bytes' object to str implicitly

If universal_newlines=False, the default, then Popen will return bytes if
the newlines in the data do not match the system's newlines.  Setting it to
true enables auto-conversion, and then guarantees that the data is always
str.

"If universal_newlines is True, the file objects stdin, stdout and stderr
are opened as text streams in universal newlines mode, as described above
in Frequently Used Arguments, otherwise they are opened as binary streams."
https://docs.python.org/3/library/subprocess.html#subprocess.Popen

8 years agotravis-ci: move python deps to 3
Hans-Christoph Steiner [Mon, 14 Mar 2016 10:02:01 +0000 (11:02 +0100)]
travis-ci: move python deps to 3

8 years agojenkins-build-makebuildserver: make sure fdroiddata is on master
Hans-Christoph Steiner [Mon, 14 Mar 2016 08:35:23 +0000 (09:35 +0100)]
jenkins-build-makebuildserver: make sure fdroiddata is on master

on the GP jenkins, I got this:

+ git pull
From https://gitlab.com/fdroid/fdroiddata
   1df2d03..621ef4f  master     -> origin/master
You are not currently on a branch. Please specify which
branch you want to merge with. See git-pull(1) for details.

    git pull <remote> <branch>

8 years agotravis-ci osx: make sure build-tools are always installed
Hans-Christoph Steiner [Fri, 11 Mar 2016 19:59:04 +0000 (20:59 +0100)]
travis-ci osx: make sure build-tools are always installed

It seems that sometimes build-tools packages will not be installed unless
the --all flag is specified.

8 years agoFix python2/makebuildserver breakage
Ciaran Gultnieks [Sun, 13 Mar 2016 20:49:38 +0000 (20:49 +0000)]
Fix python2/makebuildserver breakage

8 years agoMerge branch 'master' into 'master'
Daniel Martí [Fri, 11 Mar 2016 23:53:25 +0000 (23:53 +0000)]
Merge branch 'master' into 'master'

makebuildserver: support running VirtualBox in a VM

For debian.jenkins.net, our test environment is a kvm instance that does not expose the hardware virtualization instructions.  So this auto-detects whether the current machine, virtual or not, supports the hardware virtualization.  If not, it uses VirtualBox's software emulator, which should run everywhere, even in a kvm instance.

See merge request !108

8 years agoMerge branch 'py3' into 'master'
Daniel Martí [Fri, 11 Mar 2016 23:51:56 +0000 (23:51 +0000)]
Merge branch 'py3' into 'master'

Python 3

I tried to keep commits separate, so if anything causes trouble, it can be reverted or changed easily.

* pre-commit hooks pass
* all tests pass
* My use of `build`, `checkupdates`, `lint`, `import`, `publish` and `update` work as usual
* 2to3 does not report anything useful anymore (only useless parentheses and list() encapsulation of iterators)
* rewritemeta works exactly as usual

CC @eighthave

See merge request !88

8 years agoMerge branch 'checkupdates-speedup' into 'master'
Daniel Martí [Fri, 11 Mar 2016 20:50:59 +0000 (20:50 +0000)]
Merge branch 'checkupdates-speedup' into 'master'

checkupdates: sort tags by date in one go

This greatly speeds up checkupdates when UCM:Tags is used on git
repositories, especially on ones with lots of tags. The old method ran a
command per tag. The new method runs a single command and doesn't
require any sorting.

Test runs show that `fdroid checkupdates org.adaway` is down from ~13s
to ~10s on my laptop.

See merge request !109

8 years agoREADME: It's virtualenv that we want
Daniel Martí [Thu, 10 Mar 2016 11:17:04 +0000 (11:17 +0000)]
README: It's virtualenv that we want

virtualenv is the Debian package that holds the executables.

8 years agoCI: Use pip install to grab all deps
Daniel Martí [Tue, 1 Mar 2016 17:13:34 +0000 (17:13 +0000)]
CI: Use pip install to grab all deps

8 years agometadata: always open metadata files in UTF-8
Daniel Martí [Thu, 25 Feb 2016 00:12:23 +0000 (00:12 +0000)]
metadata: always open metadata files in UTF-8

For some reason, Python uses whatever encoding the system is using via a
locale. Since CI uses an ascii locale, stuff breaks. I can't find a way
to make all of fdroidserver ignore the locale and just use UTF-8, so for
now force it where it's bothering CI.

8 years agoFix issue related to creating fdroidvcs file
Daniel Martí [Fri, 15 Jan 2016 12:16:01 +0000 (13:16 +0100)]
Fix issue related to creating fdroidvcs file

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