Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 302325 Details for
Bug 442248
Add patches necessary for gnome-lirc-properties
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
lirc-g-l-p-support.patch
lirc-g-l-p-support.patch (text/plain), 8.35 KB, created by
Bastien Nocera
on 2008-04-14 10:31:52 UTC
(
hide
)
Description:
lirc-g-l-p-support.patch
Filename:
MIME Type:
Creator:
Bastien Nocera
Created:
2008-04-14 10:31:52 UTC
Size:
8.35 KB
patch
obsolete
>Index: 0001-Use-new-instead-of-conf-as-filename-suffix.patch >=================================================================== >RCS file: 0001-Use-new-instead-of-conf-as-filename-suffix.patch >diff -N 0001-Use-new-instead-of-conf-as-filename-suffix.patch >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ 0001-Use-new-instead-of-conf-as-filename-suffix.patch 14 Apr 2008 10:30:34 -0000 >@@ -0,0 +1,28 @@ >+From 3e45e512719feccaa16edfd208273bade4f724e4 Mon Sep 17 00:00:00 2001 >+From: Mathias Hasselmann <mathias@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 >+ >Index: 0002-Add-resume-switch-to-irrecord.patch >=================================================================== >RCS file: 0002-Add-resume-switch-to-irrecord.patch >diff -N 0002-Add-resume-switch-to-irrecord.patch >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ 0002-Add-resume-switch-to-irrecord.patch 14 Apr 2008 10:30:34 -0000 >@@ -0,0 +1,109 @@ >+From d5f3f9853d87c319c33ade71811c225db11855f7 Mon Sep 17 00:00:00 2001 >+From: Mathias Hasselmann <mathias@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 >+ >Index: 27_multiple_include.dpatch >=================================================================== >RCS file: 27_multiple_include.dpatch >diff -N 27_multiple_include.dpatch >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ 27_multiple_include.dpatch 14 Apr 2008 10:30:34 -0000 >@@ -0,0 +1,38 @@ >+#! /bin/sh /usr/share/dpatch/dpatch-run >+## 27_multiple_include.dpatch by Mario Limonciello <superm1@ubuntu.com> >+## >+## All lines beginning with `## DP:' are a description of the patch. >+## DP: Add support for "including" child lircd.conf's >+ >+@DPATCH@ >+diff -urNad lirc-0.8.3~pre1~/daemons/config_file.c lirc-0.8.3~pre1/daemons/config_file.c >+--- lirc-0.8.3~pre1~/daemons/config_file.c 2007-07-29 13:20:06.000000000 -0500 >++++ lirc-0.8.3~pre1/daemons/config_file.c 2007-12-30 02:12:56.000000000 -0600 >+@@ -690,7 +690,26 @@ >+ if(val!=NULL){ >+ val2=strtok(NULL, " \t"); >+ LOGPRINTF(3,"\"%s\" \"%s\"",key,val); >+- if (strcasecmp("begin",key)==0){ >++ if (strcasecmp("include",key)==0){ >++ FILE* childFile = fopen(val, "r"); >++ if (childFile == NULL){ >++ logprintf(LOG_ERR,"error opening child file defined at line %d:",line); >++ logprintf(LOG_ERR,"ignoring this child file for now."); >++ } >++ else{ >++ if (!top_rem){ >++ /* create first remote */ >++ LOGPRINTF(2,"creating first remote"); >++ top_rem = rem = read_config(childFile); >++ }else{ >++ /* create new remote */ >++ LOGPRINTF(2,"creating next remote"); >++ rem->next=read_config(childFile); >++ rem=rem->next; >++ } >++ fclose(childFile); >++ } >++ }else if (strcasecmp("begin",key)==0){ >+ if (strcasecmp("codes", val)==0){ >+ /* init codes mode */ >+ LOGPRINTF(2," begin codes"); >Index: lirc.spec >=================================================================== >RCS file: /cvs/pkgs/rpms/lirc/devel/lirc.spec,v >retrieving revision 1.29 >diff -u -p -r1.29 lirc.spec >--- lirc.spec 7 Apr 2008 00:29:02 -0000 1.29 >+++ lirc.spec 14 Apr 2008 10:30:35 -0000 >@@ -18,7 +18,7 @@ > > Name: lirc > Version: 0.8.3 >-Release: 0.3%{?pre:.%{pre}}%{?dist} >+Release: 0.4%{?pre:.%{pre}}%{?dist} > Summary: The Linux Infrared Remote Control package > > Group: System Environment/Daemons >@@ -30,6 +30,10 @@ Source1: %{name}.init > Source2: %{name}.sysconfig > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > >+Patch0: https://code.fluendo.com/remotecontrol/svn/trunk/patches/0001-Use-new-instead-of-conf-as-filename-suffix.patch >+Patch1: https://code.fluendo.com/remotecontrol/svn/trunk/patches/0002-Add-resume-switch-to-irrecord.patch >+Patch2: http://patches.ubuntu.com/l/lirc/extracted/27_multiple_include.dpatch >+ > BuildRequires: %{__perl} > BuildRequires: libusb-devel > %if %{with alsa} >@@ -97,6 +101,9 @@ documentation and a collection of remote > > %prep > %setup -q -n %{name}-%{version}%{?pre} >+%patch0 -p1 -b .conf-suffix >+%patch1 -p1 -b .resume >+%patch2 -p1 -b .include > > chmod 644 contrib/* > >@@ -233,6 +240,9 @@ fi > > > %changelog >+* Mon Apr 14 2008 - Bastien Nocera <bnocera@redhat.com> - 0.8.3-0.4.pre2 >+- Add patches necessary for gnome-lirc-properties (#442248) >+ > * Sun Apr 06 2008 Jarod Wilson <jwilson@redhat.com> - 0.8.3-0.3.pre2 > - Update to 0.8.3pre2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 442248
:
302325
|
305060
|
305125
|
305285
|
305286