[iguanaIR] Updating to 1.0.5

leamas leamas at fedoraproject.org
Fri Jun 21 03:21:19 UTC 2013


commit a8188662744f4927cc4171cdf727fa6b2987d911
Author: Alec Leamas <alec at tests.notat.diaspora.com>
Date:   Fri Jun 21 05:20:41 2013 +0200

    Updating to 1.0.5

 0001-Remove-trailing-whitespace.patch              |  275 ------------------
 0002-Don-t-hardcode-iguanair-UID.patch             |   27 --
 ...se-platform-specific-python-extension-dir.patch |    6 +-
 0004-Don-t-exit-3-in-library-calls.patch           |   64 ----
 0005-Improve-driver-dir-detection.patch            |   49 ----
 0006-make-options-file-work-w-systemd.patch        |   61 ----
 ...invoke-systemd-support-not-sysV-init-file.patch |   13 +
 ...-fedora-specific-default-socket-directory.patch |   82 ------
 ...invoke-systemd-support-not-sysV-init-file.patch |   28 --
 README.fedora                                      |   13 +
 iguanaIR-rescan                                    |    6 +-
 iguanaIR.spec                                      |  302 +++++++++++---------
 sources                                            |    2 +-
 13 files changed, 194 insertions(+), 734 deletions(-)
---
diff --git a/0003-Use-platform-specific-python-extension-dir.patch b/0003-Use-platform-specific-python-extension-dir.patch
index 0ca7949..2dc94c8 100644
--- a/0003-Use-platform-specific-python-extension-dir.patch
+++ b/0003-Use-platform-specific-python-extension-dir.patch
@@ -1,10 +1,8 @@
-From d6a24ca3d0a0f583d21926d4d9d3890f5958ba67 Mon Sep 17 00:00:00 2001
+From 2877272703e7b9f59cd5c690c70555b101c69815 Mon Sep 17 00:00:00 2001
 From: Alec Leamas <leamas.alec at gmail.com>
 Date: Tue, 25 Dec 2012 11:54:55 +0100
-Subject: [PATCH 3/8] Use platform specific python extension dir
+Subject: [PATCH 3/7] Use platform specific python extension dir
 
-Although this is just an issue for (multi-arch) Fedora, it should
-always be correct to use get_python_lib(1,0) instead of (0,0).
 ---
  configure | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/0006-udev-invoke-systemd-support-not-sysV-init-file.patch b/0006-udev-invoke-systemd-support-not-sysV-init-file.patch
new file mode 100644
index 0000000..bf08829
--- /dev/null
+++ b/0006-udev-invoke-systemd-support-not-sysV-init-file.patch
@@ -0,0 +1,13 @@
+diff --git a/udev/iguanaIR.rules b/udev/iguanaIR.rules
+index b3bc34f..21bc00d 100644
+--- a/udev/iguanaIR.rules
++++ b/udev/iguanaIR.rules
+@@ -12,7 +12,7 @@ ATTR{manufacturer} == "IguanaWorks", ATTR{product} == "USB IR Transceiver", \
+                OWNER = "iguanair", MODE = "0664", \
+                RUN  = "/bin/mkdir -p /var/run/iguanaIR", \
+                RUN += "/bin/chown iguanair /var/run/iguanaIR", \
+-               RUN += "/etc/init.d/iguanaIR rescan"
++               RUN += "/usr/libexec/iguanaIR/rescan"
+ 
+ # FOR DEBUGGING TRY ADDING TO THE RUN LINES:
+ #RUN += "/bin/bash -c 'echo $major $minor r=$result i=$id n=$number k=$kernel p=$parent r=$root >> /tmp/udev.txt'"
diff --git a/README.fedora b/README.fedora
new file mode 100644
index 0000000..f277f65
--- /dev/null
+++ b/README.fedora
@@ -0,0 +1,13 @@
+Fedora README
+=============
+
+On recent kernels (F17+) you will need to disable the kernel ir stuff
+to make the iguanaIR driver work. Basically, blacklist all rc_* 
+modules using a file in /etc/modprobe.d. The list varies, my 
+own file is:
+
+    blacklist rc_medion_x10_or2x
+    blacklist rc_pinnacle_pctv_hd
+    blacklist ati_remote
+    blacklist rc_core
+
diff --git a/iguanaIR-rescan b/iguanaIR-rescan
index 6565144..a41a59d 100755
--- a/iguanaIR-rescan
+++ b/iguanaIR-rescan
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # If iguanaIR runs, signal HUP to start a rescan. If not started, or
-# signal fails, try-restart daemon.
+# signal fails, restart daemon.
 
 if systemctl --quiet is-active iguanaIR.service; then
     pid=$( systemctl --property=MainPID show iguanaIR.service ) || \
@@ -9,4 +9,6 @@ if systemctl --quiet is-active iguanaIR.service; then
     pid=${pid##*=}
     [ -n "$pid" ] && kill -HUP $pid &>/dev/null && exit 0
 fi
-systemctl try-restart iguanaIR.service
+systemctl show --property=UnitFileState iguanaIR.service |
+    grep -q enabled && \
+        systemctl restart iguanaIR.service
diff --git a/iguanaIR.spec b/iguanaIR.spec
index 3f95e16..9ab42ab 100644
--- a/iguanaIR.spec
+++ b/iguanaIR.spec
@@ -1,62 +1,32 @@
 Name:           iguanaIR
-Version:        1.0.3
-Release:        2%{?dist}
+Version:        1.0.5
+Release:        1%{?dist}
 Summary:        Driver for Iguanaworks USB IR transceiver
 
 Group:          System Environment/Daemons
-
-# Following files are LGPL2.1, remaining GPLv2:
-# ./support.h ./iguanaIR.h ./support.c ./pipes.c ./compat.h ./pipes.h
-# ./iguanaIR.c ./dataPackets.h ./compat-unix.c ./dataPackets.c
 License:        GPLv2 and LGPLv2
 URL:            http://iguanaworks.net/ir
-Source0:        http://iguanaworks.net/downloads/iguanaIR-%{version}.tar.bz2
+Source0:        http://iguanaworks.net/downloads/%{name}-%{version}.tar.bz2
 Source1:        iguanaIR.service
 Source2:        iguanaIR-rescan
-Source3:        iguanaIR.logrotate
-Patch1:         0001-Remove-trailing-whitespace.patch
-# http://iguanaworks.net/projects/IguanaIR/ticket/279
-Patch2:         0002-Don-t-hardcode-iguanair-UID.patch
-# http://iguanaworks.net/projects/IguanaIR/ticket/280
+Source3:        README.fedora
+# https://iguanaworks.net/projects/IguanaIR/ticket/205 for patch 5, 3, 2.
 Patch3:         0003-Use-platform-specific-python-extension-dir.patch
-# http://iguanaworks.net/projects/IguanaIR/ticket/281
-Patch4:         0004-Don-t-exit-3-in-library-calls.patch
-# http://iguanaworks.net/projects/IguanaIR/ticket/282
-Patch5:         0005-Improve-driver-dir-detection.patch
-# http://iguanaworks.net/projects/IguanaIR/ticket/283
-Patch6:         0006-make-options-file-work-w-systemd.patch
-# http://iguanaworks.net/projects/IguanaIR/ticket/284
-Patch7:         0007-Use-fedora-specific-default-socket-directory.patch
-# Fedora only, not acceptable upstream.
-Patch8:         0008-udev-invoke-systemd-support-not-sysV-init-file.patch
-
-Requires:       lirc
-Requires:       logrotate
-Requires:       udev
-
-BuildRequires:  libusb1-devel
-BuildRequires:  libusb-devel
-BuildRequires:  popt-devel
-BuildRequires:  python2-devel
-BuildRequires:  systemd-units
-
-Requires(pre):     shadow-utils
-Requires(post):    systemd-units
-Requires(post):    systemd-sysv
-Requires(preun):   systemd-units
-Requires(postun):  systemd-units
-
+# Fedora only
+Patch6:         0006-udev-invoke-systemd-support-not-sysV-init-file.patch
 
-# some features can be disabled during the rpm build
-%{?_without_clock_gettime: %global _disable_clock_gettime --disable-clock_gettime}
+Requires:       lirc, udev
+BuildRequires:  popt-devel, libusb1-devel, libusb-devel, systemd-units
+Requires(post): systemd-units, systemd-sysv
+Requires(preun): systemd-units
+Requires(postun): systemd-units
 
-# Don't add provides for python .so and private lib so-files
-%global __provides_exclude _iguanaIR.so
-%global __provides_exclude_from %{_libdir}/iguanaIR/.*[.]so
 
-# Don't require private libs in /usr/lib[64]/iguanaIR
-%global __requires_exclude libusbpre1.so|libusb.so
+# some features can be disabled during the rpm build
+%{?_without_clock_gettime: %define _disable_clock_gettime --disable-clock_gettime}
 
+# Don't add provides for python .so files
+%define __provides_exclude_from %{python_sitearch}/.*\.so$
 
 %description
 This package provides igdaemon and igclient, the programs necessary to
@@ -65,108 +35,79 @@ control the Iguanaworks USB IR transceiver.
 %package devel
 Summary: Library and header files for iguanaIR
 Group: Development/Libraries
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
 
 %description devel
 The development files needed to interact with the iguanaIR igdaemon are
 included in this package.
 
-%package -n  python-iguanaIR
+%package python
 Group: System Environment/Daemons
 Summary: Python module for Iguanaworks USB IR transceiver
-Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: python
-BuildRequires: python2-devel swig
+Requires: %{name} = %{version}-%{release}, python >= 2.4
+BuildRequires: python-devel swig
 
-%description -n python-iguanaIR
+%description python
 This package provides the swig-generated Python module for interfacing
 with the Iguanaworks USB IR transceiver.
 
-%package firmware
+%package reflasher
 Group: System Environment/Daemons
-Summary: Firmware and reflasher for Iguanaworks USB IR transceiver
-Requires: %{name} = %{version}-%{release}
+Summary: Reflasher for Iguanaworks USB IR transceiver
 BuildArch: noarch
 
-%description firmware
+%description reflasher
 This package provides the reflasher/testing script and assorted firmware
 versions for the Iguanaworks USB IR transceiver.  If you have no idea
 what this means, you don't need it.
 
+
 %prep
-%setup -q -n iguanaIR-%{version}
-%patch1 -p1
-%patch2 -p1
+%setup -q -n %{name}-%{version}
 %patch3 -p1
-%patch4 -p1
-%patch5 -p1
 %patch6 -p1
-%patch7 -p1
-%patch8 -p1
-
-# docs: bad EOL, remove script, fix /dev/iguanaIR -> /var/run/iguanaIR
-sed -i 's/\r//' docs/*
-rm docs/pullDocs
-sed -i 's|/dev/iguanaIR|/var/run/iguanaIR|g' \
-    docs/TroubleShooting docs/driver docs/lirc
-
-# Noarch data wrongly in libdir.
-# http://iguanaworks.net/projects/IguanaIR/ticket/286
-sed -i 's|$(LIBDIR)|%{_datadir}|g' reflasher/Makefile
-
-# Force proper compile flags usage.
-sed -i '/^CFLAGS/s|$| -DFEDORA=1 -fpic %{optflags}|' Makefile.in
-
-# Remove foreign packaging
-rm -rf osx packaging
+cp %{SOURCE3} README.fedora
 
 
 %build
 %configure %{?_disable_clock_gettime}
-make %{?_smp_mflags}
+make CFLAGS="%{optflags} -fpic -DFEDORA=1" %{?_smp_mflags}
 
 
 %install
 make install PREFIX=$RPM_BUILD_ROOT/usr DESTDIR=$RPM_BUILD_ROOT INLIBDIR=$RPM_BUILD_ROOT%{_libdir}
 
+install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
+
 # Use /etc/sysconfig instead of /etc/default
-mkdir $RPM_BUILD_ROOT/etc/sysconfig
+mkdir $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig || :
 mv  $RPM_BUILD_ROOT/etc/default/iguanaIR \
-    $RPM_BUILD_ROOT/etc/sysconfig
+    $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
 
 # Fix up some stray file permissions issues
 chmod -x $RPM_BUILD_ROOT%{python_sitearch}/*.py \
-         $RPM_BUILD_ROOT%{_includedir}/iguanaIR.h \
-         $RPM_BUILD_ROOT%{_datadir}/iguanaIR-reflasher/hex/*
+         $RPM_BUILD_ROOT%{_includedir}/%{name}.h \
+         $RPM_BUILD_ROOT%{_datadir}/%{name}-reflasher/hex/*
 
 # Remove the installed initfile and install the systemd support instead.
-rm -rf $RPM_BUILD_ROOT/etc/init.d/
-install -m644 -pD %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/iguanaIR.service
-install -m755 -pD %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/iguanaIR/rescan
-
-# Install private log dir.
-install -m755 -pd $RPM_BUILD_ROOT/var/log/iguanaIR
-install -m644 -pD %SOURCE3 $RPM_BUILD_ROOT/etc/logrotate.d/%name
-
-# Handle the tempfiles.d and /var/run stuff.
-install -m755 -pd $RPM_BUILD_ROOT/run/iguanaIR
-install -m755 -pd $RPM_BUILD_ROOT/etc/tmpfiles.d
-cat > $RPM_BUILD_ROOT/etc/tmpfiles.d/iguanaIR.conf <<EOF
-d   /run/iguanaIR    0755    iguanair   iguanair
-EOF
+rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/init.d/
+install -m644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
+install -m755 -D %{SOURCE2} $RPM_BUILD_ROOT%{_libexecdir}/iguanaIR/rescan
 
-# Blacklist the kernel driver, just to be sure ATM.
-mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
-cat > $RPM_BUILD_ROOT/etc/modprobe.d/blacklist-iguanair.conf << EOF
-# iguanaIR user space driver blacklisting the kernel driver
-blacklist iguanair
+# Install private log dir, tmpfiles.d setup.
+install -m755 -d $RPM_BUILD_ROOT%{_localstatedir}/log/iguanaIR
+
+install -m755 -d $RPM_BUILD_ROOT/etc/tmpfiles.d
+cat > $RPM_BUILD_ROOT/etc/tmpfiles.d/%{name}.conf <<EOF
+d   /run/%{name}    0755    iguanair   iguanair
 EOF
+install -m755 -d $RPM_BUILD_ROOT/run/%{name}
 
 
 %pre
 getent group iguanair >/dev/null || groupadd -r iguanair
 getent passwd iguanair >/dev/null || \
-    useradd -r -g iguanair -d /var/run/iguanaIR -s /sbin/nologin \
+    useradd -r -g iguanair -d %{_localstatedir}/run/%{name} -s /sbin/nologin \
     -c "Iguanaworks IR Daemon" iguanair
 exit 0
 
@@ -180,60 +121,139 @@ fi
 %preun
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
-    /bin/systemctl --no-reload disable iguanaIR.service > /dev/null 2>&1 || :
-    /bin/systemctl stop iguanaIR.service > /dev/null 2>&1 || :
+    /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
+    /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
 fi
 
 %postun
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
-    /bin/systemctl try-restart iguanaIR.service >/dev/null 2>&1 || :
+    /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
 fi
 /sbin/ldconfig
 
 
 %files
-%doc AUTHORS LICENSE LICENSE-LGPL WHY protocols.txt README.txt notes.txt ChangeLog
-%doc docs
+%doc AUTHORS LICENSE LICENSE-LGPL WHY protocols.txt
+%doc README.txt notes.txt ChangeLog
+%doc README.fedora
 %{_bindir}/igdaemon
 %{_bindir}/igclient
-%{_libdir}/libiguanaIR.so.*
-%{_libdir}/iguanaIR/
-%{_datadir}/iguanaIR/
-%{_unitdir}/iguanaIR.service
-/lib/udev/rules.d/80-iguanaIR.rules
-%config(noreplace) /etc/modprobe.d/blacklist-iguanair.conf
-%config(noreplace) /etc/sysconfig/iguanaIR
-%config(noreplace) /etc/tmpfiles.d/iguanaIR.conf
-%config(noreplace) /etc/logrotate.d/iguanaIR
-%attr(755, iguanair, iguanair) /lib/udev/devices/iguanaIR
-%attr(755, iguanair, iguanair) /run/iguanaIR
-%attr(755, iguanair, iguanair) /var/log/iguanaIR
+%{_libdir}/lib%{name}.so.*
+%{_libdir}/%{name}/*.so
+%{_libexecdir}/%{name}/
+%{_unitdir}/%{name}.service
+/lib/udev/rules.d/80-%{name}.rules
+%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
+%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
+%attr(755, iguanair, iguanair) /run/%{name}
+%attr(775, iguanair, iguanair) %{_localstatedir}/log/%{name}
 
 %files devel
-%doc examples
-%{_includedir}/iguanaIR.h
-%{_libdir}/libiguanaIR.so
+%{_includedir}/%{name}.h
+%{_libdir}/lib%{name}.so
 
-%files -n python-iguanaIR
+%files python
 %{python_sitearch}/*
 
-%files firmware
-%{_bindir}/iguanaIR-reflasher
-%{_datadir}/iguanaIR-reflasher/
-
+%files reflasher
+%{_datadir}/%{name}-reflasher/
+%{_bindir}/%{name}-reflasher
 
 %changelog
-* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.3-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
-
-* Tue Jan 15 2013 Alec Leamas <leamas.alec at gmail.com> - 1.0.3-1
-- Handle review  remarks:
--   Revert license to GPLv2 + LGPLv2,
--   Preserve timestamps, unowned dirs, missing Requires.
-
-* Wed Jan 2 2013 Alec Leamas <leamas.alec at gmail.com> - 1.0.3-1
-- Initial release based on work by Joseph Dunn, Jarod Wilson and
-  Jason Tibbits in bug 642773
-- Set license to GPLv2, can't find any LGPL files.
+* Sun Apr 21 2013 Alec Leamas <leamas.alec at gmail.com> - 1.0.5-1
+- Update to latest upstream 1.0.5
+- Most patches merged upstream.
+
+* Tue Dec 25 2012 Alec Leamas <leamas.alec at gmail.com> - 1.0.3-1
+- Updated to 1.0.3
+- Moved most of fixes.patch to spec file, split rest to smaller ones.
+- Support sysconfig configuration file.
+- Include documentation files
+- Install udev rule in /lib/udev, not /etc/udev.
+- Fixed udev issue invoking '/etc/init.d/iguanaIR rescan'.
+
+* Wed Apr 18 2012 Jason L Tibbitts III <tibbs at math.uh.edu> - 1.0.1-3
+- Some systemd and dependency filtering suggestions.
+
+* Fri Jan 28 2011 Jarod Wilson <jarod at redhat.com> 1.0.1-2
+- Address Fedora package review concerns (#642773)
+
+* Thu Jan 20 2011 Jarod Wilson <jarod at redhat.com> 1.0.1-1
+- Update to 1.0.1 release
+
+* Wed Oct 13 2010 Jarod Wilson <jarod at redhat.com> 1.0-0.2.pre2.svn1419
+- Update to 1.0pre2 snapshot plus svn rev 1419 additions
+- Patch in additional changes to use more suitable locations for
+  plugins, socket directory and reflasher files
+
+* Wed Jul 21 2010 Jarod Wilson <jarod at redhat.com> 1.0-0.1.pre2
+- Update to 1.0pre2 snapshot
+- Revamp spec to be more compliant with Fedora packaging guidelines
+
+* Sat Jun 27 2008 Joseph Dunn <jdunn at iguanaworks.net> 0.96-1
+- Bug fix release.
+
+* Fri Mar 27 2008 Joseph Dunn <jdunn at iguanaworks.net> 0.95-1
+- Decided to do another release to fix a udev problem.
+
+* Sun Mar 23 2008 Joseph Dunn <jdunn at iguanaworks.net> 0.94-1
+- Better windows support, a pile of bugs fixed.  Works with newer
+  firmwares (version 0x102) including frequency and channel support
+  with or without LIRC.
+
+* Sat Mar 10 2007 Joseph Dunn <jdunn at iguanaworks.net> 0.31-1
+- First release with tentative win32 and darwin support.  Darwin needs
+  some work, and windows needs to interface with applications.
+
+* Thu Feb 1 2007 Joseph Dunn <jdunn at iguanaworks.net> 0.30-1
+- Added a utility to change the frequency on firmware version 3, and
+  had to make iguanaRemoveData accessible to python code.
+
+* Sun Jan 21 2007 Joseph Dunn <jdunn at iguanaworks.net> 0.29-1
+- Last currently known problem in the driver.  Using clock_gettime
+  instead of gettimeofday to avoid clock rollbacks.
+
+* Sun Dec 31 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.26-1
+- Happy New Years! and a bugfix.  Long standing bug that caused the
+  igdaemon to hang is fixed.
+
+* Sun Dec 10 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.25-1
+- The socket specification accept a path instead of just an index or
+  label.
+
+* Wed Dec 6 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.24-1
+- Fixes bad argument parsing in igdaemon, and the init script *should*
+  work for fedora and debian now.
+
+* Wed Oct 18 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.19-1
+- A real release has been made, and we'll try to keep track of version
+  numbers a bit better now.
+
+* Sat Sep 23 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.10-1
+- Preparing for a real release.
+
+* Wed Jul 11 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.9-1
+- Switch to using udev instead of hotplug.
+
+* Mon Jul 10 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.8-1
+- Version number bumps, and added python support and package.
+
+* Mon Mar 27 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.5-1
+- Version number bump.
+
+* Mon Mar 20 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.4-1
+- Version number bump.
+
+* Tue Mar 07 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.3-1
+- Packaged a client library, and header file.
+
+* Tue Mar 07 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.2-2
+- Added support for chkconfig
+
+* Tue Mar 07 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.2-1
+- Added files for hotplug.
+
+* Tue Mar 07 2006 Joseph Dunn <jdunn at iguanaworks.net> 0.1-1
+- Initial RPM spec file.
diff --git a/sources b/sources
index 7c21b4a..e42db02 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-172b897083f014c9b5ade296ccc48298  iguanaIR-1.0.3.tar.bz2
+fbdf09dbef2aaf6c89804994d17b2440  iguanaIR-1.0.5.tar.bz2


More information about the scm-commits mailing list