rpms/usbmuxd/devel 0002-Port-udev-rules-to-newer-kernels.patch, NONE, 1.1 usbmuxd.spec, 1.1, 1.2

Bastien Nocera hadess at fedoraproject.org
Fri Aug 14 15:36:07 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/usbmuxd/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6024

Modified Files:
	usbmuxd.spec 
Added Files:
	0002-Port-udev-rules-to-newer-kernels.patch 
Log Message:
* Fri Aug 14 2009 Bastien Nocera <bnocera at redhat.com> 0.1.4-2
- Make usbmuxd autostart on newer kernels
- (Still doesn't exit properly though)


0002-Port-udev-rules-to-newer-kernels.patch:
 85-usbmuxd.rules.in |   25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

--- NEW FILE 0002-Port-udev-rules-to-newer-kernels.patch ---
>From 20b807e0d003d97cbf526f8727db9e65eaae0fdf Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Fri, 14 Aug 2009 16:25:24 +0100
Subject: [PATCH 2/2] Port udev rules to newer kernels

Remove use of usb_endpoint, it's gone in newer kernels.
---
 udev/85-usbmuxd.rules.in |   24 ++++--------------------
 1 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/udev/85-usbmuxd.rules.in b/udev/85-usbmuxd.rules.in
index 82221d4..c0a3900 100644
--- a/udev/85-usbmuxd.rules.in
+++ b/udev/85-usbmuxd.rules.in
@@ -1,23 +1,7 @@
 # usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd)
 
-# Skip anything non Apple
-ACTION=="add|remove", SUBSYSTEM!="usb|usb_endpoint", ATTRS{idVendor}!="05ac", GOTO="usbmuxd_rules_end"
+# Forces iPhone 1.0, 3G, 3GS and iPodTouch 1 and 2 to USB configuration 3 and run usbmuxd
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-4]", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@prefix@/sbin/usbmuxd -u"
 
-# Forces iPhone 1.0, 3G, 3GS and iPodTouch 1 and 2 to USB configuration 3
-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="1290|1291|1292|1293|1294", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", GOTO="usbmuxd_rules_end"
-
-LABEL="usbmuxd_rules_usbmux"
-
-# Only apply to usb endpoints
-ACTION=="add|remove", SUBSYSTEM!="usb_endpoint", GOTO="usbmuxd_rules_end"
-
-# Setup cute names for the endpoints
-ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep04", IMPORT{program}="usb_id %p --export", SYMLINK+="usbmux/$env{ID_SERIAL_SHORT}/%s{direction}"
-ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", IMPORT{program}="usb_id %p --export", SYMLINK+="usbmux/$env{ID_SERIAL_SHORT}/%s{direction}"
-
-# Start and stop 'usbmuxd' as required
-ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="@prefix@/sbin/usbmuxd -u"
-ACTION=="remove", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="@prefix@/sbin/usbmuxd -x"
-
-# skip
-LABEL="usbmuxd_rules_end"
+# Exit usbmuxd when the last phone is removed
+ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="05ac", ENV{ID_MODEL_ID}=="129[0-4]", RUN+="@prefix@/sbin/usbmuxd -x"
-- 
1.6.2.5



Index: usbmuxd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/usbmuxd/devel/usbmuxd.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- usbmuxd.spec	11 Aug 2009 07:48:20 -0000	1.1
+++ usbmuxd.spec	14 Aug 2009 15:36:06 -0000	1.2
@@ -1,6 +1,6 @@
 Name:		usbmuxd
 Version:	0.1.4
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Daemon for communicating with Apple's iPod Touch and iPhone
 
 Group:		Applications/System
@@ -12,6 +12,8 @@ BuildRoot:	%{_tmppath}/%{name}-%{version
 BuildRequires:	libusb-devel
 BuildRequires:	automake autoconf libtool
 
+Patch0:		0002-Port-udev-rules-to-newer-kernels.patch
+
 %description
 usbmuxd is a daemon used for communicating with Apple's iPod Touch and iPhone
 devices. It allows multiple services on the device to be accessed
@@ -28,6 +30,7 @@ Files for development with %{name}.
 
 %prep
 %setup -q
+%patch0 -p1 -b .new-kernel
 
 %build
 %configure --enable-static=no
@@ -65,6 +68,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/libusbmuxd.pc
 
 %changelog
+* Fri Aug 14 2009 Bastien Nocera <bnocera at redhat.com> 0.1.4-2
+- Make usbmuxd autostart on newer kernels
+- (Still doesn't exit properly though)
+
 * Mon Aug 10 2009 Peter Robinson <pbrobinson at gmail.com> 0.1.4-1
 - Update to 0.1.4
 




More information about the fedora-extras-commits mailing list