Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:bmwiedemann:reproducible:test
libqt5-qtbase
reproducibletime2.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File reproducibletime2.patch of Package libqt5-qtbase
commit ef1fe1e52245c660f930a14d4fe7f915ae085a69 Author: Bernhard M. Wiedemann <bwiedemann@suse.de> Date: Thu Aug 3 08:56:09 2023 +0200 Allow to override build date with SOURCE_DATE_EPOCH [ChangeLog][qmake] Allows to override _DATE_ with SOURCE_DATE_EPOCH to make builds reproducible. 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. Fixes: QTBUG-115737 Change-Id: I1964aa0a3d849628440618aa6f0a51af2017d824 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index e350923e83..75f4578c08 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1037,10 +1037,13 @@ static ProString msvcArchitecture(const QString &vcInstallDir, const QString &pa void QMakeEvaluator::loadDefaults() { ProValueMap &vars = m_valuemapStack.top(); + qlonglong sde = qgetenv("SOURCE_DATE_EPOCH").toLongLong(); + QDateTime builddate = sde ? QDateTime::fromSecsSinceEpoch(sde) + : QDateTime::currentDateTime(); vars[ProKey("DIR_SEPARATOR")] << ProString(m_option->dir_sep); vars[ProKey("DIRLIST_SEPARATOR")] << ProString(m_option->dirlist_sep); - vars[ProKey("_DATE_")] << ProString(QDateTime::currentDateTime().toString()); + vars[ProKey("_DATE_")] << ProString(builddate.toString()); if (!m_option->qmake_abslocation.isEmpty()) vars[ProKey("QMAKE_QMAKE")] << ProString(m_option->qmake_abslocation); if (!m_option->qmake_args.isEmpty())
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor