Commit graph

8770 commits

Author SHA1 Message Date
Hans-Christoph Steiner
20caa6fa1c match the full file name when looking for the v1 signature block
ZipFile.namelist() produces a string per file.  The filename could contain
newline chars, including at the beginning and end.  ^$ in regex matches
around newline chars.  \A\Z matches the beginning/end of the full string.

This is exactly the same as obfusk's r'\AMETA-INF/(?s:.)*\.(DSA|EC|RSA)\Z'
but in a readable format that is also easily searchable, and standard for
this code base.

https://github.com/obfusk/fdroid-fakesigner-poc/blob/master/fdroidserver-regex.patch

#1251
2025-01-15 14:45:35 +01:00
linsui
0bb240fac6 Merge branch 'gradle' into 'master'
update to gradle v8.12

See merge request fdroid/fdroidserver!1584
2024-12-22 07:11:51 +00:00
linsui
c70684ea25 update to gradle v8.12 2024-12-22 15:00:47 +08:00
Hans-Christoph Steiner
3b64dcee7a
version 2.3.4 2024-12-12 17:43:43 +01:00
Hans-Christoph Steiner
eb49351b81
update CHANGELOG.md 2024-12-12 17:43:19 +01:00
Hans-Christoph Steiner
dfbf79ef2b Merge branch 'fix-net-tests-on-ipv6' into 'master'
fix localhost network tests on systems with IPv6

See merge request fdroid/fdroidserver!1581
2024-12-12 15:20:24 +00:00
Hans-Christoph Steiner
f01628ca6b fix localhost network tests on systems with IPv6
Thanks to themill from Debian for this suggestion:

> https://docs.python.org/3/library/socket.html#socket.socket makes me
> think socket.socket has done an ipv4 only but urilib3 will do
> whatever localhost resolves to.  I suspect the test code should be
> using socket.create_server - there's an example at
> https://docs.python.org/3/library/socket.html#socket.create_server
2024-12-12 15:19:58 +00:00
Jochen Sprickerhof
99c3ea9966 Merge branch 'extlib' into 'master'
lint: only error out on missing extlib on versions not archived

See merge request fdroid/fdroidserver!1579
2024-12-12 14:43:42 +00:00
linsui
f93e30f1e9 lint: only error out on missing extlib on versions not archived 2024-12-12 22:33:36 +08:00
linsui
9b59d5cf48 update: extract archive policy calculation to common 2024-12-12 22:20:38 +08:00
Hans-Christoph Steiner
173e45f248
make -C locale update 2024-12-11 14:39:27 +01:00
Hans-Christoph Steiner
c631ca7142
version 2.3.3 2024-12-11 12:51:34 +01:00
Hans-Christoph Steiner
b408d56c2b
update CHANGELOG.md for 2.3.3 2024-12-11 12:51:03 +01:00
Hans-Christoph Steiner
d826178892 Merge branch 'verify--clean-up-verified' into 'master'
verify: --clean-up-verified to rm all files except the JSON report

See merge request fdroid/fdroidserver!1574
2024-12-11 11:48:39 +00:00
Hans-Christoph Steiner
5deb936e86 verify: --clean-up-verified to rm all files except the JSON report 2024-12-11 11:39:02 +00:00
Hans-Christoph Steiner
56814824ee new function get_src_tarball_name; deprecates getsrcname
Some places in the code that need this, like verify.py, do not have
app and build instances, but do have appid and versionCode.  And
fdroidserver/build.py is going away.
2024-12-11 11:39:02 +00:00
Hans-Christoph Steiner
78865a7b2b Merge branch 'weblate' into 'master'
weblate

See merge request fdroid/fdroidserver!1578
2024-12-11 11:35:28 +00:00
VfBFan
ba0069aaa2 Translated using Weblate: German (de) by VfBFan <VfBFan@users.noreply.hosted.weblate.org>
Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: VfBFan <VfBFan@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/de/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Licaon Kter
66704e1a4c Translated using Weblate: Romanian (ro) by Licaon Kter <licaon.kter@protonmail.com>
Currently translated at 95.4% (583 of 611 strings)

Co-authored-by: Licaon Kter <licaon.kter@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ro/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Golubev Alexander
2d12f8c731 Translated using Weblate: Russian (ru) by Golubev Alexander <fatzer2@gmail.com>
Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: Golubev Alexander <fatzer2@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ru/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
WaldiS
25daaea989 Translated using Weblate: Polish (pl) by WaldiS <sto@tutanota.de>
Currently translated at 99.3% (607 of 611 strings)

Co-authored-by: WaldiS <sto@tutanota.de>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/pl/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Reno Tx
cd25bd6ce7 Translated using Weblate: Serbian (sr) by Reno Tx <renotx@users.noreply.hosted.weblate.org>
Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: Reno Tx <renotx@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/sr/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Eryk Michalak
4a5d2c4422 Translated using Weblate: Polish (pl) by Eryk Michalak <gnu.ewm@protonmail.com>
Currently translated at 97.3% (595 of 611 strings)

