rpms/lirc/F-8 lirc-0.8.3-validate-transmit-buffer.patch, NONE, 1.1 lirc-dont-exit.patch, NONE, 1.1 lirc.spec, 1.29, 1.30
Jarod Wilson
jwilson at fedoraproject.org
Tue Sep 16 14:27:51 UTC 2008
Author: jwilson
Update of /cvs/pkgs/rpms/lirc/F-8
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23936
Modified Files:
lirc.spec
Added Files:
lirc-0.8.3-validate-transmit-buffer.patch lirc-dont-exit.patch
Log Message:
* Tue Sep 16 2008 Jarod Wilson <jarod at redhat.com> - 0.8.3-2
- Fix multilib upgrade path from F8 (Nicolas Chauvet, #462435)
- Include upstream patch to validate transmit buffers
- Make lircd not exit when there's no device available, so that the
daemon is running as expected when the hardware is plugged back in
(Bastien Nocera, #440231)
lirc-0.8.3-validate-transmit-buffer.patch:
--- NEW FILE lirc-0.8.3-validate-transmit-buffer.patch ---
--- lirc/daemons/transmit.c 2007/07/29 18:20:13 5.27
+++ lirc/daemons/transmit.c 2008/05/11 13:29:47 5.28
@@ -1,4 +1,4 @@
-/* $Id: transmit.c,v 5.27 2007/07/29 18:20:13 lirc Exp $ */
+/* $Id: transmit.c,v 5.28 2008/05/11 13:29:47 lirc Exp $ */
/****************************************************************************
** transmit.c **************************************************************
@@ -116,6 +116,34 @@
return(0);
}
+static int check_send_buffer(void)
+{
+ int i;
+
+ if (send_buffer.wptr == 0)
+ {
+ LOGPRINTF(1, "nothing to send");
+ return(0);
+ }
+ for (i = 0; i < send_buffer.wptr; i++)
+ {
+ if(send_buffer.data[i] == 0)
+ {
+ if(i%2)
+ {
+ LOGPRINTF(1, "invalid space: %d", i);
+ }
+ else
+ {
+ LOGPRINTF(1, "invalid pulse: %d", i);
+ }
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
static inline void flush_send_buffer(void)
{
if(send_buffer.pendingp>0)
@@ -500,5 +528,13 @@
goto init_send_loop;
}
LOGPRINTF(3, "transmit buffer ready");
- return(1);
+ if(!check_send_buffer())
+ {
+ logprintf(LOG_ERR, "invalid send buffer");
+ logprintf(LOG_ERR,
+ "this remote configuration cannot be used "
+ "to transmit");
+ return 0;
+ }
+ return 1;
}
lirc-dont-exit.patch:
--- NEW FILE lirc-dont-exit.patch ---
--- lirc/daemons/lircd.c 2008/05/09 18:40:59 5.77
+++ lirc/daemons/lircd.c 2008/08/21 18:39:25 5.78
@@ -515,10 +515,13 @@
{
if(!hw.init_func())
{
- shutdown(clis[0],2);
- close(clis[0]);
- clin=0;
- dosigterm(SIGTERM);
+ logprintf(LOG_WARNING,
+ "Failed to initialize hardware");
+ /* Don't exit here, otherwise lirc
+ * bails out, and lircd exits, making
+ * it impossible to connect to when we
+ * have a device actually plugged
+ * in. */
}
}
}
Index: lirc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lirc/F-8/lirc.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- lirc.spec 4 May 2008 18:36:00 -0000 1.29
+++ lirc.spec 16 Sep 2008 14:27:20 -0000 1.30
@@ -18,7 +18,7 @@
Name: lirc
Version: 0.8.3
-Release: 1%{?pre:.%{pre}}%{?dist}
+Release: 2%{?pre:.%{pre}}%{?dist}
Summary: The Linux Infrared Remote Control package
Group: System Environment/Daemons
@@ -28,6 +28,8 @@
#Source0: http://lirc.sourceforge.net/software/snapshots/%{name}-%{version}%{pre}.tar.bz2
Source1: %{name}.init
Source2: %{name}.sysconfig
+Patch0: lirc-0.8.3-validate-transmit-buffer.patch
+Patch1: lirc-dont-exit.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{__perl}
@@ -60,6 +62,8 @@
%package libs
Summary: LIRC libraries
Group: System Environment/Libraries
+# Fix old F8 multilib upgrade path issue
+Obsoletes: %{name} < 0.8.3
%description libs
LIRC is a package that allows you to decode and send infra-red and
@@ -97,6 +101,8 @@
%prep
%setup -q -n %{name}-%{version}%{?pre}
+%patch0 -p1 -b .xbuf
+%patch1 -p1 -b .exit
chmod 644 contrib/*
@@ -233,6 +239,13 @@
%changelog
+* Tue Sep 16 2008 Jarod Wilson <jarod at redhat.com> - 0.8.3-2
+- Fix multilib upgrade path from F8 (Nicolas Chauvet, #462435)
+- Include upstream patch to validate transmit buffers
+- Make lircd not exit when there's no device available, so that the
+ daemon is running as expected when the hardware is plugged back in
+ (Bastien Nocera, #440231)
+
* Sun May 04 2008 Jarod Wilson <jwilson at redhat.com> - 0.8.3-1
- Update to 0.8.3 release
More information about the fedora-extras-commits
mailing list