import libinput-1.16.3-1.el8

This commit is contained in:
CentOS Sources 2021-05-18 02:41:47 -04:00 committed by Andrew Lukoshko
parent 057d0dc8fc
commit 0181122e00
7 changed files with 107 additions and 84 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/libinput-1.14.3.tar.xz
SOURCES/libinput-1.16.3.tar.xz

View File

@ -1 +1 @@
af23a4359202c24b592033f54347719a8f44d872 SOURCES/libinput-1.14.3.tar.xz
ee1e93ee647bdd4598a5910eb654592563657d66 SOURCES/libinput-1.16.3.tar.xz

View File

@ -1,18 +1,16 @@
From 158391eeecbcfa05f0dc9373ed5efd7d08e365e1 Mon Sep 17 00:00:00 2001
From 207c40c49d81edee5dae15fa519704ffad6fbb40 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 24 Oct 2019 13:04:19 +1000
Date: Tue, 3 Nov 2020 15:14:29 +1000
Subject: [PATCH libinput 1/4] Revert "tools: switch measure-touchpad-tap to
python-libevdev"
RHEL8 revert - we don't ship python-libevdev.
This reverts commit 274b80d06cd0fb51911fae9252c7a800c5f6af94.
---
tools/libinput-measure-touchpad-tap.py | 39 ++++++++++++++++----------
1 file changed, 24 insertions(+), 15 deletions(-)
diff --git a/tools/libinput-measure-touchpad-tap.py b/tools/libinput-measure-touchpad-tap.py
index 8d8a8d8d..6f4f3999 100755
index b42b78e3..e1b82d9d 100755
--- a/tools/libinput-measure-touchpad-tap.py
+++ b/tools/libinput-measure-touchpad-tap.py
@@ -27,7 +27,8 @@
@ -98,5 +96,5 @@ index 8d8a8d8d..6f4f3999 100755
def print_summary(self):
deltas = sorted(t.tdelta for t in self.touches)
--
2.23.0
2.28.0

View File

