[perl-ccom] Solved build failures with "-Werror=format-security" (#1059199)

Robert Scheck robert at fedoraproject.org
Sat Feb 15 23:45:55 UTC 2014


commit 8494ab397af2d113d616e0db51cb82628e305405
Author: Robert Scheck <robert at fedoraproject.org>
Date:   Sun Feb 16 00:46:28 2014 +0100

    Solved build failures with "-Werror=format-security" (#1059199)

 perl-ccom-1.4.1-format-security.patch |   17 +++++++++++++++++
 perl-ccom.spec                        |   21 +++++++++++++--------
 2 files changed, 30 insertions(+), 8 deletions(-)
---
diff --git a/perl-ccom-1.4.1-format-security.patch b/perl-ccom-1.4.1-format-security.patch
new file mode 100644
index 0000000..3dfb680
--- /dev/null
+++ b/perl-ccom-1.4.1-format-security.patch
@@ -0,0 +1,17 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for digitemp >= 3.6.0, 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=1059199
+
+--- ccom_V1.4.1_20010428/ccomlib/phonet.c			2002-01-18 05:17:38.000000000 +0100
++++ ccom_V1.4.1_20010428/ccomlib/phonet.c.format-security	2014-02-16 00:35:11.000000000 +0100
+@@ -1183,8 +1183,8 @@
+ 
+           if (strchr (phonet_rules[i-n],'^') != NULL)
+             {
+-             sprintf (orig, orig+1);
+-             sprintf (orig2,orig2+1);
++             sprintf (orig,  "%s", orig+1);
++             sprintf (orig2, "%s", orig2+1);
+             }
+           if (strchr (phonet_rules[i-n],'-') != NULL
+           ||  strchr (phonet_rules[i-n],'$') == NULL)
diff --git a/perl-ccom.spec b/perl-ccom.spec
index 2d8365d..c0dcaeb 100644
--- a/perl-ccom.spec
+++ b/perl-ccom.spec
@@ -1,17 +1,18 @@
 # Filter the Perl extension module
 %{?perl_default_filter}
 
-Summary: 	Perl module for context-sensitive phonetic string replacement
-Name: 		perl-ccom
-Version: 	1.4.1
-Release: 	15%{?dist}
-License: 	LGPLv2+
-Group: 		Development/Libraries
+Summary:	Perl module for context-sensitive phonetic string replacement
+Name:		perl-ccom
+Version:	1.4.1
+Release:	16%{?dist}
+License:	LGPLv2+
+Group:		Development/Libraries
 URL: 		http://www.heise.de/ct/ftp/99/25/252/
 Source:		ftp://ftp.heise.de/pub/ct/listings/phonet.tgz
+Patch0:		perl-ccom-1.4.1-format-security.patch
 Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 BuildRequires:	perl(ExtUtils::MakeMaker)
-BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
 A perl module for context-sensitive phonetic string replacement to modify
@@ -23,6 +24,7 @@ only, but the software has been prepared for multi-language support.
                                                                                                         
 %prep
 %setup -q -c -n %{name}
+%patch0 -p0 -b .format-security
 
 # Clean the strange packaging first
 mv -f ccom*/* .
@@ -59,7 +61,7 @@ rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/ccom_test.pl
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %doc Changes copying.lib readme_perl.txt ccom_test.pl
 %{_mandir}/man3/*.3pm*
 %{perl_vendorarch}/*.pm
@@ -67,6 +69,9 @@ rm -rf $RPM_BUILD_ROOT
 %{perl_vendorarch}/*.pm
 
 %changelog
+* Sun Feb 16 2014 Robert Scheck <robert at fedoraproject.org> 1.4.1-16
+- Solved build failures with "-Werror=format-security" (#1059199)
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.1-15
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list