Check c2patool and library versions in the status report and log signing errors

Part of #3596034 (closed).

Problem/Motivation

The status report shows the c2patool version as information only, and the jrglasgow/c2patool version not at all. An unsupported version shows up at the first failed upload. The c2patool error then reaches only the caller, not the site log.

Proposed resolution

  • Status report: error when c2patool is older than 0.27 or jrglasgow/c2patool older than 0.5.3. Development versions are not compared.
  • Log signing failures to a c2pa_sign channel, with the file and the c2patool message. The exception is still thrown.

Definition of done

  • c2patool row is an error below 0.27 and info from 0.27
  • New library row is an error below 0.5.3 and OK from 0.5.3
  • Every failed signature, upload or derivative, leaves an error in the c2pa_sign channel
  • The logger is injected in the event subscriber
  • All messages are translatable

Testing instructions

  1. With c2patool 0.10.2, open /admin/reports/status. The c2patool row is an error that names 0.27.0.
  2. With c2patool 0.28.2 and the library at 0.5.3, both rows are fine.
  3. Replace c2patool with a script that prints an error and exits with 1, then upload an image. /admin/reports/dblog shows a c2pa_sign error with the c2patool message.

AI Compliance

🤖 Generated with the help of an LLM, reviewed and approved by me before posting.