From 1ffcca4cc208c48ddb06b6a23abf1756f9724351 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Wed, 11 Jul 2018 10:05:55 +0200 Subject: rcc: Use SOURCE_DATE_EPOCH for mtime Use the standard variable name in addition to the QT-specific one to make builds reproducible out-of-the-box. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. Task-number: QTBUG-62511 Change-Id: I401a2a9d258e751b83ae7b83f4100d9088b9ad71 Reviewed-by: Tobias Hunger Reviewed-by: Lars Knoll --- src/tools/rcc/rcc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index f284749781..a7919e31f9 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -230,6 +230,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'); -- cgit v1.2.3