chiark / gitweb /
fdroidserver.git
7 years agoBump to 0.7.0 0.7.0
Daniel Martí [Sun, 11 Sep 2016 09:52:11 +0000 (11:52 +0200)]
Bump to 0.7.0

7 years agoMerge branch 'updates' into 'master'
Daniel Martí [Sat, 10 Sep 2016 10:06:44 +0000 (10:06 +0000)]
Merge branch 'updates' into 'master'

all: bump to build-tools 24.0.2

Update the docker image to include it there too.

See merge request !163

7 years agoall: bump to build-tools 24.0.2
Daniel Martí [Sat, 10 Sep 2016 09:43:04 +0000 (11:43 +0200)]
all: bump to build-tools 24.0.2

Update the docker image to include it there too.

7 years agoMerge branch 'buildserver-fixes' into 'master'
Hans-Christoph Steiner [Mon, 5 Sep 2016 08:48:49 +0000 (08:48 +0000)]
Merge branch 'buildserver-fixes' into 'master'

buildserver fixes

updates to the Android SDK packages used by `./makebuildserver`

See merge request !162

7 years agoupdate to platform-24_r02 in ./makebuildserver
Hans-Christoph Steiner [Tue, 30 Aug 2016 17:47:37 +0000 (19:47 +0200)]
update to platform-24_r02 in ./makebuildserver

7 years agoadd build-tools_r24.0.2-linux.zip to ./makebuildserver
Hans-Christoph Steiner [Tue, 30 Aug 2016 16:19:49 +0000 (18:19 +0200)]
add build-tools_r24.0.2-linux.zip to ./makebuildserver

7 years agonew build-tools_r24.0.1.zip sha256, Google keeps changing it
Hans-Christoph Steiner [Tue, 30 Aug 2016 16:19:34 +0000 (18:19 +0200)]
new build-tools_r24.0.1.zip sha256, Google keeps changing it

I validated this versus the Google repository XML downloaded from two
separate paths from:
https://dl.google.com/android/repository/repository-12.xml

Using their SHA1:
84f18c392919a074fcbb9b1d967984e6b2fef8b4

7 years agoMerge branch 'patch-1' into 'master'
Hans-Christoph Steiner [Tue, 30 Aug 2016 16:09:10 +0000 (16:09 +0000)]
Merge branch 'patch-1' into 'master'

Add buildserver lxml requirement for pEp

See merge request !161

7 years agoAdd buildserver lxml requirement for pEp
huss [Sun, 28 Aug 2016 12:47:12 +0000 (12:47 +0000)]
Add buildserver lxml requirement for pEp

7 years agoMerge branch 'fix-push-requests' into 'master'
Daniel Martí [Fri, 26 Aug 2016 22:26:17 +0000 (22:26 +0000)]
Merge branch 'fix-push-requests' into 'master'

Fix push requests

Two bug fixes found in the process of implementing the client side of the push requests in https://gitlab.com/fdroid/fdroidclient/merge_requests/386

This is related to !156.

See merge request !160

7 years agomake build reproducible by fixing sort order in docs
Hans-Christoph Steiner [Fri, 26 Aug 2016 09:48:12 +0000 (11:48 +0200)]
make build reproducible by fixing sort order in docs

From Debian https://bugs.debian.org/835463
 Description: Make the build reproducible
 Author: Chris Lamb <lamby@debian.org>
 Last-Update: 2016-08-26

7 years agorename server request from "delete" to "uninstall"
Hans-Christoph Steiner [Tue, 23 Aug 2016 18:30:27 +0000 (20:30 +0200)]
rename server request from "delete" to "uninstall"

This matches the Android API's current Intent action for this, rather than
the deprecated one:

https://gitlab.com/fdroid/fdroidclient/blob/v0.101-alpha5/app/src/main/java/org/fdroid/fdroid/installer/DefaultInstallerActivity.java#L147
https://developer.android.com/reference/android/content/Intent.html#ACTION_UNINSTALL_PACKAGE
https://developer.android.com/reference/android/content/Intent.html#ACTION_DELETE

7 years agosanitize mirror URLs to prevent path segments from being removed
Hans-Christoph Steiner [Tue, 23 Aug 2016 14:20:52 +0000 (16:20 +0200)]
sanitize mirror URLs to prevent path segments from being removed

