chiark / gitweb /
fdroidserver.git
8 years agoMerge branch 'docs' into 'master'
Daniel Martí [Thu, 10 Dec 2015 11:50:36 +0000 (11:50 +0000)]
Merge branch 'docs' into 'master'

docs: Add information on binary verification

I added a section about `Binaries:` metadata field. However, my information might be wrong or outdated, since I barely used it by now. Maybe even this field was left out on purpose...

See merge request !83

8 years agoMerge branch 'summarylength' into 'master'
Daniel Martí [Thu, 10 Dec 2015 11:47:48 +0000 (11:47 +0000)]
Merge branch 'summarylength' into 'master'

docs: Adjust summary length

See merge request !85

8 years agodocs: Adjust summary length
Boris Kraut [Thu, 10 Dec 2015 11:42:05 +0000 (12:42 +0100)]
docs: Adjust summary length

8 years agoOpen metadata files in only one place
Daniel Martí [Mon, 7 Dec 2015 19:31:23 +0000 (20:31 +0100)]
Open metadata files in only one place

Also get rid of the useless get_default_app_info func.

8 years agolint: optionally check format
Daniel Martí [Mon, 7 Dec 2015 19:12:26 +0000 (20:12 +0100)]
lint: optionally check format

8 years agolint: fix issue found by older version of pyflakes
Daniel Martí [Mon, 7 Dec 2015 12:58:29 +0000 (13:58 +0100)]
lint: fix issue found by older version of pyflakes

8 years agocheckupdates: fix --auto build copy
Daniel Martí [Mon, 7 Dec 2015 11:39:04 +0000 (12:39 +0100)]
checkupdates: fix --auto build copy

Also, remove origlines which hasn't been used in some time.

8 years agostats: fix a few dict accesses left over
Daniel Martí [Mon, 7 Dec 2015 11:33:24 +0000 (12:33 +0100)]
stats: fix a few dict accesses left over

8 years agoimport: fix get_default_app_info usage
Daniel Martí [Sat, 5 Dec 2015 18:20:41 +0000 (19:20 +0100)]
import: fix get_default_app_info usage

Closes #129

8 years agoscanner: remove jni check
Daniel Martí [Fri, 4 Dec 2015 18:32:01 +0000 (19:32 +0100)]
scanner: remove jni check

buildjni=no is the default. Moreover, some apps now run ndk-build via
gradle, so this was just in the way.

8 years agoSet all list defaults to an actual list
Daniel Martí [Thu, 3 Dec 2015 23:02:34 +0000 (00:02 +0100)]
Set all list defaults to an actual list

Iterating over the defaults will crash otherwise. Update pickle files.

8 years agoFix tests by not checking private attributes
Daniel Martí [Thu, 3 Dec 2015 18:31:20 +0000 (19:31 +0100)]
Fix tests by not checking private attributes

All attrs starting with '_' (e.g. _foo or __bar) are used internally, so
not very relevant for the metadata test anyway.

8 years agoAlso skip unmodified fields in the regex checks
Daniel Martí [Thu, 3 Dec 2015 15:49:35 +0000 (16:49 +0100)]
Also skip unmodified fields in the regex checks

Now it's close to 1s.

8 years agoKeep track of what attrs were modified in apps/builds
Daniel Martí [Thu, 3 Dec 2015 15:46:21 +0000 (16:46 +0100)]
Keep track of what attrs were modified in apps/builds

This allows us to run checks and fix types only on those that were
really modified. On our fdroiddata repo, with 2k apps with many unset
fields and flags, this reduces readmeta runtime from ~1.3s to ~1.1s.

8 years agoActually check that bools are valid
Daniel Martí [Thu, 3 Dec 2015 15:35:46 +0000 (16:35 +0100)]
Actually check that bools are valid

The metadata check was omitting booleans and lists, as it was only
taking strings. Fix this.

8 years agoRemove need for rstrip() of txt description
Daniel Martí [Thu, 3 Dec 2015 15:19:33 +0000 (16:19 +0100)]
Remove need for rstrip() of txt description

8 years agometadata: write strings directly to txt file
Daniel Martí [Thu, 3 Dec 2015 13:00:47 +0000 (14:00 +0100)]
metadata: write strings directly to txt file

8 years agoRename metafieldtype to fieldtype
Daniel Martí [Thu, 3 Dec 2015 12:53:49 +0000 (13:53 +0100)]
Rename metafieldtype to fieldtype

For consistency with flagtype. Also less redundant.

8 years agoUse dicts for field/flag types
Daniel Martí [Thu, 3 Dec 2015 12:52:53 +0000 (13:52 +0100)]
Use dicts for field/flag types

8 years agoSome more readability/performance tweaks
Daniel Martí [Thu, 3 Dec 2015 12:02:54 +0000 (13:02 +0100)]
Some more readability/performance tweaks

* Use set() instead of dict()
* No 'if foo: True else: False'
* Don't check for invalid fields twice

8 years agoUse constants for field/flag types
Daniel Martí [Thu, 3 Dec 2015 11:55:19 +0000 (12:55 +0100)]
Use constants for field/flag types

Avoids typos, such as one I just found which was 'strsng' isntead of
'string'. The static analyzer can catch those if they are constants.
Comparing ints is also faster than strings, which adds up in readmeta.

8 years agoAvoid conflicting func/var names
Daniel Martí [Thu, 3 Dec 2015 11:41:50 +0000 (12:41 +0100)]
Avoid conflicting func/var names

8 years agoMake text formatting faster via StringIO
Daniel Martí [Thu, 3 Dec 2015 11:02:47 +0000 (12:02 +0100)]
Make text formatting faster via StringIO

Avoid concatenating strings over and over. Also, the wiki formatting
wasn't necessary at all since it was just joining lines.

8 years agoRepresent multiline fields as str, not list
Daniel Martí [Thu, 3 Dec 2015 10:36:15 +0000 (11:36 +0100)]
Represent multiline fields as str, not list

Only keep lists in metadata files in the json format, since they don't
support multiline strings that are readable.

This makes the internal code easier, and a bit faster.

8 years agoFix tests
Daniel Martí [Thu, 3 Dec 2015 10:16:27 +0000 (11:16 +0100)]
Fix tests

8 years agoSome more txt parsing tweaks after profiling
Daniel Martí [Thu, 3 Dec 2015 10:06:27 +0000 (11:06 +0100)]
Some more txt parsing tweaks after profiling

8 years agoRemove duplicate build_flags check
Daniel Martí [Thu, 3 Dec 2015 09:58:12 +0000 (10:58 +0100)]
Remove duplicate build_flags check

It's already checked in set_flag

8 years agoRemove gradle=main
Daniel Martí [Thu, 3 Dec 2015 09:56:59 +0000 (10:56 +0100)]
Remove gradle=main

It was only supported in txt metadata, and was unused in fdroiddata
anyway.

8 years agoProperly close all metadata files once read
Daniel Martí [Thu, 3 Dec 2015 09:51:27 +0000 (10:51 +0100)]
Properly close all metadata files once read

8 years agoNever use exit/log in metadata
Daniel Martí [Wed, 2 Dec 2015 21:59:58 +0000 (22:59 +0100)]
Never use exit/log in metadata

8 years agoSpeed up metadata reading
Daniel Martí [Wed, 2 Dec 2015 21:38:40 +0000 (22:38 +0100)]
Speed up metadata reading

Total time for `fdroid readmeta` went down from ~1.6s to ~1.4s on my
machine.

8 years agoSimplify post_metadata_parse usage
Daniel Martí [Wed, 2 Dec 2015 21:29:31 +0000 (22:29 +0100)]
Simplify post_metadata_parse usage

8 years agometadata: properly store nums as strs and bools as bools
Daniel Martí [Wed, 2 Dec 2015 19:46:39 +0000 (20:46 +0100)]
metadata: properly store nums as strs and bools as bools

8 years agoPre-compile more regexes
Daniel Martí [Wed, 2 Dec 2015 19:38:55 +0000 (20:38 +0100)]
Pre-compile more regexes

8 years agolint: warn about target= in gradle builds
Daniel Martí [Wed, 2 Dec 2015 19:28:08 +0000 (20:28 +0100)]
lint: warn about target= in gradle builds

8 years agoFix default update= on ant builds
Daniel Martí [Wed, 2 Dec 2015 19:16:25 +0000 (20:16 +0100)]
Fix default update= on ant builds

8 years agoRework build into a class
Daniel Martí [Sat, 28 Nov 2015 16:55:27 +0000 (17:55 +0100)]
Rework build into a class

This simplifies usage, goes from

    build['flag']
to
    build.flag

Also makes static analyzers able to detect invalid attributes as the set
is now limited in the class definition.

As a bonus, setting of the default field values is now done in the
constructor, not separately and manually.

While at it, unify "build", "thisbuild", "info", "thisinfo", etc into
just "build".

8 years agogradle script: properly iterate over known versions
Daniel Martí [Wed, 2 Dec 2015 18:16:13 +0000 (19:16 +0100)]
gradle script: properly iterate over known versions

8 years agoAdd documentation to new App class
Daniel Martí [Sat, 28 Nov 2015 16:19:59 +0000 (17:19 +0100)]
Add documentation to new App class

8 years agoRework app into a class
Daniel Martí [Sat, 28 Nov 2015 12:09:47 +0000 (13:09 +0100)]
Rework app into a class

This simplifies usage, goes from

app['Foo']
to
app.Foo

Also makes static analyzers able to detect invalid attributes as the set
is now limited in the class definition.

As a bonus, setting of the default field values is now done in the
constructor, not separately and manually.

8 years agoHandle duplicate apps in a much cleaner way
Daniel Martí [Sat, 28 Nov 2015 11:16:23 +0000 (12:16 +0100)]
Handle duplicate apps in a much cleaner way

Don't log and exit in an inner metadata function. Handle it at a higher
level and do a proper exception. This also avoids unnecessary passing of
apps all around.

8 years agolint: more versatile /HEAD warning
Daniel Martí [Sat, 28 Nov 2015 10:32:46 +0000 (11:32 +0100)]
lint: more versatile /HEAD warning

Now catches many more github/gitlab/bitbucket links

8 years agolint: catch links at the beginning too
Daniel Martí [Sat, 28 Nov 2015 10:33:01 +0000 (11:33 +0100)]
lint: catch links at the beginning too

8 years agolint: also catch gitlab master links
Daniel Martí [Sat, 28 Nov 2015 08:52:55 +0000 (09:52 +0100)]
lint: also catch gitlab master links

8 years agoupdate: remove icons when removing disabled builds
Daniel Martí [Thu, 26 Nov 2015 23:23:59 +0000 (00:23 +0100)]
update: remove icons when removing disabled builds

They were just left there forever.

8 years agoupdate: move apk icons to and from archive too
Daniel Martí [Thu, 26 Nov 2015 23:13:30 +0000 (00:13 +0100)]
update: move apk icons to and from archive too

They all were stuck in repo/ for this reason. This resulted in apps that
were only in the archive to seem like they didn't have icons, when in
fact they did but were in the wrong dir.

8 years agoupdate: lower apps without apks logs to debug
Daniel Martí [Thu, 26 Nov 2015 22:47:22 +0000 (23:47 +0100)]
update: lower apps without apks logs to debug

If you run 'fdroid update', 6k+ warning messages are output. This is
definitely wrong. They can still be shown if one enables -v.

8 years agoDon't use paramiko with DEBUG
Daniel Martí [Sat, 21 Nov 2015 01:24:28 +0000 (17:24 -0800)]
Don't use paramiko with DEBUG

It outputs way, way too much info. Thousands of lines only when copying
the files over, which is not useful at all.

8 years agoFix ndk always being reinstalled
Daniel Martí [Sat, 21 Nov 2015 01:24:19 +0000 (17:24 -0800)]
Fix ndk always being reinstalled

8 years agoAdd gradle 2.9 to the BS
Daniel Martí [Fri, 20 Nov 2015 20:24:07 +0000 (12:24 -0800)]
Add gradle 2.9 to the BS

8 years agoInstall build-tools from the cache too
Daniel Martí [Fri, 20 Nov 2015 20:14:08 +0000 (12:14 -0800)]
Install build-tools from the cache too

8 years agoDownload platforms via makebuildserver
Daniel Martí [Fri, 20 Nov 2015 14:43:47 +0000 (06:43 -0800)]
Download platforms via makebuildserver

8 years agoAdd qt5 to the buildserver
Daniel Martí [Fri, 20 Nov 2015 13:52:17 +0000 (05:52 -0800)]
Add qt5 to the buildserver

8 years agofdroidbuild-general: split packages in lines
Daniel Martí [Fri, 20 Nov 2015 13:51:33 +0000 (05:51 -0800)]
fdroidbuild-general: split packages in lines

This improves readability, but more importantly makes changes in git a
lot easier to track.

8 years agoimport: don't crash due to missing id
Daniel Martí [Wed, 18 Nov 2015 23:33:30 +0000 (15:33 -0800)]
import: don't crash due to missing id

Fixes #129

8 years agoDon't crash if AM.xml has no application element
Daniel Martí [Mon, 16 Nov 2015 15:21:19 +0000 (07:21 -0800)]
Don't crash if AM.xml has no application element

8 years agoDon't crash if no auto name is found
Daniel Martí [Sat, 14 Nov 2015 21:05:28 +0000 (22:05 +0100)]
Don't crash if no auto name is found

8 years agobuild: don't treat FDroidExceptions as unknown
Daniel Martí [Sat, 14 Nov 2015 12:05:37 +0000 (13:05 +0100)]
build: don't treat FDroidExceptions as unknown

8 years agocommon: error if any glob paths are unused
Daniel Martí [Sat, 14 Nov 2015 12:05:16 +0000 (13:05 +0100)]
common: error if any glob paths are unused

Like rm=foo and foo doesn't exist.

8 years agocheckupdates: find new subdirs for autonames too
Daniel Martí [Sat, 14 Nov 2015 09:24:43 +0000 (10:24 +0100)]
checkupdates: find new subdirs for autonames too

The same method used for Tags and RepoManifest.

8 years agoscanner: don't warn about ignored files
Daniel Martí [Thu, 12 Nov 2015 19:02:40 +0000 (20:02 +0100)]
scanner: don't warn about ignored files

8 years agoBump to 0.5.0 0.5.0
Daniel Martí [Thu, 12 Nov 2015 18:09:50 +0000 (19:09 +0100)]
Bump to 0.5.0

8 years agoinstall: filter out log messages better
Daniel Martí [Wed, 11 Nov 2015 12:09:29 +0000 (13:09 +0100)]
install: filter out log messages better

8 years agoscanner: Ignore certain binary executable files
Daniel Martí [Tue, 10 Nov 2015 20:59:54 +0000 (21:59 +0100)]
scanner: Ignore certain binary executable files

These were warnings, so the behaviour doesn't really change.

8 years agoscanner: ignore .DS_Store files
Daniel Martí [Tue, 10 Nov 2015 20:49:46 +0000 (21:49 +0100)]
scanner: ignore .DS_Store files

They are binary and sometimes executable, so they trigger false
positives.

8 years agoFix buildserver debian stable java paths
Daniel Martí [Sat, 7 Nov 2015 17:23:30 +0000 (18:23 +0100)]
Fix buildserver debian stable java paths

8 years agoRoot required to set default java
Ciaran Gultnieks [Sat, 7 Nov 2015 10:40:51 +0000 (10:40 +0000)]
Root required to set default java

8 years agoFix 'set default java'
Ciaran Gultnieks [Sat, 7 Nov 2015 09:27:02 +0000 (09:27 +0000)]
Fix 'set default java'

8 years agoBump build-tools to 23.0.2
Daniel Martí [Thu, 5 Nov 2015 10:55:19 +0000 (11:55 +0100)]
Bump build-tools to 23.0.2

8 years agoIf we're using a jessie buildserver, we need backports (for java 8)
Ciaran Gultnieks [Thu, 5 Nov 2015 10:51:54 +0000 (10:51 +0000)]
If we're using a jessie buildserver, we need backports (for java 8)

8 years agoInstall Java 1.8 alongside 1.7 for retrolambda
Daniel Martí [Fri, 4 Sep 2015 04:44:59 +0000 (21:44 -0700)]
Install Java 1.8 alongside 1.7 for retrolambda

Fixes #103.

8 years agoFix example config default
Daniel Martí [Tue, 3 Nov 2015 09:53:03 +0000 (10:53 +0100)]
Fix example config default

8 years agorun-tests: Don't set -x until option parsing is done
Daniel Martí [Sun, 1 Nov 2015 12:52:16 +0000 (13:52 +0100)]
run-tests: Don't set -x until option parsing is done

8 years agorun-tests: Don't show echo_header commands
Daniel Martí [Sun, 1 Nov 2015 12:51:25 +0000 (13:51 +0100)]
run-tests: Don't show echo_header commands

8 years agotests: allow running ./tests/run-tests
Daniel Martí [Sun, 1 Nov 2015 12:48:25 +0000 (13:48 +0100)]
tests: allow running ./tests/run-tests

8 years agocheckupdates: check packages in AM.xml files too
Daniel Martí [Sun, 1 Nov 2015 11:35:36 +0000 (12:35 +0100)]
checkupdates: check packages in AM.xml files too

8 years agoscanner: allow apache.org maven repo
Daniel Martí [Sat, 31 Oct 2015 08:59:38 +0000 (09:59 +0100)]
scanner: allow apache.org maven repo

Since it has the same free software and source code publishing
requirements that oss.sonatype and maven.org repos have.

8 years agocheckupdates: work around multiple package ids
Daniel Martí [Fri, 30 Oct 2015 18:03:53 +0000 (19:03 +0100)]
checkupdates: work around multiple package ids

If there are multiple package ids in a build.gradle file and the first
one we don't want, checkupdates would get stuck. Make it ignore any
package id that we don't want so that it can get past that.

8 years agocheckupdates: better "no tags" messages
Daniel Martí [Tue, 27 Oct 2015 12:42:02 +0000 (13:42 +0100)]
checkupdates: better "no tags" messages

8 years agocheckupdates: no need to sort tags if len()<=5
Daniel Martí [Tue, 27 Oct 2015 12:41:09 +0000 (13:41 +0100)]
checkupdates: no need to sort tags if len()<=5

8 years agoAlso fix local.prop files before subdir
Daniel Martí [Mon, 26 Oct 2015 15:49:11 +0000 (16:49 +0100)]
Also fix local.prop files before subdir

If subdir=foo/bar and there is a foo/local.properties file, it would not
get treated.

8 years agocheckupdates: don't blindly accept subdir
Daniel Martí [Mon, 26 Oct 2015 15:29:26 +0000 (16:29 +0100)]
checkupdates: don't blindly accept subdir

This is unnecessary because dirs_with_manifest will pick it up anyway.
But the problem manifested because we weren't checking the package id
here.

8 years agocheckupdates: compare CVs as ints, not strs
Daniel Martí [Mon, 26 Oct 2015 15:13:35 +0000 (16:13 +0100)]
checkupdates: compare CVs as ints, not strs

8 years agoAdd an extra strip() to work around tostring issue
Daniel Martí [Sun, 25 Oct 2015 23:28:29 +0000 (00:28 +0100)]
Add an extra strip() to work around tostring issue

