From f28e27cb7a6b2af0c7160aec8c5d5ebe9d927055c99cd441d3d8d367a3a2f561 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Mon, 5 Aug 2019 23:13:58 +0000 Subject: [PATCH] Accepting request 721129 from home:StefanBruens:branches:Virtualization Make build reproducible OBS-URL: https://build.opensuse.org/request/show/721129 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=483 --- ...make-keycode-gen-output-reproducible.patch | 23 +++++++++++++++++++ qemu-testsuite.changes | 6 +++++ qemu-testsuite.spec | 2 ++ qemu.changes | 6 +++++ qemu.spec | 2 ++ qemu.spec.in | 2 ++ 6 files changed, 41 insertions(+) create mode 100644 keycodemapdb-make-keycode-gen-output-reproducible.patch diff --git a/keycodemapdb-make-keycode-gen-output-reproducible.patch b/keycodemapdb-make-keycode-gen-output-reproducible.patch new file mode 100644 index 00000000..039ffe8b --- /dev/null +++ b/keycodemapdb-make-keycode-gen-output-reproducible.patch @@ -0,0 +1,23 @@ +--- a/tools/keymap-gen 2019-08-05 21:56:01.731846467 +0200 ++++ b/tools/keymap-gen 2019-08-05 22:00:14.563720016 +0200 +@@ -20,6 +20,7 @@ + sys.path.append(os.path.join(os.path.dirname(__file__), "../thirdparty")) + import argparse + import hashlib ++import os + import time + import sys + +@@ -317,7 +318,11 @@ + raise NotImplementedError() + + def generate_header(self, database, args): +- today = time.strftime("%Y-%m-%d %H:%M") ++ sde = os.getenv("SOURCE_DATE_EPOCH") ++ if sde: ++ today = time.strftime("%Y-%m-%d %H:%M", time.gmtime(int(sde))) ++ else: ++ today = time.strftime("%Y-%m-%d %H:%M") + self._boilerplate([ + "This file is auto-generated from keymaps.csv on %s" % today, + "Database checksum sha256(%s)" % database.mapchecksum, diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 4c535dfa..f5b934fa 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 5 20:03:11 UTC 2019 - Stefan Brüns + +- Make keycode-gen output reproducible (use SOURCE_DATE_EPOCH timestamp) + keycodemapdb-make-keycode-gen-output-reproducible.patch + ------------------------------------------------------------------- Thu Jul 25 20:51:23 UTC 2019 - Liang Yan diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index adeaacc6..1b59efbd 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -219,6 +219,7 @@ Patch1301: sgabios-fix-cross-build.patch Patch1500: skiboot-gcc9-compat.patch # keycodemapdb - path: ui/keycodemapdb (patch range 1600-1699) (Currently no patches) +Patch1600: keycodemapdb-make-keycode-gen-output-reproducible.patch # openBIOS - path: roms/openbios (patch range 1700-1799) (Currently no patches) @@ -1047,6 +1048,7 @@ pushd roms/skiboot popd pushd ui/keycodemapdb +%patch1600 -p1 popd pushd roms/openbios diff --git a/qemu.changes b/qemu.changes index 4c535dfa..f5b934fa 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 5 20:03:11 UTC 2019 - Stefan Brüns + +- Make keycode-gen output reproducible (use SOURCE_DATE_EPOCH timestamp) + keycodemapdb-make-keycode-gen-output-reproducible.patch + ------------------------------------------------------------------- Thu Jul 25 20:51:23 UTC 2019 - Liang Yan diff --git a/qemu.spec b/qemu.spec index 65d9911d..0f3f40f0 100644 --- a/qemu.spec +++ b/qemu.spec @@ -219,6 +219,7 @@ Patch1301: sgabios-fix-cross-build.patch Patch1500: skiboot-gcc9-compat.patch # keycodemapdb - path: ui/keycodemapdb (patch range 1600-1699) (Currently no patches) +Patch1600: keycodemapdb-make-keycode-gen-output-reproducible.patch # openBIOS - path: roms/openbios (patch range 1700-1799) (Currently no patches) @@ -1047,6 +1048,7 @@ pushd roms/skiboot popd pushd ui/keycodemapdb +%patch1600 -p1 popd pushd roms/openbios diff --git a/qemu.spec.in b/qemu.spec.in index 60686a8f..c84c93fc 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -167,6 +167,7 @@ Patch1301: sgabios-fix-cross-build.patch Patch1500: skiboot-gcc9-compat.patch # keycodemapdb - path: ui/keycodemapdb (patch range 1600-1699) (Currently no patches) +Patch1600: keycodemapdb-make-keycode-gen-output-reproducible.patch # openBIOS - path: roms/openbios (patch range 1700-1799) (Currently no patches) @@ -946,6 +947,7 @@ pushd roms/skiboot popd pushd ui/keycodemapdb +%patch1600 -p1 popd pushd roms/openbios