SHA256
1
0
forked from pool/qemu
qemu/keycodemapdb-make-keycode-gen-output-reproducible.patch

24 lines
826 B
Diff
Raw Normal View History

--- 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,