From 8b8d376cf5189724d59026459e6cd59404a5cff6a6149c7f3e9acb94639045b4 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 26 Jan 2019 21:18:05 +0000 Subject: [PATCH] Accepting request 667732 from KDE:Qt5 - Add reproducible.patch to override chromium build date to make package build reproducible (boo#1047218) - Use openSUSE's ninja for the build so that we can apply fixes there that are used by everyone (boo#1118619) OBS-URL: https://build.opensuse.org/request/show/667732 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwebengine?expand=0&rev=43 --- libqt5-qtwebengine.changes | 8 ++++++++ libqt5-qtwebengine.spec | 3 +++ reproducible.patch | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 reproducible.patch diff --git a/libqt5-qtwebengine.changes b/libqt5-qtwebengine.changes index a0895d2..277dd39 100644 --- a/libqt5-qtwebengine.changes +++ b/libqt5-qtwebengine.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jan 21 14:14:56 UTC 2019 - Bernhard Wiedemann + +- Add reproducible.patch to override chromium build date + to make package build reproducible (boo#1047218) +- Use openSUSE's ninja for the build so that we can apply fixes there + that are used by everyone (boo#1118619) + ------------------------------------------------------------------- Fri Dec 21 07:34:16 UTC 2018 - Guillaume GARDET diff --git a/libqt5-qtwebengine.spec b/libqt5-qtwebengine.spec index eace450..2cae53c 100644 --- a/libqt5-qtwebengine.spec +++ b/libqt5-qtwebengine.spec @@ -76,6 +76,8 @@ Patch6: gn-fix_arm.patch Patch8: chromium-66.0.3359.170-gcc8-alignof.patch # PATCH-FIX-OPENSUSE (copied from the chromium package) Patch9: chromium-non-void-return.patch +# PATCH-FIX-UPSTREAM reproducible.patch -- https://bugs.chromium.org/p/chromium/issues/detail?id=740363 boo#1047218 +Patch10: reproducible.patch # http://www.chromium.org/blink not ported to PowerPC ExcludeArch: ppc ppc64 ppc64le s390 s390x # Try to fix i586 MemoryErrors with rpmlint @@ -102,6 +104,7 @@ BuildRequires: libqt5-qtlocation-private-headers-devel >= 5.9 BuildRequires: libqt5-qttools-private-headers-devel >= 5.9 BuildRequires: libqt5-qtwebchannel-private-headers-devel >= 5.9 BuildRequires: libqt5-qtxmlpatterns-private-headers-devel >= 5.9 +BuildRequires: ninja BuildRequires: pam-devel BuildRequires: pciutils-devel BuildRequires: perl-JSON diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..15b0371 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,37 @@ +Author: Bernhard M. Wiedemann +AuthorDate: 2017-08-10 21:41:38 +0200 + +Allow to override build date + +in order to allow for reproducible builds. +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. + +simple fix for https://bugs.chromium.org/p/chromium/issues/detail?id=740363 +that was fixed upstream in a more complicated way + +See also https://bugzilla.opensuse.org/show_bug.cgi?id=1047218 packages do not build reproducibly from including build time + +Index: qtwebengine-everywhere-src-5.11.2/src/3rdparty/chromium/build/write_build_date_header.py +=================================================================== +--- qtwebengine-everywhere-src-5.11.2.orig/src/3rdparty/chromium/build/write_build_date_header.py ++++ qtwebengine-everywhere-src-5.11.2/src/3rdparty/chromium/build/write_build_date_header.py +@@ -21,6 +21,7 @@ import datetime + import doctest + import os + import sys ++import time + + + def GetFirstSundayOfMonth(year, month): +@@ -88,7 +89,8 @@ def main(): + # Format is expected to be "Mmm DD YYYY HH:MM:SS". + build_date = args.build_date_override + else: +- now = datetime.datetime.utcnow() ++ epoch = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) ++ now = datetime.datetime.utcfromtimestamp(epoch) + if now.hour < 5: + # The time is locked at 5:00 am in UTC to cause the build cache + # invalidation to not happen exactly at midnight. Use the same calculation