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

8442 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
660520e3e1
gitlab-ci: switch ubuntu_lts_ppa job to keyserver.ubuntu.com
fixes:

Executing: /tmp/apt-key-gpghome.ZwePp5ymqm/gpg.1.sh --keyserver hkp://pool.sks-keyservers.net --recv-key 9AAC253193B65D4DF1D0A13EEC4632C79C5E0151
gpg: keyserver receive failed: No name

https://gitlab.com/fdroid/fdroidserver/-/jobs/1374517971
2021-06-24 21:34:29 +02:00
Jochen Sprickerhof
ecadad63f1 Merge branch 'get_release_filename' into 'master'
fix invalid extension of output apk

Closes fdroiddata#2410

See merge request fdroid/fdroidserver!969
2021-06-24 13:42:28 +00:00
linsui
763a2ee80d fix invalid extension of output apk 2021-06-24 13:42:10 +00:00
Hans-Christoph Steiner
ab0fe06343 Merge branch 'format' into 'master'
Make lint work with black

See merge request fdroid/fdroidserver!971
2021-06-24 12:29:02 +00:00
linsui
33137a8516 ignore E203 for black 2021-06-24 12:15:01 +00:00
linsui
e0461ca1bf Make lint max-line-length to 88 for black 2021-06-24 12:15:01 +00:00
linsui
736f244634 fix vscode setting 2021-06-24 12:15:01 +00:00
Jochen Sprickerhof
958fd17232 Merge branch 'version_unknown' into 'master'
[checkupdates] Use tag if version is 'Unknown'

See merge request fdroid/fdroidserver!970
2021-06-20 08:41:58 +00:00
Jochen Sprickerhof
b49c3741bd [checkupdates] Use tag if version is 'Unknown'
Regression from cd405cc9.
Parse_androidmanifests() can return 'Unknown' or 'Ignore' if it did not
find a version name. The check_tags() always returned the tag and
checkupdates_app() replaced the version by the tag in the 'Unknown'
case. Since cd405cc9 the tag is the hash and so the version would become
the hash as well. This patch moves the 'Unknown' check directly after
the Parse_androidmanifests().
2021-06-20 08:49:49 +02:00
Jochen Sprickerhof
63444f8654 Merge branch 'allowlist-blocklist' into 'master'
switch to allow/block list terminology throughout code base

See merge request fdroid/fdroidserver!964
2021-06-18 18:27:45 +00:00
Hans-Christoph Steiner
78d37bb13b switch to allow/block list terminology throughout code base
allowlist and blocklist are much clearer terms with no cultural baggage.
This changes all "whitelist" references to "allowlist", and all "blacklist"
references to "blocklist".
2021-06-18 18:26:50 +00:00
Hans-Christoph Steiner
8667073188 Merge branch 'port-to-windows' into 'master'
some fixes to help port to Windows

See merge request fdroid/fdroidserver!678
2021-06-18 09:26:16 +00:00
Hans-Christoph Steiner
fc989d94b3
gitlab-ci: add Windows job 2021-06-18 11:12:27 +02:00
Hans-Christoph Steiner
1300771bad
'import resource' only where its used, Windows does not have it 2021-06-18 11:12:25 +02:00
Hans-Christoph Steiner
36849b2fba
skip tests on Windows that need bash 2021-06-18 11:12:22 +02:00
Hans-Christoph Steiner
1f5534d060
require config.yml use UTF-8 as encoding
config.yml requires ASCII or UTF-8 encoding because this code does not
auto-detect the file's encoding.  That is left up to the YAML library.
YAML allows ASCII, UTF-8, UTF-16, and UTF-32 encodings.  Since it is a
good idea to manage config.yml (WITHOUT PASSWORDS!) in git, it makes
sense to use a globally standard encoding.
2021-06-18 11:12:20 +02:00
Hans-Christoph Steiner
48c4354629
always open Android source files as UTF-8
Android Studio recommends "you use UTF-8 encoding whenever possible",
so this code assumes the files use UTF-8.  UTF-8 is also the default
encoding on GNU/Linux and macOS.
https://sites.google.com/a/android.com/tools/knownissues/encoding

Windows will probably default to UTF16, since that's the native
encoding for files.  So forcing things to use UTF-8 should help
compatibility.
2021-06-18 11:12:18 +02:00
Gerhard Olsson
0c31c4a5ab
win fixes 2021-06-18 10:30:59 +02:00
Hans-Christoph Steiner
1e1f0db347
stats/known_apks.txt must be in UTF-8 format on all platforms 2021-06-18 10:30:57 +02:00
Hans-Christoph Steiner
a6d35a7ee1
metadata: always open metadata files as UTF-8
Windows seems to require this, otherwise this happens:

