1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-08-16 03:10:09 +02:00
Commit Graph

3898 Commits

Author SHA1 Message Date
Lode Hoste
1ba346aa5a Added libjpeg and zlib dependency in README
See https://github.com/python-pillow/Pillow/issues/1457
2016-04-06 00:46:48 +02:00
Hans-Christoph Steiner
6846b77259 Merge branch 'ci-update' into 'master'
Gradle 2.12, build-tools 23.0.3



See merge request !117
2016-04-05 10:42:59 +00:00
Daniel Martí
ec9087d057 Add and switch to build-tools 23.0.3
Also bump to the CI image which contains it.
2016-04-05 10:49:30 +01:00
Daniel Martí
a345e351ba Add Gradle 2.12 to the buildserver 2016-04-05 10:49:15 +01:00
Daniel Martí
7dfc1c0449 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'
2016-04-02 13:43:49 +01:00
Daniel Martí
e822627fd1 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.
2016-03-30 22:54:37 +01:00
Hans-Christoph Steiner
7082e2f209 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
2016-03-29 16:53:51 +00:00
Daniel Martí
a6e857985a 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.
2016-03-29 12:44:00 +01:00
Hans-Christoph Steiner
b72fa0d5a2 Merge branch 'master' into 'master'
Fix error in build.py



See merge request !115
2016-03-28 08:01:00 +00:00
mimi89999
593a94ea7f Fix error in build.py 2016-03-27 21:36:16 +02:00
Daniel Martí
f46253a79f rewritemeta: fix after !62 breakage 2016-03-24 19:48:15 +00:00
Hans-Christoph Steiner
9e96a288c2 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
2016-03-23 20:12:22 +00:00
Hans-Christoph Steiner
9cd6b444f8 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
2016-03-23 17:16:28 +01:00
Hans-Christoph Steiner
19189b9b04 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.
2016-03-23 17:16:28 +01:00
Hans-Christoph Steiner
994488ad47 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.
2016-03-23 17:16:28 +01:00
Hans-Christoph Steiner
3b20153cd7 document new fdroid build behavior with .fdroid.* metadata 2016-03-23 17:16:28 +01:00
Hans-Christoph Steiner
578218a8b0 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.
2016-03-23 17:16:28 +01:00
Hans-Christoph Steiner
3e6b263c8e 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.
2016-03-23 17:16:27 +01:00
Hans-Christoph Steiner
3768d7a4d6 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.
2016-03-23 17:16:27 +01:00
Hans-Christoph Steiner
9abb80b3b7 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.
2016-03-23 17:16:27 +01:00
Hans-Christoph Steiner
98809fc38f 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
2016-03-21 22:01:54 +00:00
Ciaran Gultnieks
009a926ea4 Remove extra blank lines in makebuildserver output
These seem to have appeared during the py3 conversion.
2016-03-21 08:45:42 +00:00
Daniel Martí
a6d4081822 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
2016-03-17 14:14:45 +00:00
Daniel Martí
221ec07a69 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.
2016-03-17 13:36:06 +00:00
Daniel Martí
23ef5b072a 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.
2016-03-16 18:15:08 +00:00
Daniel Martí
f57e61821c 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
2016-03-16 13:06:31 +00:00
Hans-Christoph Steiner
90f547eb5d update buildserver debian packages for py3 2016-03-15 20:04:50 +01:00
Hans-Christoph Steiner
b5cc35c44f 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.
2016-03-15 13:47:56 +01:00
Hans-Christoph Steiner
ebc8ffa7d0 jenkins-build-makebuildserver: throw error if app build fails 2016-03-15 13:37:06 +01:00
Hans-Christoph Steiner
4422dca528 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
2016-03-15 13:21:19 +01:00
Hans-Christoph Steiner
016fa78111 fix stab at a Cygwin port (aaaahh Windows!)
This gets `fdroid init` and `fdroid readmeta` working on Cygwin.
2016-03-15 11:30:27 +01:00
Daniel Martí
8041e34957 Merge branch 'master' into 'master'
makebuildserver: buildserverid should always be a string

