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

3726 Commits

Author SHA1 Message Date
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
Daniel Martí
84568c15a6 Fix detection of pyflakes3 found in Debian 2016-03-11 13:27:01 +00:00
Daniel Martí
d98b4d1b83 metadata: slightly speed up post_metadata_parse
Iterating over all the fields and checking which are modified is slower
than just iterating over the modified ones.
2016-03-11 13:27:01 +00:00
Daniel Martí
7f6276889e metadata: Sorting builds twice is not necessary 2016-03-11 13:27:00 +00:00
Daniel Martí
d4f806d757 Undo utf-8 text wrap workaround
This was added to fix unicode support in Python2. No longer needed in
Python3.
2016-03-11 13:27:00 +00:00
Daniel Martí
3371aa2116 Switch README and docs to indicate python 3 2016-03-11 13:27:00 +00:00
Daniel Martí
74197a9a2d pep8: start obeying E226
We nearly did already anyway.
2016-03-11 13:27:00 +00:00
Daniel Martí
72288345e3 pep8: Don't ignore rules we already obey 2016-03-11 13:27:00 +00:00
Daniel Martí
031bb39961 import: switch to python3 urllib 2016-03-11 13:27:00 +00:00
Daniel Martí
a51d849a5b update test: replace decode('hex') with unhexlify 2016-03-11 13:27:00 +00:00
Daniel Martí
5c40e3ab99 metadata test: load pickle in bytes, not str 2016-03-11 13:27:00 +00:00
Daniel Martí
4e28fa78fc Fix python headers in some source files
These were missing the python2 header, so they went under my radar when
doing the switch go python3.
2016-03-11 13:27:00 +00:00
Daniel Martí
24ad0418e3 tests: switch to python3 2016-03-11 13:27:00 +00:00
Daniel Martí
a1703f1204 update: fix encoding issues with the xml index 2016-03-11 13:27:00 +00:00
Daniel Martí
24266d48e1 update: get output bytes, not str, from keytool 2016-03-11 13:27:00 +00:00
Daniel Martí
4cb5ff0247 common: Introduce FDroidPopenBytes
* We can now get the output bytes directly if desired
* FDroidPopen remains with str output
* Ouptut is now buffered efficiently with a BytesIO instead of
  concatenating strings
2016-03-11 13:27:00 +00:00
Daniel Martí
63f8718cf5 Replace iterkeys() with keys() 2016-03-10 16:43:37 +00:00
Daniel Martí
8b3c27cb47 update: replace encode('hex') with hexlify 2016-03-10 16:43:37 +00:00
Daniel Martí
b31e20ee8b publish: fix hashing of strings 2016-03-10 16:43:37 +00:00
Daniel Martí
a78341d8e5 init: fix writing into file 2016-03-10 16:43:37 +00:00
Daniel Martí
da258dad57 Replace md5 with hashlib.md5 2016-03-10 16:43:37 +00:00
Daniel Martí
dd8ad7a4fd common: fix str fetching from manifest xml 2016-03-10 16:43:37 +00:00
Daniel Martí
d39bf37ce8 Port urllib and HTMLParser imports to python3 2016-03-10 16:43:37 +00:00