1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-21 04:10:37 +02:00
Commit Graph

939 Commits

Author SHA1 Message Date
proletarius101
604fe1c275
test(deploy): fix directory exists error when running tests the second time 2024-06-05 18:33:40 +08:00
proletarius101
8d8d93b1cb
test(deploy): fix No such file or directory 2024-06-05 18:25:48 +08:00
proletarius101
bae8858607
test(deploy): fix typo in rclone test cases 2024-06-05 18:10:55 +08:00
proletarius101
8caee19dd6
fix(deploy): fix errors introduced by merging 2024-06-04 22:02:11 +08:00
proletarius101
cb18d10197
feat(deploy): add index-only mode to the rclone deployment method 2024-06-04 21:18:31 +08:00
proletarius101
f321f62904
style(deploy): fix pyflake 2024-06-04 20:55:01 +08:00
proletarius101
01990411c7
fix(deploy): all files are uploaded if the index only mode deployment follows a full mode one
switch the branch before rsyncing
2024-06-04 20:55:01 +08:00
proletarius101
4941e699df
test(deploy): make sure the APK file is not uploaded in the index only mode 2024-06-04 20:54:36 +08:00
proletarius101
04987a021b
fix(deploy): local files are not synced to the local git repo 2024-06-04 20:54:36 +08:00
proletarius101
0e3bd6f63e
fix(deploy): files are not pushed to the remote 2024-06-04 20:53:54 +08:00
proletarius101
d1c881e2c3
test(deploy): fix fdroidserver.deploy.options is None 2024-06-04 20:53:54 +08:00
proletarius101
097f81a565
test(deploy): fix errors 2024-06-04 20:53:40 +08:00
proletarius101
abf4c93a7b
fix(deploy): don't recreate the branches 2024-06-04 20:53:40 +08:00
Hans-Christoph Steiner
4acab21d81
fix: avoid making the parent directory redundantly in test case 2024-06-04 20:52:39 +08:00
proletarius101
99a3823621
fix: ModuleNotFoundError 2024-06-04 20:52:39 +08:00
proletarius101
76432199be
lint: fix black formatting 2024-06-04 20:52:39 +08:00
proletarius101
df28c1e6c3
fix(deploy): remove the index-only mode from elsewhere except the config file
To enable per-remote configuration
2024-06-04 20:52:39 +08:00
proletarius101
0ea0a3de78
style: fix lint 2024-06-04 20:49:35 +08:00
proletarius101
f2fcfeabe5
style: fix lint 2024-06-04 20:49:35 +08:00
proletarius101
a4247eea0d
style: fix lint 2024-06-04 20:49:35 +08:00
proletarius101
221739b653
refactor: use _get_index_file_paths() instead of this mix of --include/--exclude 2024-06-04 20:49:07 +08:00
proletarius101
c7574037a9
refactor: remove the support of the index only mode when syncing to the local filesystem 2024-06-04 20:45:22 +08:00
proletarius101
cc75f2f9a4
feat(deploy): add index only mode in update_servergitmirrors 2024-06-04 20:43:47 +08:00
proletarius101
e22f7e52a8
style(deploy): remove unused imports 2024-06-04 20:43:03 +08:00
proletarius101
1f3f02765d
test(deploy): add test cases for update_awsbucket_libcloud and fix errors 2024-06-04 20:43:03 +08:00
proletarius101
91cf352b96
test(deploy): add test cases for update_awsbucket_s3cmd 2024-06-04 20:43:03 +08:00
proletarius101
5e3b474a1c
fix(deploy): add test cases for local copy mode and fix issues 2024-06-04 20:43:03 +08:00
proletarius101
160c23a547
fix(deploy): add test cases for server webroot mode and fix issues 2024-06-04 20:40:34 +08:00
proletarius101
742381a923
test(deploy): properly test non-index-only mode 2024-06-04 20:38:44 +08:00
paul mayero
7aabfbcbf0 Adding rclone as an option to fdroid deploy 2024-05-29 14:08:07 +00:00
Licaon_Kter
feafe2812d Fix more tests after !1487 2024-05-22 13:40:27 +00:00
Licaon_Kter
98f935493e fix test cases 2024-05-22 09:25:49 +00:00
Hans-Christoph Steiner
5745ed4753 common: only try to delete .testfiles dir if it exists
Otherwise, some tests fail with an error.
2024-05-08 16:28:14 +02:00
Hans-Christoph Steiner
18f3acc32e split out options from read_config()
There is no longer any reason for these to be intertwined.

