Hello community,

here is the log from the commit of package libinput for openSUSE:Factory 
checked in at 2020-04-25 20:06:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libinput (Old)
 and      /work/SRC/openSUSE:Factory/.libinput.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libinput"

Sat Apr 25 20:06:24 2020 rev:88 rq:795334 version:1.15.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/libinput/libinput.changes        2020-04-15 
20:07:39.970152939 +0200
+++ /work/SRC/openSUSE:Factory/.libinput.new.2738/libinput.changes      
2020-04-25 20:06:39.303341234 +0200
@@ -1,0 +2,7 @@
+Sat Apr 11 08:14:39 UTC 2020 - Jan Engelhardt <[email protected]>
+
+- Update to release 1.15.5
+  * touchpad: ratelimit the touch jump tests
+  * udev: don't use IMPORT+=
+
+-------------------------------------------------------------------

Old:
----
  libinput-1.15.4.tar.xz
  libinput-1.15.4.tar.xz.sig

New:
----
  libinput-1.15.5.tar.xz
  libinput-1.15.5.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libinput.spec ++++++
--- /var/tmp/diff_new_pack.G3lRnV/_old  2020-04-25 20:06:42.955348764 +0200
+++ /var/tmp/diff_new_pack.G3lRnV/_new  2020-04-25 20:06:42.955348764 +0200
@@ -20,7 +20,7 @@
 
 Name:           libinput
 %define lname  libinput10
-Version:        1.15.4
+Version:        1.15.5
 Release:        0
 Summary:        Input device and event processing library
 License:        MIT

++++++ libinput-1.15.4.tar.xz -> libinput-1.15.5.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.15.4/doc/api/libinput.doxygen.in 
new/libinput-1.15.5/doc/api/libinput.doxygen.in
--- old/libinput-1.15.4/doc/api/libinput.doxygen.in     2020-03-18 
06:34:28.000000000 +0100
+++ new/libinput-1.15.5/doc/api/libinput.doxygen.in     2020-04-11 
02:25:57.138630400 +0200
@@ -10,7 +10,6 @@
 WARNINGS               = YES
 QUIET                  = YES
 INPUT                  = "@builddir@"
-FILTER_PATTERNS        = *.h *.dox
 IMAGE_PATH             = "@builddir@"
 GENERATE_HTML          = YES
 HTML_OUTPUT            = api
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.15.4/doc/user/touchpad-jumping-cursors.rst 
new/libinput-1.15.5/doc/user/touchpad-jumping-cursors.rst
--- old/libinput-1.15.4/doc/user/touchpad-jumping-cursors.rst   2020-03-18 
06:34:28.000000000 +0100
+++ new/libinput-1.15.5/doc/user/touchpad-jumping-cursors.rst   2020-04-11 
02:25:57.171630400 +0200
@@ -14,10 +14,13 @@
 When libinput detects a cursor jump it prints a bug warning to the log with
 the text **"Touch jump detected and discarded."** and a link to this page.
 
-In most cases, this is a bug in the kernel driver and to libinput it appears
-that the touch point moves from its previous position. The pointer jump can
-usually be seen in the :ref:`libinput record <libinput-record>` output for the 
device:
+.. note:: This warning is ratelimited and will stop appearing after a few
+         times, even if the touchpad jumps continue.
 
+In most cases, this is a bug in the firmware (or kernel driver) and to
+libinput it appears that the touch point moves from its previous position.
+The pointer jump can usually be seen in the :ref:`libinput record
+<libinput-record>` output for the device:
 
 ::
 
@@ -50,9 +53,14 @@
 In this recording, the pointer jumps from its position 3752/2216 to
 1640/4681 within a single frame. On this particular touchpad, this would
 represent a physical move of almost 50mm. libinput detects some of these
-jumps and discards the movement but otherwise continues as usual. However,
-the bug should be fixed at the kernel level.
+jumps and discards the movement but otherwise continues as usual.
+If your only encounter with these jumps is the warning printed to the log,
+libinput functions as intended.
 
 When you encounter the warning in the log, please generate a recording of
 your touchpad with :ref:`libinput record <libinput-record>` and file a bug.
 See :ref:`reporting_bugs` for more details.
+
+Note that it most cases, libinput cannot actually fix the issue. Filing a
+bug is useful to figure out if there are other factors at play or whether
+there are heuristics we can employ to reduce the impact.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.15.4/meson.build 
new/libinput-1.15.5/meson.build
--- old/libinput-1.15.4/meson.build     2020-03-18 06:34:28.000000000 +0100
+++ new/libinput-1.15.5/meson.build     2020-04-11 02:25:57.177630400 +0200
@@ -1,5 +1,5 @@
 project('libinput', 'c',
-       version : '1.15.4',
+       version : '1.15.5',
        license : 'MIT/Expat',
        default_options : [ 'c_std=gnu99', 'warning_level=2' ],
        meson_version : '>= 0.41.0')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.15.4/src/evdev-mt-touchpad.c 
