chiark / gitweb /
Boris Kraut [Fri, 12 Aug 2016 17:52:32 +0000 (19:52 +0200)]
Add gradle 2.14.1
Hans-Christoph Steiner [Tue, 9 Aug 2016 15:44:06 +0000 (15:44 +0000)]
Merge branch 'java-home-lookup' into 'master'
Fix JDK lookup
Fix two cases when JDK path lookup could fail (found those issues on my Fedora 24 box).
See merge request !153
Hans-Christoph Steiner [Tue, 9 Aug 2016 15:33:19 +0000 (15:33 +0000)]
Merge branch 'permission-parsing' into 'master'
Parse maxSdkVersion and -23 permission tags
Parse maxSdkVersion and uses-permission-sdk-23 tags and insert them into the index.
AndroidManifest:
```xml
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" />
```
new index format:
```xml
<package>
<version>1.0</version>
<versioncode>1</versioncode>
<apkname>maxmin.apk</apkname>
<hash type="sha256">
526eb6d643050c3fae42fb6c001c704006046db52e98998b21f7646ecae3dae5
</hash>
<sig>
893fc1f22301c902d05c938b29d21648</sig>
<size>8681</size>
<sdkver>14</sdkver>
<targetSdkVersion>24</targetSdkVersion>
<added>2016-08-01</added>
<permissions>READ_EXTERNAL_STORAGE,READ_CALENDAR,WRITE_EXTERNAL_STORAGE</permissions>
<uses-permission name="android.permission.WRITE_EXTERNAL_STORAGE"
maxSdkVersion="18" />
<uses-permission name="android.permission.READ_CALENDAR" />
<uses-permission name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission-sdk-23 name="android.permission.ACCESS_FINE_LOCATION" />
</package>
```
old format:
```xml
<permissions>READ_CALENDAR,ACCESS_FINE_LOCATION,WRITE_EXTERNAL_STORAGE</permissions>
```
This generates both formats for backward compatibility with old clients.
Also increase version of index format.
This is a proposal for the issues discussed in https://gitlab.com/fdroid/fdroidclient/issues/704
@eighthave @mvdan
See merge request !150
Dominik Schürmann [Sat, 30 Jul 2016 21:12:52 +0000 (23:12 +0200)]
Parse maxSdkVersion and -23 permission tags
Parse maxSdkVersion and uses-permission-sdk-23
tags and insert them into the index, e.g.,
<package>
<permissions>READ_EXTERNAL_STORAGE,READ_CALENDAR,WRITE_EXTERNAL_STORAGE</permissions>
<uses-permission name="android.permission.WRITE_EXTERNAL_STORAGE"
maxSdkVersion="18" />
<uses-permission name="android.permission.READ_CALENDAR" />
<uses-permission name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission-sdk-23 name="android.permission.ACCESS_FINE_LOCATION" />
</package>
Also increase version of index format
relan [Wed, 3 Aug 2016 05:24:45 +0000 (08:24 +0300)]
Check javac existence when looking for JDK
Empty JDK directories can remain from previous JDK installations. For
example in RHEL/Fedora when RPM upgrades a package it can leave modified
files (usually configs) and, consequently, their directories. So we could
end up selecting a bad JDK path.
Ciaran Gultnieks [Thu, 4 Aug 2016 09:16:43 +0000 (09:16 +0000)]
Merge branch 'fix-ndk' into 'master'
Re-add NDK r12b and fix build-tools 24.0.1
See merge request !152
relan [Wed, 3 Aug 2016 05:21:46 +0000 (08:21 +0300)]
Fix JAVA_HOME environment variable handling
Append JAVA_HOME to pathlist as a string, not as a list of characters.
Daniel Martí [Tue, 2 Aug 2016 16:08:48 +0000 (18:08 +0200)]
makebs: work around build-tools 24.0.1 version bug
The zip contains 24.0.0 as the version, which means our magic was
installing 24.0.0 twice and skipping 24.0.1.
Daniel Martí [Tue, 2 Aug 2016 09:12:01 +0000 (11:12 +0200)]
all: switch to build-tools 24.0.1 as default
Daniel Martí [Tue, 2 Aug 2016 09:09:32 +0000 (11:09 +0200)]
Re-add NDK r12b, now fixed.
Ciaran Gultnieks [Mon, 1 Aug 2016 11:38:52 +0000 (12:38 +0100)]
Revert "all: add NDK r12b and set it as default"
This reverts commit
82d09560c63ea282222b319437494ad6837be026.
It doesn't work - the setup scripts are expecting a ".bin" file (which
is apparently a 7z archive), but what's actually got is a ".zip".
Conflicts:
buildserver/provision-android-ndk
Ciaran Gultnieks [Mon, 1 Aug 2016 11:25:22 +0000 (12:25 +0100)]
Catch another case of invalid wiki page names
Daniel Martí [Mon, 1 Aug 2016 06:07:26 +0000 (06:07 +0000)]
Merge branch 'bump-ci' into 'master'
CI: bump docker image
See merge request !151
Daniel Martí [Sun, 31 Jul 2016 22:57:32 +0000 (00:57 +0200)]
CI: bump docker image
Daniel Martí [Sun, 31 Jul 2016 17:15:58 +0000 (17:15 +0000)]
Merge branch 'pep' into 'master'
bs: add sqlite3 and asn1c
Ref: https://gitlab.com/fdroid/fdroiddata/merge_requests/1557
See merge request !149
Daniel Martí [Thu, 28 Jul 2016 06:26:51 +0000 (08:26 +0200)]
common: extra checks for NDK in local.props
The previous commit fixed it in local setups, this fixes it in broken
buildservers too and makes it more reliable.
Daniel Martí [Wed, 27 Jul 2016 09:20:17 +0000 (11:20 +0200)]
makebs: fix config crash
Without this, running makebuildserver from a clean master results in the
following:
$ ./makebuildserver
Traceback (most recent call last):
File "./makebuildserver", line 74, in <module>
del(config['__builtins__']) # added by compile/exec
KeyError: '__builtins__'
This is because a clean checkout has no config, thus exec is never
actually ran.
Daniel Martí [Mon, 25 Jul 2016 12:56:54 +0000 (14:56 +0200)]
wp-fdroid: add 7.0 (24) to the versions list
Daniel Martí [Mon, 25 Jul 2016 11:07:46 +0000 (13:07 +0200)]
common: don't insert $ANDROID_NDK to local.props
See the comment.
Updates #171.
Daniel Martí [Mon, 25 Jul 2016 10:45:56 +0000 (12:45 +0200)]
makebs: update android support repo
Daniel Martí [Mon, 25 Jul 2016 10:40:44 +0000 (12:40 +0200)]
makebs: add build-tools-24.0.1
Fixes #196.
Daniel Martí [Mon, 25 Jul 2016 10:40:17 +0000 (12:40 +0200)]
makebs: "fix" platform v24 zip for r02
Google replaced the r01 zip instead of adding the r02 one. Oh well.
Boris Kraut [Sat, 23 Jul 2016 17:14:28 +0000 (19:14 +0200)]
bs: add sqlite3 and asn1c
Daniel Martí [Tue, 19 Jul 2016 18:30:05 +0000 (20:30 +0200)]
makebs: revert platform-tools change in
2227cc6d
Amusingly, the commit changed more than just this so a simple git revert
is not possible.
The problem is that the zip is replaced with each point release (24.0.1
at the time of writing) and there is no way to get a URL to a single,
non-changing version. Hence any caching or checksums are completely
worthless and will break every few weeks.
Hans-Christoph Steiner [Mon, 18 Jul 2016 14:50:51 +0000 (14:50 +0000)]
Merge branch 'ndk-r12' into 'master'
NDK r12
See merge request !147
Hans-Christoph Steiner [Mon, 18 Jul 2016 14:47:45 +0000 (14:47 +0000)]
Merge branch 'ndk-error' into 'master'
build: error properly if an invalid ndk is used
See merge request !146
Daniel Martí [Wed, 13 Jul 2016 20:48:33 +0000 (20:48 +0000)]
Merge branch 'patch-2' into 'master'
Server manual phrasing matches client. "beta" -> "unstable"
Fixes #193
See merge request !148
Stephen Michel [Wed, 13 Jul 2016 17:25:33 +0000 (17:25 +0000)]
Server manual phrasing matches client. "beta" -> "unstable"
Daniel Martí [Wed, 13 Jul 2016 15:47:58 +0000 (16:47 +0100)]
all: remove 32-bit buildserver code
We dropped support for 32-bit, so remove all the now unused code and
references.
Daniel Martí [Wed, 13 Jul 2016 15:45:05 +0000 (16:45 +0100)]
all: add NDK r12b and set it as default
Daniel Martí [Wed, 13 Jul 2016 15:32:52 +0000 (16:32 +0100)]
build: error properly if an invalid ndk is used
Currently, if buildjni is not used but ndk is set to an invalid value,
the build would start but $ANDROID_NDK would be empty. This is happening
in VLC, which results in very confusing errors.
If a build uses a ndk= value that is not set up, such as r11/r12 which
we do not have yet, it should error with "NDK version could not be
found". It does with this change.
Daniel Martí [Wed, 13 Jul 2016 15:32:34 +0000 (15:32 +0000)]
Merge branch 'precommit-fixes' into 'master'
pre-commit script fixes
See merge request !145
Daniel Martí [Wed, 13 Jul 2016 11:14:19 +0000 (12:14 +0100)]
pre-commit: pep8 is now pycodestyle
See https://github.com/PyCQA/pycodestyle/issues/466.
Ciaran Gultnieks [Wed, 13 Jul 2016 11:43:33 +0000 (11:43 +0000)]
Merge branch 'use_date_from_apk_in_known_apks' into 'master'
Pass a date from APK to KnownApks.recordapk()
... if --use-date-from-apks option is used.
Essentially, it just expands influence of `--use-date-from-apks` option to `stats/known_apks.txt`.
See merge request !141
Daniel Martí [Wed, 13 Jul 2016 11:07:03 +0000 (12:07 +0100)]
pre-commit: fix warnings and errors
Properly print warnings to stderr. Also, use : instead of 'echo' as a
fallback as the latter spits out garbage to stdout.
Examples without pep8 installed.
Before:
$ ./hooks/pre-commit
./hooks/pre-commit: line 97: WARNING:: command not found
ERROR: pep8 tests failed!
After:
$ ./hooks/pre-commit
WARNING: pep8 is not installed, using dummy placeholder!
Daniel Martí [Wed, 13 Jul 2016 11:01:42 +0000 (11:01 +0000)]
Merge branch 'apk-extension-obb-support' into 'master'
support APK Extension OBB files
Google Play specifies OBB aka "APK Extension" files for apps that need more than 100 MBs, which is the Play APK size limit. They also provide a mechanism to deliver large data blobs that do not need to be part of the APK. For example, a game's assets do not need to change often, so they can be shipped as an OBB, then APK updates do not need to include all those assets for each update.
https://developer.android.com/google/play/expansion-files.html
See merge request !143
Hans-Christoph Steiner [Mon, 20 Jun 2016 11:41:30 +0000 (13:41 +0200)]
tests for finding the proper OBB files for each APK
Hans-Christoph Steiner [Mon, 20 Jun 2016 20:14:12 +0000 (22:14 +0200)]
add SHA-256 hashes of each OBB file
Hans-Christoph Steiner [Wed, 15 Jun 2016 22:29:17 +0000 (00:29 +0200)]
support .obb files for Opaque Binary Blog APK Expansions
OBB files provide a mechanism to deliver large data blobs that do not need
to be part of the APK. For example, a game's assets do not need to change
often, so they can be shipped as an OBB, then APK updates do not need to
include all those assets for each update.
https://developer.android.com/google/play/expansion-files.html
Ciaran Gultnieks [Thu, 7 Jul 2016 15:37:26 +0000 (15:37 +0000)]
Merge branch 'standalone-vagrantfile' into 'master'
Standalone Vagrantfile
@mvdan @CiaranG as a follow up on our work moving to a 64-bit build server VM, this moves the buildserver config to a standalone YAML file and commits a static _Vagrantfile_ to git. This makes it a lot easier to work with, especially for people who normally use git. The buildserver config is already a Python _dict_, and its trivial to export a _dict_ to a YAML file. _Vagrantfile_ is a Ruby script, where its trivial to load a YAML file. This moves some of the logic into _Vagrantfile_ itself. This means that someone can mess with _Yagrantfile.yaml_ and/or _Vagrantfile_ to work on the buildserver setup, without having to run `./makebuildserver`. Then once something is working, it can be ported to the current `./makebuildserver` setup that generates _Vagrantfile.yaml_.
This is important for working on getting this whole thing running in a KVM instance like jenkins.debian.net and elsewhere. From what I read, VirtualBox in KVM is only possible if VirtualBox is running in 32-bit mode, so that's a dead end for us. We need to be able to run the buildserver as KVM in KVM #190. This merge request doesn't get us there yet, but it makes the process a lot easier.
This also moves everything but Kivy to provisioning shell scripts, since the existing chef scripts were really just shell scripts wrapped in Chef wrapped in Vagrant wrapped in `./makebuildserver`.
This passes the gpjenkins CI build that creates the buildserver from scratch, then builds F-Droid and AdAway:
http://qssio5fppcrojdh3.onion:8080/job/fdroidserver-makebuildserver-eighthave/602/
I tried adding Amaze and Retrolambda as test apps for the buildserver too, we'll see how that goes:
http://qssio5fppcrojdh3.onion:8080/job/fdroidserver-makebuildserver-eighthave
See merge request !144
Hans-Christoph Steiner [Wed, 6 Jul 2016 20:16:26 +0000 (22:16 +0200)]
buildserver: delete corrupt files from the cache
In order to make CI and other automation easier, delete any corrupt files
from the cache if they fail the SHA-256 check.
https://jenkins.debian.net/view/reproducible/job/reproducible_setup_fdroid_build_environment_profitbricks3/112/console
Hans-Christoph Steiner [Mon, 4 Jul 2016 18:49:41 +0000 (20:49 +0200)]
buildserver: buildserver/Vagrantfile is configed by .yaml file
Vagrantfile is now committed and not changed between configurations. It is
configed by translating the python config file's dict to a YAML file, which
Vagrantfile now loads and uses. This makes it a lot easier for vagrant
users and python programmers to understand, and hopefully makes it easier
to maintain and test with.
Hans-Christoph Steiner [Mon, 4 Jul 2016 18:22:00 +0000 (20:22 +0200)]
buildserver: send config to vagrant via YAML file
Python can easily output dicts as YAML, and a Vagrantfile is a ruby script,
which can easily read YAML. Going this route means that Vagrantfile can
ultimately be committed to git, and the configuration will happen all via
Python dicts output as YAML. That makes it drastically easier to follow
the code, and to make modifications.
Hans-Christoph Steiner [Mon, 4 Jul 2016 12:20:42 +0000 (14:20 +0200)]
buildserver: make provision scripts output name to log
Hans-Christoph Steiner [Mon, 4 Jul 2016 12:08:54 +0000 (14:08 +0200)]
buildserver: use pip instead of easy_install for caching
easy_install does not provide any download caching, while pip does. This
also moves the python module installing a shell script that takes python
packages as args. That will allow for future uses like allowing app
metadata to include pip modules that they need.
Hans-Christoph Steiner [Mon, 4 Jul 2016 11:52:19 +0000 (13:52 +0200)]
buildserver: move apt setup to a shell script
This makes it so there is only a single `apt-get install` command run,
instead of one command per-package like with the chef script. It also adds
`apt-get upgrade` to make sure that the base box is fully up-to-date.
Hans-Christoph Steiner [Mon, 4 Jul 2016 11:23:25 +0000 (13:23 +0200)]
buildserver: move trusty/paramiko hack to its own shell script
This is part of the effort to remove moving parts from the whole build
server setup. Why wrap shell scripts in ruby and chef if we can just
directly run a shell script?
Hans-Christoph Steiner [Wed, 22 Jun 2016 06:06:07 +0000 (08:06 +0200)]
buildserver: enable debug log for provision-android-sdk
Hans-Christoph Steiner [Tue, 21 Jun 2016 16:12:09 +0000 (18:12 +0200)]
buildserver: android --silent hides errors, so remove
--silent seem to prevent `android update sdk` from exiting with an error,
so its kind of useless. I just wanted it to suppress the verbose logs.
Hans-Christoph Steiner [Tue, 21 Jun 2016 16:15:40 +0000 (18:15 +0200)]
buildserver: download and cache latest platform-tools and m2repository
Also, by having our own checksums for all the bits means that we can safely
add support for local mirrors, like a bunch in China, for example:
http://mirrors.neusoft.edu.cn/android/repository/
Hans-Christoph Steiner [Mon, 4 Jul 2016 14:34:11 +0000 (16:34 +0200)]
buildserver: test builds against fdroid and adaway
The other apps are too flaky on gpjenkins right now, and that's our
only box for running full buildserver tests. Once we get the
buildserver tests running on jenkins.debian.net, then we can add a
bunch more apps to the test script. gpjenkins is an extra locked down
box, so that's why the builds are flaky: gradle and maven downloads
regularly fail because they are blocked.
Hans-Christoph Steiner [Mon, 4 Jul 2016 15:14:06 +0000 (17:14 +0200)]
buildserver: remove last vestige of 32-bit buildserver
Hans-Christoph Steiner [Mon, 4 Jul 2016 11:14:37 +0000 (13:14 +0200)]
jenkins-build: switch buildserver to new 64-bit base
Daniel Martí [Mon, 4 Jul 2016 11:01:58 +0000 (12:01 +0100)]
makebs: flip arch64 bool
The last commit was missing this.
Hans-Christoph Steiner [Mon, 4 Jul 2016 10:34:00 +0000 (12:34 +0200)]
switch to new 64-bit base box image: https://f-droid.org/jessie64.box
build-tools and other SDK bits from android-24 require 64-bit GNU/Linux
Ciaran Gultnieks [Fri, 1 Jul 2016 12:00:38 +0000 (12:00 +0000)]
Various changes to get makebuildserver to work with a 64 bit base box
Note that the apt packages are split into two halves, because it takes
too long (on 64 bit!) to install them all. The sensible fix would be
to simply up the timeout on the package installation section, but this
is completely broken in chef.
Hans-Christoph Steiner [Mon, 27 Jun 2016 18:48:19 +0000 (18:48 +0000)]
Merge branch 'java8-and-other-fixes' into 'master'
Java8 and other fixes
This fixes the OSX travis-ci job for the Java8 update, and also two other fixes as described in the commit message. @CiaranG I think the _/etc/profile_ approach in
7b466b6266a466a954c845968271283ad60e43ea gets us closer to the idea of having the `fdroid build` jobs run in the same environment as `vagrant ssh`.
See merge request !138
Hans-Christoph Steiner [Thu, 23 Jun 2016 15:58:25 +0000 (17:58 +0200)]
handle APKs with filenames encoded with CP437
The ZIP format has no official encoding :-| so we have to do hacks. The
zipfile devs couldn't even sort this out:
https://bugs.python.org/issue10614
closes #167
Hans-Christoph Steiner [Thu, 23 Jun 2016 15:11:49 +0000 (17:11 +0200)]
FDroidPopen must have a locale to support UTF-8 filenames
`fdroid update` should be able to handle any valid filename (hopefully
aapt doesn't barf on them). To handle that, the environment where the
shell commands are run in needs to have a UTF-8 locale set. If LANG is
not set, things default to ASCII and UTF-8 filenames fail.
This also renames test APK with lots of Unicode chars as a test case.
closes #167
Hans-Christoph Steiner [Mon, 20 Jun 2016 12:24:12 +0000 (14:24 +0200)]
ignore commonly used files for testing in place
Hans-Christoph Steiner [Tue, 21 Jun 2016 14:07:14 +0000 (16:07 +0200)]
travis-ci: use most recent OSX image to get Java8
https://gitlab.com/fdroid/fdroidserver/merge_requests/137
Hans-Christoph Steiner [Tue, 21 Jun 2016 08:39:41 +0000 (10:39 +0200)]
load bash profile using --login when running builds on server
This will make `vagrant ssh` and `fdroid build --server` be the same env,
so troubleshooting should be easier. !135 Here's what `man bash` says:
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads and
executes commands from the file /etc/profile, if that file
exists. After reading that file, it looks for ~/.bash_profile,
~/.bash_login, and ~/.profile, in that order, and reads and
executes commands from the first one that exists and is readable.
The --noprofile option may be used when the shell is started to
inhibit this behavior. When a login shell exits, bash reads and
executes commands from the file ~/.bash_logout, if it exists.
Hans-Christoph Steiner [Mon, 20 Jun 2016 12:01:56 +0000 (14:01 +0200)]
properly close opened images
This stops these errors:
fdroid/fdroidserver/fdroidserver/update.py:744: ResourceWarning: unclosed
file <_io.BufferedReader
name='repo/icons-320/info.guardianproject.urzip.100.png'>
fdroid/fdroidserver/fdroidserver/update.py:721: DeprecationWarning: The
'warn' function is deprecated, use 'warning' instead
Daniel Martí [Mon, 27 Jun 2016 07:03:58 +0000 (07:03 +0000)]
Merge branch 'api-24' into 'master'
Api 24, gradle versions
CC @krt @eighthave
See merge request !140
Daniel Martí [Mon, 27 Jun 2016 06:41:49 +0000 (06:41 +0000)]
Merge branch 'permission-fix' into 'master'
Make permission parsing more specific
Get name only and ignore maxSdkVersion
Fixes #188
See merge request !142
Dominik Schürmann [Sun, 26 Jun 2016 16:03:37 +0000 (18:03 +0200)]
Make permission parsing more specific
Get name only and ignore maxSdkVersion
Fixes #188
Dmitriy Bogdanov [Sun, 26 Jun 2016 15:18:50 +0000 (19:18 +0400)]
Pass default date to KnownApks.recordapk()
... if --use-date-from-apks option is used
Daniel Martí [Fri, 24 Jun 2016 16:03:48 +0000 (17:03 +0100)]
Add Gradle 2.2 and 2.14 to the buildserver
2.2 can be specifically requested by an app, and in some extreme cases
those apps don't build with 2.2.1.
Daniel Martí [Fri, 24 Jun 2016 16:01:22 +0000 (17:01 +0100)]
Add platform-24 to the buildserver
Daniel Martí [Fri, 24 Jun 2016 15:54:30 +0000 (16:54 +0100)]
all: add and switch to build-tools v24
Hans-Christoph Steiner [Tue, 21 Jun 2016 14:02:19 +0000 (14:02 +0000)]
Merge branch 'jdk8' into 'master'
all: switch to jdk8 as default
@eighthave this will probably require some action on the jenkins machine to replace jdk7 with jdk8.
Any thoughts @CiaranG?
See merge request !137
Daniel Martí [Tue, 21 Jun 2016 10:41:25 +0000 (11:41 +0100)]
all: switch to jdk8 as default
Also, remove jdk7 as it will become unused. We added jdk8 for
retrolambda, and now that we will use jdk8 as the default, jdk7 is
unnecessary as retrolambda can work fine with just jdk8.
This removes it from the buildserver, and the new CI image also only has
jdk8 from jessie-backports.
Fixes #185.
Daniel Martí [Tue, 21 Jun 2016 10:12:54 +0000 (10:12 +0000)]
Merge branch 'some-build-fixes' into 'master'
Some build fixes
This includes a couple of fixes discussed with @mvdan including removing the `ANDROID_NDK_HOME` env var from the buildserver and removing the default behavior to force the build-tools version.
See merge request !136
Hans-Christoph Steiner [Mon, 20 Jun 2016 18:00:59 +0000 (20:00 +0200)]
add force_build_tools config option
This replaces the current default behavior of always forcing the
build_tools version and allows the user to set build-tools forcing in
config.py.
closes #147
Hans-Christoph Steiner [Wed, 23 Mar 2016 20:04:20 +0000 (21:04 +0100)]
check whether metadata file is a duplicate before parsing it
By checking first, this prevents a stacktrace when the duplicate metadata
file is not valid. For example, in the tests, the duplicate is just a zero
length file, which was causing a stacktrace.
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.
Hans-Christoph Steiner [Mon, 20 Jun 2016 09:18:03 +0000 (11:18 +0200)]
buildserver: run tests with verbose logs
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.
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
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
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?)
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.
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
Markus Kilås [Fri, 17 Jun 2016 10:58:52 +0000 (12:58 +0200)]
Adding support for DSA and ECDSA signatures.
Daniel Martí [Fri, 17 Jun 2016 10:35:44 +0000 (11:35 +0100)]
lint: only check unused exlibs if using all apps
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
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.
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.
Hans-Christoph Steiner [Wed, 15 Jun 2016 13:39:49 +0000 (15:39 +0200)]
include new provisioning shell scripts in syntax checks
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.
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.
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.
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.
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
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.
Hans-Christoph Steiner [Wed, 15 Jun 2016 11:32:14 +0000 (13:32 +0200)]
githooks: do not run syntax checks on files being deleted
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
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
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'
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.