Repository navigation
[6.42] [CMake] List an external mirror for every downloaded builtin archive - #23973
Merged
guitargeek merged 2 commits intoNov 4, 2026
Merged
guitargeek merged 2 commits into
guitargeek merged 2 commits into
Conversation
All source archives of the builtin_* options were downloaded from a single location, the CERN mirror (lcgpackages, or root.cern for libjpeg-turbo and libpng). This lists a second, external mirror for each of them, so that the download keeps working when the CERN network is unreachable: CMake tries the URLs in order. Every external URL was verified to serve the byte-identical file (same SHA256 as the pinned one): 18 from GitHub (clad, ftgl, gtest, jsroot, lz4, lzma, mathjax, nlohmann, openssl, openui5, pcre, tbb, vdt, xrootd, xxhash, zlib, zstd, and libjpeg-turbo's tag archive), the rest from the upstream project sites (fftw.org, savannah for freetype, osgeo for libtiff, HEASARC for cfitsio, statmath.wu.ac.at for unuran, ftp.gnu.org for gsl, geuz.org for gl2ps, SourceForge for giflib and libpng). The git clones (civetweb, AdaptiveCpp, clad with CLAD_GIT_TAG) are not archives and stay as they are. Along the way: * Since the version now appears in two URLs, every builtin keeps it in a single variable (added for clad, jsroot, mathjax and tbb; tbb's ROOT_TBB_VERSION was referenced for the parent scope but never set), and the SHA256 is kept in a *_HASH variable on the line right after the version, so that a version bump cannot forget the hash (added where it was missing: cfitsio, clad, fftw3, gsl, jsroot, mathjax, openssl, openui5, tbb, vdt, xrootd). The single-use *_URL variables are dropped and the URLs are written inline in the ExternalProject_Add call. * The unuran tarball on LCG turned out to be the pristine upstream release, so its stale "repackaged" comment is removed. * giflib uses the LCG copy instead of root.cern, like the other builtins. (cherry picked from commit 4f6e418)
builtins/unuran/CMakeLists.txt only set PATCH_COMMAND when <SOURCE_DIR>/src/CMakeLists.txt did not exist yet, checked at configure time against whatever the build tree held from the previous build. The check was meant to avoid re-applying the patch to an already patched tree, but it defeats the step ordering that ExternalProject already provides: the patch stamp depends on the download stamp, so the patch step re-runs exactly when a fresh tree has been extracted. Whenever the download step re-runs in an existing build tree, it replaces <SOURCE_DIR> with the pristine upstream tarball, which has no src/CMakeLists.txt (upstream unuran is autotools only). With the patch step gone, the configure step then fails with CMake Error: The source directory ".../BUILTIN_UNURAN/src" does not appear to contain CMakeLists.txt. The download re-runs whenever the URL list changes, so this broke the incremental opensuse CI build of the previous commit, which added a second mirror, and it would have broken every future version bump of the builtin in the same way, since the source directory path does not depend on the version. Set PATCH_COMMAND unconditionally, as interpreter/cling/tools/plugins/clad already does, and let ExternalProject decide when to run it. The step only re-runs on an already patched tree if its stamp file is removed by hand. (cherry picked from commit 0db7792)
Test Results 24 files 24 suites 3d 22h 54m 5s ⏱️ Results for commit d3c421d. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #23963, requested by @guitargeek.