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

3490 Commits

Author SHA1 Message Date
Daniel Martí
80a8a39f6f build: make sure .gradle/ is removed at clean 2015-09-23 13:02:22 -07:00
Daniel Martí
1b8e33f714 Update build status badge to new CI url 2015-09-22 21:46:14 -07:00
Daniel Martí
b589595e45 scanner: skip symlinks to avoid issues
If they resolve to a missing file, we don't care about them. If they resolve
to an existing file, we'll scan that file anyway.
2015-09-22 13:03:42 -07:00
Daniel Martí
b9b5b5d1b0 scanner: don't crash on unused gradle files 2015-09-22 13:02:26 -07:00
Daniel Martí
83daf71338 gradle: don't strip out comments
This was never intended. Comments can help sed usage, and can still be useful
in source tarballs.
2015-09-22 11:52:16 -07:00
Daniel Martí
21bdd2941c Merge branch 'asynchronous_reader' into 'master'
Add asynchronous filereader, fix python3 lockups

with the current implementation of AsynchronousFileReader with Python 3 FDroidPopen deadlocks with 100% CPU-utilization

The code is from https://github.com/soxofaan/asynchronousfilereader

I hope the MIT-Licence makes no problems




See merge request !80
2015-09-21 22:09:23 +00:00
Daniel Martí
39e3bfa0ce Merge branch 'docs' into 'master'
docs: Add list of trusted maven repos



See merge request !81
2015-09-21 19:58:50 +00:00
Boris Kraut
22bdcb7acf docs: Add list of trusted maven repos 2015-09-21 21:51:35 +02:00
Daniel Martí
6c5bbb2431 Merge branch 'master' into 'master'
Added support for gradle flavor specific dependencies in usual suspects check

When you have flavor specific dependencies in your project, you specify them in the build.gradle file with a prefixed *compile* command:

```
compile 'normal dependency'
myflavorCompile 'only for myflavor'
```

The usual suspects check just searches for some often used library names in the whole build.gradle file. I added another condition, so dependencies for not build flavors are not checked.

See merge request !77
2015-09-21 17:06:38 +00:00
NeroBurner
694a4ce7da Add asynchronous filereader, fix python3 lockups 2015-09-20 20:57:53 +02:00
Jan Kühle
450409ef14 Added support for gradle flavor specific dependencies in usual suspects check. 2015-09-19 14:43:42 +02:00
Daniel Martí
e285a8ac31 Remove Dogecoin donation support
Not nearly as popular as bitcoin and litecoin. To the point where it hadn't
been used yet.

Bump index version to 14 to mark its removal.
2015-09-18 19:06:10 -07:00
Daniel Martí
d07bf0754a metadata: fix html paragraph tag regression
Spotted in fdroid/fdroidclient#422
2015-09-17 14:14:54 -07:00
Daniel Martí
d7d9e38ef7 scanner: use a blacklist instead of a whitelist
This is much closer to what we did before with mimetypes. Using a whitelist
turns out to be a bad idea since repositories seem to be randomly filled with
executable images and documents, which trigger the scanner.

In an ideal world the scanner would complain about all of those. For now, just
warn about the possibility of them being hidden binaries.
2015-09-16 17:23:34 -07:00
Daniel Martí
feaf3d04e5 scanner: also ignore ttf and otf files 2015-09-16 17:14:06 -07:00
Daniel Martí
da2a4f2cf5 scanner: improve usual suspect output 2015-09-16 17:13:54 -07:00
Daniel Martí
d155648a01 Merge branch 'fix_licence_setup' into 'master'
Update Licence in setup.py to AGPLv3

See merge request !79
2015-09-16 21:29:41 +00:00
NeroBurner
9e8d9bebfa Update Licence in setup.py to AGPLv3 2015-09-16 22:55:22 +02:00
Daniel Martí
2bf04f8054 import: fix import -u from fdroiddata
Have -u take precedence over .git checking to fix import -u being run from
fdroiddata.
2015-09-15 14:06:31 -07:00
Daniel Martí
41370a12b0 Deduplicate statsdir 2015-09-14 18:13:03 -07:00
Daniel Martí
5cb47203b3 Replace some hard-coded paths with os.path.join 2015-09-14 18:12:15 -07:00
Daniel Martí
2c0be49124 import: do set root_dir if running from a repo 2015-09-14 17:40:44 -07:00
Daniel Martí
eda0c965e9 Merge branch 'dont-use-sudo-brew' into 'master'
Don't recommend using sudo with Homebrew

