Occ integrity:check-app mail reports "Signature data not found"

I’m on Arch (current, already on PHP 8.0, therefore PHP 7.4 is installed additionaly. php calls PHP 8.0, php7 calls PHP 7.4. Scripts are modified to use PHP 7.4 ATM. After upgrading my test instance to 21.0.0.18 (using beta channel), I checked integrity:core - was fine.

Then I checked app-integrity for the Mail app:

$ php occ integrity:check-app mail
  - EXCEPTION:
    - class: OC\IntegrityCheck\Exceptions\InvalidSignatureException
    - message: Signature data not found.

That should not happen right? So I disabled and removed it, to get rid of the warning.

$ php occ app:disable mail
mail 1.8.3 disabled

$ php occ app:remove mail
mail disabled
mail 0 removed

$ php occ app:disable mail
No such app enabled: mail
$ php occ integrity:check-app mail
  - EXCEPTION:
    - class: Exception
    - message: App not found

Yet, instead I got a different (weird one!). This should not happen either, right?

$ php occ app:install mail
Error: App "Mail" cannot be installed because the following dependencies
are not fulfilled: PHP with a version lower than 7.4 is required.

Wait, what?

I expected that all apps that are marked compatible with NC 21 would be compatible to PHP 8.
Is that a false assumption?

Or should the mail app not be marked compatible with 21?
Or is it compatible with PHP 8 but just pretends not to be?

(BTW: According to my superficial tests, it did it’s job, I saw no errors, even using PHP 8.)

Edit: It definitely seems not to be compliant:

$ php occ app:check-code mail
Analysing /server//test/apps/mail/lib/Vendor/Favicon/Favicon.php
 6 errors
    line   53: != - is discouraged
    line   53: != - is discouraged
    line  191: == - is discouraged
    line  262: == - is discouraged
    line  274: == - is discouraged
    line  279: == - is discouraged
App is not compliant

OK, so mail wants PHP 7, so let’s try with that:

$ php7 occ app:install mail
mail already installed

Wait what? I got a confirmation that it was deleted above!?
So I tried to disable and delete it “again”:

$ php7 occ app:remove mail
mail disabled
mail 0 removed

$ php7 occ app:remove mail
mail is not installed

OK, so that did work this time. Now I should be able to install it using PHP 7.4 …

$ php7 occ app:install mail
mail 1.8.3 installed
mail enabled

… and I am. Now, let’s get back to the initial task (integrity check):

$ php7 occ integrity:check-app mail
  - EXCEPTION:
    - class: OC\IntegrityCheck\Exceptions\InvalidSignatureException
    - message: Signature data not found.

Same error. What’s wrong here?
That is quite a LOT of error for an app that is installed by default!

As I get one error if it is installed and another if it isn’t – how to get rid of the warning using OCC?
(I do get rid of it using the rescan link on the …/settings/admin/overview.)

I’ve found that it may be related to the missing of signature.json inside appinfo folder on the app folder.
The solution seems to manually re-install the app but, for example, some don’t have that information on the nextcloud app repository too (like today I find that calendar, contacts and related_resources don’t).
Run this code on the console to get all the apps that the signature.json file ok:

find /path/to/nextcloud/folder/apps -path \*/appinfo/signature.json

Than compare all the installed apps with that list, the ones not listed probably don’t have the signature.json file.
Just a guess… because I haven’t been able to solved it, no signature.json on specifi app https://apps.nextcloud.com URL.

Thanks. I know how to check for signature.json and how to verify the app using occ. The rant is about development quality of default bundled apps and about the nextcloud server update process. The latter hit me again with NC25 and Talk this time.