Commit Graph

133 Commits

Author SHA1 Message Date
Michael Pöhn 005a33732c apply review suggestions 2024-04-24 11:56:07 +00:00
Michael Pöhn bd6afa4365
🐛 index fix: skip altstore when no IPAs present 2024-04-24 12:45:29 +02:00
Hans-Christoph Steiner 9716b5e1ab index: manual black format 2024-04-24 10:29:50 +02:00
Michael Pöhn d00a87ed6c
🏏 alt-store index: incorporate review feedback 2024-04-23 17:28:30 +02:00
Michael Pöhn 45efb88f85
🕴️ add test for make_altstore 2024-04-23 16:05:58 +02:00
Michael Pöhn f742799a9d
🏟️ add test for _parse_from_pbxproj
Also fix lint issues
2024-04-23 16:05:34 +02:00
Michael Pöhn a21ed39117
🛻 move alstore index function
Move function for generating altstore index from update.py to index.py
2024-04-23 16:05:10 +02:00
Torsten Grote faf1090214 Use fdroid.link for repo index page 2024-04-03 13:54:48 +00:00
Jochen Sprickerhof edb2d76e25
Add unversioned whatsNew to index-v2 (Closes: #1202)
copy_triple_t_store_metadata() can read the whatsNew from an unversioned
release-notes.txt. For v2 copy this to the latest build.
2024-03-13 06:40:33 +01:00
proletarius101 947217549a feat: add servergitmirrors as a dict support 2024-02-14 16:50:39 +00:00
Hans-Christoph Steiner a1d9d9d885 switch to loading mirrors.yml with ruamel to get YAML 1.2 support 2024-01-09 09:32:37 +00:00
Hans-Christoph Steiner 4536b130df index: add datatype checking to mirrors: and config/mirrors.yml 2023-12-07 17:25:15 +01:00
Hans-Christoph Steiner 6d541e3ef6
establish config/mirrors.yml as a way to set up mirrors
The mirrors: entry in config.yml is great for quick access and shorter
mirror lists.  Now that we are adding a lot more metadata to the mirrors,
including potentially the full text of the privacy policy, having this
in its own file should make these cases easier to manage.
2023-12-07 14:38:26 +01:00
Jochen Sprickerhof 521ff4fe17 Add default locale for generated categories
The client expects at least a name to be set.

Regression of 2c566cf6.
2023-09-21 14:14:06 +00:00
Hans-Christoph Steiner 48559ecec5 category with no apps should be ignored, even if defined in config
https://gitlab.com/fdroid/fdroidclient/-/issues/2619#note_1421280589

The test needed to change because the test index files contained category
definitions that were not ever used in the "copy tests/repo, generate java/gpg
keys, update, and gpgsign" test in tests/run-tests.
2023-09-08 10:45:53 +02:00
Hans-Christoph Steiner 2c566cf68f update: add all categories in metadata files to repo definitions
!1366 makes it so categories are now defined by the repo. Categories can be
defined in the config so that lint has a list of categories to enforce. This
also provides a place for localization and icons for the categories. The old
way of defining categories was just listing them in app metadata files. This
restores that way of functioning when using index-v2.

closes #1137
2023-09-08 10:45:51 +02:00
Hans-Christoph Steiner 4e28fad55a use constants for names used in the config dict
Hopefully this helps with the Anti-Features case confusion:
* antifeatures
* antiFeatures
* AntiFeatures
2023-07-25 14:31:09 +00:00
Hans-Christoph Steiner 190a95ab17 use consistent name for releaseChannels config file 2023-07-25 14:31:09 +00:00
Jochen Sprickerhof 2ee3cccb60 Don't modify app dict when generating v2 antifeatures
Regression of: 061ca38a
Closes: #1103
2023-06-01 17:53:34 +00:00
Hans-Christoph Steiner 061ca38afd define "string map" type for new Anti-Features explanations
closes #683
2023-05-23 10:47:03 +02:00
Hans-Christoph Steiner 024d309262 index: rename app var to app_dict, its not an App instance
Throughout the code, variables named "app" are instances of the App class.
In this case, this is related, but it is a dict not an App instance, since
it is being prepared for including in the index-v1.json.
2023-05-11 10:37:45 +02:00
Hans-Christoph Steiner c2bc52dd85 use constant for default locale 2023-05-11 10:37:45 +02:00
Hans-Christoph Steiner 49362b5fd1 move load_locale() and file_entry() to be accessible by all modules
* load_locale -> common.load_localized_config() since common handles config
* file_entry -> metadata.file_entry() since metadata handles data format
2023-05-10 09:21:14 +02:00
Hans-Christoph Steiner 8ccc89ad4e index: fix requestsdict check order of operations
If requestsdict is None, the old logic would still check
requestsdict["uninstall"]) and crash there.
2023-05-10 09:21:14 +02:00
Hans-Christoph Steiner 2b81a66b79 App.comments is no more since !772 2023-04-28 10:44:19 +02:00
Hans-Christoph Steiner 7c692a4532 index-v2 'mirrors' fully settable from config
This lets mirrors: in config.yml be the same list-of-dicts format as it is
in index-v2.  This also includes a data format conversion to maintain the
right format for the old, unchanging index v0 and v1 formats.