missed one subprocess issue in !110

See merge request !112
2016-03-14 23:37:51 +00:00
Ciaran Gultnieks
5d296f8c61 Fix python3 checkupdates crashes 2016-03-14 22:29:46 +00:00
Ciaran Gultnieks
6cecb69bf2 Fix another python3 build crash 2016-03-14 22:23:19 +00:00
Hans-Christoph Steiner
8f99400064 makebuildserver: buildserverid should always be a string 2016-03-14 17:35:44 +01:00
Daniel Martí
c1ac6f4e88 Merge branch 'master' into 'master'
post-py3 fixes

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

See merge request !110
2016-03-14 12:54:10 +00:00
Hans-Christoph Steiner
aa0ea46465 not all UNIX echo commands support -n
FreeBSD and OSX's does not, for example, and the shell should just treat
the '\n' as white space in the command line.
2016-03-14 12:49:38 +01:00
Hans-Christoph Steiner
7039d16046 always parse versions as strings, not bytes
Fixes a couple errors like:
  File "./makebuildserver", line 30, in vagrant
    out += line
  TypeError: Can't convert 'bytes' object to str implicitly

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

"If universal_newlines is True, the file objects stdin, stdout and stderr
are opened as text streams in universal newlines mode, as described above
in Frequently Used Arguments, otherwise they are opened as binary streams."
https://docs.python.org/3/library/subprocess.html#subprocess.Popen
2016-03-14 12:49:38 +01:00
Hans-Christoph Steiner
20d082dfed travis-ci: move python deps to 3 2016-03-14 12:48:58 +01:00
Hans-Christoph Steiner
0fef06a5c9 jenkins-build-makebuildserver: make sure fdroiddata is on master
on the GP jenkins, I got this:

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

    git pull <remote> <branch>
2016-03-14 09:35:23 +01:00
Hans-Christoph Steiner
baad79f9e8 travis-ci osx: make sure build-tools are always installed
It seems that sometimes build-tools packages will not be installed unless
the --all flag is specified.
2016-03-14 09:27:26 +01:00
Ciaran Gultnieks
bc131856d2 Fix python2/makebuildserver breakage 2016-03-13 20:49:38 +00:00
Daniel Martí
fc0746712d Merge branch 'master' into 'master'
makebuildserver: support running VirtualBox in a VM

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

See merge request !108
2016-03-11 23:53:25 +00:00
Daniel Martí
f267a1d7c9 Merge branch 'py3' into 'master'
Python 3

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

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

CC @eighthave

See merge request !88
2016-03-11 23:51:56 +00:00
Daniel Martí
eb22714818 Merge branch 'checkupdates-speedup' into 'master'
checkupdates: sort tags by date in one go

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

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

See merge request !109
2016-03-11 20:50:59 +00:00
Daniel Martí
375af1b844 README: It's virtualenv that we want
virtualenv is the Debian package that holds the executables.
2016-03-11 13:27:01 +00:00
Daniel Martí
f2681dcb36 CI: Use pip install to grab all deps 2016-03-11 13:27:01 +00:00
Daniel Martí
a023a235a2 metadata: always open metadata files in UTF-8
For some reason, Python uses whatever encoding the system is using via a
locale. Since CI uses an ascii locale, stuff breaks. I can't find a way
to make all of fdroidserver ignore the locale and just use UTF-8, so for
now force it where it's bothering CI.
2016-03-11 13:27:01 +00:00
Daniel Martí
23a950bd00 Fix issue related to creating fdroidvcs file 2016-03-11 13:27:01 +00:00
Daniel Martí
b786c6de20 gitignore: ignore all test-generated tmp dirs 2016-03-11 13:27:01 +00:00