On some systems, localhost is only defined for 127.0.0.1 (e.g. Ubuntu
and Debian containers). However, there is code that hardcodes possible
values for localhost, making it possible to open an IPv6 socket for
localhost.
On those systems, the socket will be open but urllib3 will resolve
localhost *only* to 127.0.0.1, thus failing miserably to connect.
To resolve the situation, rather than defaulting to IPv6 we actually
resolve localhost and use the socket family of the first result. On my
current system (upcoming Ubuntu Plucky) if localhost=::1 is defined in
/etc/hosts it will come up as the first result, if not 127.0.0.1 will.
V2: Use self.port rather than a forgotten hardcoded port.
Fixes: f01628ca6b "fix localhost network tests on systems with IPv6"
verified.json can get quite large on verification.f-droid.org, and for some
unknown reason, it sometimes corrupts it when writing it out. All the data
is already available in all the other JSON files, so this just automatically
reconstructs it. Its a hack, but it took me much less time than I've
already spent trying to troubleshoot why it writes out corrupt verified.json.
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
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.
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
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
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
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
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
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