]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
build: Fix Zstd and Hiredis downloads for unstable GitHub archives
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 30 Jan 2023 20:23:43 +0000 (21:23 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 31 Jan 2023 07:12:13 +0000 (08:12 +0100)
The content of the Zstd and Hiredis GitHub source achive URLs like
<https://github.com/$X/$Y/archive/$tag.tar.gz> apparently change from
time to time. Color me surprised. [1] says that this is intentional
(although, at the time of writing, reverted temporarily). Let's use
another URL for Zstd and not verify the checksum for Hiredis (since
there is no release source archive).

[1]: https://github.blog/changelog/2023-01-30-git-archive-checksums-may-change/

cmake/Findhiredis.cmake
cmake/Findzstd.cmake

index b52cb1d8f509882401fe50a2eb63e1cbec4fc366..8c01058c2dbf6939ded5821b144099ffdd459c81 100644 (file)
@@ -57,8 +57,7 @@ if(do_download)
   include(FetchContent)
   FetchContent_Declare(
     hiredis
-    URL https://github.com/redis/hiredis/archive/v${hiredis_version}.tar.gz
-    URL_HASH SHA256=fe6d21741ec7f3fc9df409d921f47dfc73a4d8ff64f4ac6f1d95f951bf7f53d6
+    URL https://github.com/redis/hiredis/archive/refs/tags/v${hiredis_version}.tar.gz
     SOURCE_DIR ${hiredis_dir}
     BINARY_DIR ${hiredis_build}
   )
index 3c770a9e0fd191bc3f941748b38dc56dc2710a5c..b68db6ab98284fbd878c5a01fdaffdf973d053d9 100644 (file)
@@ -55,8 +55,8 @@ if(do_download)
   include(FetchContent)
   FetchContent_Declare(
     zstd
-    URL https://github.com/facebook/zstd/archive/v${zstd_version}.tar.gz
-    URL_HASH SHA256=f7de13462f7a82c29ab865820149e778cbfe01087b3a55b5332707abf9db4a6e
+    URL https://github.com/facebook/zstd/releases/download/v${zstd_version}/zstd-${zstd_version}.tar.gz
+    URL_HASH SHA256=7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0
     SOURCE_DIR ${zstd_dir}
     BINARY_DIR ${zstd_build}
   )