[fetchlog] * Tue Jul 3 2012 Paul Wouters <pwouters at redhat.com> - 1.4-2 - Updated to 1.4-1 (rhbz#608241) - Adde
Paul Wouters
pwouters at fedoraproject.org
Wed Jul 4 01:14:12 UTC 2012
commit bce0cb4067648fb3997382376d3f0feadc9e3bda
Author: Paul Wouters <paul at nohats.ca>
Date: Tue Jul 3 21:13:59 2012 -0400
* Tue Jul 3 2012 Paul Wouters <pwouters at redhat.com> - 1.4-2
- Updated to 1.4-1 (rhbz#608241)
- Added patch for -Wunused and patch for bad CFLAGS
- write() patch with test case fixups
fetchlog-1.4-tests.patch | 21 +++++++++++++++++++++
fetchlog-1.4-write.patch | 43 +++++++++++++++++++++++++++++++++++++++++++
fetchlog-build.patch | 2 +-
fetchlog.spec | 7 ++++++-
4 files changed, 71 insertions(+), 2 deletions(-)
---
diff --git a/fetchlog-1.4-tests.patch b/fetchlog-1.4-tests.patch
new file mode 100644
index 0000000..ad9c3c1
--- /dev/null
+++ b/fetchlog-1.4-tests.patch
@@ -0,0 +1,21 @@
+diff -Naur fetchlog-1.4-orig/test-all fetchlog-1.4/test-all
+--- fetchlog-1.4-orig/test-all 2010-07-02 06:10:08.000000000 -0400
++++ fetchlog-1.4/test-all 2012-07-03 21:02:55.213650680 -0400
+@@ -220,7 +220,7 @@
+
+ expect "param column range 3" \
+ 3 \
+- "ERROR: fetchlog: out of range: firstcol, lastco~" \
++ "ERROR: fetchlog: out of range: firstcol, lastco~ or len" \
+ ./fetchlog -f 1:50:49: ${logfile} ${bm}
+
+ expect "param column range 3 ok" \
+@@ -1061,7 +1061,7 @@
+
+ expect "fetching fetchlen errormsg 1" \
+ 3 \
+- "ERROR: fetchlog: out of range: firstcol, lastcol~" \
++ "ERROR: fetchlog: out of range: firstcol, lastcol~ r len" \
+ ./fetchlog -f 1:999:50: ${logfile} ${bm}
+
+ expect "fetching fetchlen 1" \
diff --git a/fetchlog-1.4-write.patch b/fetchlog-1.4-write.patch
new file mode 100644
index 0000000..9224850
--- /dev/null
+++ b/fetchlog-1.4-write.patch
@@ -0,0 +1,43 @@
+--- fetchlog.c-old 2012-04-05 14:48:22.999438037 -0400
++++ fetchlog.c 2012-04-05 14:52:56.469292696 -0400
+@@ -55,7 +55,7 @@
+ #define MIN_FETCHLEN 50 /* Min length of fetched data */
+ #define MAX_FETCHLEN 20000 /* Max length of fetched data */
+
+-#define OK_MESSAGE "OK: no messages"
++#define OK_MESSAGE "OK: no messages\n"
+ #define ERR_MESSAGE "ERROR: fetchlog: "
+
+ /* suffix for temp bookmarkfile: mkstemp() template */
+@@ -155,7 +155,7 @@
+ msg[fetchlen_G-2] = '~';
+ len = fetchlen_G + 1;
+ }
+- (void)write( STDOUT_FILENO, msg, len-1 );
++ fprintf(stdout, msg);
+ free( msg );
+ }
+
+@@ -295,7 +295,7 @@
+ /* something changed meanwhile ? */
+ if( obm.mtime==nbm.mtime && obm.inode==nbm.inode && obm.last==nbm.last ) {
+ if( conv_G & CONV_OKMSG )
+- (void)write( STDOUT_FILENO, OK_MESSAGE "\n", sizeof( OK_MESSAGE ));
++ fprintf(stdout, OK_MESSAGE "\n");
+ close( fd );
+ return RET_OK;
+ }
+@@ -484,11 +484,11 @@
+ ((conv_G & CONV_NAGIOS3)!= 0 && fetchlen_G-opos==4 ) ) ) ) {
+
+ if( conv_G & CONV_OKMSG ) {
+- (void)write( STDOUT_FILENO, OK_MESSAGE "\n", sizeof( OK_MESSAGE ) );
++ fprintf(stdout,OK_MESSAGE);
+ }
+ i = RET_OK;
+ }else{
+- (void)write( STDOUT_FILENO, obuf+opos,fetchlen_G-opos);
++ fprintf(stdout, "%s",obuf+opos);
+ i = RET_NEWMSG;
+ }
+
diff --git a/fetchlog-build.patch b/fetchlog-build.patch
index c11f97f..94e93f1 100644
--- a/fetchlog-build.patch
+++ b/fetchlog-build.patch
@@ -5,7 +5,7 @@
### gcc
CC=gcc
-CFLAGS= -O -Werror -Wall -Wcast-qual -Wstrict-prototypes \
-+CFLAGS= $(RPM_OPT_FLAGS) \
++CFLAGS= $(RPM_OPT_FLAGS) -Wall -Wcast-qual -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Winline -Wcast-align
### cc
#CC=cc
diff --git a/fetchlog.spec b/fetchlog.spec
index 2b630af..9574a46 100644
--- a/fetchlog.spec
+++ b/fetchlog.spec
@@ -7,6 +7,8 @@ Url: http://sourceforge.net/projects/%{name}/
Source: http://dl.sf.net/sourceforge/fetchlog/%{name}-%{version}.tar.gz
Patch0: fetchlog-build.patch
Patch1: fetchlog-unusedvar.patch
+Patch2: fetchlog-1.4-write.patch
+Patch3: fetchlog-1.4-tests.patch
Group: Applications/System
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -20,6 +22,8 @@ fetchlog uses a bookmark to remember which messages have been fetched.
%setup -q
%patch0
%patch1 -p1
+%patch2 -p0
+%patch3 -p1
%build
make %{?_smp_mflags}
@@ -45,9 +49,10 @@ rm -rf %{buildroot}
%{_mandir}/*/*
%changelog
-* Tue Feb 28 2012 Paul Wouters <pwouters at redhat.com> - 1.4-1
+* Tue Jul 3 2012 Paul Wouters <pwouters at redhat.com> - 1.4-2
- Updated to 1.4-1 (rhbz#608241)
- Added patch for -Wunused and patch for bad CFLAGS
+- write() patch with test case fixups
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list