* [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
@ 2019-01-21 19:55 Carl Dong
2019-01-22 14:28 ` bug#34165: " Danny Milosavljevic
2019-01-23 9:07 ` [bug#34165] " Ludovic Courtès
0 siblings, 2 replies; 8+ messages in thread
From: Carl Dong @ 2019-01-21 19:55 UTC (permalink / raw)
To: 34165
From 2b3162dde22a5d44eb5910b0fcfa07318f935aaf Mon Sep 17 00:00:00 2001
From: Carl Dong <accounts@carldong.me>
Date: Mon, 21 Jan 2019 14:51:57 -0500
Subject: [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
* gnu/packages/finance.scm: Make bitcoin-qt deterministic.
---
gnu/packages/finance.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 468388797..96df919c4 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -115,6 +115,9 @@
"/bin/lupdate"))
#:phases
(modify-phases %standard-phases
+ (add-before 'configure 'qt-time
+ (lambda _
+ (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1"))) ; Make QT deterministic
(add-before 'check 'set-home
(lambda _
(setenv "HOME" (getenv "TMPDIR"))))))) ; Tests write to $HOME.
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#34165: [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
2019-01-21 19:55 [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic Carl Dong
@ 2019-01-22 14:28 ` Danny Milosavljevic
2019-01-23 9:07 ` [bug#34165] " Ludovic Courtès
1 sibling, 0 replies; 8+ messages in thread
From: Danny Milosavljevic @ 2019-01-22 14:28 UTC (permalink / raw)
To: Carl Dong; +Cc: 34165-done
[-- Attachment #1: Type: text/plain, Size: 91 bytes --]
Thanks!
Pushed this as commit 99629e5a110a9a91151bd0e63a1805446996a3c8 to guix master.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
2019-01-21 19:55 [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic Carl Dong
2019-01-22 14:28 ` bug#34165: " Danny Milosavljevic
@ 2019-01-23 9:07 ` Ludovic Courtès
2019-01-23 14:41 ` Ricardo Wurmus
1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2019-01-23 9:07 UTC (permalink / raw)
To: Carl Dong; +Cc: 34165
Hi!
Carl Dong <contact@carldong.me> skribis:
>>From 2b3162dde22a5d44eb5910b0fcfa07318f935aaf Mon Sep 17 00:00:00 2001
> From: Carl Dong <accounts@carldong.me>
> Date: Mon, 21 Jan 2019 14:51:57 -0500
> Subject: [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
[...]
> + (add-before 'configure 'qt-time
> + (lambda _
> + (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1"))) ; Make QT deterministic
Looking at this and the upstream commit¹, I’m thinking maybe we should
do the same in other Qt applications. Any idea how we can identify
applications where it’s needed?
Thanks,
Ludo’.
¹ https://github.com/qt/qtbase/commit/38271e9298dcf48652a6e2e08414a940a97867fa
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
2019-01-23 9:07 ` [bug#34165] " Ludovic Courtès
@ 2019-01-23 14:41 ` Ricardo Wurmus
2019-01-26 18:07 ` Efraim Flashner
2019-01-28 11:07 ` Danny Milosavljevic
0 siblings, 2 replies; 8+ messages in thread
From: Ricardo Wurmus @ 2019-01-23 14:41 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 34165, Carl Dong
Ludovic Courtès <ludo@gnu.org> writes:
> Hi!
>
> Carl Dong <contact@carldong.me> skribis:
>
>>>From 2b3162dde22a5d44eb5910b0fcfa07318f935aaf Mon Sep 17 00:00:00 2001
>> From: Carl Dong <accounts@carldong.me>
>> Date: Mon, 21 Jan 2019 14:51:57 -0500
>> Subject: [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
>
> [...]
>
>> + (add-before 'configure 'qt-time
>> + (lambda _
>> + (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1"))) ; Make QT deterministic
>
> Looking at this and the upstream commit¹, I’m thinking maybe we should
> do the same in other Qt applications. Any idea how we can identify
> applications where it’s needed?
>
> ¹
> https://github.com/qt/qtbase/commit/38271e9298dcf48652a6e2e08414a940a97867fa
This is a bit unfortunate. It seems to me that the original intent of
the patch was to support SOURCE_DATE_EPOCH as the commit message
mentions that variable’s specification. Pity that it is now a custom Qt
variable.
This probably should be used for all packages that generate resource
files, which I assume are most non-trivial applications. I think it’s
fine to add it to all packages using qtbase.
--
Ricardo
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
2019-01-23 14:41 ` Ricardo Wurmus
@ 2019-01-26 18:07 ` Efraim Flashner
2019-01-27 22:39 ` Ludovic Courtès
2019-01-28 11:07 ` Danny Milosavljevic
1 sibling, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2019-01-26 18:07 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 34165, Carl Dong
[-- Attachment #1: Type: text/plain, Size: 691 bytes --]
On Wed, Jan 23, 2019 at 03:41:43PM +0100, Ricardo Wurmus wrote:
>
>
> This is a bit unfortunate. It seems to me that the original intent of
> the patch was to support SOURCE_DATE_EPOCH as the commit message
> mentions that variable’s specification. Pity that it is now a custom Qt
> variable.
>
We could just add it in to the gnu-build-system and set the variable in
all events. Or patch qt/qtbase to accept SOURCE_DATE_EPOCH in place of
their own variable.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
2019-01-26 18:07 ` Efraim Flashner
@ 2019-01-27 22:39 ` Ludovic Courtès
0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2019-01-27 22:39 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 34165, Carl Dong
Efraim Flashner <efraim@flashner.co.il> skribis:
> On Wed, Jan 23, 2019 at 03:41:43PM +0100, Ricardo Wurmus wrote:
>>
>>
>> This is a bit unfortunate. It seems to me that the original intent of
>> the patch was to support SOURCE_DATE_EPOCH as the commit message
>> mentions that variable’s specification. Pity that it is now a custom Qt
>> variable.
>>
>
> We could just add it in to the gnu-build-system and set the variable in
> all events. Or patch qt/qtbase to accept SOURCE_DATE_EPOCH in place of
> their own variable.
Either way is fine with me. Adding it to the ‘set-SOURCE-DATE-EPOCH’
phase in ‘core-updates’ would be reasonable IMO.
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
2019-01-23 14:41 ` Ricardo Wurmus
2019-01-26 18:07 ` Efraim Flashner
@ 2019-01-28 11:07 ` Danny Milosavljevic
2019-01-28 13:39 ` Ludovic Courtès
1 sibling, 1 reply; 8+ messages in thread
From: Danny Milosavljevic @ 2019-01-28 11:07 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: 34165, Carl Dong
[-- Attachment #1: Type: text/plain, Size: 1371 bytes --]
Hi,
> > https://github.com/qt/qtbase/commit/38271e9298dcf48652a6e2e08414a940a97867fa
>
> This is a bit unfortunate. It seems to me that the original intent of
> the patch was to support SOURCE_DATE_EPOCH as the commit message
> mentions that variable’s specification. Pity that it is now a custom Qt
> variable.
I asked them and they said [1]:
>There was a policy to prefix variables with QT_ and I did not want to discuss more with the reviewer.
>But later, this was merged:
>https://codereview.qt-project.org/#/c/243636/4/src/tools/rcc/rcc.cpp,unified
[1] https://github.com/qt/qtbase/commit/38271e9298dcf48652a6e2e08414a940a97867fa#commitcomment-32085478
https://codereview.qt-project.org/#/c/243636/4/src/tools/rcc/rcc.cpp,unified contains the following patch:
...
228 228 const QDateTime lastModified = m_fileInfo.lastModified();
229 229 quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
230 230 static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(
);
231 231 if (sourceDate != 0)
232 232 lastmod = sourceDate;
233 + static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong();
234 + if (sourceDate2 != 0)
235 + lastmod = sourceDate2;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic.
2019-01-28 11:07 ` Danny Milosavljevic
@ 2019-01-28 13:39 ` Ludovic Courtès
0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2019-01-28 13:39 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: 34165, Carl Dong
Hi Danny,
Danny Milosavljevic <dannym@scratchpost.org> skribis:
> [1] https://github.com/qt/qtbase/commit/38271e9298dcf48652a6e2e08414a940a97867fa#commitcomment-32085478
>
> https://codereview.qt-project.org/#/c/243636/4/src/tools/rcc/rcc.cpp,unified contains the following patch:
>
> ...
> 228 228 const QDateTime lastModified = m_fileInfo.lastModified();
> 229 229 quint64 lastmod = quint64(lastModified.isValid() ? lastModified.toMSecsSinceEpoch() : 0);
> 230 230 static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong(
> );
> 231 231 if (sourceDate != 0)
> 232 232 lastmod = sourceDate;
> 233 + static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong();
> 234 + if (sourceDate2 != 0)
> 235 + lastmod = sourceDate2;
Nice, so maybe we don’t need to change anything and just wait for the
next Qt version?
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-01-28 13:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-21 19:55 [bug#34165] [PATCH] gnu: bitcoin-core: Make bitcoin-qt deterministic Carl Dong
2019-01-22 14:28 ` bug#34165: " Danny Milosavljevic
2019-01-23 9:07 ` [bug#34165] " Ludovic Courtès
2019-01-23 14:41 ` Ricardo Wurmus
2019-01-26 18:07 ` Efraim Flashner
2019-01-27 22:39 ` Ludovic Courtès
2019-01-28 11:07 ` Danny Milosavljevic
2019-01-28 13:39 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).