[Wine-patches] [eterhack] New rules for new udev (eterbug #6754).

Alexander Morozov amorozov на etersoft.ru
Пн Янв 10 17:51:09 MSK 2011


----------- следующая часть -----------
From 0df2684ba659f5b72ce3a2f7a1db6f40efd0cae1 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Mon, 10 Jan 2011 17:44:14 +0300
Subject: [PATCH] New rules for new udev (eterbug #6754).

---
 tools/Makefile.in    |    4 +++-
 tools/udev-147.rules |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 tools/udev.rules     |   23 ++++++++++++-----------
 3 files changed, 64 insertions(+), 12 deletions(-)
 create mode 100644 tools/udev-147.rules

diff --git a/tools/Makefile.in b/tools/Makefile.in
index ca561aa..36e0499 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -70,7 +70,9 @@ install install-lib:: wine.inf $(INSTALLDIRS)
 	$(INSTALL_DATA) wine.inf $(DESTDIR)$(datadir)/wine/wine.inf
 	$(INSTALL_DATA) $(srcdir)/l_intl.nls $(DESTDIR)$(datadir)/wine/l_intl.nls
 	$(INSTALL_DATA) $(srcdir)/wine.desktop $(DESTDIR)$(datadir)/applications/wine.desktop
-	$(INSTALL_DATA) udev.rules $(DESTDIR)$(sysconfdir)/udev/rules.d/99-winekeys.rules
+	test -x /sbin/udevadm && test "$(/sbin/udevadm --version)" -gt 147 && \
+		$(INSTALL_DATA) udev.rules $(DESTDIR)$(sysconfdir)/udev/rules.d/99-winekeys.rules || \
+		$(INSTALL_DATA) udev-147.rules $(DESTDIR)$(sysconfdir)/udev/rules.d/99-winekeys.rules
 	-$(UPDATE_DESKTOP_DATABASE)
 
 install install-dev:: $(DESTDIR)$(bindir) install-man-pages
diff --git a/tools/udev-147.rules b/tools/udev-147.rules
new file mode 100644
index 0000000..981471b
--- /dev/null
+++ b/tools/udev-147.rules
@@ -0,0 +1,49 @@
+#
+# udev rules file for software protection keys (for udev version <= 147)
+#
+# Copyright (C) 2008 - 2011 Etersoft
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+
+ACTION!="add", GOTO="winekeys_rules_end"
+
+# Rainbow Sentinel SuperPro/UltraPro
+BUS=="usb", SYSFS{idVendor}=="04b9", SYSFS{idProduct}=="0300", MODE="0666", OWNER="root", GROUP="root"
+
+# Eutron SmartKey 3
+BUS=="usb", SYSFS{idVendor}=="073d", SYSFS{idProduct}=="0025", MODE="0666", OWNER="root", GROUP="root"
+
+# Katran
+BUS=="usb", SYSFS{idVendor}=="14a8", SYSFS{idProduct}=="0001", MODE="0666", OWNER="root", GROUP="root"
+
+# Guardant StealthIII Sign/Time USB HID
+BUS=="usb", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="000C", MODE="0666", OWNER="root", GROUP="root"
+
+# Guardant StealthIII Sign/Time USB
+BUS=="usb", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0008", MODE="0666", OWNER="root", GROUP="root"
+
+# Guardant Stealth/Net III
+BUS=="usb", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0006", MODE="0666", OWNER="root", GROUP="root"
+
+# Guardant Stealth/Net II
+BUS=="usb", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0003", MODE="0666", OWNER="root", GROUP="root"
+
+# Aladdin HASP
+BUS=="usb", SYSFS{idVendor}=="0529", SYSFS{idProduct}=="0001", MODE="0666", OWNER="root", GROUP="root"
+
+# Senselock
+BUS=="usb", SYSFS{idVendor}=="0471", SYSFS{idProduct}=="485d", MODE="0666", OWNER="root", GROUP="root"
+
+LABEL="winekeys_rules_end"
diff --git a/tools/udev.rules b/tools/udev.rules
index 7bd904f..3ea6bbb 100644
--- a/tools/udev.rules
+++ b/tools/udev.rules
@@ -1,7 +1,7 @@
 #
-# udev rules file for eterkeys devices (for udev 0.95 version)
+# udev rules file for software protection keys (for udev version > 147)
 #
-# Copyright (C) 2008, 2009 Etersoft
+# Copyright (C) 2008 - 2011 Etersoft
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -17,33 +17,34 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 
+SUBSYSTEM!="usb|usb_device", GOTO="winekeys_rules_end"
 ACTION!="add", GOTO="winekeys_rules_end"
 
 # Rainbow Sentinel SuperPro/UltraPro
-BUS=="usb", SYSFS{idVendor}=="04b9", SYSFS{idProduct}=="0300", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="04b9", ATTRS{idProduct}=="0300", MODE="0666", OWNER="root", GROUP="root"
 
 # Eutron SmartKey 3
-BUS=="usb", SYSFS{idVendor}=="073d", SYSFS{idProduct}=="0025", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="073d", ATTRS{idProduct}=="0025", MODE="0666", OWNER="root", GROUP="root"
 
 # Katran
-BUS=="usb", SYSFS{idVendor}=="14a8", SYSFS{idProduct}=="0001", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="14a8", ATTRS{idProduct}=="0001", MODE="0666", OWNER="root", GROUP="root"
 
 # Guardant StealthIII Sign/Time USB HID
-BUS=="usb", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="000C", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="0a89", ATTRS{idProduct}=="000C", MODE="0666", OWNER="root", GROUP="root"
 
 # Guardant StealthIII Sign/Time USB
-BUS=="usb", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0008", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="0a89", ATTRS{idProduct}=="0008", MODE="0666", OWNER="root", GROUP="root"
 
 # Guardant Stealth/Net III
-BUS=="usb", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0006", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="0a89", ATTRS{idProduct}=="0006", MODE="0666", OWNER="root", GROUP="root"
 
 # Guardant Stealth/Net II
-BUS=="usb", SYSFS{idVendor}=="0a89", SYSFS{idProduct}=="0003", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="0a89", ATTRS{idProduct}=="0003", MODE="0666", OWNER="root", GROUP="root"
 
 # Aladdin HASP
-BUS=="usb", SYSFS{idVendor}=="0529", SYSFS{idProduct}=="0001", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="0529", ATTRS{idProduct}=="0001", MODE="0666", OWNER="root", GROUP="root"
 
 # Senselock
-BUS=="usb", SYSFS{idVendor}=="0471", SYSFS{idProduct}=="485d", MODE="0666", OWNER="root", GROUP="root"
+ATTRS{idVendor}=="0471", ATTRS{idProduct}=="485d", MODE="0666", OWNER="root", GROUP="root"
 
 LABEL="winekeys_rules_end"
-- 
1.7.3.4



Подробная информация о списке рассылки Wine-patches