- fix FTBFS due -Werror=format-security

- modernize spec
This commit is contained in:
Dan Horák 2014-03-14 13:02:32 +01:00
commit cd515dfe0e
2 changed files with 240 additions and 12 deletions

View file

@ -0,0 +1,230 @@
diff -up wxPython-src-2.8.12.0/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp.format 2014-03-14 11:35:34.581008618 +0100
+++ wxPython-src-2.8.12.0/wxPython/contrib/gizmos/gtk/gizmos_wrap.cpp 2014-03-14 11:35:46.035843300 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp.format 2014-03-14 11:34:19.451092820 +0100
+++ wxPython-src-2.8.12.0/wxPython/contrib/glcanvas/gtk/glcanvas_wrap.cpp 2014-03-14 11:34:32.157909458 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/contrib/stc/gtk/stc_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/contrib/stc/gtk/stc_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/contrib/stc/gtk/stc_wrap.cpp.format 2014-03-14 11:34:48.078679712 +0100
+++ wxPython-src-2.8.12.0/wxPython/contrib/stc/gtk/stc_wrap.cpp 2014-03-14 11:34:59.102520628 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/_core_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/_core_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/_core_wrap.cpp.format 2014-03-14 11:27:46.008769964 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/_core_wrap.cpp 2014-03-14 11:28:51.805819727 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/_gdi_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/_gdi_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/_gdi_wrap.cpp.format 2014-03-14 11:27:46.008769964 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/_gdi_wrap.cpp 2014-03-14 11:28:51.805819727 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/animate_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/animate_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/animate_wrap.cpp.format 2014-03-14 11:27:46.008769964 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/animate_wrap.cpp 2014-03-14 11:28:51.805819727 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/aui_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/aui_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/aui_wrap.cpp.format 2014-03-14 11:27:46.013769892 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/aui_wrap.cpp 2014-03-14 11:29:04.018643338 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/calendar_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/calendar_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/calendar_wrap.cpp.format 2014-03-14 11:27:46.015769863 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/calendar_wrap.cpp 2014-03-14 11:29:17.674446166 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/combo_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/combo_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/combo_wrap.cpp.format 2014-03-14 11:27:46.018769820 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/combo_wrap.cpp 2014-03-14 11:29:29.227279558 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/_controls_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/_controls_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/_controls_wrap.cpp.format 2014-03-14 11:27:46.025769719 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/_controls_wrap.cpp 2014-03-14 11:28:04.778498903 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/_core_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/_core_wrap.cpp
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/_gdi_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/_gdi_wrap.cpp
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/grid_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/grid_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/grid_wrap.cpp.format 2014-03-14 11:27:46.044769444 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/grid_wrap.cpp 2014-03-14 11:29:40.914111013 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/html_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/html_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/html_wrap.cpp.format 2014-03-14 11:27:46.048769387 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/html_wrap.cpp 2014-03-14 11:29:52.878938455 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/media_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/media_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/media_wrap.cpp.format 2014-03-14 11:27:46.050769358 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/media_wrap.cpp 2014-03-14 11:30:04.953764306 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/_misc_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/_misc_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/_misc_wrap.cpp.format 2014-03-14 11:27:46.055769285 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/_misc_wrap.cpp 2014-03-14 11:28:26.677182645 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/richtext_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/richtext_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/richtext_wrap.cpp.format 2014-03-14 11:27:46.060769213 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/richtext_wrap.cpp 2014-03-14 11:30:15.843607244 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/webkit_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/webkit_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/webkit_wrap.cpp.format 2014-03-14 11:27:46.063769170 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/webkit_wrap.cpp 2014-03-14 11:30:31.108387076 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/_windows_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/_windows_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/_windows_wrap.cpp.format 2014-03-14 11:27:46.068769098 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/_windows_wrap.cpp 2014-03-14 11:28:41.342970838 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/wizard_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/wizard_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/wizard_wrap.cpp.format 2014-03-14 11:27:46.070769069 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/wizard_wrap.cpp 2014-03-14 11:30:42.440223630 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}
diff -up wxPython-src-2.8.12.0/wxPython/src/gtk/xrc_wrap.cpp.format wxPython-src-2.8.12.0/wxPython/src/gtk/xrc_wrap.cpp
--- wxPython-src-2.8.12.0/wxPython/src/gtk/xrc_wrap.cpp.format 2014-03-14 11:27:46.073769026 +0100
+++ wxPython-src-2.8.12.0/wxPython/src/gtk/xrc_wrap.cpp 2014-03-14 11:30:55.391036827 +0100
@@ -861,7 +861,7 @@ SWIG_Python_AddErrorMsg(const char* mesg
Py_DECREF(old_str);
Py_DECREF(value);
} else {
- PyErr_Format(PyExc_RuntimeError, mesg);
+ PyErr_Format(PyExc_RuntimeError, "%s", mesg);
}
}

