libqt5-qtbase/reproducible-qrc-time.patch
Dominique Leuenberger 9515d2adab Accepting request 663360 from KDE:Qt5
- Add reproducible-qrc-time.patch to use SOURCE_DATE_EPOCH
  for qrc embedded timestamps to make bitcoin-qt build reproducible
  (https://bugreports.qt.io/browse/QTBUG-62511, boo#1047218)

- Use upstream-recommended %{_rpmconfigdir}/macros.d directory
  for the rpm macros.

OBS-URL: https://build.opensuse.org/request/show/663360
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=92
2019-01-15 12:13:30 +00:00

27 lines
1008 B
Diff

commit aa0241031c93086737d82d5c3e917a8816a77fc4
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Wed Jul 11 10:05:55 2018 +0200
Use SOURCE_DATE_EPOCH
Use the standard variable name in addition to the QT-specific one
to make builds reproducible out-of-the-box
Change-Id: I401a2a9d258e751b83ae7b83f4100d9088b9ad71
diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 1a7cab01df..26fc3efea2 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -211,6 +211,9 @@ void RCCFileInfo::writeDataInfo(RCCResourceLibrary &lib)
static const quint64 sourceDate = 1000 * qgetenv("QT_RCC_SOURCE_DATE_OVERRIDE").toULongLong();
if (sourceDate != 0)
lastmod = sourceDate;
+ static const quint64 sourceDate2 = 1000 * qgetenv("SOURCE_DATE_EPOCH").toULongLong();
+ if (sourceDate2 != 0)
+ lastmod = sourceDate2;
lib.writeNumber8(lastmod);
if (text || pass1)
lib.writeChar('\n');