Traceback (most recent call last):

  File "tests/update.TestCase", line 737, in test_translate_per_build_anti_features

    apps = fdroidserver.metadata.read_metadata(xref=True)

  File "C:\Users\travis\build\fdroidtravis\fdroidserver\fdroidserver\metadata.py", line 813, in read_metadata

    app = parse_metadata(metadatapath, appid in check_vcs, refresh)

  File "C:\Users\travis\build\fdroidtravis\fdroidserver\fdroidserver\metadata.py", line 1023, in parse_metadata

    parse_yaml_metadata(mf, app)

  File "C:\Users\travis\build\fdroidtravis\fdroidserver\fdroidserver\metadata.py", line 1073, in parse_yaml_metadata

    yamldata = yaml.safe_load(mf)

  File "C:\python37\lib\site-packages\yaml\__init__.py", line 162, in safe_load

    return load(stream, SafeLoader)

  File "C:\python37\lib\site-packages\yaml\__init__.py", line 112, in load

    loader = Loader(stream)

  File "C:\python37\lib\site-packages\yaml\loader.py", line 34, in __init__

    Reader.__init__(self, stream)

  File "C:\python37\lib\site-packages\yaml\reader.py", line 85, in __init__

    self.determine_encoding()

  File "C:\python37\lib\site-packages\yaml\reader.py", line 124, in determine_encoding

    self.update_raw()

  File "C:\python37\lib\site-packages\yaml\reader.py", line 178, in update_raw

    data = self.stream.read(size)

  File "C:\python37\lib\encodings\cp1252.py", line 23, in decode

    return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 37: character maps to <undefined>
2021-06-18 10:30:55 +02:00
Hans-Christoph Steiner
c12007c260
publish: use platform-neutral newlines 2021-06-18 10:30:52 +02:00
Hans-Christoph Steiner
4514983e58
fix typo 2021-06-18 10:30:50 +02:00
Hans-Christoph Steiner
1abbc9732e
metadata: add test_build_ndk_path 2021-06-18 10:30:44 +02:00
Hans-Christoph Steiner
1236f89896 Merge branch 'vscode' into 'master'
add vscode settings

Closes #909

See merge request fdroid/fdroidserver!965
2021-06-18 06:51:30 +00:00
linsui
466c8a44d7 add vscode settings 2021-06-18 06:50:50 +00:00
Jochen Sprickerhof
0ea4839fbb Merge branch 'billing' into 'master'
NON_FREE_GRADLE_LINES: add com.android.billingclient

See merge request fdroid/fdroidserver!958
2021-06-17 11:53:18 +00:00
linsui
7c831c11dd NON_FREE_GRADLE_LINES: add com.android.billingclient 2021-06-17 11:53:03 +00:00
Jochen Sprickerhof
f44bd8d928 Merge branch 'test_version_update' into 'master'
[checkupdates] Only update if version code is grater

See merge request fdroid/fdroidserver!963
2021-06-17 11:52:48 +00:00
Jochen Sprickerhof
39c55d799b [checkupdates] Only update if version code is grater
Don't change the current versions in case there is an error in the check_* methods or upstream screwed up.
2021-06-17 11:52:37 +00:00
Jochen Sprickerhof
37e3142610 Merge branch 'checkupdates_use_hash' into 'master'
Use hash of tag when adding new version

See merge request fdroid/fdroidserver!956
2021-06-17 11:51:28 +00:00
Jochen Sprickerhof
cd405cc93e Use hash of tag when adding new version
Also extend getref with a refname parameter and implement it for
vcs_git.
2021-06-17 11:51:18 +00:00
Jochen Sprickerhof
35cf7f289e Merge branch 'fix_gotorevisionx' into 'master'
Ignore git submodule failure in gotorevisionx

See merge request fdroid/fdroidserver!955
2021-06-16 09:02:02 +00:00
Jochen Sprickerhof
3809b4d424 Ignore git submodule failure in gotorevisionx
gotorevisionx tries to clean up the git repo before checking out a new
revision. In b848b99ba this was changed to reset and clean any submodule
as well. In case upstream has a broken submodule configuration this
could fail and we can't checkout the new revision. As we are doing a
reset and clean after checking out the new revision anyhow, this change
ignores submodule errors before the checkout and only makes sure that
the main repo is reset and clean.

