[librsync] Solved build failures with "-Werror=format-security" (#1037171)
Robert Scheck
robert at fedoraproject.org
Sun Dec 8 00:57:20 UTC 2013
commit 947efe6f2fa3c33fe28205a4b76fd4880bf44de5
Author: Robert Scheck <robert at fedoraproject.org>
Date: Sun Dec 8 01:57:14 2013 +0100
Solved build failures with "-Werror=format-security" (#1037171)
librsync-0.9.7-format-security.patch | 15 +++++++++++++++
librsync.spec | 7 ++++++-
2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/librsync-0.9.7-format-security.patch b/librsync-0.9.7-format-security.patch
new file mode 100644
index 0000000..83957f9
--- /dev/null
+++ b/librsync-0.9.7-format-security.patch
@@ -0,0 +1,15 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for librsync >= 0.9.7, which fixes the
+build failures if compiled with "-Werror=format-security". For further information please
+also have a look to https://bugzilla.redhat.com/show_bug.cgi?id=1037171
+
+--- librsync-0.9.7/buf.c 2004-02-08 00:17:57.000000000 +0100
++++ librsync-0.9.7/buf.c.format-security 2013-12-08 01:52:22.000000000 +0100
+@@ -213,7 +213,7 @@
+
+ got = fread(*buf, 1, *len, f);
+ if (got == -1) {
+- rs_error(strerror(errno));
++ rs_error("%s", strerror(errno));
+ return RS_IO_ERROR;
+ } else if (got == 0) {
+ rs_error("unexpected eof on fd%d", fileno(f));
diff --git a/librsync.spec b/librsync.spec
index ea0e14c..bbb9d84 100644
--- a/librsync.spec
+++ b/librsync.spec
@@ -1,7 +1,7 @@
Summary: Rsync libraries
Name: librsync
Version: 0.9.7
-Release: 21%{?dist}
+Release: 22%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://librsync.sourceforge.net/
@@ -9,6 +9,7 @@ Source: http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{v
Patch0: librsync-0.9.7-lfs_overflow.patch
Patch1: librsync-0.9.7-getopt.patch
Patch2: librsync-0.9.7-man_pages.patch
+Patch3: librsync-0.9.7-format-security.patch
BuildRequires: zlib-devel, bzip2-devel, %{_includedir}/popt.h, libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -43,6 +44,7 @@ and incompatible with rsync 2.4.6.
%patch0 -p1 -b .lfs_overflow
%patch1 -p1 -b .getopt
%patch2 -p1 -b .man_pages
+%patch3 -p1 -b .format-security
%build
libtoolize
@@ -78,6 +80,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/librsync.3*
%changelog
+* Sun Dec 08 2013 Robert Scheck <robert at fedoraproject.org> 0.9.7-22
+- Solved build failures with "-Werror=format-security" (#1037171)
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.7-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list