-
Notifications
You must be signed in to change notification settings - Fork 37.8k
build, qt: Hardcode last modified timestamp in Qt RCC #23862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Guix builds:
|
It might be good idea to set We learnt this the hard-way on NixOS, where lots of poorly written scripts treated |
This change allows the already built qt package to be reused even with the SOURCE_DATE_EPOCH variable set, e.g., for Guix builds.
Updated 52c9960 -> 11736db (pr23862.01 -> pr23862.02, diff): |
Guix builds:
|
guix hashes, mine match @hebasto:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 11736db
Guix build:
bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
bd9eff2b1257beb72d289da1d6b116b766818b90ba208be0e6de184f4c2b879d guix-build-11736dbe3dbe/output/aarch64-linux-gnu/SHA256SUMS.part
9950b058e97bc3b0f0262aa8fa5609d2b675caaf9966703ee5d4914599e55816 guix-build-11736dbe3dbe/output/aarch64-linux-gnu/bitcoin-11736dbe3dbe-aarch64-linux-gnu-debug.tar.gz
f12c58d958d23c1d6425f4841cbaeab635546639269a8a449fb8f665b3f35afa guix-build-11736dbe3dbe/output/aarch64-linux-gnu/bitcoin-11736dbe3dbe-aarch64-linux-gnu.tar.gz
f02588bd85e5de7c48a794b5877e186d32add675b8b9bf44f12028b6d9928796 guix-build-11736dbe3dbe/output/arm-linux-gnueabihf/SHA256SUMS.part
62abc6da735ab56bddf5c3771581a198a033749c269c47ecdd7158f688a7ec12 guix-build-11736dbe3dbe/output/arm-linux-gnueabihf/bitcoin-11736dbe3dbe-arm-linux-gnueabihf-debug.tar.gz
021372c5844b0305d20503644085a072c374b5913789fbb953f37307c03169d6 guix-build-11736dbe3dbe/output/arm-linux-gnueabihf/bitcoin-11736dbe3dbe-arm-linux-gnueabihf.tar.gz
3a0e17796cc977ed098ec28c6e6d19e5d4f93a102feb6903a2efe4ebcaa59cda guix-build-11736dbe3dbe/output/dist-archive/bitcoin-11736dbe3dbe.tar.gz
ff0c30e507ea2e7bc45be0cf12e4d2d0e55636b79a4d2c7dc1b7193a41baff96 guix-build-11736dbe3dbe/output/powerpc64-linux-gnu/SHA256SUMS.part
165ba8aac6db5e36bc68f456b5216ee5e9fa14abaa999ebcf97da60779fc1ed3 guix-build-11736dbe3dbe/output/powerpc64-linux-gnu/bitcoin-11736dbe3dbe-powerpc64-linux-gnu-debug.tar.gz
e46ad50a76703c01434cee9e6c48ff856adddad16e1dab9e7e23565ab64e21d9 guix-build-11736dbe3dbe/output/powerpc64-linux-gnu/bitcoin-11736dbe3dbe-powerpc64-linux-gnu.tar.gz
c2950e2bda24768afd8395580011e5f2cd2bd6b57e1b7a83d52664c61dcee312 guix-build-11736dbe3dbe/output/powerpc64le-linux-gnu/SHA256SUMS.part
ccadb9f6b0a1129f2bd1959a01946bf73f10ecca94c2de846ae3ec10d91182db guix-build-11736dbe3dbe/output/powerpc64le-linux-gnu/bitcoin-11736dbe3dbe-powerpc64le-linux-gnu-debug.tar.gz
42a4dcb700694cfc04b73c2b01353a381c59536a3a3eb87db52c388dd78ac9d5 guix-build-11736dbe3dbe/output/powerpc64le-linux-gnu/bitcoin-11736dbe3dbe-powerpc64le-linux-gnu.tar.gz
f4045b97af8c77f5434119b7f6bea00d2106dc9d34291949641ebffc1790bf0f guix-build-11736dbe3dbe/output/riscv64-linux-gnu/SHA256SUMS.part
bbe088d99d56fd4eeef0b0a512e65fe3878f6c1b1a7ee728604eaa132a069e05 guix-build-11736dbe3dbe/output/riscv64-linux-gnu/bitcoin-11736dbe3dbe-riscv64-linux-gnu-debug.tar.gz
80682bea8480c745d951c87d702956d5478ab863f41014ec9e77e0033dc186af guix-build-11736dbe3dbe/output/riscv64-linux-gnu/bitcoin-11736dbe3dbe-riscv64-linux-gnu.tar.gz
9ce48d2bf5d3331cd7848f374d88ef013fb62b63d70fb82a72bb37e48118e202 guix-build-11736dbe3dbe/output/x86_64-apple-darwin/SHA256SUMS.part
4d18cad661bd4e205f6a0b52bacdd076fe86902d3c7cfad1b365d485ba90a035 guix-build-11736dbe3dbe/output/x86_64-apple-darwin/bitcoin-11736dbe3dbe-osx-unsigned.dmg
e7eb2a9dc672c927dd1bbae92ecf00d16291480d4635e92dcd9a35433462851b guix-build-11736dbe3dbe/output/x86_64-apple-darwin/bitcoin-11736dbe3dbe-osx-unsigned.tar.gz
726ca6143424781d39697fea531107f347755e7923b26fb5056ecca1a559f9be guix-build-11736dbe3dbe/output/x86_64-apple-darwin/bitcoin-11736dbe3dbe-osx64.tar.gz
db755da0f9512e6f8db089a6ead9d4472ff0bfcc9fd3e9dd1615624e2bc6683f guix-build-11736dbe3dbe/output/x86_64-linux-gnu/SHA256SUMS.part
75dfe92fa7d063a4db5fa7258f02402f7026f132774d3c00870d1ce419052f07 guix-build-11736dbe3dbe/output/x86_64-linux-gnu/bitcoin-11736dbe3dbe-x86_64-linux-gnu-debug.tar.gz
f35fafa985d803f78d5d92872ce881839c3e3e42ae56d38a68186d4164575fea guix-build-11736dbe3dbe/output/x86_64-linux-gnu/bitcoin-11736dbe3dbe-x86_64-linux-gnu.tar.gz
f22056664a74ffba317885d1eff9b402957500a6e8097119b52d1bcbdc115cdc guix-build-11736dbe3dbe/output/x86_64-w64-mingw32/SHA256SUMS.part
bc5afb1f660640df7c39a9e72d769e7b64d01489dd3a3ee9f5ec10fab03db519 guix-build-11736dbe3dbe/output/x86_64-w64-mingw32/bitcoin-11736dbe3dbe-win-unsigned.tar.gz
8c738b0b46664228154b9e2407c9a89786ec3b5a2527e2be80ccdd512221b2d6 guix-build-11736dbe3dbe/output/x86_64-w64-mingw32/bitcoin-11736dbe3dbe-win64-debug.zip
63411a35e4980d2ffda3c55d8a299c64adbea23c5dd819faa752a28c9322edb9 guix-build-11736dbe3dbe/output/x86_64-w64-mingw32/bitcoin-11736dbe3dbe-win64-setup-unsigned.exe
443ebe2885012430f418d9edeccf31bef302898b4ac56249e45b8a3554c2d490 guix-build-11736dbe3dbe/output/x86_64-w64-mingw32/bitcoin-11736dbe3dbe-win64.zip
…t RCC 11736db build, qt: Hardcode last modified timestamp in Qt RCC (Hennadii Stepanov) Pull request description: Our Guix build system sets the [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/specs/source-date-epoch/) and propagates it to the depends build subsystem. Its [default value](https://github.com/bitcoin/bitcoin/blob/master/contrib/guix/README.md#recognized-environment-variables) is the top commit timestamp. After bumping Qt version up to 5.15.2, due to [this](qt/qtbase@1ffcca4) 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](bitcoin#21995) 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](https://bugreports.qt.io/browse/QTBUG-57182) 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`. ACKs for top commit: fanquake: ACK 11736db Tree-SHA512: 31f104010a0a78d217aafcc5bc4606351f9060fc2a827277935b85fc8ced9f3d90a31d812c7db8c2711fb6daccd279cf0945dc1d7a7199e0eb0ade451cdbcd5d
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 theSOURCE_DATE_EPOCH
variable in the depends build subsystem. For instance, its default value could be the output ofgit log --format=%at -1 -- depends
.