#928
#1107
2023-04-27 07:53:02 +00:00
Jochen Sprickerhof 889b8cb372 Don't copy per version anti features to all versions
make_v0() modified the apps data structure to copy an anti feature for a
specific version to all versions resulting in index-v1 and -v2 to
contain wrong anti feature annotations. This patch fixes this and adds a
test that the data structure is no longer modified.

The bug shadowed bugs in the AF implementation of -v1 and -v2 resulting
in not coping the version specific data. This is corrected as well.
This is also tested now.

For -v2 the AF dict is now sorted to make the result reproducible.

Finally The NoSourceSince AF was added as a per version and overall AF
in -v1 and is now only applied as an overall AF and the test is updated
accordingly.
2023-04-04 14:20:41 +00:00
Hans-Christoph Steiner f3e49f4bcb
download_repo_index_v2() for verified downloading of index-v2 2023-03-09 12:35:29 +01:00
Hans-Christoph Steiner 723873456d
versioned download_repo_index_v1() to be future proof 2023-03-09 12:34:52 +01:00
Jochen Sprickerhof 0f151a3779 v2: move video to translated text (Closes: #1095)
It contains a link to the actual video and can be translated.
2023-02-16 21:42:09 +01:00
linsui 5858d8fcb4 remove liberapayID 2023-01-16 17:02:56 +00:00
FC Stegerman fc8820ff8e
index.make_v0: ensure name is a str 2023-01-10 19:40:52 +01:00
Hans-Christoph Steiner 947d94e0a9
deploy: support GitLab Job Artifacts as a mirror 2022-11-16 20:16:32 +01:00
Hans-Christoph Steiner f24613b701
index: fix git-mirror size check for GitLab Pages
The test case had the wrong folder setup, this was confirmed on a production
repo setup.
2022-11-16 20:16:25 +01:00
Jochen Sprickerhof 1bb963d768
jarsigner: allow weak signatures
openjdk-11 11.0.17 in Debian unstable fails to verify weak signatures:

jarsigner -verbose -strict -verify tests/signindex/guardianproject.jar

         131 Fri Dec 02 20:10:00 CET 2016 META-INF/MANIFEST.MF
         252 Fri Dec 02 20:10:04 CET 2016 META-INF/1.SF
        2299 Fri Dec 02 20:10:04 CET 2016 META-INF/1.RSA
           0 Fri Dec 02 20:09:58 CET 2016 META-INF/
 m  ?  48743 Fri Dec 02 20:09:58 CET 2016 index.xml

  s = signature was verified
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  ? = unsigned entry

- Signed by "EMAILADDRESS=root@guardianproject.info, CN=guardianproject.info, O=Guardian Project, OU=FDroid Repo, L=New York, ST=New York, C=US"
    Digest algorithm: SHA1 (disabled)
    Signature algorithm: SHA1withRSA (disabled), 4096-bit key

WARNING: The jar will be treated as unsigned, because it is signed with a weak algorithm that is now disabled by the security property:

  jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, DSA keySize < 1024, SHA1 denyAfter 2019-01-01, include jdk.disabled.namedCurves
2022-11-14 17:59:56 +01:00
Hans-Christoph Steiner 890513fcba index: standardized AntiFeature variable names
This is the only occurance of "anti_features".
2022-11-01 09:54:06 +01:00
Hans-Christoph Steiner 886712026d index: Anti-Features should always be a sorted set
There are diffs in the index caused by unstable order:
* 184cdd9c65 (572d84bb16becb794e10614840972554f333c66e_169259_169353)
* 184cdd9c65 (24c372740761176e67461dbc9136a799b15cfdbf_204154_204185)
2022-11-01 09:53:09 +01:00
linsui 5a28f20301 make versionCode/build.timeout an integer
Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de>
2022-10-14 08:42:26 +00:00
pmmayero 0ad45a94a8 Addition of IPFS CIDv1 to Index
IPFS CIDv1 is only generated for APKs and "repo files"
2022-09-14 09:28:02 +00:00
Hans-Christoph Steiner e79585b0c0 index: remove unused, confusing args to file_entry() 2022-09-08 18:13:26 +02:00
Jochen Sprickerhof eb79522a36 Fix flake8 E275 missing whitespace after keyword 2022-07-31 09:48:14 +02:00
Hans-Christoph Steiner 3182b77d18
use apksigner to sign index-v2 with modern, supported algorithms
The current signing method uses apksigner to sign the JAR so that it
will automatically select algorithms that are compatible with Android
SDK 23, which added the most recent algorithms:
https://developer.android.com/reference/java/security/Signature

This signing method uses then inherits the default signing algothim
settings, since Java and Android both maintain those.  That helps
avoid a repeat of being stuck on an old signing algorithm.  That means
specifically that this call to apksigner does not specify any of the
algorithms.

The old indexes must be signed by SHA1withRSA otherwise they will no
longer be compatible with old Androids.

apksigner 30.0.0+ is available in Debian/bullseye, Debian/buster-backports,
Ubuntu 21.10, and Ubuntu 20.04 from the fdroid PPA.  Here's a quick way to
test:

for f in `ls -1 /opt/android-sdk/build-tools/*/apksigner | sort ` /usr/bin/apksigner; do printf "$f : "; $f sign --v4-signing-enabled false; done

closes #1005
2022-06-07 16:56:23 +02:00
Jochen Sprickerhof 9933f54093 Fix --nosign semantics
This reverts parts of 197ca7e36 as it never triggered the
FDroidException as 'keystore' not in common.config is always False.
2022-06-07 13:22:02 +02:00
Jochen Sprickerhof 1073dd57f7 Make webBaseUrl configurable 2022-06-04 11:56:04 +02:00
Jochen Sprickerhof 72e3d07acb Simplify primary mirror logic
Assume repo_url/archive_url to be valid URL and mark it as a primary
mirror.
2022-06-04 11:56:04 +02:00
Jochen Sprickerhof d70e5c2cd9 Index v2 2022-05-23 10:39:17 +00:00
Jochen Sprickerhof 656c707636 Simplify index.html for new html5lib
Newer html5lib (used in html5print in the test_make_website) strip the
empty value, as it is valid html.
2021-11-19 18:34:23 +01:00
Jochen Sprickerhof 0783f97bed Fix get_dir_size call
Regression of 7987c746.
2021-09-13 11:16:16 +00:00
Hans-Christoph Steiner 7987c746de index: do not include GitLab Pages mirror if it can't be deployed
GitLab Pages sites are limited to 1GB on gitlab.com, so the CI/CD job will
fail if the repo is bigger than that.  It should not be included as a
mirror in that case.

https://docs.gitlab.com/ee/user/gitlab_com/#gitlab-pages
2021-09-11 15:30:55 +00:00
Hans-Christoph Steiner 5267699d81
index: make download_repo_index() handle common URL mistakes 2021-07-01 14:43:58 +02:00