Co-authored-by: Eryk Michalak <gnu.ewm@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/pl/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Shuuji TAKAHASHI (shuuji3)
07b83ed101 Translated using Weblate: Japanese (ja) by "Shuuji TAKAHASHI (shuuji3)" <shuuji3@gmail.com>
Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: Shuuji TAKAHASHI (shuuji3) <shuuji3@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ja/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Ecron
8658f21282 Translated using Weblate: Catalan (ca) by Ecron <ecron_89@hotmail.com>
Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: Ecron <ecron_89@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ca/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
தமிழ்நேரம்
067a216f00 Translated using Weblate: Tamil (ta) by தமிழ்நேரம் <anishprabu.t@gmail.com>
Currently translated at 100.0% (611 of 611 strings)

Translated using Weblate: Tamil (ta) by தமிழ்நேரம் <anishprabu.t@gmail.com>

Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ta/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Ldm Public
6671720d68 Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>
Currently translated at 95.9% (586 of 611 strings)

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 95.9% (586 of 611 strings)

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 95.4% (583 of 611 strings)

Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>

Currently translated at 95.0% (581 of 611 strings)

Co-authored-by: Ldm Public <ldmpub@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/fr/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Lzebulon
e8aff6a755 Translated using Weblate: French (fr) by Lzebulon <lzebulon@crans.org>
Currently translated at 95.9% (586 of 611 strings)

Translated using Weblate: French (fr) by Lzebulon <lzebulon@crans.org>

Currently translated at 95.4% (583 of 611 strings)

Translated using Weblate: French (fr) by Lzebulon <lzebulon@crans.org>

Currently translated at 95.0% (581 of 611 strings)

Translated using Weblate: French (fr) by Lzebulon <lzebulon@crans.org>

Currently translated at 94.9% (580 of 611 strings)

Co-authored-by: Lzebulon <lzebulon@crans.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/fr/
Translation: F-Droid/F-Droid Server
2024-12-11 12:25:21 +01:00
Michael Pöhn
36fafaf2cc Merge branch 'replace-deprecated-pkg_resources' into 'master'
support Python 3.13

See merge request fdroid/fdroidserver!1576
2024-12-11 10:28:02 +00:00
Hans-Christoph Steiner
bc118484e4 index.xml: XML escaping from Python < 3.13 which stopped converting "
index.xml is for old clients that are stuck in the past forever.  So the
format should not change at all.  Python 3.13 changed minidom so it no
longer converts " to an XML entity.
154477be72
2024-12-06 16:15:48 +01:00
Hans-Christoph Steiner
6d40e8fa27
extras_require: python-magic is preferred when libmagic is available 2024-12-06 12:26:45 +01:00
Hans-Christoph Steiner
46dba20ba3
setup.py: update classifiers 2024-12-06 12:26:42 +01:00
Hans-Christoph Steiner
5fde2f4d03
replace deprecated pkg_resources.get_distribution() from setuptools
This should fix the CI error for macOS and reduce technical debt.
https://gitlab.com/fdroid/fdroidserver/-/jobs/8542884186
2024-12-06 12:26:37 +01:00
Jochen Sprickerhof
30e308ac8a Merge branch 'stop-overwriting-index-png' into 'master'
update: only gen index.png when making index.html

See merge request fdroid/fdroidserver!1575
2024-12-04 12:25:06 +00:00
Hans-Christoph Steiner
ad9b0c3294 update: only gen index.png when making index.html
* https://f-droid.org/repo does not use the index.png at all
* Some repos want to set their own index.png rather than the QR code
2024-12-04 13:13:30 +01:00
Hans-Christoph Steiner
11aee5b325
version 2.3.2 2024-11-26 22:17:08 +01:00
Hans-Christoph Steiner
620e9f9331
update CHANGELOG.md for 2.3.2 2024-11-26 22:17:05 +01:00
Hans-Christoph Steiner
194d4b63d0 Merge branch 'weblate' into 'master'
weblate

See merge request fdroid/fdroidserver!1573
2024-11-26 21:13:32 +00:00
தமிழ்நேரம்
a45893addf Translated using Weblate: Tamil (ta) by தமிழ்நேரம் <anishprabu.t@gmail.com>
Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: தமிழ்நேரம் <anishprabu.t@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ta/
Translation: F-Droid/F-Droid Server
2024-11-26 22:03:01 +01:00
Joan Pujolar
dbd6034738 Translated using Weblate: Catalan (ca) by Joan Pujolar <joan.pujolar@gmail.com>
Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: Joan Pujolar <joan.pujolar@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ca/
Translation: F-Droid/F-Droid Server
2024-11-26 22:03:01 +01:00
Ldm Public
222f19d167 Translated using Weblate: French (fr) by Ldm Public <ldmpub@gmail.com>
Currently translated at 93.7% (573 of 611 strings)