new/libinput-1.15.5/src/evdev-mt-touchpad.c
--- old/libinput-1.15.4/src/evdev-mt-touchpad.c 2020-03-18 06:34:28.000000000 
+0100
+++ new/libinput-1.15.5/src/evdev-mt-touchpad.c 2020-04-11 02:25:57.188630300 
+0200
@@ -1718,10 +1718,11 @@
 
                if (tp_detect_jumps(tp, t, time)) {
                        if (!tp->semi_mt)
-                               evdev_log_bug_kernel(tp->device,
-                                              "Touch jump detected and 
discarded.\n"
-                                              "See 
%stouchpad-jumping-cursors.html for details\n",
-                                              HTTP_DOC_LINK);
+                               evdev_log_bug_kernel_ratelimit(tp->device,
+                                               &tp->jump.warning,
+                                               "Touch jump detected and 
discarded.\n"
+                                               "See 
%stouchpad-jumping-cursors.html for details\n",
+                                               HTTP_DOC_LINK);
                        tp_motion_history_reset(t);
                }
 
@@ -3581,6 +3582,9 @@
        if (!use_touch_size)
                tp_init_pressure(tp, device);
 
+       /* 5 warnings per 2 hours should be enough */
+       ratelimit_init(&tp->jump.warning, s2us(2 * 60 * 60), 5);
+
        /* Set the dpi to that of the x axis, because that's what we normalize
           to when needed*/
        device->dpi = device->abs.absinfo_x->resolution * 25.4;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.15.4/src/evdev-mt-touchpad.h 
new/libinput-1.15.5/src/evdev-mt-touchpad.h
--- old/libinput-1.15.4/src/evdev-mt-touchpad.h 2020-03-18 06:34:28.000000000 
+0100
+++ new/libinput-1.15.5/src/evdev-mt-touchpad.h 2020-04-11 02:25:57.188630300 
+0200
@@ -279,6 +279,10 @@
         */
        unsigned int fake_touches;
 
+       struct {
+               struct ratelimit warning;
+       } jump;
+
        /* if pressure goes above high -> touch down,
           if pressure then goes below low -> touch up */
        struct {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.15.4/src/util-strings.h 
new/libinput-1.15.5/src/util-strings.h
--- old/libinput-1.15.4/src/util-strings.h      2020-03-18 06:34:28.000000000 
+0100
+++ new/libinput-1.15.5/src/util-strings.h      2020-04-11 02:25:57.218630300 
+0200
@@ -312,3 +312,29 @@
        free(result);
        return -1;
 }