urllib.parse.urljoin() will strip off the last path segment before joining
if that last path segment does not end with /.  That's a "feature" to make
it easy to replace file names.  Here it was stripping off the essential
'fdroid' segment, making URLs like:

https://foo.com/repo

when they should be

https://foo.com/fdroid/repo

7 years agoMerge branch 'ci-bump' into 'master'
Daniel Martí [Mon, 22 Aug 2016 09:25:19 +0000 (09:25 +0000)]
Merge branch 'ci-bump' into 'master'

CI: bump docker image

See merge request !159

7 years agoCI: bump docker image
Daniel Martí [Sun, 21 Aug 2016 09:11:01 +0000 (11:11 +0200)]
CI: bump docker image

7 years agomakebs: add gradle 3.0
Daniel Martí [Thu, 18 Aug 2016 15:53:27 +0000 (17:53 +0200)]
makebs: add gradle 3.0

7 years agomakebs: bump m2repository to r36 (24.2.0)
Daniel Martí [Thu, 18 Aug 2016 15:48:01 +0000 (17:48 +0200)]
makebs: bump m2repository to r36 (24.2.0)

7 years agomakebs: bump tools to r25.2.1
Daniel Martí [Thu, 18 Aug 2016 15:47:49 +0000 (17:47 +0200)]
makebs: bump tools to r25.2.1

7 years agogradle: plugins 2.2 and 2.1.3 require 2.14.1
Daniel Martí [Thu, 18 Aug 2016 15:38:36 +0000 (17:38 +0200)]
gradle: plugins 2.2 and 2.1.3 require 2.14.1

7 years agoMerge branch 'push-install' into 'master'
Hans-Christoph Steiner [Wed, 17 Aug 2016 09:18:31 +0000 (09:18 +0000)]
Merge branch 'push-install' into 'master'

set up install/delete lists for "push" commands from server