This deliberately avoids touching some files as much as possible because
they are super tangled and due to be replaced.  Those files are:

* fdroidserver/build.py
* fdroidserver/update.py

# Conflicts:
#	tests/testcommon.py

# Conflicts:
#	fdroidserver/btlog.py
#	fdroidserver/import_subcommand.py
2024-05-08 16:26:46 +02:00
Hans-Christoph Steiner
685efa23d4 import: always load testcommon from localmodule
Having this import before sys.path.insert() made it load testcommon from
the Debian package.
2024-05-08 16:19:27 +02:00
Hans-Christoph Steiner
1e5699e90c remove all references to optparse (deprecated since Python 3.2) 2024-05-08 16:19:27 +02:00
Hans-Christoph Steiner
717df09be0 clarify that config/options can be global or module-level variable 2024-05-08 16:19:27 +02:00
Hans-Christoph Steiner
8208841460 common: make explicit which test cases need mocked options 2024-05-08 16:19:27 +02:00
Hans-Christoph Steiner
ad9f0a9022 include @obfusk's proof-of-concept APKs in test suite
https://github.com/obfusk/fdroid-fakesigner-poc/releases/tag/poc-apks
2024-05-07 16:22:59 +02:00
Hans-Christoph Steiner
fc4a9c96a5 test APK signatures with a cert chain are parsed like apksigner
Microsoft and SanDisk sign APKs with a X.509 certificate chain of
trust, so there are actually three certificates included. apksigner
only cares about one certificate and ignores the other certificates in
the chain.

The correct values come from:

    apksigner verify --print-certs 883cbdae7aeb2e4b122e8ee8d89966c7062d0d49107a130235fa220a5b994a79.apk

X.509 certificates are machine generated and just data, so are not
copyrightable.  So I included SANAPPSI.* directly.
2024-05-07 16:22:59 +02:00
Hans-Christoph Steiner
accdd65f91 also handle APKs entirely without JAR/v1 signatures
future-proofing!
2024-05-07 16:22:59 +02:00
Hans-Christoph Steiner
9a327b5097 reliable implementation of get_first_signer_certificate()
This keeps key pieces of @linsui's algorithm, specifically the check
that all certificates are the same.  apksigner also does this check.

closes #1128
2024-05-07 16:22:59 +02:00
Hans-Christoph Steiner
1b65e33835 make it easy to keep test artifacts from jobs
When troubleshooting things that are difficult to reproduce locally, like
different behaviors in the fedora_latest job, these changes make it easy to
keep the test files around after the tests run.  For example, if PNGs are
processed differently by newer Python versions.
2024-05-07 12:58:23 +00:00
Hans-Christoph Steiner
299e3e5f4c index: handle image processing diffs across various Python versions
Apparently, the newest Python thingies strip the PNGs a tiny bit smaller,
so a fixed file size will lead to the test failing:

https://gitlab.com/fdroid/fdroidserver/-/jobs/6703386074
```
Traceback (most recent call last):
  File "/builds/fdroid/fdroidserver/tests/index.TestCase", line 704, in test_package_metadata
    self.assertEqual(36027, metadata['featureGraphic']['en-US']['size'])
AssertionError: 36027 != 35619
```
2024-05-07 12:58:23 +00:00
Hans-Christoph Steiner
9a9b5beeaa simplify test setup
I'm in the midst of working towards getting rid of the "config" instances
that are in the subcommand module, e.g. `fdroidserver.lint.config`
2024-05-07 11:33:04 +00:00
Hans-Christoph Steiner
14c8647909 add additional tests 2024-05-07 11:33:04 +00:00
linsui
d243cbd030 lint: blocklist known AOSP debug keys in AASK 2024-05-07 11:33:04 +00:00
Hans-Christoph Steiner
5b7abc0423 single function to tame androguard's verbose default output
# Conflicts:
#	fdroidserver/common.py
2024-04-25 12:39:12 +02:00
Hans-Christoph Steiner
7a144a4762 port to androguard >= 4 and drop support for older than 3.3.3
This also makes androguard a hard requirement, which has been true for a
while anyway.  So the code that handles androguard as an optional
requirement is removed.  androguard from Debian/buster is new enough, so
this does not seem like it will cause any problems.
2024-04-25 12:39:12 +02:00
Hans-Christoph Steiner
cdc7c98707 common.get_androguard_APK() is no longer private to the module 2024-04-25 12:39:12 +02:00