diff --git a/Fix-gcc7-and-gcc8.patch b/Fix-gcc7-and-gcc8.patch index beb868d..b5f938d 100644 --- a/Fix-gcc7-and-gcc8.patch +++ b/Fix-gcc7-and-gcc8.patch @@ -1,4 +1,4 @@ -commit 6a8758e9353447abdb9366638790984e84b04eb1 +commit f5644b3f62db9edc49929a5d62fc03bd7fe542ed Author: Nicolas Morey-Chaisemartin Date: Wed Aug 9 17:31:57 2017 +0200 @@ -9,18 +9,18 @@ Date: Wed Aug 9 17:31:57 2017 +0200 Signed-off-by: Nicolas Morey-Chaisemartin diff --git configure.ac configure.ac -index 4d549ee4cb79..c8e15447f5e1 100644 +index 366d9a115693..dc356443f2cc 100644 --- configure.ac +++ configure.ac -@@ -308,6 +308,7 @@ AM_CONDITIONAL([USE_LOCAL_SQLITE], [test "$SQLITE_SYSTEM_AVAILABLE" = no]) - +@@ -604,6 +604,7 @@ AC_SEARCH_LIBS([sqlite3_initialize], [sqlite3], [SQLITE_SYSTEM_AVAILABLE="yes"], + AM_CONDITIONAL([USE_LOCAL_SQLITE], [test "$SQLITE_SYSTEM_AVAILABLE" = no]) CFLAGS="$CFLAGS -DMST_UL" +CPPFLAGS="$CPPFLAGS -DMST_UL" CXXFLAGS="$CXXFLAGS -DMST_UL" - -@@ -336,6 +337,14 @@ AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CFLAGS="$CFLAGS -Wno-implici + CCVER=`${CC} --version | grep ${CC} | grep -E -o "( )[[4-9]]\.[[0-9]]\.[[0-9]]" | head -1` +@@ -631,6 +632,14 @@ AX_CHECK_COMPILE_FLAG([-Wno-implicit-fallthrough], [CFLAGS="$CFLAGS -Wno-implici AX_CHECK_COMPILE_FLAG([-Wno-cast-function-type], [CFLAGS="$CFLAGS -Wno-cast-function-type"], [], []) CFLAGS="$OLD_CFLAGS" diff --git a/GCC15-C23-support.patch b/GCC15-C23-support.patch deleted file mode 100644 index d71fea9..0000000 --- a/GCC15-C23-support.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit 472b859ebe5486f62f670e76cbc3fcf5d994c2c0 -Author: Nicolas Morey -Date: Fri Jul 11 08:35:50 2025 +0200 - - GCC15/C23 support - - Signed-off-by: Nicolas Morey - -diff --git common/bit_slice.h common/bit_slice.h -index 9f1764339604..20885cf99cd7 100644 ---- common/bit_slice.h -+++ common/bit_slice.h -@@ -59,6 +59,7 @@ - #define EXT64(src, end, start) EXTRACT64(src, start, end - start + 1) - - #ifndef __cplusplus -+#if __STDC_VERSION__ < 202300L - enum cpp_bool - { - false = 0, -@@ -66,5 +67,6 @@ enum cpp_bool - }; - typedef unsigned char bool; - #endif -+#endif - - #endif -diff --git small_utils/mtserver.c small_utils/mtserver.c -index d75ec2e25aef..8e8e6417c513 100644 ---- small_utils/mtserver.c -+++ small_utils/mtserver.c -@@ -607,7 +607,7 @@ void usage(const char* s) - } - - /* ////////////////////////////////////////////////////////////////////// */ --void mySignal() -+void mySignal(int arg) - { - exit(0); - } diff --git a/PIE.patch b/PIE.patch index 2a27543..2340ee2 100644 --- a/PIE.patch +++ b/PIE.patch @@ -1,4 +1,4 @@ -commit da607dd93fc67a63029d08f868e1e1c2c70e9663 +commit 77ebcfe7e1c1d5a3037761aa64de6f9ca32361d7 Author: Nicolas Morey-Chaisemartin Date: Fri Jul 9 13:01:55 2021 +0200 @@ -8,17 +8,20 @@ Date: Fri Jul 9 13:01:55 2021 +0200 Signed-off-by: Hardware error from APEI Generic Hardware Error Source: 0 -Index: configure.ac -=================================================================== ---- configure.ac.orig +diff --git configure.ac configure.ac +index dc356443f2cc..ef5fc5584e6a 100644 +--- configure.ac +++ configure.ac -@@ -91,6 +91,9 @@ AM_CONDITIONAL(KERNEL_BUILD,[test ${KERN - AC_SUBST(KERNEL_BUILD) +@@ -104,6 +104,12 @@ else + fi + fi - LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/usr/local/lib64 -L/usr/lib64" ++# All bin programs are linked using LDL ++# reuse this instead of LDFLAGS as it would mess ++# up shared lib builds +if test "$host_cpu" != "s390x"; then -+ LDFLAGS="${LDFLAGS} -pie" ++ LDL="${LDL} -pie" +fi - CXXFLAGS="${CXXFLAGS} -isystem /usr/local/include" - if test "x$OS" = "xFreeBSD"; then - AC_MSG_NOTICE(FreeBSD Build) + + AC_SUBST(MTCR_CONF_DIR) + AC_SUBST(VFIO_DRIVER_DIR) diff --git a/Remove-date-time-info-from-build.patch b/Remove-date-time-info-from-build.patch deleted file mode 100644 index a44d549..0000000 --- a/Remove-date-time-info-from-build.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 59982ffad738c25082053bb4a87aa7fb97ebc796 -Author: Nicolas Morey-Chaisemartin -Date: Fri Sep 30 14:10:47 2022 +0200 - - Remove date/time info from build - - Signed-off-by: Nicolas Morey-Chaisemartin - -diff --git common/tools_version.h common/tools_version.h -index c656076c13b4..021da5429402 100644 ---- common/tools_version.h -+++ common/tools_version.h -@@ -74,8 +74,9 @@ static inline int get_version_string(char* buf, int buf_size, const char* exe_na - len = snprintf(buf, buf_size, "%s %s, ", exe_name, tool_version); - } - // cut out first and last "$" from the SVN version string: -- len += snprintf(buf + len, buf_size - len, "%s, built on %s, %s. Git SHA Hash: %s", MSTFLINT_VERSION_STR, __DATE__, -- __TIME__, TOOLS_GIT_SHA); -+ len += snprintf(buf + len, buf_size - len, "%s. Git SHA Hash: %s", -+ MSTFLINT_VERSION_STR, -+ TOOLS_GIT_SHA); - return len; - } - diff --git a/_service b/_service new file mode 100644 index 0000000..53ca0be --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + git + https://github.com/Mellanox/mstflint.git + no + .git + mstflint + @PARENT_TAG@.@TAG_OFFSET@.%h + v(.*) + \1 + 9ed9e8c36608035769534e7450d1885483df8eaf + + + *mstflint*.tar + gz + + diff --git a/fix-race-condition-during-install.patch b/fix-race-condition-during-install.patch deleted file mode 100644 index 962a0bc..0000000 --- a/fix-race-condition-during-install.patch +++ /dev/null @@ -1,47 +0,0 @@ -commit f86bbb8e3d722796ac464910e8e6b79ebb638d39 -Author: Nicolas Morey-Chaisemartin -Date: Mon Oct 15 09:33:09 2018 +0200 - - fix race condition during install - - Signed-off-by: Nicolas Morey-Chaisemartin - -diff --git dev_mgt/Makefile.am dev_mgt/Makefile.am -index 2283c2d1c763..2e4d7781e245 100644 ---- dev_mgt/Makefile.am -+++ dev_mgt/Makefile.am -@@ -46,7 +46,7 @@ libdev_mgt_a_SOURCES = \ - - dev_mgt_pylibdir = $(libdir)/mstflint/python_tools/ - --dev_mgt_pylib_DATA = c_dev_mgt.so dev_mgt.py -+dev_mgt_pylib_DATA = c_dev_mgt.so - dist_dev_mgt_pylib_DATA = dev_mgt.py - - c_dev_mgt.so: libdev_mgt.a -diff --git mtcr_py/Makefile.am mtcr_py/Makefile.am -index 934b8030a229..da7d2aed878f 100644 ---- mtcr_py/Makefile.am -+++ mtcr_py/Makefile.am -@@ -37,7 +37,7 @@ mtcr_pylibdir = $(libdir)/mstflint/python_tools/ - USER_DIR = .. - MTCR_DIR = $(USER_DIR)/${MTCR_CONF_DIR} - --mtcr_pylib_DATA = cmtcr.so mtcr.py -+mtcr_pylib_DATA = cmtcr.so - dist_mtcr_pylib_DATA = mtcr.py - cmtcr.so: - $(CC) -g -Wall -pthread -shared ${CFLAGS} $(MTCR_DIR)/*.o -o cmtcr.so $(MFT_CORE_LIB_LINK) -diff --git reg_access/Makefile.am reg_access/Makefile.am -index c33bac653620..8783d2953a78 100644 ---- reg_access/Makefile.am -+++ reg_access/Makefile.am -@@ -52,7 +52,7 @@ libmlxconfig_4th_gen_regsiters_a_LIBADD = $(libmlxconfig_4th_gen_regsiters_la_DE - RREG_ACCESS_SO = rreg_access.so - reg_access_pylibdir = $(libdir)/mstflint/python_tools/ - --reg_access_pylib_DATA = ${RREG_ACCESS_SO} regaccess.py regaccess_structs.py -+reg_access_pylib_DATA = ${RREG_ACCESS_SO} - dist_reg_access_pylib_DATA = regaccess.py regaccess_structs.py - - ${RREG_ACCESS_SO}: libreg_access.a diff --git a/mflash-add-missing-stlib-include.patch b/mflash-add-missing-stlib-include.patch deleted file mode 100644 index 3d8a871..0000000 --- a/mflash-add-missing-stlib-include.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit df180102768284a7223ada6d7243531f9e9be2c7 -Author: Nicolas Morey -Date: Thu Sep 5 14:08:06 2024 +0200 - - mflash: add missing stlib include - - Add missing include to fix GCC 14 build error: - In file included from mflash_dev_capability.c:42: - mflash_dev_capability.c: In function 'get_flash_gen': - mflash_dev_capability.h:67:27: error: implicit declaration of function 'getenv' [-Wimplicit-function-declaration] - 67 | char* reacDebug = getenv("FLASH_DEBUG"); \ - | ^~~~~~ - mflash_dev_capability.c:186:5: note: in expansion of macro 'DPRINTF' - 186 | DPRINTF(("get_flash_gen: flash_gen = %d\n", gen)); - | ^~~~~~~ - mflash_dev_capability.c:43:1: note: 'getenv' is defined in header ''; this is probably fixable by adding '#include ' - 42 | #include "mflash_dev_capability.h" - +++ |+#include - 43 | - mflash_dev_capability.h:67:27: error: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion] - 67 | char* reacDebug = getenv("FLASH_DEBUG"); \ - | ^~~~~~ - mflash_dev_capability.c:186:5: note: in expansion of macro 'DPRINTF' - 186 | DPRINTF(("get_flash_gen: flash_gen = %d\n", gen)); - | ^~~~~~~ - - Signed-off-by: Nicolas Morey - -diff --git mflash/mflash_dev_capability.h mflash/mflash_dev_capability.h -index d63b7cffaf90..ce850a982d84 100644 ---- mflash/mflash_dev_capability.h -+++ mflash/mflash_dev_capability.h -@@ -42,6 +42,7 @@ - #ifndef USER_MFLASH_MFLASH_DEV_CAPABILITY_H_ - #define USER_MFLASH_MFLASH_DEV_CAPABILITY_H_ - -+#include - #include "mflash_pack_layer.h" - - #ifndef UEFI_BUILD diff --git a/mstflint-4.25.0-1.tar.gz b/mstflint-4.25.0-1.tar.gz deleted file mode 100644 index c19256d..0000000 --- a/mstflint-4.25.0-1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d81a259fafc6b7ab7f9b1946f5a2f2eb012f3f2e71097fee229c8125956f79b -size 7473881 diff --git a/mstflint-4.33.0-1.60.9ed9e8c3.tar.gz b/mstflint-4.33.0-1.60.9ed9e8c3.tar.gz new file mode 100644 index 0000000..783df2c --- /dev/null +++ b/mstflint-4.33.0-1.60.9ed9e8c3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90460b763f3d6b8ef862800cf2e9f19dac4e6e225aeae71346f80588e24be009 +size 10044870 diff --git a/mstflint.changes b/mstflint.changes index 355367c..b00f265 100644 --- a/mstflint.changes +++ b/mstflint.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Tue Nov 18 16:42:34 UTC 2025 - Nicolas Morey + +- Add _service to fetch from git directly +- Update to mstflint-4.33.0-1.60.9ed9e8c3 + - See https://github.com/Mellanox/mstflint/releases/tag/v4.33.0-1 +- Drop patches merged upstream: + - Remove-date-time-info-from-build.patch + - fix-race-condition-during-install.patch + - GCC15-C23-support.patch + - mflash-add-missing-stlib-include.patch +- Refresh patches against new sources: + - Fix-gcc7-and-gcc8.patch + - PIE.patch + ------------------------------------------------------------------- Fri Jul 11 06:41:42 UTC 2025 - Nicolas Morey diff --git a/mstflint.spec b/mstflint.spec index 44a5e95..e18ac48 100644 --- a/mstflint.spec +++ b/mstflint.spec @@ -16,24 +16,20 @@ # -%define extra_version -1 +%define git_ver -1.60.9ed9e8c3 Name: mstflint -Version: 4.25.0 +Version: 4.33.0 Release: 0 Summary: Mellanox Firmware Burning and Diagnostics Tools License: BSD-2-Clause OR GPL-2.0-only Group: System/Console URL: http://www.openfabrics.org Obsoletes: mstflint-devel < %{version} -Source: https://github.com/Mellanox/mstflint/releases/download/v%{version}%{extra_version}/mstflint-%{version}%{extra_version}.tar.gz +Source: mstflint-%{version}%{?git_ver}.tar.gz Source100: README.md -Patch1: Remove-date-time-info-from-build.patch -Patch4: Fix-gcc7-and-gcc8.patch -Patch5: fix-race-condition-during-install.patch -Patch6: PIE.patch -Patch7: mflash-add-missing-stlib-include.patch -Patch8: GCC15-C23-support.patch +Patch1: Fix-gcc7-and-gcc8.patch +Patch2: PIE.patch BuildRequires: gcc-c++ BuildRequires: infiniband-diags-devel BuildRequires: libibverbs-devel @@ -52,7 +48,7 @@ package. For a full documentation of the MFT package, please refer to the downloads page at the Mellanox web site. %prep -%autosetup -p0 +%autosetup -p0 -n %{name}-%{version}%{git_ver} %build ./autogen.sh @@ -72,16 +68,19 @@ rm -rf %{buildroot}%{_bindir}/hca_self_test.ofed %license LICENSE COPYING %{_bindir}/mstconfig %{_bindir}/mstcongestion +%{_bindir}/mstdevices_info %{_bindir}/mstflint +%{_bindir}/mstfwctrl %{_bindir}/mstfwreset %{_bindir}/mstmcra +%{_bindir}/mstmget_temp %{_bindir}/mstmread %{_bindir}/mstmtserver %{_bindir}/mstmwrite -%{_bindir}/mstprivhost %{_bindir}/mstregdump %{_bindir}/mstresourcedump %{_bindir}/mstresourceparse +%{_bindir}/msttokengenerator %{_bindir}/mstvpd %{_bindir}/mstfwtrace %{_mandir}/man1/*.1%{ext_man}