diff --git a/.gitignore b/.gitignore index 9d9b36f..b7a98b2 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ noarch/ /mstflint-4.1.0/ /mstflint-4.3.0-1.49.g9b9af70.tar.gz /mstflint-4.4.0-1.12.gd1edd58.tar.gz +/mstflint-4.6.0.tar.gz diff --git a/0001-Extend-buffer-for-a-few-arrays.patch b/0001-Extend-buffer-for-a-few-arrays.patch new file mode 100644 index 0000000..ffac349 --- /dev/null +++ b/0001-Extend-buffer-for-a-few-arrays.patch @@ -0,0 +1,47 @@ +From b947fc631d499fa6e041b6c460320bcd253f4671 Mon Sep 17 00:00:00 2001 +From: Honggang Li +Date: Wed, 22 Feb 2017 01:42:25 -0500 +Subject: [PATCH] Extend buffer for a few arrays + +Signed-off-by: Honggang Li +--- + mtcr_ul/mtcr_ul_com.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/mtcr_ul/mtcr_ul_com.c b/mtcr_ul/mtcr_ul_com.c +index 50a663f..1335b43 100644 +--- a/mtcr_ul/mtcr_ul_com.c ++++ b/mtcr_ul/mtcr_ul_com.c +@@ -1353,7 +1353,7 @@ int mdevices_v_ul(char *buf, int len, int mask, int verbosity) + } + + char inbuf[64]; +- char fname[64]; ++ char fname[300]; + + d = opendir("/sys/bus/pci/devices"); + if (d == NULL) { +@@ -1369,7 +1369,7 @@ int mdevices_v_ul(char *buf, int len, int mask, int verbosity) + continue; + } else if (sz > 4 && strcmp(dir->d_name + sz - 4, "00.0") && !verbosity) { + // Skip virtual functions +- char physfn[64]; ++ char physfn[300]; + DIR* physfndir; + sprintf(physfn, "/sys/bus/pci/devices/%s/physfn", dir->d_name); + if ((physfndir = opendir(physfn)) != NULL) { +@@ -1993,9 +1993,9 @@ int mclose_ul(mfile *mf) + return 0; + } + +-#define IBDR_MAX_NAME_SIZE 128 ++#define IBDR_MAX_NAME_SIZE 300 + #define BDF_NAME_SIZE 12 +-#define DEV_DIR_MAX_SIZE 128 ++#define DEV_DIR_MAX_SIZE 300 + static + int get_inband_dev_from_pci(char* inband_dev, char* pci_dev) + { +-- +2.7.4 + diff --git a/mstflint.spec b/mstflint.spec index 73a3481..7ac29f4 100644 --- a/mstflint.spec +++ b/mstflint.spec @@ -1,11 +1,12 @@ Name: mstflint Summary: Mellanox firmware burning tool -Version: 4.4.0 -Release: 2.12.gd1edd58.1%{?dist} +Version: 4.6.0 +Release: 1%{?dist} License: GPLv2+ or BSD Group: Applications/System -Source: https://www.openfabrics.org/downloads/%{name}/%{name}-%{version}-1.12.gd1edd58.tar.gz -Url: https://www.openfabrics.org +Source: https://github.com/Mellanox/%{name}/releases/download/v4.6.0-1/%{name}-%{version}.tar.gz +Patch1: 0001-Extend-buffer-for-a-few-arrays.patch +Url: https://github.com/Mellanox/mstflint BuildRequires: libstdc++-devel BuildRequires: zlib-devel BuildRequires: libibmad-devel >= 1.3.12 @@ -18,12 +19,13 @@ It also provides access to the relevant source code. %prep %setup -q +%patch1 -p1 find . -type f -iname '*.[ch]' -exec chmod a-x '{}' ';' find . -type f -iname '*.cpp' -exec chmod a-x '{}' ';' %build -export CFLAGS="$RPM_OPT_FLAGS" -export CXXFLAGS="$RPM_OPT_FLAGS -std=gnu++98 -Wno-c++11-compat" +export CFLAGS="$RPM_OPT_FLAGS -Wno-implicit-fallthrough" +export CXXFLAGS="$RPM_OPT_FLAGS -std=gnu++98 -Wno-c++11-compat -Wno-implicit-fallthrough" %configure make @@ -39,6 +41,11 @@ rm -fr %{buildroot}%{_libdir} %_bindir/* %changelog +* Wed Feb 22 2017 Honggang Li - 4.6.0-1 +- Rebase to latest upstream release 4.6.0. +- Update mstflint package from github. +- Resolves: bz1423970 + * Fri Feb 10 2017 Fedora Release Engineering - 4.4.0-2.12.gd1edd58.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index f531d90..3c09de8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -092797cdafa14e8b60b8498b14100202 mstflint-4.4.0-1.12.gd1edd58.tar.gz +SHA512 (mstflint-4.6.0.tar.gz) = aefe60a60bb9d566026f22a420eedda2ac5cf18f05d1c4bf4c351ec740526858acdd2e5a9385af2c4a3f722ce25797b8f3386ac0d577b12d0411857dcddfd835