It is now possible for the server operator to specify lists of apps that must be installed or deleted on the client (aka "push installs).  If
the user has opted in, or the device is already setup to respond to these requests, then fdroidclient will automatically install/delete
the packageNames listed.  This is protected by the same signing key as the app index metadata.

It generates single XML elements with the data set in the attributes. This keeps the XML compact and easily extensible, e.g. for adding versionCode, signingKey, etc as attributes:

```xml
    <install packageName="com.fsck.k9"/>
    <install packageName="at.bitfire.davdroid"/>
    <delete packageName="com.facebook.orca"/>
```

See merge request !156

7 years agoset up install/delete lists for "push" commands from server
Hans-Christoph Steiner [Tue, 16 Aug 2016 19:02:15 +0000 (21:02 +0200)]
set up install/delete lists for "push" commands from server

It is now possible for the server operator to specify lists of apps that
must be installed or deleted on the client (aka "push installs).  If
the user has opted in, or the device is already setup to respond to
these requests, then fdroidclient will automatically install/delete
the packageNames listed.  This is protected by the same signing key
as the app index metadata.

It generates single XML elements with the data set in the attributes. This
keeps the XML compact and easily extensible, e.g. for adding versionCode,
signingKey, etc as attributes:

    <install packageName="com.fsck.k9"/>
    <install packageName="at.bitfire.davdroid"/>
    <delete packageName="com.facebook.orca"/>

Copyright: 2016 Blue Jay Wireless
Signed-off-by: Hans-Christoph Steiner <hans@eds.org>
closes #177

7 years agoMerge branch 'ndk11' into 'master'
Daniel Martí [Sun, 14 Aug 2016 09:15:04 +0000 (09:15 +0000)]
Merge branch 'ndk11' into 'master'

Add ndk r11c

NDK11 is required by some apps (some versions of VLC) which will not build with r10e or r12b. As always, please test this before merging: I havent added a NDK before.

See merge request !155

7 years agomakebs: add automake
Daniel Martí [Sun, 14 Aug 2016 07:57:29 +0000 (09:57 +0200)]
makebs: add automake

Version 1.14 is needed for k9 and some other apps.

7 years agoAdd ndk r11c
Boris Kraut [Fri, 12 Aug 2016 18:24:54 +0000 (20:24 +0200)]
Add ndk r11c

7 years agoMerge branch 'gradle-2.14.1' into 'master'
Daniel Martí [Fri, 12 Aug 2016 20:36:35 +0000 (20:36 +0000)]
Merge branch 'gradle-2.14.1' into 'master'

Add gradle 2.14.1

I hope verything is doen correctly, didnt add any gradle versions since moving from chef.. (or at all?)

See merge request !154

7 years agoAdd gradle 2.14.1
Boris Kraut [Fri, 12 Aug 2016 17:52:32 +0000 (19:52 +0200)]
Add gradle 2.14.1

7 years agoMerge branch 'java-home-lookup' into 'master'
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

7 years agoMerge branch 'permission-parsing' into 'master'
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

7 years agoParse maxSdkVersion and -23 permission tags
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

7 years agoCheck javac existence when looking for JDK
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.

7 years agoMerge branch 'fix-ndk' into 'master'
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

7 years agoFix JAVA_HOME environment variable handling
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.

7 years agomakebs: work around build-tools 24.0.1 version bug
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.

7 years agoall: switch to build-tools 24.0.1 as default
Daniel Martí [Tue, 2 Aug 2016 09:12:01 +0000 (11:12 +0200)]
all: switch to build-tools 24.0.1 as default

7 years agoRe-add NDK r12b, now fixed.
Daniel Martí [Tue, 2 Aug 2016 09:09:32 +0000 (11:09 +0200)]
Re-add NDK r12b, now fixed.

7 years agoRevert "all: add NDK r12b and set it as default"
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

7 years agoCatch another case of invalid wiki page names
Ciaran Gultnieks [Mon, 1 Aug 2016 11:25:22 +0000 (12:25 +0100)]
Catch another case of invalid wiki page names

7 years agoMerge branch 'bump-ci' into 'master'
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

7 years agoCI: bump docker image
Daniel Martí [Sun, 31 Jul 2016 22:57:32 +0000 (00:57 +0200)]
CI: bump docker image

7 years agoMerge branch 'pep' into 'master'
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

7 years agocommon: extra checks for NDK in local.props
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.

7 years agomakebs: fix config crash
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.

7 years agowp-fdroid: add 7.0 (24) to the versions list
Daniel Martí [Mon, 25 Jul 2016 12:56:54 +0000 (14:56 +0200)]
wp-fdroid: add 7.0 (24) to the versions list

7 years agocommon: don't insert $ANDROID_NDK to local.props
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.

7 years agomakebs: update android support repo
Daniel Martí [Mon, 25 Jul 2016 10:45:56 +0000 (12:45 +0200)]
makebs: update android support repo

7 years agomakebs: add build-tools-24.0.1
Daniel Martí [Mon, 25 Jul 2016 10:40:44 +0000 (12:40 +0200)]
makebs: add build-tools-24.0.1

Fixes #196.

7 years agomakebs: "fix" platform v24 zip for r02
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.

7 years agobs: add sqlite3 and asn1c
Boris Kraut [Sat, 23 Jul 2016 17:14:28 +0000 (19:14 +0200)]
bs: add sqlite3 and asn1c

7 years agomakebs: revert platform-tools change in 2227cc6d
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.

7 years agoMerge branch 'ndk-r12' into 'master'
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

7 years agoMerge branch 'ndk-error' into 'master'
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

7 years agoMerge branch 'patch-2' into 'master'
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

7 years agoServer manual phrasing matches client. "beta" -> "unstable"
Stephen Michel [Wed, 13 Jul 2016 17:25:33 +0000 (17:25 +0000)]
Server manual phrasing matches client. "beta" -> "unstable"

7 years agoall: remove 32-bit buildserver code
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.

7 years agoall: add NDK r12b and set it as default
Daniel Martí [Wed, 13 Jul 2016 15:45:05 +0000 (16:45 +0100)]
all: add NDK r12b and set it as default

7 years agobuild: error properly if an invalid ndk is used
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.

7 years agoMerge branch 'precommit-fixes' into 'master'
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

7 years agopre-commit: pep8 is now pycodestyle
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.

7 years agoMerge branch 'use_date_from_apk_in_known_apks' into 'master'
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

7 years agopre-commit: fix warnings and errors
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!

7 years agoMerge branch 'apk-extension-obb-support' into 'master'
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

7 years agotests for finding the proper OBB files for each APK
Hans-Christoph Steiner [Mon, 20 Jun 2016 11:41:30 +0000 (13:41 +0200)]
tests for finding the proper OBB files for each APK

7 years agoadd SHA-256 hashes of each OBB file
Hans-Christoph Steiner [Mon, 20 Jun 2016 20:14:12 +0000 (22:14 +0200)]
add SHA-256 hashes of each OBB file

7 years agosupport .obb files for Opaque Binary Blog APK Expansions
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

7 years agoMerge branch 'standalone-vagrantfile' into 'master'
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

7 years agobuildserver: delete corrupt files from the cache
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

7 years agobuildserver: buildserver/Vagrantfile is configed by .yaml file
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.

7 years agobuildserver: send config to vagrant via YAML file
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.

7 years agobuildserver: make provision scripts output name to log
Hans-Christoph Steiner [Mon, 4 Jul 2016 12:20:42 +0000 (14:20 +0200)]
buildserver: make provision scripts output name to log

7 years agobuildserver: use pip instead of easy_install for caching
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.

7 years agobuildserver: move apt setup to a shell script
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.

7 years agobuildserver: move trusty/paramiko hack to its own shell script
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?

7 years agobuildserver: enable debug log for provision-android-sdk
Hans-Christoph Steiner [Wed, 22 Jun 2016 06:06:07 +0000 (08:06 +0200)]
buildserver: enable debug log for provision-android-sdk

7 years agobuildserver: android --silent hides errors, so remove
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.

7 years agobuildserver: download and cache latest platform-tools and m2repository
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/

7 years agobuildserver: test builds against fdroid and adaway
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.

7 years agobuildserver: remove last vestige of 32-bit buildserver
Hans-Christoph Steiner [Mon, 4 Jul 2016 15:14:06 +0000 (17:14 +0200)]
buildserver: remove last vestige of 32-bit buildserver

7 years agojenkins-build: switch buildserver to new 64-bit base
Hans-Christoph Steiner [Mon, 4 Jul 2016 11:14:37 +0000 (13:14 +0200)]
jenkins-build: switch buildserver to new 64-bit base

7 years agomakebs: flip arch64 bool
Daniel Martí [Mon, 4 Jul 2016 11:01:58 +0000 (12:01 +0100)]
makebs: flip arch64 bool

The last commit was missing this.

7 years agoswitch to new 64-bit base box image: https://f-droid.org/jessie64.box
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

7 years agoVarious changes to get makebuildserver to work with a 64 bit base box
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.

7 years agoMerge branch 'java8-and-other-fixes' into 'master'
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

7 years agohandle APKs with filenames encoded with CP437
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

7 years agoFDroidPopen must have a locale to support UTF-8 filenames
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

7 years agoignore commonly used files for testing in place
Hans-Christoph Steiner [Mon, 20 Jun 2016 12:24:12 +0000 (14:24 +0200)]
ignore commonly used files for testing in place

7 years agotravis-ci: use most recent OSX image to get Java8
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

7 years agoload bash profile using --login when running builds on server
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.

7 years agoproperly close opened images
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

7 years agoMerge branch 'api-24' into 'master'
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

7 years agoMerge branch 'permission-fix' into 'master'
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

7 years agoMake permission parsing more specific
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

7 years agoPass default date to KnownApks.recordapk()
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

7 years agoAdd Gradle 2.2 and 2.14 to the buildserver
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.

7 years agoAdd platform-24 to the buildserver
Daniel Martí [Fri, 24 Jun 2016 16:01:22 +0000 (17:01 +0100)]
Add platform-24 to the buildserver

7 years agoall: add and switch to build-tools v24
Daniel Martí [Fri, 24 Jun 2016 15:54:30 +0000 (16:54 +0100)]
all: add and switch to build-tools v24

7 years agoMerge branch 'jdk8' into 'master'
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

7 years agoall: switch to jdk8 as default
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.

7 years agoMerge branch 'some-build-fixes' into 'master'
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

7 years agoadd force_build_tools config option
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

7 years agocheck whether metadata file is a duplicate before parsing it
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.