[packages/mstflint] - updated to 3.5.0 - added format patch (fixes build with -Werror=format-security)

qboosh qboosh at pld-linux.org
Sun Feb 2 20:14:27 CET 2014


commit 1b5ab1fbce65cb434313bbaf764302f83f965a56
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Feb 2 20:16:05 2014 +0100

    - updated to 3.5.0
    - added format patch (fixes build with -Werror=format-security)

 mstflint-format.patch | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++
 mstflint.spec         | 15 ++++++---
 2 files changed, 104 insertions(+), 4 deletions(-)
---
diff --git a/mstflint.spec b/mstflint.spec
index f0e6a56..3897b6b 100644
--- a/mstflint.spec
+++ b/mstflint.spec
@@ -1,12 +1,13 @@
 Summary:	Firmware burning and diagnostic tools for Mellanox HCA/NIC cards
 Summary(pl.UTF-8):	Narzędzia modyfikujące firmware i diagnostyczne dla kart HCA/NIC Mellanox
 Name:		mstflint
-Version:	1.4
+Version:	3.5.0
 Release:	1
 License:	BSD or GPL v2
 Group:		Networking/Utilities
 Source0:	http://www.openfabrics.org/downloads/mstflint/%{name}-%{version}.tar.gz
-# Source0-md5:	7ab9cba9acfede2411fd2fc2a999c05f
+# Source0-md5:	00c3ea4ea8c99f89a0733a72fcb14fb9
+Patch0:		%{name}-format.patch
 URL:		http://www.openfabrics.org/
 BuildRequires:	libstdc++-devel
 BuildRequires:	zlib-devel
@@ -16,7 +17,8 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Firmware burning and diagnostic tools for Mellanox HCA/NIC cards
 
 %description -l pl.UTF-8
-Narzędzia modyfikujące firmware i diagnostyczne dla kart HCA/NIC Mellanox
+Narzędzia modyfikujące firmware i diagnostyczne dla kart HCA/NIC
+Mellanox.
 
 %package devel
 Summary:	Header files for Mellanox HCA/NIC cards access
@@ -32,6 +34,7 @@ Pliki nagłówkowe do dostępu do kart HCA/NIC Mellanox.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure
@@ -48,15 +51,19 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc LICENSE README hca_self_test.readme
+%doc LICENSE README
 %attr(755,root,root) %{_bindir}/hca_self_test.ofed
 %attr(755,root,root) %{_bindir}/mstflint
 %attr(755,root,root) %{_bindir}/mstmcra
 %attr(755,root,root) %{_bindir}/mstmread
+%attr(755,root,root) %{_bindir}/mstmtserver
 %attr(755,root,root) %{_bindir}/mstmwrite
 %attr(755,root,root) %{_bindir}/mstregdump
 %attr(755,root,root) %{_bindir}/mstvpd
+%{_datadir}/mstflint
+%{_mandir}/man1/mstflint.1*
 
 %files devel
 %defattr(644,root,root,755)
+%{_libdir}/libmtcr_ul.a
 %{_includedir}/mtcr_ul
diff --git a/mstflint-format.patch b/mstflint-format.patch
new file mode 100644
index 0000000..c01960e
--- /dev/null
+++ b/mstflint-format.patch
@@ -0,0 +1,93 @@
+--- mstflint-3.5.0/mtcr_ul/mtcr_ib_ofed.c.orig	2013-12-25 16:04:41.000000000 +0100
++++ mstflint-3.5.0/mtcr_ul/mtcr_ib_ofed.c	2014-02-02 19:39:08.948133384 +0100
+@@ -414,7 +414,7 @@
+         }
+     }
+     if (!ivm->dl_handle) {
+-        IBERROR((dlerror()));
++        IBERROR(("%s", dlerror()));
+         //free(ivm);
+         return -1;
+ 
+--- mstflint-3.5.0/mlxfwops/lib/fw_ops.cpp.orig	2013-12-25 16:04:41.000000000 +0100
++++ mstflint-3.5.0/mlxfwops/lib/fw_ops.cpp	2014-02-02 19:42:33.294791474 +0100
+@@ -875,7 +875,7 @@
+         return errmsg("operation supported only for switch devices InfiniScaleIV and SwitchX over an IB interface");
+     }
+     if (!((Flash*)_ioAccess)->sw_reset()) {
+-        return errmsg(_ioAccess->err());
++        return errmsg("%s", _ioAccess->err());
+     }
+     return true;
+ }
+@@ -965,7 +965,7 @@
+ bool FwOperations::RomInfo::ParseInfo()
+ {
+     if (!GetExpRomVersion()) {
+-        snprintf(expRomErrMsg, MAX_ROM_ERR_MSG_LEN, err());
++        snprintf(expRomErrMsg, MAX_ROM_ERR_MSG_LEN, "%s", err());
+         expRomErrMsgValid = true;
+         //printf("-D-expRomErrMsg: %s \n", expRomErrMsg);
+     }
+--- mstflint-3.5.0/mlxfwops/lib/fs2_ops.cpp.orig	2013-12-25 16:04:41.000000000 +0100
++++ mstflint-3.5.0/mlxfwops/lib/fs2_ops.cpp	2014-02-02 19:43:50.514788234 +0100
+@@ -1345,7 +1345,7 @@
+     // Compine the image and the rom into new daa
+     if(!UpdateRomInImage((u_int8_t*)(&new_data[0]), (u_int8_t*)(fim->getBuf()),
+                          (u_int8_t*)(&_romSect[0]), rom_size, &actual_image_size)) {
+-        return errmsg(err());
++        return errmsg("%s", err());
+     }
+ 
+     // close old image and open new image with the rom.
+@@ -1893,7 +1893,7 @@
+     int new_image_size;
+     if(!UpdateRomInImage((u_int8_t*)(&new_data[0]), (u_int8_t*)(&data[0]),
+                              NULL, 0, &new_image_size)) {
+-        return errmsg(_ioAccess->err());
++        return errmsg("%s", _ioAccess->err());
+     }
+ 
+     // Burn the Image after the ROM was removed.
+--- mstflint-3.5.0/mlxfwops/lib/fs3_ops.cpp.orig	2013-12-25 16:04:41.000000000 +0100
++++ mstflint-3.5.0/mlxfwops/lib/fs3_ops.cpp	2014-02-02 19:46:02.774782684 +0100
+@@ -579,7 +579,7 @@
+          if (pre_message == NULL) {
+              sprintf(message, "Burning FW image without signatures");
+          } else {
+-             sprintf(message, pre_message);
++             strcpy(message, pre_message);
+          }
+          int str_len = strlen(message), restore_len = strlen(RESTORING_MSG);
+          str_len = (restore_len > str_len) ? restore_len : str_len;
+--- mstflint-3.5.0/flint/subcommands.cpp.orig	2013-12-25 16:04:40.000000000 +0100
++++ mstflint-3.5.0/flint/subcommands.cpp	2014-02-02 19:50:36.781437852 +0100
+@@ -1138,7 +1138,7 @@
+     } else {
+         sprintf(curr_ver, "N/A");
+     }
+-    printf(curr_ver); printf("\n");
++    printf("%s\n", curr_ver);
+ 
+     printf("    New FW version:               ");
+     if (_imgInfo.fw_info.fw_ver[0] != 0) {
+@@ -1146,7 +1146,7 @@
+     } else {
+         sprintf(new_ver, "N/A");
+     }
+-    printf(new_ver); printf("\n");
++    printf("%s\n", new_ver);
+ 
+     if (_flintParams.log_specified) {
+         print_line_to_log("Current FW version on flash: %s,  New FW version: %s\n", curr_ver, new_ver);
+--- mstflint-3.5.0/small_utils/mtserver.c.orig	2013-12-25 16:04:41.000000000 +0100
++++ mstflint-3.5.0/small_utils/mtserver.c	2014-02-02 19:55:28.641425602 +0100
+@@ -326,7 +326,7 @@
+     printf("Switches may be:\n");
+     printf("\t-p[ort] <port> - Listen to specify port (default is %d).\n", port);
+     printf("\t-d[ebug]       - Print all socket traffic (for debuging only).\n");
+-    printf(sim_str);
++    fputs(sim_str, stdout);
+     printf("\t-h[elp]        - Print help message.\n");
+     exit (1);
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mstflint.git/commitdiff/1b5ab1fbce65cb434313bbaf764302f83f965a56



More information about the pld-cvs-commit mailing list