Commit graph

3677 commits

Author SHA1 Message Date
Hans-Christoph Steiner
4ce3da476d
btlog: run black to format code 2022-05-23 23:17:40 +02:00
Hans-Christoph Steiner
7be0ec3572
btlog: include index-v2.json entry.json and entry.jar 2022-05-23 23:17:37 +02:00
Hans-Christoph Steiner
2448f070e9 fix tests and docstring error 2022-05-23 15:34:30 +02:00
Hans-Christoph Steiner
293975d081
refactor comment into docstring for update_serverwebroot 2022-05-23 14:41:37 +02:00
Hans-Christoph Steiner
053a64718a
deploy: handle index-v2 files on two pass sync methods
When using rsync or s3cmd, the upload is done in multiple passes. This
reduces the chance of interfering with an existing client-server
interaction.

- rsync: In the first pass, upload without the index files and delay
  the deletion as much as possible.  That keeps the repo functional
  while this update is running.  Then second pass uploads the index
  files.

- s3cmd: In the first pass, only new files are uploaded.  In the
  second pass, changed files are uploaded, overwriting what is on the
  server.  On the third/last pass, the indexes are uploaded, and any
  removed files are deleted from the server.  The last pass is the
  only pass to use a full MD5 checksum of all files to detect changes.
2022-05-23 14:41:34 +02:00
Jochen Sprickerhof
b07d23ff5c Don't include disabled apks in the index
This needs a rerun of `fdroid update --clean`.

In case a build is disabled delete_disabled_builds takes care of
deleting it from the repo. But this only works if the apk follows the
normal name pattern. Otherwise it will stay in the folder and be picked
up by process_apks and added to the index.

Closes: #1002
2022-05-23 11:47:53 +00:00
Jochen Sprickerhof
d70e5c2cd9 Index v2 2022-05-23 10:39:17 +00:00
linsui
13534bf02e scanner: add me.pushy 2022-05-21 12:25:11 +00:00
Hans-Christoph Steiner
73c31e6e63
signindex: do not remove index-v1.json after signing
With ~index-v2, the model is changing to offer the plain JSON file for easy
consumption.  Then gpgsign will also provide a detached PGP signature for
systems that would rather verify based on PGP signatures than JAR signatures.

!1080
closes #969
2022-05-17 15:38:06 +02:00
Hans-Christoph Steiner
107593d3ba net: improve parsing filenames from URL
This is more relevant to issuebot than fdroidserver, but it can't hurt here
also.
2022-05-09 20:59:15 +02:00
linsui
c16d170f12 scanner: add kotlinx-coroutines-play-services 2022-05-07 01:49:56 +00:00
linsui
90bc8e1e8f scan gradle.kts 2022-05-07 00:43:55 +08:00
linsui
4f04bd9200 Update scanner.py 2022-05-05 03:39:49 +00:00
Jochen Sprickerhof
50e680be93 Silence dexdump output in build --verbose 2022-05-03 18:30:02 +02:00
Jochen Sprickerhof
c80fdd5ce8 Handle BadZipFile 2022-05-03 14:59:52 +00:00
Jochen Sprickerhof
925cdbe542 Improve recursion warning, thx Hans! 2022-05-03 14:59:52 +00:00
Jochen Sprickerhof
9eaab6050e Fix variable name 2022-05-03 14:59:52 +00:00
Jochen Sprickerhof
91320fa10e Rework code 2022-05-03 14:59:52 +00:00
Jochen Sprickerhof
7ec3905734 Log zip recursion limit 2022-05-03 14:59:52 +00:00
Jochen Sprickerhof
5fc88431f8 Simplify code 2022-05-03 14:59:52 +00:00
Jochen Sprickerhof
d0d56173c9 Support nested apks 2022-05-03 14:59:52 +00:00
Jochen Sprickerhof
635f12e438 Use latest build-tools version 2022-05-03 14:59:52 +00:00
Jochen Sprickerhof
9c8e128064 [scanner] replace apkanalyzer by dexdump 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
Jochen Sprickerhof
d05bcafe14 Test index before signing 2022-04-25 22:26:59 +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
253f2e5fef [scanner] Deep copy json structs (Closes: #985)
The lists in the DEFAULT_JSON_PER_BUILD where only initialized and thus
shared between builds resulting in accumulating the entries over all
versions. As per 2f5d780c4 DEFAULT_JSON_PER_BUILD is used as an API, so
use deepcopy to work around it.
2022-04-21 12:58:07 +00: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
Licaon_Kter
1df6b1db90 Import - some fixes for flutter apps 2022-04-12 10:08:13 +00: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
linsui
849e671353 Add junrar to blocklist 2022-03-15 12:06:42 +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
0c390c943d [checkupdates] update submodules according to tag
In case the version information is inside a submodule we need to
checkout the submodule at the version of the tag we test.

Found with org.courville.nova.

Closes: #622
2022-03-10 12:49:03 +01:00
Simon Ser
fdc88650eb Add support for Triple-T metadata in Flutter projects
Closes: https://gitlab.com/fdroid/fdroidserver/-/issues/975
2022-03-06 18:24:45 +01:00
Jochen Sprickerhof
8fb37445f2 Fix detection of binary files without extension
Regression of fb61168c.
2022-03-02 10:21:20 +01:00
Hans-Christoph Steiner
707cd7addb
publish index-v1.json and include a gpg signature
This gives a more flexible and direct way for many clients to consume the
index file. #969
2022-02-22 22:58:09 +01:00
Hans-Christoph Steiner
d1fd58681e
nightly: stop stripping APKs before signing, apksigner does it
* https://gitlab.com/fdroid/fdroidserver/-/merge_requests/1033#note_742563869
* https://github.com/wardvl/f-droid-nightly-action/issues/3
2022-02-22 22:29:09 +01:00
Hans-Christoph Steiner
01d1869d59
nightly: fix "deploy key URL" that is printed to log output
GitLab now uses the "/-/" form as the canonical.
2022-02-22 13:34:01 +01:00
Sylvia van Os
1f75090fa2 Fix --use-date-from-apk flag 2022-02-15 22:39:08 +00:00
Sylvia van Os
fb61168c38 Also detect versioned so files 2022-02-15 22:36:44 +00:00
Jochen Sprickerhof
be7e59e71a Add typing information for mypy 2021-12-30 11:17:57 +01:00
Hans-Christoph Steiner
c54f9ea4ca mirror: make _run_wget() return to the dir it started in
This kind of function should not change the working environment, especially
since so much of the fdroidserver code assumes the current working directory
is the root of an fdroid repo.

It is used in fdroidserver/mirror.py with absolute paths always, so it
shouldn't change any existing use.  I found this issue by using it in a
plugin.
2021-12-07 10:24:27 +01:00
Romain Lebbadi-Breteau
b2eca0fc3b
remove useless import in verify.py 2021-12-04 18:26:26 -05:00
Romain Lebbadi-Breteau
3576d025fe
fix verify.py use sha256sum from common 2021-12-04 18:14:21 -05: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