Homebrew [doesn't recommend using `sudo`][1], so update the README to reflect that.

 [1]: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/FAQ.md#why-does-homebrew-say-sudo-is-bad-

See merge request !78
2015-09-14 16:40:41 +00:00
Daniel Martí
15e14075cf scanner: avoid checking if usual files are binary 2015-09-13 22:22:03 -07:00
Daniel Martí
055759cf76 Rewrite scanner logic
Initially, the scanner used libmagic which used magic numbers in the file's
content to detect what kind of file it appears to be. Since that library isn't
available on all systems, we added support for two other libraries, mimetypes
amongst them.

The issue with mimetypes is that it only uses the file's extension, not its
actual content. So this ends in variable behaviour depending on what system
you're using fdroidserver on. For example, an executable binary without
extension would be ignored if mimetypes was being used.

We now drop all libraries - mimetypes too as it depends on the system's
mime.types file - and instead check extensions ourselves. On top of that, do
a simple binary content check to find binary executables that don't have an
extension.

The new in-house code without any dependencies doesn't add any new checks, so
no builds should break. The current checks still work:

 % fdroid scanner app.openconnect:1029
[...]
Found executable binary at assets/raw/armeabi/curl
Found executable binary at assets/raw/mips/curl
Found executable binary at assets/raw/x86/curl
Found JAR file at lib/XposedBridgeApi-54.jar
Found JAR file at libs/acra-4.5.0.jar
Found JAR file at libs/openconnect-wrapper.jar
Found JAR file at libs/stoken-wrapper.jar
Found shared library at libs/armeabi/libopenconnect.so
Found shared library at libs/armeabi/libstoken.so
Found shared library at libs/mips/libopenconnect.so
Found shared library at libs/mips/libstoken.so
Found shared library at libs/x86/libopenconnect.so
Found shared library at libs/x86/libstoken.so
2015-09-13 22:17:37 -07:00
Daniel Martí
1a3816acfb scanner: support apps using srclib repo type 2015-09-13 22:05:41 -07:00
Alex Jordan
e62a9c5cbb Don't recommend using sudo with Homebrew 2015-09-13 14:53:34 -07:00
Daniel Martí
576da1d048 all: deduplicate -v/-q setup 2015-09-11 23:42:50 -07:00
Daniel Martí
b42b45f762 lint: small cleanup 2015-09-11 23:35:32 -07:00
Daniel Martí
ecad89dc05 lint: catch more duplicate links 2015-09-11 23:30:59 -07:00
Daniel Martí
3638acddc4 checkupdates: Avoid variable/string names as CV 2015-09-11 23:17:46 -07:00
Daniel Martí
7a79b000bf Allow slashes in tags
The wikipedia app uses them, for example.
2015-09-11 23:17:36 -07:00
Daniel Martí
fb23b2cff4 metadata: don't break words nor on hyphens 2015-09-11 22:52:50 -07:00
Daniel Martí
df9b044a3b lint: add dumb support for multiline links 2015-09-11 22:40:16 -07:00
Daniel Martí
b9b4880b49 lint: move regex closer to usage 2015-09-11 22:07:51 -07:00
Daniel Martí
223db1588b metadata: allow links spanning multiple lines
This allows for nicer text wrapping.
2015-09-11 22:07:20 -07:00
Daniel Martí
e6b14c8995 lint: remove now obsolete description checks 2015-09-11 21:54:39 -07:00
Daniel Martí
3413965eaa Wrap descriptions to 80 chars 2015-09-11 21:36:18 -07:00
Daniel Martí
ade5036e23 metadata: rewrite multiline field writing
Now description text wrapping can be added.
2015-09-11 19:12:51 -07:00
Daniel Martí
cd202e59b1 Ensure that builds are always sorted when writing
This might not be true if builds are appended by e.g. checkupdates --auto.
This ensures that we sort them again before writing.
2015-09-11 18:21:07 -07:00
Daniel Martí
cc48d2828c lint: overhaul, cleaner and saner output 2015-09-10 18:41:10 -07:00
Daniel Martí
acfc48970d lint: move lastbuild into separate function 2015-09-10 17:55:09 -07:00
Daniel Martí
a5c2e503b2 lint: remove "no recommended build" check
In some cases we do want to not recommend any version. The client should more
or less gracefully handle this.
2015-09-10 17:54:41 -07:00
Daniel Martí
13b5966062 Merge branch 'import-tweaks-and-tests' into 'master'
Import tweaks and tests

This makes the code for `fdroid import` a bit more flexible and adds tests for the first time.  It also comments out options in `examples/config.py` that just mirror the defaults to make it clear that they are defaults, and help illustrate other options (this is standard procedure in default config files).

More details in the commit messages.

See merge request !76
2015-09-11 00:23:42 +00:00
Daniel Martí
e9e2713cde lint: cleanup, remove stale sites 2015-09-10 17:05:13 -07:00
Hans-Christoph Steiner
491d2d75a2 comment out things that are default values in examples/config.py
Since these are already defaults, there is no need to set them as defaults
in the default config.
2015-09-10 11:08:40 +02:00
Hans-Christoph Steiner
707930ce0a add a basic test of fdroid import 2015-09-10 11:08:40 +02:00
Hans-Christoph Steiner
48397bfa3c import: append .git to gitlab URLs, git sometimes freaks out otherwise
From my experience, gitlab URLs need to end in .git for git to always be
happy using them.
2015-09-10 11:08:39 +02:00
Hans-Christoph Steiner
c80c1bf017 import: split out URL handling into its own function
This is preparation to add other import methods, like checking if the
command was run in a currently checked out git repo.
2015-09-10 11:08:39 +02:00
Daniel Martí
9489e80f09 Merge branch 'replace_optparse_with_argparse' into 'master'
replace deprecated optparse with argparse

squashed and rebased merge request fdroid/fdroidserver!74

following guidelines from:
https://docs.python.org/2/library/argparse.html#upgrading-optparse-code
except, still using option = parse.parse_args() instead of args = ...

- using the following script in folder fdroidserver:
	```
	for i in *.py; do
		sed -i -e 's/optparse/argparse/' \
			-e 's/OptionParser/ArgumentParser/' \
			-e 's/OptionError/ArgumentError/' \
			-e 's/add_option/add_argument/' \
			-e 's/(options, args) = parser/options = parser/' \
			-e 's/options, args = parser/options = parser/' \
			-e 's/Usage: %prog/%(prog)s/' $i;
	done
	```
- use ArgumentParser argument to replace (option, args) = parser.parse()
  call
- use parser.error(msg) instead of raise ArgumentException as suggested
  in https://docs.python.org/2/library/argparse.html#exiting-methods
- in fdroid catch ArgumentError instead of OptionError

See merge request !75
2015-09-10 02:08:24 +00:00