summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2022-06-02 09:52:05 -0700
committerGitHub <noreply@github.com>2022-06-02 12:52:05 -0400
commit5728ba01222fde36ecd7c55ad7bc3ca44156f5d7 (patch)
treed6fd7d6c3087be81b9b31a4980b095945378460c /lib
parent2bda10edb53cf69fe2dd75fd65b0d3db38445cbd (diff)
downloadspack-5728ba01222fde36ecd7c55ad7bc3ca44156f5d7.tar.gz
spack-5728ba01222fde36ecd7c55ad7bc3ca44156f5d7.tar.bz2
spack-5728ba01222fde36ecd7c55ad7bc3ca44156f5d7.tar.xz
spack-5728ba01222fde36ecd7c55ad7bc3ca44156f5d7.zip
Use stable URLs for patch-diff GitHub patches (#30953)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/audit.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py
index 1075822de7..e090ff251f 100644
--- a/lib/spack/spack/audit.py
+++ b/lib/spack/spack/audit.py
@@ -298,7 +298,8 @@ def _check_build_test_callbacks(pkgs, error_cls):
def _check_patch_urls(pkgs, error_cls):
"""Ensure that patches fetched from GitHub have stable sha256 hashes."""
github_patch_url_re = (
- r"^https?://github\.com/.+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)"
+ r"^https?://(?:patch-diff\.)?github(?:usercontent)?\.com/"
+ ".+/.+/(?:commit|pull)/[a-fA-F0-9]*.(?:patch|diff)"
)
errors = []