summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-07 12:29:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-08 13:20:01 +0000
commitad4f1d59e08017e14040261af00d5970d00de4a5 (patch)
tree23992cfc1c1a338d4cbc9fd9c8689eb6918e61cb /meta/recipes-support
parent0f2fdd4abfd70f3608f7612f9f4ef1506250ade1 (diff)
downloadpoky-ad4f1d59e08017e14040261af00d5970d00de4a5.tar.gz
libevdev: Fix determinism issue
We need to sort python dict output to be deterministic and generate consistent header files. (From OE-Core rev: 75e4cedb986379db2e8a897df52ee1363f9a9a80) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/libevdev/libevdev/determinism.patch34
-rw-r--r--meta/recipes-support/libevdev/libevdev_1.8.0.bb3
2 files changed, 36 insertions, 1 deletions
diff --git a/meta/recipes-support/libevdev/libevdev/determinism.patch b/meta/recipes-support/libevdev/libevdev/determinism.patch
new file mode 100644
index 0000000000..33a6076b78
--- /dev/null
+++ b/meta/recipes-support/libevdev/libevdev/determinism.patch
@@ -0,0 +1,34 @@
1The order of dict values is not deterministic leading to differing header file generation.
2Sort to remove this inconsistency.
3
4RP 2020/2/7
5
6Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7Upstream-Status: Pending
8
9Index: a/libevdev/make-event-names.py
10===================================================================
11--- a/libevdev/make-event-names.py
12+++ b/libevdev/make-event-names.py
13@@ -67,10 +67,10 @@ def print_bits(bits, prefix):
14 if not hasattr(bits, prefix):
15 return
16 print("static const char * const %s_map[%s_MAX + 1] = {" % (prefix, prefix.upper()))
17- for val, name in list(getattr(bits, prefix).items()):
18+ for val, name in sorted(list(getattr(bits, prefix).items())):
19 print(" [%s] = \"%s\"," % (name, name))
20 if prefix == "key":
21- for val, name in list(getattr(bits, "btn").items()):
22+ for val, name in sorted(list(getattr(bits, "btn").items())):
23 print(" [%s] = \"%s\"," % (name, name))
24 print("};")
25 print("")
26@@ -111,7 +111,7 @@ def print_lookup(bits, prefix):
27 if not hasattr(bits, prefix):
28 return
29
30- names = list(getattr(bits, prefix).items())
31+ names = sorted(list(getattr(bits, prefix).items()))
32 if prefix == "btn":
33 names = names + btn_additional;
34
diff --git a/meta/recipes-support/libevdev/libevdev_1.8.0.bb b/meta/recipes-support/libevdev/libevdev_1.8.0.bb
index 84274987d7..46ed5d786a 100644
--- a/meta/recipes-support/libevdev/libevdev_1.8.0.bb
+++ b/meta/recipes-support/libevdev/libevdev_1.8.0.bb
@@ -6,7 +6,8 @@ LICENSE = "MIT-X"
6LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
7 file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1" 7 file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
8 8
9SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz" 9SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz \
10 file://determinism.patch"
10SRC_URI[md5sum] = "879631080be18526737e33b63d848039" 11SRC_URI[md5sum] = "879631080be18526737e33b63d848039"
11SRC_URI[sha256sum] = "20d3cae4efd277f485abdf8f2a7c46588e539998b5a08c2c4d368218379d4211" 12SRC_URI[sha256sum] = "20d3cae4efd277f485abdf8f2a7c46588e539998b5a08c2c4d368218379d4211"
12 13