From 9f272f24f133c9d4801ce81ab5b404b06f482bc5 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Thu, 30 Jul 2026 18:27:59 +0200 Subject: [PATCH] Use consistent x64/arm64 arch suffixes for ripunzip sha attrs Rename the sha256 attributes (and matching canonical_ids) to a single scheme across all platforms: _x64 / _arm64. This replaces the inconsistent sha256_linux (no suffix), sha256_macos_intel and sha256_macos_arm. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c6404a7a-35d7-4294-b3b6-9231ca15ef25 --- MODULE.bazel | 10 +++++----- misc/ripunzip/ripunzip.bzl | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 57a43361a11..e8d49c11bcb 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -326,11 +326,11 @@ ripunzip_archive = use_repo_rule("//misc/ripunzip:ripunzip.bzl", "ripunzip_archi # go to https://github.com/GoogleChrome/ripunzip/releases to find latest version and corresponding sha256s ripunzip_archive( name = "ripunzip", - sha256_linux = "71482d7a7e4ea9176d5596161c49250c34b136b157c45f632b1111323fbfc0de", - sha256_linux_arm = "a282740ef376ff8dc0de3c589b7457598db15cc045b7daa688f15531612e0bbe", - sha256_macos_arm = "604194ab13f0aba3972995d995f11002b8fc285c8170401fcd46655065df20c9", - sha256_macos_intel = "65367b94fd579d93d46f2d2595cc4c9a60cfcf497e3c824f9d1a7b80fa8bd38a", - sha256_windows = "ac3874075def2b9e5074a3b5945005ab082cc6e689e1de658da8965bc23e643e", + sha256_linux_arm64 = "a282740ef376ff8dc0de3c589b7457598db15cc045b7daa688f15531612e0bbe", + sha256_linux_x64 = "71482d7a7e4ea9176d5596161c49250c34b136b157c45f632b1111323fbfc0de", + sha256_macos_arm64 = "604194ab13f0aba3972995d995f11002b8fc285c8170401fcd46655065df20c9", + sha256_macos_x64 = "65367b94fd579d93d46f2d2595cc4c9a60cfcf497e3c824f9d1a7b80fa8bd38a", + sha256_windows_x64 = "ac3874075def2b9e5074a3b5945005ab082cc6e689e1de658da8965bc23e643e", version = "2.0.4", ) diff --git a/misc/ripunzip/ripunzip.bzl b/misc/ripunzip/ripunzip.bzl index 148c4dfbc7f..53f22c53e0a 100644 --- a/misc/ripunzip/ripunzip.bzl +++ b/misc/ripunzip/ripunzip.bzl @@ -6,12 +6,12 @@ def _ripunzip_archive_impl(repository_ctx): arch = repository_ctx.os.arch if arch == "aarch64": deb_arch = "arm64" - sha256 = repository_ctx.attr.sha256_linux_arm - canonical_id = "ripunzip-linux-arm" + sha256 = repository_ctx.attr.sha256_linux_arm64 + canonical_id = "ripunzip-linux-arm64" else: deb_arch = "amd64" - sha256 = repository_ctx.attr.sha256_linux - canonical_id = "ripunzip-linux" + sha256 = repository_ctx.attr.sha256_linux_x64 + canonical_id = "ripunzip-linux-x64" # ripunzip only provides a deb package for Linux: we fish the binary out of it # a deb archive contains a data.tar.xz one which contains the files to be installed under usr/bin @@ -29,20 +29,20 @@ def _ripunzip_archive_impl(repository_ctx): elif "windows" in repository_ctx.os.name: repository_ctx.download_and_extract( url = "%s/ripunzip_v%s_x86_64-pc-windows-msvc.zip" % (url_prefix, version), - canonical_id = "ripunzip-windows", - sha256 = repository_ctx.attr.sha256_windows, + canonical_id = "ripunzip-windows-x64", + sha256 = repository_ctx.attr.sha256_windows_x64, output = "bin", ) elif "mac os" in repository_ctx.os.name: arch = repository_ctx.os.arch if arch == "x86_64": suffix = "x86_64-apple-darwin" - sha256 = repository_ctx.attr.sha256_macos_intel - canonical_id = "ripunzip-macos-intel" + sha256 = repository_ctx.attr.sha256_macos_x64 + canonical_id = "ripunzip-macos-x64" elif arch == "aarch64": suffix = "aarch64-apple-darwin" - sha256 = repository_ctx.attr.sha256_macos_arm - canonical_id = "ripunzip-macos-arm" + sha256 = repository_ctx.attr.sha256_macos_arm64 + canonical_id = "ripunzip-macos-arm64" else: fail("Unsupported macOS architecture: %s" % arch) repository_ctx.download_and_extract( @@ -61,10 +61,10 @@ ripunzip_archive = repository_rule( doc = "Downloads a prebuilt ripunzip binary for the host platform from https://github.com/GoogleChrome/ripunzip/releases", attrs = { "version": attr.string(mandatory = True), - "sha256_linux": attr.string(mandatory = True), - "sha256_linux_arm": attr.string(mandatory = True), - "sha256_windows": attr.string(mandatory = True), - "sha256_macos_intel": attr.string(mandatory = True), - "sha256_macos_arm": attr.string(mandatory = True), + "sha256_linux_x64": attr.string(mandatory = True), + "sha256_linux_arm64": attr.string(mandatory = True), + "sha256_windows_x64": attr.string(mandatory = True), + "sha256_macos_x64": attr.string(mandatory = True), + "sha256_macos_arm64": attr.string(mandatory = True), }, )