Hello community,

here is the log from the commit of package spacenavd for openSUSE:Factory 
checked in at 2019-03-26 15:42:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/spacenavd (Old)
 and      /work/SRC/openSUSE:Factory/.spacenavd.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "spacenavd"

Tue Mar 26 15:42:51 2019 rev:5 rq:685832 version:0.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/spacenavd/spacenavd.changes      2018-08-31 
10:44:58.747241021 +0200
+++ /work/SRC/openSUSE:Factory/.spacenavd.new.25356/spacenavd.changes   
2019-03-26 15:43:40.872200729 +0100
@@ -1,0 +2,7 @@
+Sat Mar 16 11:30:05 UTC 2019 - Herbert Graeber <[email protected]>
+
+- Add two upstream patches for proper handling of device ids:
+  * spacenavd-add-blacklist-and-device-ids.patch
+  * spacenavd-add-missing-usbid.patch
+
+-------------------------------------------------------------------

New:
----
  spacenavd-add-blacklist-and-device-ids.patch
  spacenavd-add-missing-usbid.patch

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

Other differences:
------------------
++++++ spacenavd.spec ++++++
--- /var/tmp/diff_new_pack.cM1agD/_old  2019-03-26 15:43:41.648200285 +0100
+++ /var/tmp/diff_new_pack.cM1agD/_new  2019-03-26 15:43:41.652200283 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package spacenavd
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2009,2011,2013 Herbert Graeber
 #
 # All modifications and additions to the file contributed by third parties
@@ -35,6 +35,10 @@
 Source3:        xinitrc-%{name}
 Source4:        %{name}.service
 Patch1:         spacenavd-0.6+git3066072.patch
+# PATCH-FIX-UPSTREAM spacenavd-add-blacklist-and-device-ids.patch #4
+Patch2:         spacenavd-add-blacklist-and-device-ids.patch
+# PATCH-FIX-UPSTREAM spacenavd-add-missing-usbid.patch #12
+Patch3:         spacenavd-add-missing-usbid.patch
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(x11)
 Requires:       xdpyinfo
@@ -61,6 +65,8 @@
 %prep
 %setup -q -n %{name}-%{name}-%{version}
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 %configure

++++++ spacenavd-add-blacklist-and-device-ids.patch ++++++
commit 68bf97e0458605b671c69744e3bc45e5ca2e9b2b
Author: John Tsiombikas <[email protected]>
Date:   Sun Oct 28 02:42:46 2018 +0300

    - fixed github issue #4: added a blacklist for USB device matching, and
    expanded the device list with new USB IDs provided by Herbert Graeber.

diff --git a/src/cfgfile.h b/src/cfgfile.h
index 8d56df3..a959610 100644
--- a/src/cfgfile.h
+++ b/src/cfgfile.h
@@ -1,6 +1,6 @@
 /*
-spnavcfg - an interactive GUI configurator for the spacenavd daemon.
-Copyright (C) 2007-2013 John Tsiombikas <[email protected]>
+spacenavd - a free software replacement driver for 6dof space-mice.
+Copyright (C) 2007-2018 John Tsiombikas <[email protected]>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/src/dev.c b/src/dev.c
index b4e5b4b..31b435c 100644
--- a/src/dev.c
+++ b/src/dev.c
@@ -200,56 +200,86 @@ struct device *get_devices(void)
 #define VENDOR_3DCONNEXION     0x256f
 
 static int devid_list[][2] = {
-       /* 3Dconnexion devices */
-       {0x46d, 0xc603},        /* spacemouse plus XT */
-       {0x46d, 0xc605},        /* cadman */
-       {0x46d, 0xc606},        /* spacemouse classic */
-       {0x46d, 0xc621},        /* spaceball 5000 */
-       {0x46d, 0xc623},        /* space traveller */
-       {0x46d, 0xc625},        /* space pilot */
-       {0x46d, 0xc626},        /* space navigator */
-       {0x46d, 0xc627},        /* space explorer */
-       {0x46d, 0xc628},        /* space navigator for notebooks*/
-       {0x46d, 0xc629},        /* space pilot pro*/
-       {0x46d, 0xc62b},        /* space mouse pro*/
-       {0x46d, 0xc640},        /* nulooq */
+       {0x046d, 0xc603},       /* spacemouse plus XT */
+       {0x046d, 0xc605},       /* cadman */
+       {0x046d, 0xc606},       /* spacemouse classic */
+       {0x046d, 0xc621},       /* spaceball 5000 */
+       {0x046d, 0xc623},       /* space traveller */
+       {0x046d, 0xc625},       /* space pilot */
+       {0x046d, 0xc626},       /* space navigator */
+       {0x046d, 0xc627},       /* space explorer */
+       {0x046d, 0xc628},       /* space navigator for notebooks*/
+       {0x046d, 0xc629},       /* space pilot pro*/
+       {0x046d, 0xc62b},       /* space mouse pro*/
+       {0x046d, 0xc640},       /* nulooq */
+       {0x256f, 0xc62e},       /* spacemouse wireless */
+       {0x256f, 0xc631},       /* spacemouse pro wireless */
+       {0x256f, 0xc632},       /* spacemouse pro wireless receiver */
+       {0x256f, 0xc633},       /* spacemouse enterprise */
+       {0x256f, 0xc635},       /* spacemouse compact */
+       {0x256f, 0xc636},       /* spacemouse module */
 
        {-1, -1}
 };
 
+/* 3Dconnexion devices which we don't want to match, because they are
+ * not 6dof space-mice. reported by: Herbert Graeber in github issue #4
+ */
+static int devid_blacklist[][2] = {
+       {0x256f, 0xc62f},       /* spacemouse wireless receiver */
+       {0x256f, 0xc652},
+       {0x256f, 0xc650},       /* cadmouse */
+       {0x256f, 0xc651},       /* cadmouse wireless */
+       {0x256f, 0xc62c},       /* lipari(?) */
+       {0x256f, 0xc641},       /* scout(?) */
+
+       {-1, -1}
+};
+
+
 static int match_usbdev(const struct usb_device_info *devinfo)
 {
        int i;
 
-       /* if it's a 3Dconnexion device match it immediately */
-       if((devinfo->name && strstr(devinfo->name, "3Dconnexion"))) {
-               return 1;
+       /* match any USB devices listed in the config file */
+       for(i=0; i<MAX_CUSTOM; i++) {
+               if(cfg.devid[i][0] != -1 && cfg.devid[i][1] != -1 &&
+                               (unsigned int)cfg.devid[i][0] == 
devinfo->vendorid &&
+                               (unsigned int)cfg.devid[i][1] == 
devinfo->productid) {
+                       return 1;
+               }
+               if(cfg.devname[i] && devinfo->name && strcmp(cfg.devname[i], 
devinfo->name) == 0) {
+                       return 1;
+               }
        }
 
        if(devinfo->vendorid != -1 && devinfo->productid != -1) {
+               int vid = devinfo->vendorid;
+               int pid = devinfo->productid;
+
+               /* ignore any device in the devid_blacklist */
+               for(i=0; devid_blacklist[i][0] > 0; i++) {
+                       if(vid == devid_blacklist[i][0] && pid == 
devid_blacklist[i][1]) {
+                               return 0;
+                       }
+               }
+
                /* match any device with the new 3Dconnexion device id */
-               if(devinfo->vendorid == VENDOR_3DCONNEXION) {
+               if(vid == VENDOR_3DCONNEXION) {
                        return 1;
                }
 
                /* match any device in the devid_list */
                for(i=0; devid_list[i][0] > 0; i++) {
-                       if(devinfo->vendorid == devid_list[i][0] && 
devinfo->productid == devid_list[i][1]) {
+                       if(vid == devid_list[i][0] && pid == devid_list[i][1]) {
                                return 1;
                        }
                }
        }
 
-       /* match any joystick devices listed in the config file */
-       for(i=0; i<MAX_CUSTOM; i++) {
-               if(cfg.devid[i][0] != -1 && cfg.devid[i][1] != -1 &&
-                               (unsigned int)cfg.devid[i][0] == 
devinfo->vendorid &&
-                               (unsigned int)cfg.devid[i][1] == 
devinfo->productid) {
-                       return 1;
-               }
-               if(cfg.devname[i] && devinfo->name && strcmp(cfg.devname[i], 
devinfo->name) == 0) {
-                       return 1;
-               }
+       /* if it's a 3Dconnexion device match it immediately */
+       if((devinfo->name && strstr(devinfo->name, "3Dconnexion"))) {
+               return 1;
        }
 
        return 0;       /* no match */
++++++ spacenavd-add-missing-usbid.patch ++++++
commit a9eccf34e7cac969ee399f625aef827f4f4aaec6
Author: John Tsiombikas <[email protected]>
Date:   Sun Feb 24 21:34:21 2019 +0200

    SpaceMouse Wireless device id was erroneously put in the black list;
    moved it to the device list, solving github issue #12

diff --git a/src/dev.c b/src/dev.c
index 4e8e7a2..466ed42 100644
--- a/src/dev.c
+++ b/src/dev.c
@@ -212,7 +212,8 @@ static int devid_list[][2] = {
        {0x046d, 0xc629},       /* space pilot pro*/
        {0x046d, 0xc62b},       /* space mouse pro*/
        {0x046d, 0xc640},       /* nulooq */
-       {0x256f, 0xc62e},       /* spacemouse wireless */
+       {0x256f, 0xc62e},       /* spacemouse wireless (USB cable) */
+       {0x256f, 0xc62f},       /* spacemouse wireless  receiver */
        {0x256f, 0xc631},       /* spacemouse pro wireless */
        {0x256f, 0xc632},       /* spacemouse pro wireless receiver */
        {0x256f, 0xc633},       /* spacemouse enterprise */
@@ -223,10 +224,9 @@ static int devid_list[][2] = {
 };
 
 /* 3Dconnexion devices which we don't want to match, because they are
- * not 6dof space-mice. reported by: Herbert Graeber in github issue #4
+ * not 6dof space-mice. reported by: Herbert Graeber in github pull request #4
  */
 static int devid_blacklist[][2] = {
-       {0x256f, 0xc62f},       /* spacemouse wireless receiver */
        {0x256f, 0xc652},
        {0x256f, 0xc650},       /* cadmouse */
        {0x256f, 0xc651},       /* cadmouse wireless */


Reply via email to