chiark / gitweb /
fdroidserver.git
7 years agobuildserver: do not set NDK env vars, they are handled by `fdroid build`
Hans-Christoph Steiner [Fri, 17 Jun 2016 09:29:00 +0000 (11:29 +0200)]
buildserver: do not set NDK env vars, they are handled by `fdroid build`

`fdroid build` handles setting the NDK env vars since the NDK version can
change depending on the app being build.  Unlike ANDROID_HOME, there is no
single global NDK location.  The NDK installs are all versioned.

7 years agobuildserver: run tests with verbose logs
Hans-Christoph Steiner [Mon, 20 Jun 2016 09:18:03 +0000 (11:18 +0200)]
buildserver: run tests with verbose logs

7 years agobuildserver: suppress unzip file list when unpacking SDK/NDK
Hans-Christoph Steiner [Fri, 17 Jun 2016 12:29:41 +0000 (14:29 +0200)]
buildserver: suppress unzip file list when unpacking SDK/NDK

Just too much pointless info in the log.

7 years agoMerge branch 'fix-buildserver' into 'master'
Hans-Christoph Steiner [Tue, 21 Jun 2016 08:22:34 +0000 (08:22 +0000)]
Merge branch 'fix-buildserver' into 'master'

Fix buildserver, broken by e449d2f

Switching to a script /etc/profile.d to set up the environment is all
well and good, except that doesn't get run when you directly execute a
command directly via ssh, which means that the buildserver didn't work
at all (at least for anything that used gradle, or relied on the
environment variables.

This fix doesn't look very nice, but it works - it just forces the
appropriate script to run before build.py is executed on the server.

(Side note, I thought we had tests for this, how did it get past them?)

See merge request !135

7 years agoMerge branch 'master' into 'master'
Hans-Christoph Steiner [Tue, 21 Jun 2016 06:34:20 +0000 (06:34 +0000)]
Merge branch 'master' into 'master'

Tone down makebuildserver terminal spamming

The progress bar updating at each 1k chunk spams the terminal to such an
extent it stops responding to keypresses (at least with a fast
connection). It also seems extremely inefficient to be writing the file
in 1k chunks. This makes it 64k, which is more reasonable but quite
probably still too small.

See merge request !134

7 years agoFix buildserver, broken by e449d2f
Ciaran Gultnieks [Sat, 18 Jun 2016 11:10:36 +0000 (12:10 +0100)]
Fix buildserver, broken by e449d2f

Switching to a script /etc/profile.d to set up the environment is all
well and good, except that doesn't get run when you directly execute a
command directly via ssh, which means that the buildserver didn't work
at all (at least for anything that used gradle, or relied on the
environment variables.

This fix doesn't look very nice, but it works - it just forces the
appropriate script to run before build.py is executed on the server.

(Side note, I thought we had tests for this, how did it get past them?)

7 years agoTone down makebuildserver terminal spamming
Ciaran Gultnieks [Fri, 17 Jun 2016 12:39:01 +0000 (13:39 +0100)]
Tone down makebuildserver terminal spamming

The progress bar updating at each 1k chunk spams the terminal to such an
extent it stops responding to keypresses (at least with a fast
connection). It also seems extremely inefficient to be writing the file
in 1k chunks. This makes it 64k, which is more reasonable but quite
probably still too small.

7 years agoMerge branch 'add-sig-algs-1' into 'master'
Hans-Christoph Steiner [Fri, 17 Jun 2016 12:05:22 +0000 (12:05 +0000)]
Merge branch 'add-sig-algs-1' into 'master'

Adding support for DSA and ECDSA signatures in binaries

Before this patch only RSA signature files was supported when using the Binaries metadata directive as described in https://f-droid.org/wiki/page/Deterministic,_Reproducible_Builds.

This patch simply makes .DSA and .EC files also be recognised as signature files.

See merge request !133

7 years agoAdding support for DSA and ECDSA signatures.
Markus Kilås [Fri, 17 Jun 2016 10:58:52 +0000 (12:58 +0200)]
Adding support for DSA and ECDSA signatures.

7 years agolint: only check unused exlibs if using all apps
Daniel Martí [Fri, 17 Jun 2016 10:35:44 +0000 (11:35 +0100)]
lint: only check unused exlibs if using all apps

7 years agoMerge branch 'use-android-update-sdk' into 'master'
Ciaran Gultnieks [Fri, 17 Jun 2016 09:15:33 +0000 (09:15 +0000)]
Merge branch 'use-android-update-sdk' into 'master'

switch SDK/NDK/gradle buildserver provisioning to shell scripts

This converts the SDK, NDK, and gradle chef recipes to vagrant provisioning shell scripts.   Those recipes were just shell scripts anyway, forced into that ugly ruby/chef syntax.  Hopefully this will make things easier to maintain since simple bash is easier for most devs than ruby/chef. Also, it might speed up the provisioning a little bit since the whole script is sent to the VM then executed, rather than sent line-by-line.  Additionally, the SDK components are now installed using `android update sdk` so we do not need to duplicate Google's crazy kludges with that stuff.

See merge request !132

7 years agocommon: always set android ndk env vars
Daniel Martí [Thu, 16 Jun 2016 20:36:31 +0000 (21:36 +0100)]
common: always set android ndk env vars

Also, add the ndk to PATH at the beginning, in case any other ndks are
already in it.

Fixes #176.

7 years agoinvalidate apkcache if the metadata version is different
Hans-Christoph Steiner [Wed, 15 Jun 2016 14:34:10 +0000 (16:34 +0200)]
invalidate apkcache if the metadata version is different

When the metadata changes, different things will be stored about each APK.
So invalidate the cached info parsed from APKs if the cache's metadata
version does not match the metadata version of the currently running tools.

7 years agoinclude new provisioning shell scripts in syntax checks
Hans-Christoph Steiner [Wed, 15 Jun 2016 13:39:49 +0000 (15:39 +0200)]
include new provisioning shell scripts in syntax checks

7 years agobuildserver: /vagrant/cache writeable only by root
Hans-Christoph Steiner [Wed, 15 Jun 2016 10:47:16 +0000 (12:47 +0200)]
buildserver: /vagrant/cache writeable only by root

Prevent build processes from modifying the cache, it is only needed
during provisioning anyway. A malicious build could still use sudo to
change the cache, but this is more to prevent mistaken modifications.

7 years agobuildserver: unpack gradle versions with provisioning shell script
Hans-Christoph Steiner [Wed, 15 Jun 2016 13:25:57 +0000 (15:25 +0200)]
buildserver: unpack gradle versions with provisioning shell script

This was not using anything special from chef, so do it in a shell script
instead.  This makes the script easier for the python/shell people, and
probably uses less memory, since chef is a memory hog.  This might even
make the provision go faster since it uploads the whole script as a file to
the VM, then runs it there.  I think chef sends each command via SSH.

7 years agobuildserver: unpack NDK with a provisioning shell script
Hans-Christoph Steiner [Wed, 15 Jun 2016 13:02:37 +0000 (15:02 +0200)]
buildserver: unpack NDK with a provisioning shell script

This makes the process closer to ./jenkins-build scripts and .gitlab-ci.yml
files.  Hopefully it uses less RAM than chef too.

7 years agobuildserver: use `android update sdk` to install Android SDK
Hans-Christoph Steiner [Tue, 14 Jun 2016 14:34:13 +0000 (16:34 +0200)]
buildserver: use `android update sdk` to install Android SDK

`android update sdk --no-ui` is the standard command line tool for
installing the Android SDK.  By symlinking into the $ANDROID_HOME/temp dir,
the cached files can still be used.  This converts the chef recipe to a
vagrant shell provisioning script since it was all bash anyway.

Some file names no longer officially have a -linux in them, so those were
changed to keep the cache working with the default filename.

7 years agobuildserver: setup env vars using standard script
Hans-Christoph Steiner [Wed, 15 Jun 2016 11:09:57 +0000 (13:09 +0200)]
buildserver: setup env vars using standard script

bash provides a standard file location for a script to be run when the
shell starts: /etc/profile.d/  This converts the scattered bits of code for
making ~/.bsenv into a single provisioning script to generate
/etc/profile.d/bsenv.sh, which gets automatically executed when bash starts

7 years agobuildserver: extract NDK rather than executing it
Hans-Christoph Steiner [Wed, 15 Jun 2016 12:25:22 +0000 (14:25 +0200)]
buildserver: extract NDK rather than executing it

Then the NDK archive doesn't need execute permissions.

7 years agogithooks: do not run syntax checks on files being deleted
Hans-Christoph Steiner [Wed, 15 Jun 2016 11:32:14 +0000 (13:32 +0200)]
githooks: do not run syntax checks on files being deleted

7 years agoMerge branch 'fix-makebuildserver' into 'master'
Ciaran Gultnieks [Wed, 15 Jun 2016 09:30:42 +0000 (09:30 +0000)]
Merge branch 'fix-makebuildserver' into 'master'

Fix ./makebuildserver CI build

In order to get reproducible builds work reliably, we need to have buildserver create be fully automatic, and be able to run in VMs.  It should also handle caching downloads well, so that people can easily rebuild their buildserver, and CI builds don't have to download gigs and gigs for each run.  These are some related fixes.

See merge request !131

7 years agoREBASE buildserver: handle loops in bash, not ruby, to save memory
Hans-Christoph Steiner [Tue, 14 Jun 2016 21:21:39 +0000 (23:21 +0200)]
REBASE buildserver: handle loops in bash, not ruby, to save memory

7 years agotests: `pyvenv --system-site-packages` is too buggy on python 3.4
Hans-Christoph Steiner [Tue, 14 Jun 2016 20:40:50 +0000 (22:40 +0200)]
tests: `pyvenv --system-site-packages` is too buggy on python 3.4

It always wants to install packages into /usr/lib/python3.4/site-packages

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 295, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1436, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 672, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 902, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 214, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 176, in clobber
    os.makedirs(dest)
  File "/usr/lib/python3.4/os.py", line 237, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.4/site-packages'

7 years agobuildserver: handle loops in bash, not ruby, to save memory
Hans-Christoph Steiner [Tue, 14 Jun 2016 14:34:13 +0000 (16:34 +0200)]
buildserver: handle loops in bash, not ruby, to save memory

Apparently, ruby is quite a memory hog when it forks.  I've been getting
errors like this with ./makebuildserver:

Errno::ENOMEM - script[add_btools_17] (android-sdk::default line 72) had an
  error: Errno::ENOMEM: Cannot allocate memory - fork(2)

So instead of looping in ruby and forking for each loop, handle the looping
in the bash script, so ruby is just calling a single bash script.

7 years agoremove app.openconnect from ./makebuildserver tests
Hans-Christoph Steiner [Tue, 14 Jun 2016 08:27:15 +0000 (10:27 +0200)]
remove app.openconnect from ./makebuildserver tests

Turns out this one is a pain to get running on the locked down Guardian
Project Jenkins box since it uses git:// rather than https:// for the git
submodules.

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

7 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

7 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

7 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

7 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.

7 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