rpms/usbmuxd/devel usbmuxd-udevuser.patch, NONE, 1.1 usbmuxd.spec, 1.6, 1.7

Peter Robinson pbrobinson at fedoraproject.org
Sat Jan 30 12:18:06 UTC 2010


Author: pbrobinson

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

Modified Files:
	usbmuxd.spec 
Added Files:
	usbmuxd-udevuser.patch 
Log Message:
- Run deamon under the usbmuxd user

usbmuxd-udevuser.patch:
 85-usbmuxd.rules.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE usbmuxd-udevuser.patch ---
--- usbmuxd-1.0.0/udev/85-usbmuxd.rules.in.orig	2010-01-30 08:14:05.000000000 +0000
+++ usbmuxd-1.0.0/udev/85-usbmuxd.rules.in	2010-01-30 08:14:56.000000000 +0000
@@ -1,7 +1,7 @@
 # usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd)
 
 # 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-9]", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -u -U"
+ACTION=="add", SUBSYSTEM=="usb", OWNER="usbmuxd", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-9]", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -u -U"
 
 # Exit usbmuxd when the last phone is removed
 ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[0-9]/*", ENV{INTERFACE}=="255/*", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -x"


Index: usbmuxd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/usbmuxd/devel/usbmuxd.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- usbmuxd.spec	7 Dec 2009 02:57:15 -0000	1.6
+++ usbmuxd.spec	30 Jan 2010 12:18:06 -0000	1.7
@@ -1,17 +1,19 @@
 Name:		usbmuxd
 Version:	1.0.0
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Daemon for communicating with Apple's iPod Touch and iPhone
 
 Group:		Applications/System
 # All code is dual licenses as GPLv3+ or GPLv2+, except libusbmuxd which is LGPLv2+.
 License:	GPLv3+ or GPLv2+ and LGPLv2+
 URL:		http://marcansoft.com/uploads/
-Source0:	http://marcansoft.com/uploads/usbmuxd/%{name}-%{version}.tar.bz2
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0:	http://marcansoft.com/uploads/usbmuxd/%{name}-%{version}.tar.bz2
+Patch0:		usbmuxd-udevuser.patch
 
 BuildRequires:	libusb1-devel
 BuildRequires:	cmake
+Requires(pre): shadow-utils
 
 %description
 usbmuxd is a daemon used for communicating with Apple's iPod Touch and iPhone
@@ -23,12 +25,14 @@ Summary: Development package for %{name}
 Group: Development/Libraries
 Requires: usbmuxd = %{version}-%{release}
 Requires: pkgconfig
+Requires: libusb1-devel
 
 %description devel
 Files for development with %{name}.
 
 %prep
 %setup -q
+%patch0 -p1 -b .udevuser
 
 %build
 export CMAKE_PREFIX_PATH=/usr
@@ -44,6 +48,13 @@ make install DESTDIR=$RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+getent group usbmuxd >/dev/null || groupadd -r usbmuxd
+getent passwd usbmuxd >/dev/null || \
+useradd -r -g usbmuxd -d / -s /sbin/nologin \
+-c "usbmuxd user" usbmuxd
+exit 0
+
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
@@ -64,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/libusbmuxd.pc
 
 %changelog
+* Fri Jan 29 2010 Peter Robinson <pbrobinson at gmail.com> 1.0.0-2
+- Run deamon under the usbmuxd user
+
 * Mon Dec  7 2009 Peter Robinson <pbrobinson at gmail.com> 1.0.0-1
 - New stable 1.0.0 release
 



More information about the scm-commits mailing list