@ -1,18 +1,18 @@
From 85bf2c8a8595dfcc783d8b6abd460fe1bcf6d63c Mon Sep 17 00:00:00 2001
From 0e35c5baa7d0d0c15661a9f870ad5e58f06341b7 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 24 Oct 2019 13:05:44 +1000
Date: Tue, 3 Nov 2020 15:22:53 +1000
Subject: [PATCH libinput 2/4] Revert "tools: switch measure-touchpad-pressure
to python-libevdev"
RHEL8 revert - we don't ship python-libevdev.
This reverts commit 33afe9f8756196e5a4df5fff33cb1344d5b6bc53.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
tools/libinput-measure-touchpad-pressure.py | 66 ++++++++++++---------
1 file changed, 37 insertions(+), 29 deletions(-)
tools/libinput-measure-touchpad-pressure.py | 62 ++++++++++++---------
1 file changed, 35 insertions(+), 27 deletions(-)
diff --git a/tools/libinput-measure-touchpad-pressure.py b/tools/libinput-measure-touchpad-pressure.py
index bba834c4..4973275e 100755
index a55bad0c..df958e4d 100755
--- a/tools/libinput-measure-touchpad-pressure.py
+++ b/tools/libinput-measure-touchpad-pressure.py
@@ -28,7 +28,8 @@ import sys
@ -25,7 +25,7 @@ index bba834c4..4973275e 100755
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
@@ -149,33 +150,41 @@ class InvalidDeviceError(Exception):
@@ -177,33 +178,41 @@ class InvalidDeviceError(Exception):
pass
@ -39,19 +39,17 @@ index bba834c4..4973275e 100755
- fd = open(self.path, 'rb')
- super().__init__(fd)
-
+ self.device = evdev.InputDevice(self.path)
- print("Using {}: {}\n".format(self.name, self.path))
-
+ print("Using {}: {}\n".format(self.device.name, self.path))
- self.has_mt_pressure = True
- absinfo = self.absinfo[libevdev.EV_ABS.ABS_MT_PRESSURE]
- if absinfo is None:
- absinfo = self.absinfo[libevdev.EV_ABS.ABS_PRESSURE]
- self.has_mt_pressure = False
- if absinfo is None:
+ self.device = evdev.InputDevice(self.path)
+
+ print("Using {}: {}\n".format(self.device.name, self.path))
+
+ # capabilities rturns a dict with the EV_* codes as key,
+ # each of which is a list of tuples of (code, AbsInfo)
+ #
@ -83,7 +81,7 @@ index bba834c4..4973275e 100755
self._init_thresholds_from_quirks()
self.sequences = []
@@ -221,10 +230,10 @@ class Device(libevdev.Device):
@@ -249,10 +258,10 @@ class Device(libevdev.Device):
def handle_key(device, event):
tapcodes = [
@ -97,8 +95,8 @@ index bba834c4..4973275e 100755
+ evdev.ecodes.BTN_TOOL_QUINTTAP
]
if event.code in tapcodes and event.value > 0:
print("\rThis tool cannot handle multiple fingers, "
@@ -232,7 +241,7 @@ def handle_key(device, event):
print('\r\033[2KThis tool cannot handle multiple fingers, '
@@ -260,7 +269,7 @@ def handle_key(device, event):
def handle_abs(device, event):
@ -107,7 +105,7 @@ index bba834c4..4973275e 100755
if event.value > -1:
device.start_new_sequence(event.value)
else:
@@ -243,8 +252,8 @@ def handle_abs(device, event):
@@ -271,8 +280,8 @@ def handle_abs(device, event):
except IndexError:
# If the finger was down at startup
pass
@ -118,7 +116,7 @@ index bba834c4..4973275e 100755
try:
s = device.current_sequence()
s.append(Touch(pressure=event.value))
@@ -255,9 +264,9 @@ def handle_abs(device, event):
@@ -283,9 +292,9 @@ def handle_abs(device, event):
def handle_event(device, event):
@ -130,9 +128,9 @@ index bba834c4..4973275e 100755
handle_key(device, event)
@@ -269,9 +278,8 @@ def loop(device):
print("Place a single finger on the touchpad to measure pressure values.\n"
"Ctrl+C to exit\n")
@@ -312,9 +321,8 @@ def loop(device):
print(headers)
print(fmt.separator())
- while True:
- for event in device.events():
@ -143,5 +141,5 @@ index bba834c4..4973275e 100755
def colon_tuple(string):
--
2.23.0
2.28.0

View File

@ -1,16 +1,16 @@
From 7e2ea0b918e8587db4975f585210e28cfaa5b2e1 Mon Sep 17 00:00:00 2001
From bf1dea1a8e516dd0372c2e7e3c818a05f3777a89 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 24 Oct 2019 13:06:48 +1000
Date: Tue, 3 Nov 2020 15:24:23 +1000
Subject: [PATCH libinput 3/4] Revert "tools: switch measure-touch-size to
python-libevdev"
This reverts commit deb759a0699a0ad18a9fa3dda8f1b397e34ae537.
---
tools/libinput-measure-touch-size.py | 53 ++++++++++++++++------------
1 file changed, 31 insertions(+), 22 deletions(-)
tools/libinput-measure-touch-size.py | 79 ++++++++++++++++------------
1 file changed, 44 insertions(+), 35 deletions(-)
diff --git a/tools/libinput-measure-touch-size.py b/tools/libinput-measure-touch-size.py
index 4b2201e2..6f16b7e1 100755
index 5d98bc28..f974df43 100755
--- a/tools/libinput-measure-touch-size.py
+++ b/tools/libinput-measure-touch-size.py
@@ -28,7 +28,8 @@ import sys
@ -23,7 +23,7 @@ index 4b2201e2..6f16b7e1 100755
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
@@ -177,23 +178,32 @@ class InvalidDeviceError(Exception):
@@ -171,23 +172,32 @@ class InvalidDeviceError(Exception):
pass
@ -43,7 +43,7 @@ index 4b2201e2..6f16b7e1 100755
+ print("Using {}: {}\n".format(self.device.name, self.path))
- if not self.has(libevdev.EV_ABS.ABS_MT_TOUCH_MAJOR):
+ # capabilities returns a dict with the EV_* codes as key,
+ # capabilities returns a dict with the EV_* codes as key,
+ # each of which is a list of tuples of (code, AbsInfo)
+ #
+ # Get the abs list first (or empty list if missing),
@ -63,7 +63,7 @@ index 4b2201e2..6f16b7e1 100755
self.up = 0
self.down = 0
@@ -245,16 +255,16 @@ class Device(libevdev.Device):
@@ -239,32 +249,32 @@ class Device(libevdev.Device):
return self.sequences[-1]
def handle_key(self, event):
@ -76,31 +76,48 @@ index 4b2201e2..6f16b7e1 100755
+ evdev.ecodes.BTN_TOOL_QUADTAP,
+ evdev.ecodes.BTN_TOOL_QUINTTAP]
if event.code in tapcodes and event.value > 0:
print("\rThis tool cannot handle multiple fingers, "
"output will be invalid", file=sys.stderr)
print("\rThis tool cannot handle multiple fingers, "
"output will be invalid", file=sys.stderr)
def handle_abs(self, event):
- if event.matches(libevdev.EV_ABS.ABS_MT_TRACKING_ID):
+ if event.code == evdev.ecodes.ABS_MT_TRACKING_ID:
if event.value > -1:
self.start_new_sequence(event.value)
else:
@@ -265,11 +275,11 @@ class Device(libevdev.Device):
except IndexError:
# If the finger was down during start
pass
- if event.value > -1:
- self.start_new_sequence(event.value)
- else:
- try:
- s = self.current_sequence()
- s.finalize()
- print("\r{}".format(s))
- except IndexError:
- # If the finger was down during start
- pass
- elif event.matches(libevdev.EV_ABS.ABS_MT_TOUCH_MAJOR):
+ elif event.code == evdev.ecodes.ABS_MT_TOUCH_MAJOR:
self.touch.major = event.value
- self.touch.major = event.value
- elif event.matches(libevdev.EV_ABS.ABS_MT_TOUCH_MINOR):
+ elif event.code == evdev.ecodes.ABS_MT_TOUCH_MINOR:
self.touch.minor = event.value
- self.touch.minor = event.value
- elif event.matches(libevdev.EV_ABS.ABS_MT_ORIENTATION):
- self.touch.orientation = event.value
+ if event.code == evdev.ecodes.ABS_MT_TRACKING_ID:
+ if event.value > -1:
+ self.start_new_sequence(event.value)
+ else:
+ try:
+ s = self.current_sequence()
+ s.finalize()
+ print("\r{}".format(s))
+ except IndexError:
+ # If the finger was down during start
+ pass
+ elif event.code == evdev.ecodes.ABS_MT_TOUCH_MAJOR:
+ self.touch.major = event.value
+ elif event.code == evdev.ecodes.ABS_MT_TOUCH_MINOR:
+ self.touch.minor = event.value
+ elif event.code == evdev.ecodes.ABS_MT_ORIENTATION:
self.touch.orientation = event.value
+ self.touch.orientation = event.value
def handle_syn(self, event):
@@ -284,11 +294,11 @@ class Device(libevdev.Device):
if self.touch.dirty:
@@ -278,11 +288,11 @@ class Device(libevdev.Device):
pass
def handle_event(self, event):
@ -115,7 +132,7 @@ index 4b2201e2..6f16b7e1 100755
self.handle_syn(event)
def read_events(self):
@@ -299,9 +309,8 @@ class Device(libevdev.Device):
@@ -293,9 +303,8 @@ class Device(libevdev.Device):
print("Place a single finger on the device to measure touch size.\n"
"Ctrl+C to exit\n")
@ -128,5 +145,5 @@ index 4b2201e2..6f16b7e1 100755
def colon_tuple(string):
--
2.23.0
2.28.0

View File

@ -1,18 +1,16 @@
From b79b1513b33d42b861572ad4e0bac135e58b5d12 Mon Sep 17 00:00:00 2001
From 2f294e771a5e9cdeedff4627905634b9daac9bec Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Thu, 24 Oct 2019 13:09:25 +1000
Date: Tue, 3 Nov 2020 15:30:18 +1000
Subject: [PATCH libinput 4/4] Revert "tools: switch measure-fuzz to use
python-libevdev"
RHEL8 revert - we don't ship python-libevdev.
This reverts commit 795c08eb44fca078fa9935fdc5b8482bb7b43413.
---
tools/libinput-measure-fuzz.py | 42 +++++++++++++++++++++++++---------
1 file changed, 31 insertions(+), 11 deletions(-)
tools/libinput-measure-fuzz.py | 40 ++++++++++++++++++++++++----------
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/tools/libinput-measure-fuzz.py b/tools/libinput-measure-fuzz.py
index 41e2825c..bb574882 100755
index c392d74a..f539fe23 100755
--- a/tools/libinput-measure-fuzz.py
+++ b/tools/libinput-measure-fuzz.py
@@ -29,7 +29,8 @@ import sys
@ -25,7 +23,7 @@ index 41e2825c..bb574882 100755
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
@@ -69,15 +70,15 @@ class InvalidDeviceError(Exception):
@@ -74,15 +75,15 @@ class InvalidDeviceError(Exception):
pass
@ -44,7 +42,7 @@ index 41e2825c..bb574882 100755
context = pyudev.Context()
self.udev_device = pyudev.Devices.from_device_file(context, self.path)
@@ -132,18 +133,37 @@ class Device(libevdev.Device):
@@ -137,18 +138,35 @@ class Device(libevdev.Device):
Returns a tuple of (xfuzz, yfuzz) with the fuzz as set on the device
axis. Returns None if no fuzz is set.
'''
@ -54,9 +52,7 @@ index 41e2825c..bb574882 100755
+ #
+ # Get the abs list first (or empty list if missing),
+ # then extract the touch major absinfo from that
+ caps = self.device.capabilities(absinfo=True).get(
+ evdev.ecodes.EV_ABS, []
+ )
+ caps = self.device.capabilities(absinfo=True).get(evdev.ecodes.EV_ABS, [])
+ codes = [cap[0] for cap in caps]
+
+ if evdev.ecodes.ABS_X not in codes or evdev.ecodes.ABS_Y not in codes:
@ -66,18 +62,18 @@ index 41e2825c..bb574882 100755
+ if (evdev.ecodes.ABS_MT_POSITION_X in codes) != (evdev.ecodes.ABS_MT_POSITION_Y in codes):
raise InvalidDeviceError('device does not have both multitouch axes')
- xfuzz = self.absinfo[libevdev.EV_ABS.ABS_X].fuzz or \
- self.absinfo[libevdev.EV_ABS.ABS_MT_POSITION_X].fuzz
- yfuzz = self.absinfo[libevdev.EV_ABS.ABS_Y].fuzz or \
- self.absinfo[libevdev.EV_ABS.ABS_MT_POSITION_Y].fuzz
- xfuzz = (self.absinfo[libevdev.EV_ABS.ABS_X].fuzz or
- self.absinfo[libevdev.EV_ABS.ABS_MT_POSITION_X].fuzz)
- yfuzz = (self.absinfo[libevdev.EV_ABS.ABS_Y].fuzz or
- self.absinfo[libevdev.EV_ABS.ABS_MT_POSITION_Y].fuzz)
+ axes = {
+ 0x00: None,
+ 0x01: None,
+ 0x35: None,
+ 0x36: None,
+ 0x00: None,
+ 0x01: None,
+ 0x35: None,
+ 0x36: None,
+ }
- if xfuzz is 0 and yfuzz is 0:
- if xfuzz == 0 and yfuzz == 0:
+ for c in caps:
+ if c[0] in axes.keys():
+ axes[c[0]] = c[1].fuzz
@ -90,5 +86,5 @@ index 41e2825c..bb574882 100755
return (xfuzz, yfuzz)
--
2.23.0
2.28.0

View File

@ -4,7 +4,7 @@
%global gitversion 58abea394
Name: libinput
Version: 1.14.3
Version: 1.16.3
Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Summary: Input device library
@ -18,6 +18,7 @@ Source2: commitid
Source0: http://www.freedesktop.org/software/libinput/libinput-%{version}.tar.xz
%endif
# Backout the python-evdev -> python-libevdev conversion
Patch001: 0001-Revert-tools-switch-measure-touchpad-tap-to-python-l.patch
Patch002: 0002-Revert-tools-switch-measure-touchpad-pressure-to-pyt.patch
Patch003: 0003-Revert-tools-switch-measure-touch-size-to-python-lib.patch
@ -83,8 +84,15 @@ pathfix.py -i %{__python3} -p -n $(git grep -l '#!/usr/bin/.*python3')
%install
%meson_install
# Remove tools requiring python-libevdev
rm $RPM_BUILD_ROOT/%{_libexecdir}/libinput/libinput-replay
rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
rm $RPM_BUILD_ROOT/%{_libexecdir}/libinput/libinput-analyze
rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-analyze.1*
rm $RPM_BUILD_ROOT/%{_libexecdir}/libinput/libinput-analyze-per-slot-delta
rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-analyze-per-slot-delta.1*
rm $RPM_BUILD_ROOT/%{_libexecdir}/libinput/libinput-measure-touchpad-size
rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-measure-touchpad-size.1*
%post
/sbin/ldconfig
@ -97,7 +105,8 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
%doc COPYING
%{_libdir}/libinput.so.*
%{udevdir}/libinput-device-group
%{udevdir}/libinput-fuzz-override
%{udevdir}/libinput-fuzz-to-zero
%{udevdir}/libinput-fuzz-extract
%{udevdir}/rules.d/80-libinput-device-groups.rules
%{udevdir}/rules.d/90-libinput-fuzz-override.rules
%{_bindir}/libinput
@ -118,6 +127,7 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
%{_libdir}/pkgconfig/libinput.pc
%files utils
%{_libexecdir}/libinput/libinput-debug-tablet
%{_libexecdir}/libinput/libinput-measure
%{_libexecdir}/libinput/libinput-measure-fuzz
%{_libexecdir}/libinput/libinput-measure-touchpad-tap
@ -125,6 +135,7 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
%{_libexecdir}/libinput/libinput-measure-touch-size
%{_libexecdir}/libinput/libinput-quirks
%{_libexecdir}/libinput/libinput-record
%{_mandir}/man1/libinput-debug-tablet.1*
%{_mandir}/man1/libinput-measure.1*
%{_mandir}/man1/libinput-measure-fuzz.1*
%{_mandir}/man1/libinput-measure-touchpad-tap.1*
@ -140,6 +151,9 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
%{_mandir}/man1/libinput-test-suite.1*
%changelog
* Tue Nov 03 2020 Peter Hutterer <peter.hutterer@redhat.com> 1.16.3-1
- libinput 1.16.3 (#1886648)
* Mon Oct 28 2019 Peter Hutterer <peter.hutterer@redhat.com> 1.14.3-1
- libinput 1.14.3 (#1728821)
@ -154,7 +168,7 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
* Fri Dec 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-2
- Add a quirk for the Lenovo T480s (#1658604)
- Add a quirk for the HP Spectre x360
* Tue Nov 13 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.3-1
- libinput 1.12.3 (#1647294)
@ -169,7 +183,7 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
* Mon Oct 08 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-3
- Fix sporadic crash on two-finger scrolling (#1636282)
- Fix one more device quirk
- Fix one more device quirk
* Wed Sep 19 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.12.0-2
- Fix some buggy device quirks (related #1614636)
@ -667,7 +681,7 @@ rm $RPM_BUILD_ROOT/%{_mandir}/man1/libinput-record.1*
* Fri May 29 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.15.0-4
- Add tap-to-end-drag patch (#1225998)
* Wed May 27 2015 Peter Hutterer <peter.hutterer@redhat.com> 0.15.0-3
- Refine disable-while-typing (#1209753)