View file

@ -5,7 +5,7 @@
Name: wxPython
Version: 2.8.12.0
Release: 5%{?dist}
Release: 6%{?dist}
Summary: GUI toolkit for the Python programming language
@ -16,7 +16,7 @@ Source0: http://downloads.sourceforge.net/wxpython/%{name}-src-%{version}
# fix aui imports
# http://trac.wxwidgets.org/ticket/12107
Patch0: wxPython-2.8.12.0-aui.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch1: wxPython-2.8.12.0-format.patch
# make sure to keep this updated as appropriate
BuildRequires: wxGTK-devel >= 2.8.11
BuildRequires: python-devel
@ -58,9 +58,10 @@ Documentation, samples and demo application for wxPython.
%prep
%setup -q -n wxPython-src-%{version}
%patch0 -p1 -b .aui
%patch1 -p1 -b .format
# fix libdir otherwise additional wx libs cannot be found
sed -i -e 's|/usr/lib|%{_libdir}|' wxPython/config.py
# fix libdir otherwise additional wx libs cannot be found, fix default optimization flags
sed -i -e 's|/usr/lib|%{_libdir}|' -e 's|-O3||' wxPython/config.py
%build
@ -73,7 +74,6 @@ python setup.py %{buildflags} build
%install
rm -rf $RPM_BUILD_ROOT
cd wxPython
python setup.py %{buildflags} install --root=$RPM_BUILD_ROOT
@ -83,12 +83,8 @@ mv $RPM_BUILD_ROOT%{python_sitelib}/wx.pth $RPM_BUILD_ROOT%{python_sitearch}
mv $RPM_BUILD_ROOT%{python_sitelib}/wxversion.py* $RPM_BUILD_ROOT%{python_sitearch}
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc wxPython/licence
%{_bindir}/*
%{python_sitearch}/wx.pth
@ -102,7 +98,6 @@ rm -rf $RPM_BUILD_ROOT
%endif
%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/wx-2.8/wx/wxPython
%{_includedir}/wx-2.8/wx/wxPython/*.h
%dir %{_includedir}/wx-2.8/wx/wxPython/i_files
@ -111,11 +106,14 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/wx-2.8/wx/wxPython/i_files/*.swg
%files docs
%defattr(-,root,root,-)
%doc wxPython/docs wxPython/demo wxPython/samples
%changelog
* Fri Mar 14 2014 Dan Horák <dan[at]danny.cz> - 2.8.12.0-6
- fix FTBFS due -Werror=format-security
- modernize spec
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.12.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
@ -200,7 +198,7 @@ rm -rf $RPM_BUILD_ROOT
- Fix an attribute error when importing wxPython (compat) module
(redhat bugzilla 450073, 450074)
* Sat Jun 6 2008 Matthew Miller <mattdm@mattdm.org> - 2.8.7.1-4
* Sat Jun 7 2008 Matthew Miller <mattdm@mattdm.org> - 2.8.7.1-4
- gratuitously bump package release number to work around build system
glitch. again, but it will work this time.