+
+/**
+ * Strip any of the characters in what from the beginning and end of the
+ * input string.
+ *
+ * @return a newly allocated string with none of "what" at the beginning or
+ * end of string
+ */
+static inline char *
+strstrip(const char *input, const char *what)
+{
+       char *str, *last;
+
+       str = safe_strdup(&input[strspn(input, what)]);
+
+       last = str;
+
+       for (char *c = str; *c != '\0'; c++) {
+               if (!strchr(what, *c))
+                       last = c + 1;
+       }
+
+       *last = '\0';
+
+       return str;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.15.4/test/litest.c 
new/libinput-1.15.5/test/litest.c
--- old/libinput-1.15.4/test/litest.c   2020-03-18 06:34:28.000000000 +0100
+++ new/libinput-1.15.5/test/litest.c   2020-04-11 02:25:57.235630500 +0200
@@ -725,7 +725,7 @@
        if (need_keyboard_builtin) {
                fprintf(f, ""
                        "ATTRS{name}==\"litest %s*\","
-                       " IMPORT{builtin}+=\"keyboard\"\n",
+                       " IMPORT{builtin}=\"keyboard\"\n",
                        dev->name);
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.15.4/test/test-utils.c 
new/libinput-1.15.5/test/test-utils.c
--- old/libinput-1.15.4/test/test-utils.c       2020-03-18 06:34:28.000000000 
+0100
+++ new/libinput-1.15.5/test/test-utils.c       2020-04-11 02:25:57.259630400 
+0200
@@ -1033,6 +1033,44 @@
 }
 END_TEST
 
+START_TEST(strstrip_test)
+{
+       struct strstrip_test {
+               const char *string;
+               const char *expected;
+               const char *what;
+       } tests[] = {
+               { "foo",                "foo",          "1234" },
+               { "\"bar\"",            "bar",          "\"" },
+               { "'bar'",              "bar",          "'" },
+               { "\"bar\"",            "\"bar\"",      "'" },
+               { "'bar'",              "'bar'",        "\"" },
+               { "\"bar\"",            "bar",          "\"" },
+               { "\"\"",               "",             "\"" },
+               { "\"foo\"bar\"",       "foo\"bar",     "\"" },
+               { "\"'foo\"bar\"",      "foo\"bar",     "\"'" },
+               { "abcfooabcbarbca",    "fooabcbar",    "abc" },
+               { "xxxxfoo",            "foo",          "x" },
+               { "fooyyyy",            "foo",          "y" },
+               { "xxxxfooyyyy",        "foo",          "xy" },
+               { "x xfooy y",          " xfooy ",      "xy" },
+               { " foo\n",             "foo",          " \n" },
+               { "",                   "",             "abc" },
+               { "",                   "",             "" },
+               { NULL , NULL, NULL }
+       };
+       struct strstrip_test *t = tests;
+
+       while (t->string) {
+               char *str;
+               str = strstrip(t->string, t->what);
+               ck_assert_str_eq(str, t->expected);
+               free(str);
+               t++;
+       }
+}
+END_TEST
+
 START_TEST(list_test_insert)
 {
        struct list_test {
@@ -1138,6 +1176,7 @@
        tcase_add_test(tc, strsplit_test);
        tcase_add_test(tc, kvsplit_double_test);
        tcase_add_test(tc, strjoin_test);
+       tcase_add_test(tc, strstrip_test);
        tcase_add_test(tc, time_conversion);
 
        tcase_add_test(tc, list_test_insert);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libinput-1.15.4/tools/libinput-record.c 
new/libinput-1.15.5/tools/libinput-record.c
--- old/libinput-1.15.4/tools/libinput-record.c 2020-03-18 06:34:28.000000000 
+0100
+++ new/libinput-1.15.5/tools/libinput-record.c 2020-04-11 02:25:57.264630600 
+0200
@@ -1447,9 +1447,9 @@
                        osrstr[strlen(osrstr) - 1] = '\0'; /* linebreak */
 
                        if (!distro && strneq(osrstr, "ID=", 3))
-                               distro = safe_strdup(&osrstr[3]);
+                               distro = strstrip(&osrstr[3], "\"'");
                        else if (!version && strneq(osrstr, "VERSION_ID=", 11))
-                               version = safe_strdup(&osrstr[11]);
+                               version = strstrip(&osrstr[11], "\"'");
 
                        if (distro && version) {
                                iprintf(ctx, "os: \"%s:%s\"\n", distro, 
version);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.15.4/udev/80-libinput-device-groups.rules.in 
new/libinput-1.15.5/udev/80-libinput-device-groups.rules.in
--- old/libinput-1.15.4/udev/80-libinput-device-groups.rules.in 2020-03-18 
06:34:28.000000000 +0100
+++ new/libinput-1.15.5/udev/80-libinput-device-groups.rules.in 2020-04-11 
02:25:57.267630600 +0200
@@ -1,6 +1,6 @@
 ACTION!="add|change", GOTO="libinput_device_group_end"
 KERNEL!="event[0-9]*", GOTO="libinput_device_group_end"
 
-ATTRS{phys}=="?*", IMPORT{program}+="@UDEV_TEST_PATH@libinput-device-group 
%S%p"
+ATTRS{phys}=="?*", IMPORT{program}="@UDEV_TEST_PATH@libinput-device-group %S%p"
 
 LABEL="libinput_device_group_end"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libinput-1.15.4/udev/90-libinput-fuzz-override.rules.in 
new/libinput-1.15.5/udev/90-libinput-fuzz-override.rules.in
--- old/libinput-1.15.4/udev/90-libinput-fuzz-override.rules.in 2020-03-18 
06:34:28.000000000 +0100
+++ new/libinput-1.15.5/udev/90-libinput-fuzz-override.rules.in 2020-04-11 
02:25:57.267630600 +0200
@@ -15,12 +15,12 @@
 # about that.
 ATTRS{capabilities/abs}!="0", \
        ENV{ID_INPUT_TOUCHPAD}=="1", \
-       IMPORT{program}+="@UDEV_TEST_PATH@libinput-fuzz-extract %S%p", \
+       IMPORT{program}="@UDEV_TEST_PATH@libinput-fuzz-extract %S%p", \
        RUN{program}+="@UDEV_TEST_PATH@libinput-fuzz-to-zero %S%p", \
        GOTO="libinput_fuzz_override_end"
 ATTRS{capabilities/abs}!="0", \
        ENV{ID_INPUT_TOUCHSCREEN}=="1", \
-       IMPORT{program}+="@UDEV_TEST_PATH@libinput-fuzz-extract %S%p", \
+       IMPORT{program}="@UDEV_TEST_PATH@libinput-fuzz-extract %S%p", \
        RUN{program}+="@UDEV_TEST_PATH@libinput-fuzz-to-zero %S%p", \
        GOTO="libinput_fuzz_override_end"
 


Reply via email to