Skip to content

Add support for oci:// URLs to fetch RPMs from OCI registries #1080

@lcarva

Description

@lcarva

Currently, the Hermeto lock file requires an http:// or https:// URL in the url field for each RPM entry. This limits the sources from which RPMs can be fetched. I would like to store and distribute RPMs in OCI-compliant registries and have Hermeto fetch them directly.

I propose extending the url field to support an oci:// scheme. This would allow Hermeto to pull RPMs from an OCI registry, where the RPM is stored as a layer in an OCI artifact.

An entry in rpms.lock.yaml would, partially, look like this:

- name: aardvark-dns
  checksum: sha256:deadbeef...
  url: oci://registry.example.com/rpms/aardvark-dns:1.14.0

The oci:// URL points to an OCI Image Manifest or an Image Index that describes an OCI Artifact. The manifest will likely contain one or more layers (blobs). The checksum value from the lock file entry corresponds to the digest of the correct RPM layer. Hermeto should fetch the manifest, find the layer with the matching digest, and download it. Alternatively, it is possible to fetch the layer directly from the registry using its digest (the checksum value).

Standard OCI registry authentication mechanisms (e.g., ~/.docker/config.json) should be supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions