Michael Pöhn
08acb55897
keep yaml metadata when rewrite failed
2019-08-27 15:38:40 +02:00
Michael Pöhn
dcf3837bcb
parse yaml: ignore (and warn) deprecated field: Provides
2019-07-15 15:45:02 +02:00
Michael Pöhn
191363ad55
exclude Provides metadata from yml
2019-07-11 03:35:23 +02:00
Michael Pöhn
66105de833
improve litecoin validation + tests
2019-05-28 11:04:43 +02:00
Michael Pöhn
06cec2041d
improve bitcoin validation regex + testcases
2019-05-07 22:43:05 +02:00
Licaon_Kter
0ea03ddfaa
metadata.py - typo
2019-04-08 16:30:32 +00:00
Michael Pöhn
67731470cc
Revert "Merge branch 'write-yaml-overhaul' into 'master'"
...
This reverts merge request !630
2019-04-01 10:24:00 +00:00
Michael Pöhn
2683b37044
yml metadata write: do not use local functions
2019-03-19 01:01:18 +01:00
Michael Pöhn
63afc0acb5
use pyyaml for writing metadata instead of ruamel
2019-03-18 22:45:35 +01:00
Hans-Christoph Steiner
217e6a7c30
metadata: fix pyflakes "use ==/!= to compare str, bytes, and int literals"
...
$ ./hooks/pre-commit || export EXITVALUE=1
WARNING: ruby is not installed, using dummy placeholder!
fdroidserver/metadata.py:1180: use ==/!= to compare str, bytes, and int literals
fdroidserver/metadata.py:1184: use ==/!= to compare str, bytes, and int literals
fdroidserver/metadata.py:1186: use ==/!= to compare str, bytes, and int literals
fdroidserver/metadata.py:1189: use ==/!= to compare str, bytes, and int literals
ERROR: pyflakes tests failed!
2019-01-27 23:00:00 +01:00
Michael Pöhn
31ca2092a1
yaml parsing: script build flags can now be lists
2018-11-29 21:53:37 +01:00
Michael Pöhn
c15a7508e7
write yaml script metadata as lists
2018-11-29 21:53:37 +01:00
Michael Pöhn
afdc0be954
yaml build flag prebuild: keep writing string rathern than list of strings when theres just 1 entry
2018-11-29 21:53:37 +01:00
Michael Pöhn
942de28fa5
yaml metadata: split prebuild build field to list
2018-11-29 21:53:37 +01:00
Hans-Christoph Steiner
57556aceee
remove redundant open() arg: encoding='utf8'
...
By default, open() returns a str:
https://docs.python.org/3/library/functions.html#open
By default, str is UTF-8:
https://docs.python.org/3/library/stdtypes.html#str
This used to matter on Python 2.x, but this code is 3.x only now.
2018-10-19 15:01:34 +02:00
Michael Pöhn
aea2589c67
metadata: remove redundant build flags list creation
...
picked out of fdroid/fdroidserver!559
2018-10-10 16:02:34 +02:00
Hans-Christoph Steiner
58b14279af
rewritemeta: rewrite AntiFeature str entries like Categories
2018-10-09 23:49:27 +02:00
Hans-Christoph Steiner
6e6afeec65
unset Categories should be empty by default, not ['None']
...
This is an ancient, bizarre vestige. This makes the TYPE_LIST fields
behave the same, e.g. AntiFeatures and Categories.
2018-10-09 23:39:09 +02:00
Hans-Christoph Steiner
2113e29082
throw error on ancient, obsolete BuildVersion/UseBuilt metadata fields
2018-10-09 22:23:42 +02:00
Hans-Christoph Steiner
5d161cc9fd
validate appid when reading metadata files
...
The metadata file must be named after the Application ID of the app it is
describing, and Android Application IDs must be valid Java Package Names.
2018-09-03 22:56:08 +02:00
Michael Pöhn
ee4945cb84
remove unused YamlLoader optimization
2018-08-29 11:25:01 +02:00
Michael Pöhn
e7a34807f7
use yaml.safe_load for parsing metadata
2018-08-29 00:33:58 +02:00
Michael Pöhn
6a06944945
better exception and waring message when yaml metadata checks fail; build flags check optional
2018-08-14 12:31:12 +02:00
Michael Pöhn
0d005ab83a
make parse_yaml_metadata ignore empty input
2018-08-14 12:31:12 +02:00
Michael Pöhn
e83221eb03
improve yaml build flag check cost; added unit test for unknown app fields, builds flags checks when parsing yaml
2018-08-14 12:31:12 +02:00
Michael Pöhn
25b4a47951
check for unknown app fields and build flags when parsing yml
2018-08-14 12:31:12 +02:00
Michael Pöhn
1e7d9b854d
never interpret "disable" as bool in yaml metadata
2018-08-02 17:31:58 +02:00
Hans-Christoph Steiner
b03c4a7353
NoSourceSince Anti-Feature should only be added to index
...
Before, it was being added to the metadata, so that rewritemeta would
output it.
fdroid/fdroidserver!529
#508
2018-07-10 23:32:07 +02:00
Izzy
5d8e1bde4f
new AntiFeature: SourceGone (automatically set at NoSourceSince). closes #508
2018-07-10 12:36:49 +00:00
Hans-Christoph Steiner
ff90c0246e
fix PEP8 W605 invalid escape sequence
...
Python 3.7 will get a lot stricter with escape sequences. They must be
valid.
* https://lintlyci.github.io/Flake8Rules/rules/W605.html
* https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
2018-05-29 13:51:47 +02:00
relan
4d56c6c262
metadata: write values of TYPE_INT fields
...
Otherwise we end up with empty values after "fdroid rewritemeta".
2018-02-11 09:51:53 +03:00
Hans-Christoph Steiner
05eef5a454
metadata: add new Translation app field for URL for contributions
...
This is a field requested from a bunch of translators so they can easily
find where to translate apps:
https://forum.f-droid.org/t/translation-field-for-app-entries/1403/5
2018-02-05 15:45:12 +01:00
relan
86f34ee70a
build: make per-build hard time limit customizable
...
Add "timeout=n" metadata field that overrides build timeout (in seconds).
The default is 7200, i.e. 2 hours.
2018-01-30 11:14:50 +03:00
Hans-Christoph Steiner
099c98bc60
metadata: fix crash when there are duplicate metadata files
...
The string had the variable 'appid' while the format() call had only the
variable 'path'. This also standardizes on 'appid' like the rest of the
code.
2018-01-26 10:18:42 +01:00
Hans-Christoph Steiner
513c95894c
build: remove unused, unmaintained Kivy build method
...
This code has never been used and contains some insecure uses of shell=True
Building Kivy apps should be done with the buildozer=yes method. The
buildozer method should probably be moved to a provisioner once that is in
place.
2018-01-23 23:16:05 +01:00
Marcus Hoffmann
e775d330c2
build: fix --no-refresh
...
This was broken by the in-source-tree .fdroid.yml file support.
Also support this for building on the buildserver.
2017-12-26 00:20:17 +01:00
Andrea Scarpino
19a83b6219
Add Liberapay support
2017-12-12 11:53:31 +01:00
Hans-Christoph Steiner
4af8f196e3
metadata: error if .fdroid.txt exists, it is unsupported
...
Using .txt format has bugs when used embedded in an app's git repo, so
tell the user to use YAML or JSON.
#364
2017-12-11 22:11:16 +01:00
Marcus Hoffmann
0f18005104
metadata: make help for metadata -W option clearer
...
specify possible choices and provide clearer help text
2017-12-07 20:28:27 +01:00
Hans-Christoph Steiner
30b2f5a48a
build: sort fdroid build --all by most recently changed first
2017-11-30 17:32:53 +01:00
Hans-Christoph Steiner
230d8971ba
metadata: make all strings translatable
2017-10-25 23:01:25 +02:00
Hans-Christoph Steiner
ffc91e301a
make _ always be the gettext function, nothing else
...
This avoids hard bugs where the _() function gets overidden by a str or
something else.
2017-10-25 23:01:25 +02:00
Hans-Christoph Steiner
255932453c
ensure _ is used only for gettext strings
...
_ is often used for variables that are ignored, this makes that a bit more
explicit
!338
2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
278d67d960
implement gettext localization
...
This allows all the text to be localized via Weblate. This is a quick
overview of all the strings, but there are certainly some that were left
out.
closes #342
2017-09-15 11:39:00 +02:00
Marcus Hoffmann
a9a19527c7
metadata: also read .fdroid.txt metadata
...
This is documented as working here:
https://f-droid.org/docs/Building_Applications/
(second to last paragraph)
fixes #364
2017-08-22 00:03:43 +02:00
Hans-Christoph Steiner
c67f8e349c
metadata: handle empty YAML files without crashing
...
!311
2017-07-26 18:21:28 -07:00
Izzy
b787ec9e34
Updating syntax check for Flattr (see #284 )
2017-07-20 20:26:25 +02:00
Hans-Christoph Steiner
dfb07808d3
support configing buildserver VM per-build with sudo=
...
This adds the 'sudo' build field, which is just a script that is run as
root. For more info, see the issue that this closes:
refs #318
closes #317
2017-07-06 17:29:23 +02:00
Hans-Christoph Steiner
abe422fd7a
handle App instance with no Builds when writing YAML
2017-07-06 16:00:44 +02:00
Hans-Christoph Steiner
df99c85ca6
support manually adding per-build antiFeatures in metadata
...
For cases like the OpenVPN vuln that was recently announced, it is useful
for fdroiddata maintainers to be able to mark builds that have known
vulnerabilities.
2017-07-06 12:25:48 +02:00