1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-15 03:20:10 +01:00
Commit Graph

4221 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
64ea4caac1 buildserver: allow gradle/sdkmanager to install into the new m2repository
Google is pushing gradle towards downloading all the SDK components that it
needs, rather than having a preconfigured SDK installed.  The buildserver
strongly supports the old model, with added checksum checking even. We can
still support the old model by pre-configuring the SDK and locking it down
as root. This can then also support the new model by setting the file perms
so that new packages can be auto-installed, but they cannot overwrite any
packages that come pre-installed and pre-verified.

fdroiddata!2096
closes #247
2017-03-16 13:23:42 +01:00
Michael Pöhn
d2570a493e metadata output-lines now substitute $$VERSION$$/etc. 2017-03-16 09:24:05 +01:00
Hans-Christoph Steiner
c5c244ccbd generate HTML diff from verify using diffoscope
If diffoscope is installed, then use it to generate HTML diffs of all
verification builds.
2017-03-15 22:12:04 +01:00
Hans-Christoph Steiner
03ec590989 new repo-wide config option for a Binary Transparency Log
A Binary Transparency Log is a append only log of all binaries published by
a repo.  This is useful for people to find whether the binary they have
matches what F-Droid has published, and also makes it more difficult for
the published history to be changed without notice, or for a server to give
specific users custom malware binaries.

https://www.eff.org/deeplinks/2014/02/open-letter-to-tech-companies
2017-03-15 22:12:04 +01:00
Ciaran Gultnieks
0ef818486d Remove whitespace from HTTP update check versions 2017-03-15 19:54:09 +00:00
Ciaran Gultnieks
7306e1cf69 Catch update check failure and proceed, not bomb out 2017-03-15 19:54:09 +00:00
Hans-Christoph Steiner
4430d8b01c update: fix crash in debug logging message 2017-03-15 14:23:37 +01:00
Hans-Christoph Steiner
1e9406778f buildserver: remove my silly mistake
Should have done this through a merge request... code review!
2017-03-14 20:14:06 +01:00
Hans-Christoph Steiner
ee82c30cb8 buildserver: bump to android_m2repository r45 2017-03-14 20:04:50 +01:00
Hans-Christoph Steiner
cb7c60246c Merge branch 'constraintlayout-license-bullshit' into 'master'
buildserver: support new ConstraintLayout license bullshit

See merge request !225
2017-03-14 12:11:27 +00:00
Hans-Christoph Steiner
3e895eadd2 buildserver: allow gradle to install newer build-tools versions
gradle will now automatically download and install missing bits of the
Android SDK.  While we prefer to have the SDK packages fully verified, we
should allow this behavior on the buildserver to ensure that builds work
even when the buildserver can't be updated.  Since each build starts from a
clean snapshot, this auto-installed build-tools will only be used for the
single build, so it won't affect other apps.
2017-03-14 12:39:03 +01:00
Hans-Christoph Steiner
590160d766 buildserver: support new ConstraintLayout license bullshit
The new ConstraintLayout library in Android Support has some new custom way
of handling the license.  I suspect that they are going to use this new way
with all of the bits that gradle downloads.  We also have to support it for
apps that use it, including soon fdroidclient.

fdroiddata!2094
ci-images!1
2017-03-13 16:31:27 +01:00
Ciaran Gultnieks
7211381e27 Merge branch 'popen-nonutf8' into 'master'
common: don't assume build script output is utf-8

See merge request !224
2017-03-13 07:40:31 +00:00
Daniel Martí
37c802d323 common: don't assume build script output is utf-8
FDroidPopen is used for running many commands - from git to gradle to
custom commands via flags like build=. When any of these invoke calls to
custom build systems or upstream programs/scripts, it's not safe to
assume that the output will be utf8.

Unfortunately, this currently leads to crashes and failed builds:

	ERROR: Could not build app org.kiwix.kiwixmobile due to unknown error: Traceback (most recent call last):
	  File "/home/vagrant/fdroidserver/fdroidserver/build.py", line 1155, in main
	    options.onserver, options.refresh):
	  File "/home/vagrant/fdroidserver/fdroidserver/build.py", line 951, in trybuild
	    build_local(app, build, vcs, build_dir, output_dir, srclib_dir, extlib_dir, tmp_dir, force, onserver, refresh)
	  File "/home/vagrant/fdroidserver/fdroidserver/build.py", line 648, in build_local
	    p = FDroidPopen(['bash', '-x', '-c', cmd], cwd=root_dir)
	  File "/home/vagrant/fdroidserver/fdroidserver/common.py", line 1786, in FDroidPopen
	    result.output = result.output.decode('utf-8')
	UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb7 in position 5397290: invalid start byte

One way to fix this would be to use one of the python libraries that
guess an encoding. But a much safer option is to tell the decode method
to ignore non-utf8 bytes, as opposed to crashing on them.
2017-03-12 19:36:44 +00:00
Hans-Christoph Steiner
001d3b1fbb Merge branch 'include-ota-zip-in-index-xml' into 'master'
fix OTA ZIP inclusion in index.xml

See merge request !223
2017-03-10 23:06:22 +00:00
Hans-Christoph Steiner
6fe27ad75e fix source tarball filename for media files
bug from 07ce948809
2017-03-10 19:05:51 +01:00
Hans-Christoph Steiner
6aca906863 include non-APKs that match metadata and fdroid-generated filenames
Since it is now possible to build and include arbitrary files, like OTA
update ZIP files, the update procedure needs to look for non-APK files that
match the packageName_versionCode pattern of fdroid-generated files.

!193
admin#14
privileged-extension#9
2017-03-10 18:37:18 +01:00
Hans-Christoph Steiner
9d363b91f4 update: do not include fdroid-generated tarballs as "media" files
`fdroid build` will generate source tarballs, and now with support for
adding any file to a repo, we need to explicitly ignore the fdroid-
generated source tarballs.  If people want to include source tarballs in a
repo, they still can, as long as that source tarball doesn't use the
`fdroid build` tarball naming scheme.
2017-03-10 18:37:18 +01:00
Hans-Christoph Steiner
6207ee7878 Merge branch 'gradle341' into 'master'
makebs: add gradle 3.4.1

See merge request !222
2017-03-10 15:23:41 +00:00
Boris Kraut
e8d0a8ede8 makebs: add gradle 3.4.1 2017-03-10 14:29:36 +01:00
Hans-Christoph Steiner
19b3d7f00d Merge branch 'pre-indexv1-fixes' into 'master'
pre index-v1 fixes

See merge request !220
2017-03-07 10:39:41 +00:00
Hans-Christoph Steiner
650d52fb0a uses-permission maxSdkVersion as int, and enforces int string in XML
This forces <uses-permission maxSdkVersion=""> to be an integer in the
internal dict, and forces it to have no decimal point in XML.  Having it as
an integer in the internal dict means data will pass directly through to
the fdroidclient Apk instance, where it is ultimately an integer.
2017-03-06 22:04:14 +01:00
Hans-Christoph Steiner
7bae1075ba non-APK files will not have minSdkVersion, so don't force it
fdroidclient should handle no minSdkVersion fine, since it just parses the
text in <sdkver></sdkver> as an int, and uses a default value if there is
an Exception.
2017-03-06 22:03:20 +01:00
Hans-Christoph Steiner
0be58c2dca update: do not include PGP signatures as "media" files
A .asc or .sig file is a detached PGPG signature, `fdroid gpgsign`
generates them.  It makes no sense for them to be ever treated as a file
for distribution.

This also adds to forgotten forms of index files.
2017-03-06 11:55:17 +01:00
Hans-Christoph Steiner
f79f08a1c1 update bash completion commenting to match standards 2017-03-06 11:53:58 +01:00
Hans-Christoph Steiner
d4060bbaa2 Merge branch 'master' into 'master'
upload release apk to virustotal

Closes #17

See merge request !218
2017-03-06 09:13:15 +00:00
thez3ro
f76ef0b3a8
upload release apk to virustotal 2017-03-03 13:44:55 +01:00
Hans-Christoph Steiner
c352c02557 Merge branch 'master' into 'master'
upload release apk to AndroidObservatory

Closes #142

See merge request !217
2017-03-01 22:36:53 +00:00
Hans-Christoph Steiner
f68d811e64 Merge branch 'master' into 'master'
upload release apk to AndroidObservatory

Closes #142

See merge request !217
2017-03-01 22:36:26 +00:00
thez3ro
d5e2d6f57a
upload release apk to AndroidObservatory 2017-03-01 22:34:55 +01:00
Hans-Christoph Steiner
2242bb232b Merge branch 'skip-scan' into 'master'
Pass on --skip-scan flag to build server VM when running fdroid build --server.

Closes #130

