From 2c0f412d408b39abec5cbc0e87307aa474567d9a Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Jul 11 2018 18:12:03 +0000 Subject: - Resolves: rhbz#1582773 fetchlog: FTBFS in Fedora 28 --- diff --git a/fetchlog-1.4-printf.patch b/fetchlog-1.4-printf.patch new file mode 100644 index 0000000..af8447e --- /dev/null +++ b/fetchlog-1.4-printf.patch @@ -0,0 +1,30 @@ +diff -Naur fetchlog-1.4-orig/fetchlog.c fetchlog-1.4/fetchlog.c +--- fetchlog-1.4-orig/fetchlog.c 2018-07-11 14:00:03.328216490 -0400 ++++ fetchlog-1.4/fetchlog.c 2018-07-11 14:08:31.814172473 -0400 +@@ -155,7 +155,7 @@ + msg[fetchlen_G-2] = '~'; + len = fetchlen_G + 1; + } +- fprintf(stdout, msg); ++ fputs(msg, stdout); + 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 ) +- fprintf(stdout, OK_MESSAGE "\n"); ++ fputs(OK_MESSAGE "\n", stdout); + close( fd ); + return RET_OK; + } +@@ -484,7 +484,7 @@ + ((conv_G & CONV_NAGIOS3)!= 0 && fetchlen_G-opos==4 ) ) ) ) { + + if( conv_G & CONV_OKMSG ) { +- fprintf(stdout,OK_MESSAGE); ++ fputs(OK_MESSAGE, stdout); + } + i = RET_OK; + }else{ diff --git a/fetchlog.spec b/fetchlog.spec index e02a6a5..843ed33 100644 --- a/fetchlog.spec +++ b/fetchlog.spec @@ -1,15 +1,17 @@ Summary: Utility to display new messages of a logfile since last run Name: fetchlog Version: 1.4 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2+ -Url: http://sourceforge.net/projects/%{name}/ -Source: http://dl.sf.net/sourceforge/fetchlog/%{name}-%{version}.tar.gz +Url: http://sourceforge.net/projects/fetchlog +Source: http://dl.sf.net/sourceforge/fetchlog/fetchlog-%{version}.tar.gz +Group: Applications/System + Patch0: fetchlog-build.patch Patch1: fetchlog-unusedvar.patch Patch2: fetchlog-1.4-write.patch Patch3: fetchlog-1.4-tests.patch -Group: Applications/System +Patch4: fetchlog-1.4-printf.patch %description The fetchlog utility displays the last new messages of a logfile. It is @@ -23,6 +25,7 @@ fetchlog uses a bookmark to remember which messages have been fetched. %patch1 -p1 %patch2 -p0 %patch3 -p1 +%patch4 -p1 %build make %{?_smp_mflags} @@ -44,6 +47,9 @@ make testall %{_mandir}/*/* %changelog +* Wed Jul 11 2018 Paul Wouters - 1.4-13 +- Resolves: rhbz#1582773 FTBFS in Fedora 28 (Fix for -Werror=format-security errors with fprintf) + * Wed Feb 07 2018 Fedora Release Engineering - 1.4-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild