Skip to content

Check the original checksums on the fallback archives from Software Heritage #5720

Open
@kit-ty-kate

Description

@kit-ty-kate

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:

  • make sure users understand that the checksum is not checked and that the content might not be the same, when prompting to use the fallback
  • make the fallback require --confirm-level=unsafe-yes as currently only --yes is required:
    if OpamConsole.confirm ~default:false
  • Wait for the proper fix upstream and use it whenever possible

[1]: I’m guessing it’s for space efficiencies, but still...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions