Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
40.07k stars 9.4k forks source link

Leave manifest platform empty for `:all` bottles #17395

Open justenstall opened 1 month ago

justenstall commented 1 month ago

Verification

Provide a detailed description of the proposed feature

The image index for cross-platform bottles lists a single manifest which is downloaded for all platforms. The manifest descriptor includes a "platform" object describing the architecture the bottle was built on. To conform to the OCI spec, the descriptor should exclude the "platform" field since it is not platform-specific.

From the OCI Image Index Specification:

  • platform object

    This OPTIONAL property describes the minimum runtime requirements of the image. This property SHOULD be present if its target is platform-specific.

Example of a cross-platform bottle's image index: ghcr.io/homebrew/core/ca-certificates:2024-03-11

What is the motivation for the feature?

This change will make bottles conform to the OCI specification better.

This change will also improve the inspection and discovery of bottles through the GitHub Packages UI and command line clients like oras and skopeo. The GitHub Package UI labels the images with the "platform" information, which is misleading: image

link to package

How will the feature be relevant to at least 90% of Homebrew users?

This change will improve the bottle publishing format consumed by all Homebrew users.

What alternatives to the feature have been considered?

None.

MikeMcQuaid commented 1 month ago

Makes sense, thanks @justenstall. For whoever picks this up: I note the tab also contains arch: "arm64" which should probably be removed and built_on contains the OS/OS version/Xcode version which could potentially be removed.