[perl-re-engine-RE2] Fix build with -Werror=format-security
Mathieu Bridon
bochecha at fedoraproject.org
Mon Jun 9 08:48:41 UTC 2014
commit 0f4659954cba367ed88aeb9a286cb79579a3ef29
Author: Mathieu Bridon <bochecha at fedoraproject.org>
Date: Mon Jun 9 10:48:25 2014 +0200
Fix build with -Werror=format-security
https://bugzilla.redhat.com/show_bug.cgi?id=1106308
perl-re-engine-RE2.spec | 10 +++++++-
....11-Fix-build-with-Werror-format-security.patch | 25 ++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/perl-re-engine-RE2.spec b/perl-re-engine-RE2.spec
index 89919bf..00974e8 100644
--- a/perl-re-engine-RE2.spec
+++ b/perl-re-engine-RE2.spec
@@ -1,7 +1,7 @@
Name: perl-re-engine-RE2
Summary: RE2 regex engine
Version: 0.11
-Release: 6%{?dist}
+Release: 7%{?dist}
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/re-engine-RE2/
Source0: http://www.cpan.org/authors/id/D/DG/DGL/re-engine-RE2-%{version}.tar.gz
@@ -10,6 +10,10 @@ Source0: http://www.cpan.org/authors/id/D/DG/DGL/re-engine-RE2-%{versio
# https://rt.cpan.org/Public/Bug/Display.html?id=83467
Patch0: re-engine-RE2-0.11-Unbundle-re2.patch
+# Reported upstream:
+# https://rt.cpan.org/Public/Bug/Display.html?id=96338
+Patch1: re-engine-RE2-0.11-Fix-build-with-Werror-format-security.patch
+
BuildRequires: perl(ExtUtils::CppGuess)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(XSLoader)
@@ -34,6 +38,7 @@ chmod -x lib/re/engine/RE2.pm
rm -fr re2
%patch0 -p1
+%patch1 -p1
%build
@@ -62,6 +67,9 @@ make test
%changelog
+* Mon Jun 09 2014 Mathieu Bridon <bochecha at fedoraproject.org> - 0.11-7
+- Fix the build with -Werror=format-security.
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.11-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/re-engine-RE2-0.11-Fix-build-with-Werror-format-security.patch b/re-engine-RE2-0.11-Fix-build-with-Werror-format-security.patch
new file mode 100644
index 0000000..09d85f4
--- /dev/null
+++ b/re-engine-RE2-0.11-Fix-build-with-Werror-format-security.patch
@@ -0,0 +1,25 @@
+From d669869b3517ae8460e80065967e238de8385ed6 Mon Sep 17 00:00:00 2001
+From: Mathieu Bridon <bochecha at fedoraproject.org>
+Date: Mon, 9 Jun 2014 10:05:05 +0200
+Subject: [PATCH] Fix build with -Werror=format-security
+
+---
+ re2_xs.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/re2_xs.cc b/re2_xs.cc
+index 74a7586..b31b1b0 100644
+--- a/re2_xs.cc
++++ b/re2_xs.cc
+@@ -169,7 +169,7 @@ RE2_comp(pTHX_
+ const string error = ri->error();
+ delete ri;
+
+- croak(perl_only
++ croak("%s", perl_only
+ ? "/x is not supported by RE2"
+ : error.c_str());
+ return NULL; // unreachable
+--
+1.9.3
+
More information about the scm-commits
mailing list