From 3c58fb7ec57f292d7bdcd8ace511fb9e0dc44f2a Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Wed, 16 Oct 2024 13:07:33 -0700 Subject: [PATCH] Adjust libpfm4 dep to use git instead of the tar. (#4413) The .tar.gz link is currently broken (I think wget used to work, now it doesn't); not sure if that's deliberate since it's a download page. I'm hoping the new location remains more reliable. Note I tried using SourceForge's git directly. That works locally, but on the action runners it seems to be blocked: ``` fatal: unable to access 'https://git.code.sf.net/p/perfmon2/libpfm4/': Failed to connect to git.code.sf.net port 443 after 5 ms: Connection refused ``` --- MODULE.bazel | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 420033d44275..4fcd5b47ecef 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -53,13 +53,17 @@ bazel_dep(name = "libpfm", version = "4.11.0") libpfm_version = "4.13.0" +# The official site is https://perfmon2.sourceforge.net/, but SourceForge makes +# it difficult to download from bazel. On GitHub action runners, +# https://git.code.sf.net/p/perfmon2/libpfm4 seems to be blocked. As a +# consequence, use a mirror. archive_override( module_name = "libpfm", - integrity = "sha256-0YuXdkx1VSjBBR03bjNUXQ62DG6/hWgENoE/pbBMw9E=", + integrity = "sha256-sGBx1+UoQCplBCc+pwA1Tr/PS2L/4jnLZHH82wSuPz0=", patch_strip = 1, patches = ["@//bazel/libpfm:0001-Introduce-a-simple-native-Bazel-build.patch"], - strip_prefix = "libpfm-{0}".format(libpfm_version), - urls = ["https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-{0}.tar.gz".format(libpfm_version)], + strip_prefix = "libpfm4-{0}".format(libpfm_version), + urls = ["https://github.com/wcohen/libpfm4/archive/v{0}.tar.gz".format(libpfm_version)], ) # The registry has a snapshot, but upstream is active and not regularly marking