-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check the original checksums on the fallback archives from Software Heritage #5720
Comments
thank you for opening this issue. I was not aware that these archives are used as a fallback without verifying the checksum. Would it be possible to guard this behaviour with even another command-line option (i.e. not Thanks a lot. |
On validation, checksums are not checked as they can't be used. It is another mechanism that is in place for SWH fallback. We rely on the swhid given in the opam file to download the archive. That swhid is an unique identifier computed from the content of the archive, and it is given by the maintainer. So when we download the SWH archive, we recompute the swhid on the untarred archive in order to validate it (no corruption). On the fallback itself, it is possible to disable it using |
Some clarification, after a long discussion :) There was a misunderstanding on Software heritage usage, and the fallback implemented in opam. But that safe to use guaranty is today not fully fulfilled: there is no check done on opam repo ci, on publication tools, etc. At the beginning, the Software Heritage & OCaml story contained:
But it was done (and funded) only until point 2. So at the moment, there is no support on opam repo, nor on publication tools. It results on 0 package in opam repo contain a Once that said, there is still a strong reliability on repo/maintainer for Until the opam repo & publication tools are upgraded, we propose to change the default by deactivating the SWH fallback, and to display a note in the case an opam file contains an |
The software heritage fallback was disabled by default in #5899 so moving this issue off the 2.2 milestone |
Software Heritage fallbacks added in #4859 adds the ability for opam to fetch archives from Software Heritage.
Currently such archives are (for reasons that escape me [1]) not backups of the original archives but backups of the untarred archives that are re-tarred again later when requested. This way of doing makes it so that archives loose their original checksums and retrieving it in a deterministic manner is close to impossible due to file ordering and metadata having changed.
There is currently a long standing upstream issue that hopes to fix this issue in the medium to long term: https://gitlab.softwareheritage.org/swh/devel/swh-model/-/issues/2430
I personally think we should:
--confirm-level=unsafe-yes
as currently only--yes
is required:opam/src/repository/opamDownload.ml
Line 315 in c4961ba
[1]: I’m guessing it’s for space efficiencies, but still...
The text was updated successfully, but these errors were encountered: