rpms/lirc/devel lirc-add-resume-switch-to-irrecord.patch, NONE, 1.1 lirc-use-new-instead-of-conf-as-filename-suffix.patch, NONE, 1.1 lirc-0.8.3-validate-transmit-buffer.patch, 1.1, 1.2 lirc.spec, 1.32, 1.33

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Mon Jun 2 18:58:49 UTC 2008


Author: jwilson

Update of /cvs/pkgs/rpms/lirc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20337

Modified Files:
	lirc-0.8.3-validate-transmit-buffer.patch lirc.spec 
Added Files:
	lirc-add-resume-switch-to-irrecord.patch 
	lirc-use-new-instead-of-conf-as-filename-suffix.patch 
Log Message:
* Mon Jun 02 2008 Jarod Wilson <jwilson at redhat.com> - 0.8.3-3
- Add additional required patches for gnome-lirc-properties (#442248)
- Put remote definitions in their own sub-package (#442328)


lirc-add-resume-switch-to-irrecord.patch:

--- NEW FILE lirc-add-resume-switch-to-irrecord.patch ---
>From d5f3f9853d87c319c33ade71811c225db11855f7 Mon Sep 17 00:00:00 2001
From: Mathias Hasselmann <mathias at openismus.com>
Date: Wed, 13 Feb 2008 21:23:43 +0100
Subject: Add --resume switch to irrecord.

This switch asks irrecord to take hardware parameters from the provided
template file, instead of trying to interactively discover them.

This change is needed for gnome-lirc-properties to allow it having a
self-contained key-code learning mode, that's consistent with
gnome-keybinding-properties.

The 'remotes==NULL' check for LIRC_MODE_MODE2 seems to indicate, that its
author had a similar behaviour in mind. Still I prefer having that switch,
instead of silently switching to --resume behaviour when a templates file
was found, for backwards compability and for being able to detect that
feature.
---
 daemons/irrecord.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/daemons/irrecord.c b/daemons/irrecord.c
index df03c7b..a2420a8 100644
--- a/daemons/irrecord.c
+++ b/daemons/irrecord.c
@@ -192,6 +192,7 @@ int main(int argc,char **argv)
 	lirc_t min_remaining_gap, max_remaining_gap;
 	int force;
 	int retries;
+	int resume;
 	struct ir_remote *remotes=NULL;
 	char *device=NULL;
 #ifdef DEBUG
@@ -200,6 +201,7 @@ int main(int argc,char **argv)
 
 	progname=argv[0];
 	force=0;
+	resume=0;
 	hw_choose_driver(NULL);
 	while(1)
 	{
@@ -211,6 +213,7 @@ int main(int argc,char **argv)
 			{"device",required_argument,NULL,'d'},
 			{"driver",required_argument,NULL,'H'},
 			{"force",no_argument,NULL,'f'},
+			{"resume",no_argument,NULL,'r'},
 #ifdef DEBUG
 			{"pre",no_argument,NULL,'p'},
 			{"post",no_argument,NULL,'P'},
@@ -221,9 +224,9 @@ int main(int argc,char **argv)
 			{0, 0, 0, 0}
 		};
 #ifdef DEBUG
-		c = getopt_long(argc,argv,"hvd:H:fpPtiT",long_options,NULL);
+		c = getopt_long(argc,argv,"hvd:H:frpPtiT",long_options,NULL);
 #else
-		c = getopt_long(argc,argv,"hvd:H:f",long_options,NULL);
+		c = getopt_long(argc,argv,"hvd:H:fr",long_options,NULL);
 #endif
 		if(c==-1)
 			break;
@@ -234,6 +237,7 @@ int main(int argc,char **argv)
 			printf("\t -h --help\t\tdisplay this message\n");
 			printf("\t -v --version\t\tdisplay version\n");
 			printf("\t -f --force\t\tforce raw mode\n");
+			printf("\t -r --resume\t\tcontinue recording\n");
 			printf("\t -H --driver=driver\tuse given driver\n");
 			printf("\t -d --device=device\tread from given device\n");
 			exit(EXIT_SUCCESS);
@@ -254,6 +258,9 @@ int main(int argc,char **argv)
 		case 'f':
 			force=1;
 			break;
+		case 'r':
+			resume=1;
+			break;
 #ifdef DEBUG
 		case 'p':
 			get_pre=1;
@@ -460,7 +467,7 @@ int main(int argc,char **argv)
 	switch(hw.rec_mode)
 	{
 	case LIRC_MODE_MODE2:
-		if(remotes==NULL && !get_lengths(&remote,force))
+		if((!remotes || !resume) && !get_lengths(&remote,force))
 		{
 			if(remote.gap==0)
 			{
@@ -494,7 +501,7 @@ int main(int argc,char **argv)
 	case LIRC_MODE_LIRCCODE:
 		if(hw.rec_mode==LIRC_MODE_CODE) remote.bits=CHAR_BIT;
 		else remote.bits=hw.code_length;
-		if(!get_gap_length(&remote))
+		if((!remotes || !resume) && !get_gap_length(&remote))
 		{
 			fprintf(stderr,"%s: gap not found,"
 				" can't continue\n",progname);
@@ -767,7 +774,7 @@ int main(int argc,char **argv)
 		exit(EXIT_FAILURE);
 	}
 	
-	if(!has_toggle_bit_mask(remotes))
+	if((!remotes || !resume) && !has_toggle_bit_mask(remotes))
 	{
 		get_toggle_bit_mask(remotes);
 	}
-- 
1.5.3.7


lirc-use-new-instead-of-conf-as-filename-suffix.patch:

--- NEW FILE lirc-use-new-instead-of-conf-as-filename-suffix.patch ---
>From 3e45e512719feccaa16edfd208273bade4f724e4 Mon Sep 17 00:00:00 2001
From: Mathias Hasselmann <mathias at openismus.com>
Date: Wed, 13 Feb 2008 21:16:09 +0100
Subject: Use '.new' instead of '.conf' as filename suffix in template mode,
 and append that the suffix to 'filename_new' instead of 'filename',
 to prevent a buffer overrun for 'argv[optind]'.

---
 daemons/irrecord.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/daemons/irrecord.c b/daemons/irrecord.c
index ea298e3..df03c7b 100644
--- a/daemons/irrecord.c
+++ b/daemons/irrecord.c
@@ -364,7 +364,7 @@ int main(int argc,char **argv)
 			exit(EXIT_FAILURE);
 		}
 		strcpy(filename_new, filename);
-		strcat(filename_new, ".conf");
+		strcat(filename_new,".new");
		filename = filename_new;
 	}
 	fout=fopen(filename,"w");
 	if(fout==NULL)
-- 
1.5.3.7


lirc-0.8.3-validate-transmit-buffer.patch:

Index: lirc-0.8.3-validate-transmit-buffer.patch
===================================================================
RCS file: /cvs/pkgs/rpms/lirc/devel/lirc-0.8.3-validate-transmit-buffer.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- lirc-0.8.3-validate-transmit-buffer.patch	12 May 2008 22:15:58 -0000	1.1
+++ lirc-0.8.3-validate-transmit-buffer.patch	2 Jun 2008 18:57:47 -0000	1.2
@@ -1,5 +1,5 @@
---- transmit.c	2007/07/29 18:20:13	5.27
-+++ transmit.c	2008/05/11 13:29:47	5.28
+--- 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$      */
 +/*      $Id$      */


Index: lirc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/lirc/devel/lirc.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- lirc.spec	12 May 2008 22:13:46 -0000	1.32
+++ lirc.spec	2 Jun 2008 18:57:47 -0000	1.33
@@ -18,7 +18,7 @@
 
 Name:           lirc
 Version:        0.8.3
-Release:        2%{?pre:.%{pre}}%{?dist}
+Release:        3%{?pre:.%{pre}}%{?dist}
 Summary:        The Linux Infrared Remote Control package
 
 Group:          System Environment/Daemons
@@ -30,6 +30,8 @@
 Source2:        %{name}.sysconfig
 Patch0:         lirc-0.8.3-remote-includes-directive.patch
 Patch1:         lirc-0.8.3-validate-transmit-buffer.patch
+Patch2:         lirc-use-new-instead-of-conf-as-filename-suffix.patch
+Patch3:         lirc-add-resume-switch-to-irrecord.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  %{__perl}
@@ -94,13 +96,27 @@
 Included applications include daemons which decode the received
 signals as well as user space applications which allow controlling a
 computer with a remote control.  This package contains LIRC
-documentation and a collection of remote control configuration files.
+documentation.
+
+%package        remotes
+Summary:        LIRC remote definitions
+Group:          System Environment/Daemons
+
+%description    remotes
+LIRC is a package that allows you to decode and send infra-red and
+other signals of many (but not all) commonly used remote controls.
+Included applications include daemons which decode the received
+signals as well as user space applications which allow controlling a
+computer with a remote control.  This package contains a collection
+of remote control configuration files.
 
 
 %prep
 %setup -q -n %{name}-%{version}%{?pre}
 %patch0 -p1 -b .incl
 %patch1 -p1 -b .xbuf
+%patch2 -p1 -b .suf
+%patch3 -p1 -b .res
 
 chmod 644 contrib/*
 
@@ -183,6 +199,8 @@
 
 rm $RPM_BUILD_ROOT%{_libdir}/liblirc_client.la
 
+# Put remote definitions in place
+cp -ar remotes $RPM_BUILD_ROOT%{_datadir}/lirc-remotes
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -233,10 +251,19 @@
 
 %files doc
 %defattr(-,root,root,-)
-%doc __docs/* remotes/
+%doc __docs/*
+
+%files remotes
+%defattr(-,root,root,-)
+%dir %{_datadir}/lirc-remotes
+%{_datadir}/lirc-remotes/*
 
 
 %changelog
+* Mon Jun 02 2008 Jarod Wilson <jwilson at redhat.com> - 0.8.3-3
+- Add additional required patches for gnome-lirc-properties (#442248)
+- Put remote definitions in their own sub-package (#442328)
+
 * Mon May 12 2008 Jarod Wilson <jwilson at redhat.com> - 0.8.3-2
 - Include upstream patch for lircd.conf remote include directives (#442248)
 - Include upstream patch to validate transmit buffers




More information about the fedora-extras-commits mailing list