In cases like this xml code:

<string name="app_name">"OpenKeychain"</string>
<!-- title -->
<string name="title_encrypt_text">"Encrypt"</string>

tostring() returns trailing whitespaces (including newlines). Which
aren't removed until the very end, after we try to remove enclosing
quotes. So strip right after tostring() too, since we never really care
about whitespaces anyway.

8 years agocheckupdates: never auto-update to older versions
Daniel Martí [Sun, 25 Oct 2015 18:14:23 +0000 (19:14 +0100)]
checkupdates: never auto-update to older versions

8 years agocommon: Compile more regexes only once
Daniel Martí [Sun, 25 Oct 2015 18:10:49 +0000 (19:10 +0100)]
common: Compile more regexes only once

8 years agoDon't double check package name
Daniel Martí [Sun, 25 Oct 2015 18:10:23 +0000 (19:10 +0100)]
Don't double check package name

8 years agocheckupdates: don't ignore root directory
Daniel Martí [Sun, 25 Oct 2015 18:09:55 +0000 (19:09 +0100)]
checkupdates: don't ignore root directory

8 years agocheckupdates: Make RepoManifest change subdir too
Daniel Martí [Sun, 25 Oct 2015 11:09:01 +0000 (12:09 +0100)]
checkupdates: Make RepoManifest change subdir too

8 years agocheckupdates: let Tags detect subdir changes
Daniel Martí [Sun, 25 Oct 2015 11:00:02 +0000 (12:00 +0100)]
checkupdates: let Tags detect subdir changes

Up until now, this was done only if no overall version could be found. But in
tags, we would get stuck with an old version from an old tag and not see
subdir changes in new tags.

8 years agoBe consistent about root_dir/build_dir naming
Daniel Martí [Sun, 25 Oct 2015 10:41:46 +0000 (11:41 +0100)]
Be consistent about root_dir/build_dir naming

8 years agoFix a small indentation issue
Daniel Martí [Sun, 25 Oct 2015 10:32:18 +0000 (11:32 +0100)]
Fix a small indentation issue

8 years agoFix gradle-2.8 checksum
Daniel Martí [Sun, 25 Oct 2015 09:48:17 +0000 (10:48 +0100)]
Fix gradle-2.8 checksum

I once again did the -all.zip hash, not the -bin.zip one.

8 years agolint: fix unlinkified links regex
Daniel Martí [Sat, 24 Oct 2015 22:07:33 +0000 (00:07 +0200)]
lint: fix unlinkified links regex

It was incorrectly matching:

foo [http://bar

and not matching:

http://foo (start of line)

8 years agoupdate: fix for 0fa6aac2881
Daniel Martí [Sat, 24 Oct 2015 18:13:49 +0000 (20:13 +0200)]
update: fix for 0fa6aac2881

For some reason, my up to date pyflakes didn't catch this.

8 years agoAlso replace git@gitlab.com submodule urls
Daniel Martí [Sat, 24 Oct 2015 17:42:40 +0000 (19:42 +0200)]
Also replace git@gitlab.com submodule urls

8 years agoAdd gradle 2.8
Daniel Martí [Sat, 24 Oct 2015 17:05:21 +0000 (19:05 +0200)]
Add gradle 2.8

8 years agoBump sdk to 24.4.1
Daniel Martí [Sat, 24 Oct 2015 17:02:14 +0000 (19:02 +0200)]
Bump sdk to 24.4.1

8 years agotests: we now replace "buildToolsVersion var" too
Daniel Martí [Sat, 24 Oct 2015 16:47:43 +0000 (18:47 +0200)]
tests: we now replace "buildToolsVersion var" too

See d706cfa7d8a

8 years agoTypo fix for 91daacb8896e796
Daniel Martí [Sat, 24 Oct 2015 16:37:57 +0000 (18:37 +0200)]
Typo fix for 91daacb8896e796