From 346e9668ea9ff803872f29a89a0638ab03f20df5 Mon Sep 17 00:00:00 2001 From: Simon Lukasik Date: Feb 03 2014 10:54:39 +0000 Subject: 1037313: Fix FTBS when Werror=format-security. --- diff --git a/0002-Werror-format-security.patch b/0002-Werror-format-security.patch new file mode 100644 index 0000000..8292914 --- /dev/null +++ b/0002-Werror-format-security.patch @@ -0,0 +1,12 @@ +diff -Naur ncurses-ruby-1.3.1/form_wrap.c ncurses-ruby-1.3.1.format/form_wrap.c +--- ncurses-ruby-1.3.1/form_wrap.c 2014-02-03 11:31:39.049867878 +0100 ++++ ncurses-ruby-1.3.1.format/form_wrap.c 2014-02-03 11:44:37.001008654 +0100 +@@ -1132,7 +1132,7 @@ + char msg[500]; + snprintf(msg, 500, "The validation functions for this field type need %d additional arguments.",(int)(NUM2INT(argc)-1)); + msg[499]=0; +- rb_raise(rb_eArgError, msg); ++ rb_raise(rb_eArgError, "%s", msg); + } + } + } diff --git a/ruby-ncurses.spec b/ruby-ncurses.spec index ae3f543..28070c6 100644 --- a/ruby-ncurses.spec +++ b/ruby-ncurses.spec @@ -4,13 +4,14 @@ Name: %distname Version: 1.3.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: A module for ruby applications for using ncurses interfaces Group: System Environment/Libraries License: LGPLv2+ URL: http://ncurses-ruby.berlios.de/ Source0: http://download.berlios.de/ncurses-ruby/%{realname}-%{version}.tar.bz2 Patch0: 0001-STR2CSTR-deprecated.patch +Patch1: 0002-Werror-format-security.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ruby(release) >= %{rubyabi} BuildRequires: ruby @@ -27,6 +28,7 @@ of the C library ncurses accessible from the Ruby programming language. %prep %setup -q -n %{realname}-%{version} %patch0 -p1 -b .p +%patch1 -p1 -b .format %{__chmod} 0644 ncurses_wrap.c find examples/ -type f | xargs %{__chmod} 0644 @@ -52,6 +54,9 @@ ruby extconf.rb --vendor %{ruby_vendorlibdir}/ncurses_sugar.rb %changelog +* Mon Feb 03 2014 Šimon Lukašík - 1.3.1-10 +- FTBFS if "-Werror=format-security" flag is used (#1037313) + * Sun Aug 04 2013 Fedora Release Engineering - 1.3.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild