SHA256
1
0
forked from pool/qemu
qemu/Make-keycode-gen-output-reproducible-use.patch
Bruce Rogers 64435eabdc Accepting request 730437 from Virtualization:Staging
Update to v4.1.0. Also includes other major packaging changes as follows:
There is a new package maintenance workflow - see README.PACKAGING for details.
The sibling packages qemu-linux-user and qemu-testsuite are now created with the Build Service's MultiBuild feature. This also necessitates combining the qemu-linux-user changelog content back into qemu's. Luckily the delta there is quite small. Note that the qemu spec file is now that much busier, but added section markers should help reduce the confusion. Also qemu is being enabled for RISCV host compatibility, so some changes are related to that as well.

OBS-URL: https://build.opensuse.org/request/show/730437
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=487
2019-09-12 15:54:03 +00:00

36 lines
1.3 KiB
Diff

From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Mon, 5 Aug 2019 20:03:11 +0000
Subject: Make keycode-gen output reproducible (use SOURCE_DATE_EPOCH
timestamp)
Signed-off-by: Bruce Rogers <brogers@suse.com
---
tools/keymap-gen | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ui/keycodemapdb/tools/keymap-gen b/ui/keycodemapdb/tools/keymap-gen
index f0269e3cabf57881bb41e2333143..a374eb255fb3c55b65b475e86461 100755
--- a/ui/keycodemapdb/tools/keymap-gen
+++ b/ui/keycodemapdb/tools/keymap-gen
@@ -20,6 +20,7 @@ except:
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 @@ class LanguageGenerator(object):
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,