1180 Commits
Author SHA1 Message Date
Hans-Christoph Steiner 61c6290a7a signindex: fix test_signindex case which was not running
* `if common.find_apksigner({}) is None:` was always false.
* test case never generated files for archive/
* use --nosign to only sign jars with signindex
2026-09-11 10:30:02 +00:00
Hans-Christoph Steiner bd56812fed signindex: complete conversion to common.get_config()
5b997e4037
2026-09-11 10:30:02 +00:00
Hans-Christoph Steiner d03ee2b138 hide icon warnings in integration tests 2026-09-11 10:30:02 +00:00
Hans-Christoph Steiner f9b5bbd66f index: ensure all indexes have the same timestamp
The current method messed up on timezones in some cases. Also fixes:
DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and
scheduled for removal in a future version. Use timezone-aware objects to
represent datetimes in UTC:
datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
2026-09-11 10:30:02 +00:00
Hans-Christoph Steiner b8fbf79a9d add test of production index.(css/html/png) setup 2026-09-11 09:59:48 +00:00
Hans-Christoph Steiner 86d643e861 zlib-ng's non-determinism breaks implanting APK sigs #1354
Python 3.14 defaults to building with zlib-ng, so this is a workaround
until signature copying is fixed.

This also fixes !1848 tests on macOS:
https://gitlab.com/fdroid/fdroidserver/-/jobs/15472305534
FileNotFoundError: [Errno 2] No such file or directory: '/etc/os-release'
2026-09-10 16:21:27 +00:00
Michael Pöhn ebcf5636e7 🪙 add support for taler template based donations 2026-08-27 16:00:16 +02:00
Michael Pöhn d7f52c4580 🧋 add array support for doante link metadata.
With this change the `Donate` metadata field can also be an array of
links, not just one single link. e.g.:

```
Donate:
  - "https://f-droid.org/donate"
  - "https://donate.example.com/fdroid"
```

For backwards compatibility the old solo string format is also
supported. e.g.:

```
Donate: "https://f-droid.org/donate"
```
2026-08-27 13:54:58 +00:00
ByteHamster 0ae5a4fcdc Fix symlink handling around triple-t/fastlane metadata 2026-08-23 10:13:02 +02:00
Hans-Christoph Steiner 32d0b3bf8f signindex: test exception when failing to sign v0/v1 2026-07-22 11:26:28 +02:00
Hans-Christoph Steiner 5b997e4037 signindex: convert to common.get_config()
717df09be0
2026-07-22 08:19:42 +02:00
Michael Pöhn 1ea8ca7685 🧺 make TmpCwd more fault tolerant
TmpCwd used to raise FileNotFound exception when the processes cwd is
pointing to a non-existent directory.  This change makes it so that
TmpCwd doesn't raise this exception anymore.
2026-07-21 10:44:38 +00:00
Michael Pöhn 530c885a66 🌴 update: add get_apks_without_allowed_signatures v1 sig scheme only test 2026-07-21 10:44:38 +00:00
Michael Pöhn 02da07b736 🐽 make scan_apk_androguard determine is_v1_signed_only 2026-07-21 10:44:38 +00:00
Michael Pöhn 671b728789 ✂️ add apkfile_is_v1_signed_only
Intially apk_is_v1_signed_only() was designed to expect APK file-paths
as parameter. In some cases we already have an androguard APK instance,
so those changes the signature of apk_is_v1_signed_only to take
androguard APK objects instead of file-paths. Additionally we introduce
apkfile_is_v1_signed_only for working with file-paths.
2026-07-21 10:44:38 +00:00
Michael Pöhn 28f979584d 🗼 use v2+ signed apk in TestUpdateWithAllowedApkSigningKeys 2026-07-21 10:44:38 +00:00
Michael Pöhn 8b70f83d50 🛣️ switch TestUpdateWithAllowedApkSigningKeys to pathlib 2026-07-21 10:44:38 +00:00
Michael Pöhn 938009d7cc 🪣 TestUpdateWithAllowedApkSigningKeys rm pointless metadata copies 2026-07-21 10:44:38 +00:00
Michael Pöhn b3e2f47ae4 🪚 simplify tmp dir setup in TestUpdateWithAllowedApkSigningKeys 2026-07-21 10:44:38 +00:00
Michael Pöhn eb04ef67af 🔨 test_update_with_AllowedAPKSigningKeys contains 2 tests -> split 2026-07-21 10:44:38 +00:00
Michael Pöhn 366aee7f45 👉 move test_update_with_AllowedAPKSigningKeys into separate TestCase 2026-07-21 10:44:38 +00:00
Michael Pöhn f61f06b413 🤏 separate test case for get_apks_without_allowed_signatures 2026-07-21 10:44:38 +00:00
Michael Pöhn b218b890b1 ⚔️ build: reject v1 only sigend reference Binaries 2026-07-21 10:44:38 +00:00
Michael Pöhn 836d32fe69 🚠 build: refactor binary download into testable sub function
This adds _download_and_check_reference_binary() to build.py and moves
some lines from the humongous main() function there. It also adds some
unit tests for that new fucntion.
2026-07-21 10:44:38 +00:00
Michael Pöhn 3a83ae9fd7 📇 publish: do not allow v1 signed Binaries 2026-07-21 10:44:38 +00:00
Michael Pöhn ac3405fb28 🧓 add common.apk_is_v1_signed_only
Add a helper function that determines whether an APK is exclusively
singed with v1 signatures.
2026-07-21 10:44:38 +00:00
Hans-Christoph Steiner 5c7bac295d publish: skip sig implant test on Fedora #1354
There is a complicated issue with the ZIP library that needs to be resolved
in Fedora before this can work.
2026-07-21 12:32:28 +02:00
Timothy Mario Redaelli 82e644fa17 common, publish: support v2/v3-only sigdirs in developer signature graft 2026-06-03 20:51:49 +00:00
Hans-Christoph Steiner 093752b06f use IntEnum for SCREEN_RESOLUTIONS
This is a Pythonic structure for gathering all these constant values that
are used in a manageable way.

Enums have SCREEN_RESOLUTIONS['ldpi'] but throw KeyErrors when the key is
there.
2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner 778b6527a0 fix "doesn't conform to UPPER_CASE naming style (invalid-name)" 2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner 8ab474ad3b update: "0" DPI only needed for extraction, not icon_dirs
The '0' value is not used to generate an icon_dir, e.g. repo/icons-0/, so
this additional "all" structure is not needed.

The 0 DPI value is the really old default when no DPI specified.
https://github.com/androguard/androguard/blob/dd458bead6165975c3ef0b1b78eaf2450e4889d9/androguard/core/apk/__init__.py#L681
2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner 9f101af294 update: fix ancient bug where not all icons get moved to archive 2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner f3e3605f64 update: stop using density values as strings, they're ints 2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner cc47f7cc0f update: add tests for extract_apk_icons() 2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner b2a7e8eae2 update: parse icons by fully resolving the resources
This was doing only quite simple resolution, which missed lots of
things starting in Android Gradle Plugin 4.2.
2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner 09947064ff add tests of fdroidserver.update.get_icon_dir() 2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner f668343b35 update: move icon density parse to standalone function for testing 2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner 02139d196d remove obsolete test back when aapt dump badging was parsed
see !485
2026-05-22 23:02:59 +00:00
Hans-Christoph Steiner 976c9c0db4 ensure httpd is shut down when test_mirroring_a_repo fails
Otherwise, this will fail and then hang forever.  THis just puts everything
that could cause the hang in try/finally.
2026-05-20 11:35:05 +02:00
Hans-Christoph Steiner e9f875b2d8 added test case 2026-05-05 21:24:24 +00:00
Hans-Christoph Steiner 2333b5c1fb stop accessing private variable in sdkmanager in tests
sdkmanager@3ff3706e70752fbd0f712818b760dcabda8de405 changed the name
of the variable that was being accessed.  This instead uses a private
function, but that function already fits the PEP naming standards and has
remained unchanged since the beginning of _sdkmanager_.
2026-05-01 22:29:25 +02:00
Torsten Grote a2574360d9 Add localized category to tests 2026-04-22 15:01:20 -03:00
Torsten Grote 36e75c29e6 Add category description to tests 2026-04-21 20:10:03 -03:00
Hans-Christoph Steiner 0b6ec94af7 remove NSFW Anti-Feature
admin#634
fdroiddata#3867
2026-04-20 14:40:29 +00:00
linsui ad8bfca824 fix gradle output path 2026-04-13 17:21:32 +00:00
linsui 7723311b44 disable gradle jvm auto download 2026-03-18 04:12:57 +08:00
Hans-Christoph Steiner b20d505347 index: make sure DNS records are in the "mirrors" list
fdroidclient!1626
https://gitlab.com/fdroid/fdroidclient/-/work_items/2948#note_3157998787
fdroidclient#2717
fdroidclient#2948
2026-03-13 22:58:07 +01:00
Hans-Christoph Steiner 2e4b8c8d15 fix Fedora check in macOS job
platform.freedesktop_os_release() requires that /etc/os-release or
/usr/lib/os-release is present.
2026-03-12 22:00:04 +01:00
mnbogner b7714db4f6 added check foripv6 suppot to dns tests 2026-03-12 22:00:02 +01:00
Alexander Martinz 0577be66d5 test: test_index: test_make_v1: ensure nativecode exists
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2026-03-12 20:32:10 +01:00