Looks like the ~index-v2 work removed this error case, and the old bash
integration test case failed to catch it. This reestablishes this error.
@mindston's refactoring of the old bash test suite caught this issue, e.g.
!1587
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.
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
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'
iter_commits() follows `git rev-list` (which selects different commits
than `git diff`). With ... notation, `git rev-list` will return all
the commits that are not shared by the two branches. This needs only
the commits in the right side of the comparison (like how `git diff`
does it).