This broke checkupdates for apps where old versions had broken
submodules. It checkout out the old version and got stuck, not able to
checkout any other version.
2021-06-15 20:39:18 +02:00
Jochen Sprickerhof
02a63a2ec0 Merge branch 'emtpy_checkupdatedata' into 'master'
[checkupdates] UpdateCheckData tag for verocode if no regex

See merge request fdroid/fdroidserver!962
2021-06-15 18:21:53 +00:00
Jochen Sprickerhof
cebdcdd67c [checkupdates] UpdateCheckData tag for verocode if no regex
Use the tag as the version code if no regex was specified. This allows:

UpdateCheckData: '|||'

meaning the tag should be used for version code and name.
2021-06-15 19:27:29 +02:00
Hans-Christoph Steiner
0c484f927e Merge branch 'gradle-release-checksums.py' into 'master'
update to gradle v7.1

See merge request fdroid/fdroidserver!959
2021-06-15 10:45:52 +00:00
fdroid-bot
da820ace2e gradle v7.1 2021-06-15 06:54:38 +00:00
Jochen Sprickerhof
188e163b1a Merge branch 'tag_sort_version' into 'master'
latesttags revert to git log and fix comma handling

See merge request fdroid/fdroidserver!960
2021-06-15 06:53:58 +00:00
Jochen Sprickerhof
4e97b58d8c latesttags revert to git log and fix comma handling
2de34312 tried to fix the comma handling by relying on git tag --sort.
This did not work out so this reverts to the method used before.
2021-06-15 08:39:59 +02:00
Jochen Sprickerhof
09987f1fc7 Merge branch 'git_latesttags' into 'master'
Use git tag in latesttags

See merge request fdroid/fdroidserver!954
2021-06-14 18:56:59 +00:00
Jochen Sprickerhof
2de3431296 Use git tag in latesttags 2021-06-14 18:56:59 +00:00
Hans-Christoph Steiner
89762f4d48 Merge branch 'fix_flavour' into 'master'
Fix matching substring flavour detection

Closes #899 and #912

See merge request fdroid/fdroidserver!957
2021-06-14 12:49:45 +00:00
Jochen Sprickerhof
1e6de7eb34 Support '{' in extra line in parse_androidmanifests
If the flavour group starts in a separate line don't count it as a
second group.

Closes: #899
2021-06-13 07:23:42 +02:00
Jochen Sprickerhof
0fefecde1e Fix matching substring flavour detection
com.github.jameshnsears.quoteunquote defines flavours 'fdroid' and
'fdroidS'. The old code used flavour in line, which matches both and the
wrong one was selected.

Closes: #912
2021-06-13 00:09:02 +02:00
Hans-Christoph Steiner
a21c2c5ff1 Merge branch 'fix_pathlib' into 'master'
[lint] convert path to Path first

See merge request fdroid/fdroidserver!953
2021-06-09 17:08:47 +00:00
Jochen Sprickerhof
46ebdd701a [lint] convert path to Path first
Fixes a lot of undetected extlibs.
Regression of 6bafb036.
2021-06-09 17:49:59 +02:00
Jochen Sprickerhof
14cfa11b68 Merge branch 'tag_UpdateCheckData' into 'master'
[checkupdates] UpdateCheckData use tag as default version

See merge request fdroid/fdroidserver!949
2021-06-09 12:20:15 +00:00
Jochen Sprickerhof
bdec7d8652 [checkupdates] UpdateCheckData use tag by default
Use the tag as version, if no version file was specified:

UpdateCheckData: app/build.gradle|versionCode\s(\d+)||

Extract version from tag, if a regex was specified:

UpdateCheckData: app/build.gradle|versionCode\s(\d+)||Android-([\d.]+)

Use the tag for both if no file was specified:

UpdateCheckData: |\+(\d+)||Android-([\d.]+)
2021-06-09 14:02:02 +02:00
Hans-Christoph Steiner
b7a4883c09 Merge branch 'fix_versioncode_regex' into 'master'
Don't allow '_' in first place of version code

See merge request fdroid/fdroidserver!950
2021-06-09 11:16:32 +00:00
Jochen Sprickerhof
a9a336a12b Don't allow '_' in first place of version code
Fixes a regression of 2cb0ff45. Example:

versionCode project.versionCode_plus

931b0a3087/app/build.gradle (L38)
2021-06-09 11:04:25 +00:00