In general, the Bitcoin Core build system attempts to fetch commit or tag details from git. This is handled by the cmake/script/GenerateBuildInfo.cmake
script, which generates the src/bitcoin-build-info.h
header within the build tree.
However, there are cases where the retrieved details may be incorrect—for example, when building from a source tarball or as a subproject within a git-aware project.
In the Autotools-based build system, the BITCOIN_GENBUILD_NO_GIT
environment variable was introduced in v0.20.0 to address such scenarios:
The process for generating the source code release (“tarball”) has changed in an effort to make it more complete, however, there are a few regressions in this release:
- Instead of running
make
simply, you should instead runBITCOIN_GENBUILD_NO_GIT=1 make
.
This PR automagically handles both of the aforementioned cases and removes the need for BITCOIN_GENBUILD_NO_GIT
.
The user is still able to configure the build with -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
to disable git execution manually, for reasons we don’t know in advance.
Closes #31999.