Skip to content

[6.42] [CMake] List an external mirror for every downloaded builtin archive - #23973

Merged
guitargeek merged 2 commits into
root-project:v6-42-00-patchesfrom
root-project-bot:BP_6.42_pull_23963
Nov 4, 2026
Merged

guitargeek merged 2 commits into
root-project:v6-42-00-patchesfrom
root-project-bot:BP_6.42_pull_23963

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #23963, requested by @guitargeek.

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)
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Test Results

    24 files      24 suites   3d 22h 54m 5s ⏱️
 3 905 tests  3 905 ✅ 0 💤 0 ❌
83 648 runs  83 648 ✅ 0 💤 0 ❌

Results for commit d3c421d.

@guitargeek
guitargeek merged commit 8721a8d into root-project:v6-42-00-patches Nov 4, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:Build System pr:backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants