Our Guix build system sets the SOURCE_DATE_EPOCH
and propagates it to the depends build subsystem. Its default value is the top commit timestamp.
After bumping Qt version up to 5.15.2, due to this change, every time they are going to make new Guix builds for another branch/commit they must ensure that the qt
package will be rebuilt from scratch. Otherwise, Bitcoin Core GUI binaries will be non-deterministic.
Such behavior makes working with Guix builds suboptimal.
This PR fixes the described issue by patching Qt RCC and hardcoding last modified timestamps with 1
.
It’s worth to mention that this change is compatible with a possible future improvement which makes each dependency package reproducible.
A drawback of such an approach is not currently applied to our project, as it effectively makes QML cache files useless. I can’t say it’s a problem for the https://github.com/bitcoin-core/gui-qml project.
A note for thinkers: For now this change is enough as only Qt source contains SOURCE_DATE_EPOCH
. But in general we should re-think about treating the SOURCE_DATE_EPOCH
variable in the depends build subsystem. For instance, its default value could be the output of git log --format=%at -1 -- depends
.