[ibutils] Fix FTBFS with tcl-8.6 and -Werror=format-security (#1037127, #1106783)
Yaakov Selkowitz
yselkowitz at fedoraproject.org
Tue Jul 8 04:57:55 UTC 2014
commit 73623240ea1a8b31bc7bcd03243bf345f0403562
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date: Mon Jun 30 21:38:40 2014 -0500
Fix FTBFS with tcl-8.6 and -Werror=format-security (#1037127, #1106783)
ibutils-1.5.7-format-security.patch | 39 +++++++++++++++++++++++++++++++++++
ibutils-1.5.7-tk86.patch | 25 ++++++++++++++++++++++
ibutils.spec | 14 +++++++++--
3 files changed, 75 insertions(+), 3 deletions(-)
---
diff --git a/ibutils-1.5.7-format-security.patch b/ibutils-1.5.7-format-security.patch
new file mode 100644
index 0000000..229dd62
--- /dev/null
+++ b/ibutils-1.5.7-format-security.patch
@@ -0,0 +1,39 @@
+diff --git a/ibis/src/ibis.i b/ibis/src/ibis.i
+index 8fc4440..0b596bf 100644
+--- a/ibis/src/ibis.i
++++ b/ibis/src/ibis.i
+@@ -362,7 +362,7 @@ ibisp_is_debug(void)
+ }
+
+ int ibis_puts( osm_log_level_t verbosity, char *msg) {
+- osm_log(&(IbisObj.log), verbosity, msg );
++ osm_log(&(IbisObj.log), verbosity, "%s", msg );
+ return TCL_OK;
+ }
+
+diff --git a/ibis/src/ibis_wrap.c b/ibis/src/ibis_wrap.c
+index 5098c2a..93154ba 100644
+--- a/ibis/src/ibis_wrap.c
++++ b/ibis/src/ibis_wrap.c
+@@ -3186,7 +3186,7 @@ typedef struct {
+ }
+
+ int ibis_puts( osm_log_level_t verbosity, char *msg) {
+- osm_log(&(IbisObj.log), verbosity, msg );
++ osm_log(&(IbisObj.log), verbosity, "%s", msg );
+ return TCL_OK;
+ }
+
+diff --git a/ibis/src/ibissh_wrap.cpp b/ibis/src/ibissh_wrap.cpp
+index f75cde6..d312915 100644
+--- a/ibis/src/ibissh_wrap.cpp
++++ b/ibis/src/ibissh_wrap.cpp
+@@ -3186,7 +3186,7 @@ typedef struct {
+ }
+
+ int ibis_puts( osm_log_level_t verbosity, char *msg) {
+- osm_log(&(IbisObj.log), verbosity, msg );
++ osm_log(&(IbisObj.log), verbosity, "%s", msg );
+ return TCL_OK;
+ }
+
diff --git a/ibutils-1.5.7-tk86.patch b/ibutils-1.5.7-tk86.patch
new file mode 100644
index 0000000..60cbfeb
--- /dev/null
+++ b/ibutils-1.5.7-tk86.patch
@@ -0,0 +1,25 @@
+diff --git a/ibdiag/config/tk.m4 b/ibdiag/config/tk.m4
+index 91ff1cb..e992392 100644
+--- a/ibdiag/config/tk.m4
++++ b/ibdiag/config/tk.m4
+@@ -18,14 +18,16 @@ dnl if we were not given a path - try finding one:
+ if test "x$with_tk_lib" = "xnone"; then
+ dirs="/usr /usr/local /usr/local/ibgd /usr/local/ibg2 /usr/local/ibed /usr/local/ofed"
+ for d in $dirs; do
+- if test -e $d/lib/libtk8.4.so -o -e $d/lib/libtk8.5.so; then
++ for v in 8.4 8.5 8.6; do
++ if test -e $d/lib/libtk$v.so; then
+ with_tk_lib=$d/lib
+ AC_MSG_NOTICE(TK: found in:$with_tk_lib)
+- fi
+- if test -e $d/lib64/libtk8.4.so -o -e $d/lib64/libtk8.5.so; then
++ fi
++ if test -e $d/lib64/libtk$v.so; then
+ with_tk_lib=$d/lib64
+ AC_MSG_NOTICE(TK: found in:$with_tk_lib)
+- fi
++ fi
++ done
+ done
+ fi
+
diff --git a/ibutils.spec b/ibutils.spec
index de04afa..47e771d 100644
--- a/ibutils.spec
+++ b/ibutils.spec
@@ -21,16 +21,19 @@
Summary: OpenIB Mellanox InfiniBand Diagnostic Tools
Name: ibutils
Version: 1.5.7
-Release: 13%{?dist}
+Release: 14%{?dist}
# This is dual-licensed upstream, all code available under either license
License: GPLv2 or BSD
Url: http://www.openfabrics.org/
Group: System Environment/Libraries
Source0: http://www.openfabrics.org/downloads/%{name}/%{name}-%{version}.tar.gz
+Patch0: ibutils-1.5.7-tk86.patch
+Patch1: ibutils-1.5.7-format-security.patch
Requires: tcl, tk, graphviz-tcl
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
# perl-podlators required on F19
-BuildRequires: libibverbs-devel >= 1.1, opensm-devel >= 3.3.0, tcl-devel, swig, tk-devel, libibumad-devel, autoconf, graphviz-tcl, chrpath, perl-podlators
+BuildRequires: libibverbs-devel >= 1.1, opensm-devel >= 3.3.0, tcl-devel, swig, tk-devel, libibumad-devel, graphviz-tcl, chrpath, perl-podlators
+BuildRequires: autoconf, automake, libtool
# IB hardware doesn't exist on other arches
ExclusiveArch: %{ix86} x86_64 ppc %{power64} ia64 %{arm}
%description
@@ -59,7 +62,9 @@ Static libraries from the Mellanox Infiniband diagnostic utilities
%prep
%setup -q
-#./autogen.sh
+%patch0 -p1
+%patch1 -p1
+autoreconf -fiv -I config
sed -i "s/^libibmscli_la_LIBADD =/& -lpthread/" ibmgtsim/src/Makefile.in
%configure --with-osm=%{_prefix} --enable-ibmgtsim --disable-rpath CXXFLAGS="$CXXFLAGS -fno-strict-aliasing -fPIC"
# Workaround libtool reordering -Wl,--as-needed after all the libraries.
@@ -140,6 +145,9 @@ chrpath -d %{buildroot}%{_libdir}/*/libib{dm,is}.so.%{version}
%{_libdir}/*.a
%changelog
+* Mon Jun 30 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 1.5.7-14
+- Fix FTBFS with tcl-8.6 and -Werror=format-security (#1037127, #1106783)
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5.7-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list