Commit graph

1215 commits

Author SHA1 Message Date
Jochen Sprickerhof
557fe87d44 Run shell scripts with -e (Closes: #1035)
Make sudo, init prebuild, build and Prepare fields lists and only
concatenate them with '; ' before execution. This allows arbitrary
commands inside the fileds (even && and ';') as we don't need to split
the commands again for rewritemeta.
2022-11-03 12:25:31 +00:00
linsui
5a28f20301 make versionCode/build.timeout an integer
Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
2022-10-14 08:42:26 +00:00
Michael Pöhn
06b8150922 scanner: fix loading config.yml
With my last merge request I accidentally intoduced a bug where
scanner.py stopped loading 'config.yml' because the helper functions
from common.py get called in the wrong places. This change fixes this
issue.
2022-10-13 10:53:25 +02:00
Jochen Sprickerhof
8244ffa0ff Allow pow in VercodeOperation (Closes: #1021) 2022-10-12 08:51:17 +00:00
Hans-Christoph Steiner
ade0122d47
fix ipfs_cid detection logic
@obfusk caught this.

I messed up in 02a91cba66 from !1202
2022-10-11 23:31:08 +02:00
Hans-Christoph Steiner
02a91cba66
update: only show missing ipfs_cid warning once. 2022-10-11 16:36:08 +02:00
linsui
e90f03a494 remove MVN3 2022-10-11 09:58:35 +00:00
Hans-Christoph Steiner
9ccf583061 Apply 3 suggestion(s) to 2 file(s) 2022-10-06 13:55:38 +00:00
Michael Pöhn
7933623e93 fix pydocstyle lint errors 2022-10-06 12:09:07 +02:00
Michael Pöhn
a8bcaa3d70 scanner: implement caching rules for suss 2022-10-06 12:09:06 +02:00
Michael Pöhn
4a38908bd7 make cachedir subdirectories pick their place correctly based on parent folder 2022-10-06 12:09:06 +02:00
Michael Pöhn
c10633eac5 convert fdroid scanner --exodus to SignatureDataController 2022-10-06 12:08:26 +02:00
Michael Pöhn
f56b1f3012 basic downloading for scan_binary signatures 2022-10-06 12:08:23 +02:00
Jochen Sprickerhof
96f8284a50
Sync all status files 2022-09-29 19:41:12 +02:00
Jochen Sprickerhof
cf228d35a3 Work around old apksigner on f-droid.org publish server 2022-09-20 13:58:41 +00:00
Jochen Sprickerhof
0f48294a6e
Use old python-git exception API for getref
The is_valid_object method is not even in Debian bullseye.
2022-09-15 07:44:02 +02:00
pmmayero
0ad45a94a8 Addition of IPFS CIDv1 to Index
IPFS CIDv1 is only generated for APKs and "repo files"
2022-09-14 09:28:02 +00:00
Jochen Sprickerhof
7b31535c25 git.getref: use python-git
Fixes a "warning: refname is ambiguous." problem:

$ git clone https://gitlab.com/joshua.tee/wx.git
$ cd wx
$ git rev-parse 55699
warning: refname '55699' is ambiguous.

8760bb0ce7 (note_1090707468)
2022-09-14 09:12:02 +00:00
Jochen Sprickerhof
c89a9f0e8b
Add timeout argument to requests.(get,post) 2022-09-05 17:50:10 +02:00
Jochen Sprickerhof
cf0100cf11
Merge comparisons with 'in' 2022-09-05 17:14:51 +02:00
Jochen Sprickerhof
153f136e79 Also write status.json when command finished 2022-08-25 08:53:47 +00:00
FestplattenSchnitzel
7c89e923f6 Move methods specific to import to it's module 2022-08-24 22:21:37 +02:00
linsui
43ea0c35d8 Sort the xml file pathes for consistent result 2022-08-24 13:51:31 +00:00
fdroid-bot
53c6dffbce Android NDK None (None) 2022-08-24 11:07:33 +00:00
linsui
516a0c2ce8 Fix tag match with GitPython 2022-08-24 10:50:09 +00:00
linsui
cf7eb913d9 Show all unused scanner path at once 2022-08-19 18:01:31 +08:00
Jochen Sprickerhof
eb79522a36 Fix flake8 E275 missing whitespace after keyword 2022-07-31 09:48:14 +02:00
Jochen Sprickerhof
7822db2881 Catch DefusedXmlException (as ValueError)
defusedxml can't handle the nbsp in the strings.xml (etree can).
2022-07-25 09:30:25 +02:00
Jochen Sprickerhof
7e1d974351 Reduce try/except block 2022-07-25 08:51:47 +02:00
linsui
534c170615 NDK r25 2022-07-14 06:35:55 +00:00
Hans-Christoph Steiner
3182b77d18
use apksigner to sign index-v2 with modern, supported algorithms
The current signing method uses apksigner to sign the JAR so that it
will automatically select algorithms that are compatible with Android
SDK 23, which added the most recent algorithms:
https://developer.android.com/reference/java/security/Signature

This signing method uses then inherits the default signing algothim
settings, since Java and Android both maintain those.  That helps
avoid a repeat of being stuck on an old signing algorithm.  That means
specifically that this call to apksigner does not specify any of the
algorithms.

The old indexes must be signed by SHA1withRSA otherwise they will no
longer be compatible with old Androids.

apksigner 30.0.0+ is available in Debian/bullseye, Debian/buster-backports,
Ubuntu 21.10, and Ubuntu 20.04 from the fdroid PPA.  Here's a quick way to
test:

for f in `ls -1 /opt/android-sdk/build-tools/*/apksigner | sort ` /usr/bin/apksigner; do printf "$f : "; $f sign --v4-signing-enabled false; done

closes #1005
2022-06-07 16:56:23 +02:00
Jochen Sprickerhof
4ce79a7eaa explicitly re-raising exceptions
To fix pylint.
2022-06-01 22:52:22 +02:00
Hans-Christoph Steiner
c6dcc82ca4 allow common.get_apk_id() to be used in the API
If a project uses fdroidserver as a library, then just calls
common.get_apk_id(), it will now work.  Before, that project would have had
to include something like `common.config = {}` to avoid a stacktrace.
2022-05-26 22:18:21 +02:00
fdroid-bot
762c945c42 Android NDK None (None) 2022-05-26 15:10:14 +00:00
Danilo Bargen
a4d0698628 Fix parsing of smartcardoptions config
With the previous code, a trailing newline would result in an empty
space being part of the list. When this is passed to keytool, it fails
with "Illegal option: ".

Instead of doing overly complicated regex based string substitution
followed by parametrized splitting, we can simply use `.split()`
without any parameters, and Python will automatically strip any
whitespace.
2022-05-26 16:47:33 +02:00
Hans-Christoph Steiner
5448fa2a2d
update: hide confusing androguard warning that is irrelevant here
This is related to androguard features that fdroidserver does not use:
WARNING: Requested API level 31 is larger than maximum we have, returning API level 28 instead.
2022-05-23 23:17:42 +02:00
Jochen Sprickerhof
d70e5c2cd9 Index v2 2022-05-23 10:39:17 +00:00
Jochen Sprickerhof
635f12e438 Use latest build-tools version 2022-05-03 14:59:52 +00:00
Hans-Christoph Steiner
189ff9cd7b
build: improve error message when NDK SHA-256 does not match 2022-04-26 10:25:34 +02:00
Sergey Bobrenok
46f4205fff Avoid zero-length prefixes in PATH
A zero-length prefix in PATH is a legacy feature that indicates the
current working directory.

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03

Found in ru.nsu.bobrofon.easysshfs, see:
https://gitlab.com/fdroid/fdroiddata/-/merge_requests/10953#note_921802636
2022-04-24 16:33:33 +03:00
Jochen Sprickerhof
5f3eb601df Add check for repo/archive_url 2022-04-21 11:16:14 +02:00
Jochen Sprickerhof
c19f46b706 [checkupdates] move gradle var check to parser
3638acddc added a check if the version name string is actually a
unresolved gradle variable. This moves the check into the
common.parse_androidmanifests() as it is the only where the it could
happen. This also resolves the case where checkupdates returns
"Unknown".

Closes: #751
2022-04-14 17:47:44 +02:00
Jochen Sprickerhof
b6ea0d6acd Consider namespace for applicationId
> If the application ID is not explicitly defined using the
> applicationId property, it automatically takes on the same value as
> the namespace.

https://developer.android.com/studio/build/configure-app-module

Found in com.amanoteam.unalix, see:

https://gitlab.com/fdroid/fdroiddata/-/merge_requests/10895#note_907080341
2022-04-10 09:27:17 +02:00
Jochen Sprickerhof
a872d8688d Fix pylint warnings 2022-03-29 15:53:45 +02:00
Licaon_Kter
287fe1fb16 Add NDK24 2022-03-23 12:30:28 +00:00
Jochen Sprickerhof
17c7c3948c Handle XML parser errors
Found in checkupdates of com.dar.nclientv2.
2022-03-11 09:03:03 +01:00
Jochen Sprickerhof
2933880590 Raise exception if the given NDK was not found
Seen in

https://monitor.f-droid.org/builds/log/io.nekohasekai.sagernet/635#site-footer
2021-12-01 07:45:03 +01:00
jugendhacker
b236773455 Fix subproject regex to allow subdir without colon 2021-11-30 08:28:17 +00:00
linsui
9b0ef544bb add ndk r23b 2021-11-29 11:28:43 +00:00
Jochen Sprickerhof
a5deaa80d8 Parse single digit sizes
Closes: #946
2021-11-27 21:44:47 +01:00