See merge request !216
2017-03-01 17:35:02 +00:00
Michael Pöhn
c5bd8d9582 Pass on --skip-scan flag to build server VM when running fdroid build --server. 2017-03-01 17:27:17 +01:00
Hans-Christoph Steiner
0025adf566 Merge branch 'metadata-fixes-and-tests' into 'master'
metadata fixes and tests

Closes #261

See merge request !215
2017-02-28 13:28:55 +00:00
Hans-Christoph Steiner
4e8e297944 metadata: port .fdroid.yml handling to App dict subclass
This got overlooked in b7fc7f2228, then
caught in the ./makebuildserver tests, where it builds Checkey.
2017-02-28 12:08:04 +01:00
Hans-Christoph Steiner
5214889bbd fix bug including media files
'name' is not the full path, so it'll always fail common.is_repo_file()'s
os.path.isfile() check.

Introduced in 56d51fcd6b
2017-02-28 12:08:04 +01:00
Hans-Christoph Steiner
f06e336904 improve rewritemeta error msg about formats 2017-02-28 12:08:04 +01:00
Hans-Christoph Steiner
564cfb1089 match versionCode/versionName when set as gradle variable
For example, see org.kontalk:

allprojects {
    ext {
        appVersionCode = 221
        appVersionName = '4.0.1-preview'
    }
}
2017-02-28 12:08:04 +01:00
Hans-Christoph Steiner
507ed4a170 do not crash if no versionCode is found while parsing
if vercode is None and max_vercode is None, then it gave None as an arg to
the regexp pattern in ignoresearch().

closes #261
2017-02-28 12:08:04 +01:00
Hans-Christoph Steiner
d92ac1e8f6 fix metadata dump test to run on CI servers 2017-02-28 12:08:04 +01:00
Hans-Christoph Steiner
8b85c860a6 rename lastupdated to lastUpdated to match fdroid client
This lets index-v1 be parsed directly into class instances because the
field/instance var names match exactly.  The original index v0 element
must retain the 'lastupdated' name for backwards compatibility.
2017-02-28 12:08:04 +01:00
Hans-Christoph Steiner
73bb2cf1ba Merge branch 'gradle34' into 'master'
makebs: add gradle 3.4

See merge request !214
2017-02-27 09:10:11 +00:00
Boris Kraut
add1ad6eb5 makebs: add gradle 3.4 2017-02-26 03:23:49 +01:00
Hans-Christoph Steiner
b2a432db7e Merge branch 'remove-manual' into 'master'
remove TeX manual, it moved to https://gitlab.com/fdroid/fdroid-website

See merge request !209
2017-02-24 15:18:43 +01:00
Hans-Christoph Steiner
584841a775 jenkins-build-makebuildserver: add rudimentary rewritemeta test
This will show if rewritemeta changed anything.  fdroiddata requires all
files to be rewritten with rewritemeta before they are accepted.
2017-02-24 14:01:31 +01:00
Hans-Christoph Steiner
8decd3b504 remove TeX manual, it moved to https://gitlab.com/fdroid/fdroid-website
The whole TeX manual has been folded into the new Jekyll-based website, so
this is no longer needed at all.
2017-02-24 14:01:31 +01:00
Hans-Christoph Steiner
7a25dbc081 rewritemeta: fix silly bug of using == for =
This was introduced in c0bc3afda9
2017-02-24 13:36:41 +01:00
Torsten Grote
2a421d653c Merge branch 'make-Build-App-act-like-dicts' into 'master'
make Build and App classes act like dicts

See merge request !210
2017-02-24 11:11:11 +00:00
Hans-Christoph Steiner
4e39621601 provide warning if config items will not preserve order
If a group of items are enclosed in {}, then that will be a Python set,
which does not preserve order.  To preserve order, the data must be either
a tuple () or list [].
2017-02-24 11:01:01 +01:00
Hans-Christoph Steiner
388c336e76 build: ensure test is running on git commit that this code works with
Since https://gitlab.com/fdroid/ci-test-app is a separate git repo, things
with incompatible changes could get out of sync.  Therefore, this test
should specify which git commit is runs against.

For example, the .fdroid.yml file is still a moving target.  Just now, the
keys had the spaces removed as part of this MR.
2017-02-24 11:01:01 +01:00
Hans-Christoph Steiner
593613043e normalize Build TYPE_STRING data based on .txt
Unfortunately, things like versionCode must be strings.  That should be
converted to be ints throughout.
2017-02-24 11:01:01 +01:00