diff --git a/.usbmuxd.metadata b/.usbmuxd.metadata new file mode 100644 index 0000000..99b785b --- /dev/null +++ b/.usbmuxd.metadata @@ -0,0 +1 @@ +56bd90d5ff94c1d9c528f8b49deffea25b7384e8 SOURCES/usbmuxd-1.0.8.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Use-systemd-to-start-usbmuxd.patch b/SOURCES/0001-Use-systemd-to-start-usbmuxd.patch new file mode 100644 index 0000000..3928a41 --- /dev/null +++ b/SOURCES/0001-Use-systemd-to-start-usbmuxd.patch @@ -0,0 +1,61 @@ +From c15d2f6f22a3d5013c8b1cd6ca9c8a31be3748d5 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Mon, 9 Jul 2012 16:30:33 +0100 +Subject: [PATCH] Use systemd to start usbmuxd + +Instead of using udev. udev should not be used to start +long-running daemons. The started daemon will receive SIGKILL +after all event handling has been done, as udev.service cleans +up all the lingering processes. + +We instead ask udev to tell systemd to start us up through the +usbmuxd.service file. + +See: +https://bugzilla.redhat.com/show_bug.cgi?id=786853 +for more details. +--- + udev/85-usbmuxd.rules.in | 2 +- + udev/CMakeLists.txt | 2 ++ + udev/usbmuxd.service.in | 7 +++++++ + 3 files changed, 10 insertions(+), 1 deletion(-) + create mode 100644 udev/usbmuxd.service.in + +diff --git a/udev/85-usbmuxd.rules.in b/udev/85-usbmuxd.rules.in +index 6f2186b..d9de100 100644 +--- a/udev/85-usbmuxd.rules.in ++++ b/udev/85-usbmuxd.rules.in +@@ -1,7 +1,7 @@ + # usbmuxd ("Apple Mobile Device" muxer listening on /var/run/usbmuxd) + + # Forces iDevices to the last USB configuration and runs usbmuxd +-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", OWNER="usbmux", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -u -U usbmux" ++ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="12[9a][0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", OWNER="usbmux", TAG+="systemd", ENV{SYSTEMD_WANTS}="usbmuxd.service" + + # Exit usbmuxd when the last device is removed + ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -x" +diff --git a/udev/CMakeLists.txt b/udev/CMakeLists.txt +index 0f7042d..3067a75 100644 +--- a/udev/CMakeLists.txt ++++ b/udev/CMakeLists.txt +@@ -1,2 +1,4 @@ + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/85-usbmuxd.rules.in ${CMAKE_CURRENT_BINARY_DIR}/85-usbmuxd.rules @ONLY) ++CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/usbmuxd.service.in ${CMAKE_CURRENT_BINARY_DIR}/usbmuxd.service @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/85-usbmuxd.rules DESTINATION /lib/udev/rules.d/) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/usbmuxd.service DESTINATION /lib/systemd/system/) +diff --git a/udev/usbmuxd.service.in b/udev/usbmuxd.service.in +new file mode 100644 +index 0000000..bcfb347 +--- /dev/null ++++ b/udev/usbmuxd.service.in +@@ -0,0 +1,7 @@ ++[Unit] ++Description=iOS USB Muxer ++ ++[Service] ++Type=simple ++ExecStart=/sbin/usbmuxd -u -U usbmux ++PIDFile=/var/run/usbmuxd.pid +-- +1.7.10.2 + diff --git a/SPECS/usbmuxd.spec b/SPECS/usbmuxd.spec new file mode 100644 index 0000000..9378cba --- /dev/null +++ b/SPECS/usbmuxd.spec @@ -0,0 +1,184 @@ +Name: usbmuxd +Version: 1.0.8 +Release: 9%{?dist} +Summary: Daemon for communicating with Apple's iOS devices + +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://www.libimobiledevice.org/ +Source0: http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2 +Patch0: 0001-Use-systemd-to-start-usbmuxd.patch + +BuildRequires: libplist-devel +BuildRequires: libusbx-devel +BuildRequires: cmake +# For the systemd RPM macros +BuildRequires: systemd +Requires(pre): shadow-utils +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +%description +usbmuxd is a daemon used for communicating with Apple's iPod Touch, iPhone, +iPad and Apple TV devices. It allows multiple services on the device to be +accessed simultaneously. + +%package devel +Summary: Development package for %{name} +Group: Development/Libraries +Requires: usbmuxd = %{version}-%{release} +Requires: pkgconfig +Requires: libusbx-devel + +%description devel +Files for development with %{name}. + +%prep +%setup -q +%patch0 -p1 -b .systemd + +# Set the owner of the device node to be usbmuxd +sed -i.owner 's/OWNER="usbmux"/OWNER="usbmuxd"/' udev/85-usbmuxd.rules.in +sed -i.user 's/-U usbmux/-U usbmuxd/' udev/usbmuxd.service.in + +%build +export CMAKE_PREFIX_PATH=/usr +%{cmake} . + +make %{?_smp_mflags} + +%install +export CMAKE_PREFIX_PATH=/usr$RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +%pre +getent group usbmuxd >/dev/null || groupadd -r usbmuxd -g 113 +getent passwd usbmuxd >/dev/null || \ +useradd -r -g usbmuxd -d / -s /sbin/nologin \ + -c "usbmuxd user" -u 113 usbmuxd +exit 0 + +%post +/sbin/ldconfig +%systemd_post usbmuxd.service + +%preun +%systemd_preun usbmuxd.service + +%postun +/sbin/ldconfig +%systemd_postun_with_restart usbmuxd.service + +%files +%doc AUTHORS README COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 README.devel +/lib/udev/rules.d/85-usbmuxd.rules +/lib/systemd/system/usbmuxd.service +%{_bindir}/iproxy +%{_sbindir}/usbmuxd +%{_libdir}/libusbmuxd.so.* + +%files devel +%doc README.devel +%{_includedir}/*.h +%{_libdir}/libusbmuxd.so +%{_libdir}/pkgconfig/libusbmuxd.pc + +%changelog +* Wed Nov 06 2013 Bastien Nocera 1.0.8-9 +- Add BR so scriptlets are expanded +Resolves: #1017894 + +* Mon Nov 4 2013 Matthias Clasen - 1.0.8-8 +- Fix %%postun scriptlet +- Resolves: #1017894 + +* Fri Feb 15 2013 Fedora Release Engineering - 1.0.8-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Nov 19 2012 Bastien Nocera 1.0.8-6 +- Fix source URL + +* Thu Oct 4 2012 Peter Robinson - 1.0.8-5 +- Make use of the new systemd macros +- Minor updates to spec + +* Sun Jul 22 2012 Fedora Release Engineering - 1.0.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 09 2012 Bastien Nocera 1.0.8-3 +- Use systemd to start usbmuxd instead of udev (#786853) + +* Sat Apr 28 2012 Bastien Nocera 1.0.8-2 +- Fix usbmuxd not starting under udev + +* Mon Apr 9 2012 Peter Robinson 1.0.8-1 +- New stable 1.0.8 release + +* Thu Feb 2 2012 Peter Robinson - 1.0.7-3 +- Add debian patch for CVE-2012-0065. Fixes RHBZ 783523 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.0.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Mar 22 2011 Peter Robinson 1.0.7-1 +- New stable 1.0.7 release + +* Mon Feb 07 2011 Fedora Release Engineering - 1.0.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Oct 24 2010 Peter Robinson 1.0.6-1 +- New stable 1.0.6 release + +* Fri Jul 23 2010 Peter Robinson 1.0.5-1 +- New stable 1.0.5 release + +* Fri May 28 2010 Bastien Nocera 1.0.4-3 +- Fix udev rule to use the usbmuxd user + +* Wed May 12 2010 Peter Robinson 1.0.4-2 +- Actually upload a source file + +* Tue May 11 2010 Peter Robinson 1.0.4-1 +- New stable 1.0.4 release + +* Mon Mar 22 2010 Peter Robinson 1.0.3-1 +- New stable 1.0.3 release + +* Thu Feb 11 2010 Peter Robinson 1.0.2-1 +- New stable 1.0.2 release + +* Tue Feb 09 2010 Bastien Nocera 1.0.0-3 +- Use the gid/uid reserved for usbmuxd in setup 2.8.15 and above + +* Fri Jan 29 2010 Peter Robinson 1.0.0-2 +- Run deamon under the usbmuxd user + +* Mon Dec 7 2009 Peter Robinson 1.0.0-1 +- New stable 1.0.0 release + +* Sat Oct 31 2009 Peter Robinson 1.0.0-0.1.rc2 +- New 1.0.0-rc2 test release + +* Thu Oct 29 2009 Peter Robinson 1.0.0-0.2.rc1 +- Add patch to fix install of 64 bit libs + +* Tue Oct 27 2009 Peter Robinson 1.0.0-0.1.rc1 +- New 1.0.0-rc1 test release + +* Fri Aug 14 2009 Bastien Nocera 0.1.4-2 +- Make usbmuxd autostart on newer kernels +- (Still doesn't exit properly though) + +* Mon Aug 10 2009 Peter Robinson 0.1.4-1 +- Update to 0.1.4 + +* Tue Aug 4 2009 Peter Robinson 0.1.3-1 +- Update to 0.1.3, review input + +* Mon Aug 3 2009 Peter Robinson 0.1.2-1 +- Update to 0.1.2 + +* Mon Aug 3 2009 Peter Robinson 0.1.1-1 +- Initial packaging