Co-authored-by: Ldm Public <ldmpub@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/fr/
Translation: F-Droid/F-Droid Server
2024-11-26 22:03:01 +01:00
Peter Dave Hello
a8c354a2d0 Translated using Weblate: Chinese (Traditional Han script) (zh_Hant) by Peter Dave Hello <hsu@peterdavehello.org>
Currently translated at 81.9% (501 of 611 strings)

Co-authored-by: Peter Dave Hello <hsu@peterdavehello.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/zh_Hant/
Translation: F-Droid/F-Droid Server
2024-11-26 22:03:01 +01:00
Danial Behzadi
19bb2bf1aa Translated using Weblate: Persian (fa) by Danial Behzadi <dani.behzi@ubuntu.com>
Currently translated at 18.1% (111 of 611 strings)

Translated using Weblate: Persian (fa) by Danial Behzadi <dani.behzi@ubuntu.com>

Currently translated at 9.9% (61 of 611 strings)

Translated using Weblate: Persian (fa) by Danial Behzadi <dani.behzi@ubuntu.com>

Currently translated at 9.9% (61 of 611 strings)

Co-authored-by: Danial Behzadi <dani.behzi@ubuntu.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/fa/
Translation: F-Droid/F-Droid Server
2024-11-26 22:03:01 +01:00
Hugo Carvalho
9ce877acdb Translated using Weblate: Portuguese (pt) by Hugo Carvalho <hugokarvalho@hotmail.com>
Currently translated at 100.0% (611 of 611 strings)

Translated using Weblate: Portuguese (pt) by Hugo Carvalho <hugokarvalho@hotmail.com>

Currently translated at 97.3% (595 of 611 strings)

Translated using Weblate: Portuguese (Portugal) (pt_PT) by Hugo Carvalho <hugokarvalho@hotmail.com>

Currently translated at 100.0% (611 of 611 strings)

Translated using Weblate: Portuguese (Portugal) (pt_PT) by Hugo Carvalho <hugokarvalho@hotmail.com>

Currently translated at 97.3% (595 of 611 strings)

Co-authored-by: Hugo Carvalho <hugokarvalho@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/pt/
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/pt_PT/
Translation: F-Droid/F-Droid Server
2024-11-26 22:03:01 +01:00
gfbdrgng
0b40c04422 Translated using Weblate: Russian (ru) by gfbdrgng <hnaofegnp@hldrive.com>
Currently translated at 100.0% (611 of 611 strings)

Co-authored-by: gfbdrgng <hnaofegnp@hldrive.com>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/ru/
Translation: F-Droid/F-Droid Server
2024-11-26 22:03:01 +01:00
Reno Tx
4ea9cdfa93
Translated using Weblate: Serbian (sr) by Reno Tx <renotx@users.noreply.hosted.weblate.org>
Currently translated at 96.8% (592 of 611 strings)

Co-authored-by: Reno Tx <renotx@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/f-droid/fdroidserver/sr/
Translation: F-Droid/F-Droid Server
2024-11-26 19:01:59 +01:00
Michael Pöhn
e52a07d63a Merge branch 'install-fixes' into 'master'
install: fix breakage in downloading from Maven Central, GitHub Releases

See merge request fdroid/fdroidserver!1572
2024-11-26 15:15:59 +00:00
Hans-Christoph Steiner
8fc340aaca install: fix download dir when fetching from GitHub Releases 2024-11-26 15:31:47 +01:00
Hans-Christoph Steiner
8c81033ea3 FDroidPopenBytes: do not crash if options are not set
This makes writing test cases a lot easier. For example:

======================================================================
ERROR: test_devices (tests.test_install.InstallTest.test_devices)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hans/code/fdroid/server/tests/test_install.py", line 31, in test_devices
    devices = fdroidserver.install.devices()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hans/code/fdroid/server/fdroidserver/install.py", line 225, in devices
    p = common.SdkToolsPopen(['adb', "devices"])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hans/code/fdroid/server/fdroidserver/common.py", line 2921, in SdkToolsPopen
    return FDroidPopen([abscmd] + commands[1:],
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hans/code/fdroid/server/fdroidserver/common.py", line 3024, in FDroidPopen
    result = FDroidPopenBytes(commands, cwd, envs, output, stderr_to_stdout)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hans/code/fdroid/server/fdroidserver/common.py", line 2987, in FDroidPopenBytes
    if output and options.verbose:
                  ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'verbose'
2024-11-26 15:20:06 +01:00
Hans-Christoph Steiner
d2cc020336 install: fix broken URL building logic for Maven Central
The append logic was wrong, so it was trying to download URLs like:
https://repo.maven.apache.org/maven2/org/fdroid/fdroid/F-Droid/maven-metadata.xml/org/fdroid/fdroid/F-Droid/1.20.0/F-Droid-1.20.0.apk

Which should be:
https://repo.maven.apache.org/maven2/org/fdroid/fdroid/F-Droid/1.20.0/F-Droid-1.20.0.apk

Can be manually tested using:
`test_download_fdroid_apk=1 python -m unittest -k test_download_fdroid_apk_from_maven`
2024-11-26 15:14:18 +01:00