diff --git a/0000-extend-fdesc-array.patch b/0000-extend-fdesc-array.patch index 47290578c0dbedf392045595106c9756f4fa47d2..1ecc90b6b1b5dac075d344c74ea67942fa2714c6 100644 --- a/0000-extend-fdesc-array.patch +++ b/0000-extend-fdesc-array.patch @@ -1,5 +1,5 @@ ---- psm_utils.c.orig 2018-03-14 21:12:33.678607767 -0400 -+++ psm_utils.c 2018-03-14 21:11:04.696909162 -0400 +--- a/psm_utils.c 2018-03-14 21:12:33.678607767 -0400 ++++ b/psm_utils.c 2018-03-14 21:11:04.696909162 -0400 @@ -951,7 +951,7 @@ struct psmi_faultinj_spec *psmi_faultinj union psmi_envvar_val env_fi; char fvals_str[128]; diff --git a/fix-stringop-truncation-build-error.patch b/fix-stringop-truncation-build-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..15ee17d982ea64f9923120cdbad6fba2617abce4 --- /dev/null +++ b/fix-stringop-truncation-build-error.patch @@ -0,0 +1,13 @@ +diff -Naur opa-psm2-PSM2_10.3.58/psm_ep.c opa-psm2-PSM2_10.3.58_new/psm_ep.c +--- opa-psm2-PSM2_10.3.58/psm_ep.c 2018-05-08 03:44:29.000000000 +0800 ++++ opa-psm2-PSM2_10.3.58_new/psm_ep.c 2020-07-01 17:09:40.229405374 +0800 +@@ -1495,8 +1495,7 @@ + + b_new = (char *)devstr; + e = b_new + len; +- strncpy(e, devstring, len - 1); +- e[len - 1] = '\0'; ++ strncpy(e, devstring, len); + ee = e + len; + i = 0; + while (e < ee && *e && i < PTL_MAX_INIT) { diff --git a/libpsm2.spec b/libpsm2.spec index 500dc3e6eb5cb36b2584b53d728674a32ec1f0dd..d4a9afaaaa84693171dcae8c1657ea963abb153d 100644 --- a/libpsm2.spec +++ b/libpsm2.spec @@ -1,6 +1,6 @@ Name: libpsm2 Version: 10.3.58 -Release: 5 +Release: 6 Summary: Intel PSM Libraries License: BSD or GPLv2 URL: https://github.com/01org/opa-psm2/ @@ -8,6 +8,7 @@ URL: https://github.com/01org/opa-psm2/ Source0: https://github.com/intel/opa-psm2/archive/PSM2_10.3.58.tar.gz #extend fdesc array Patch0: 0000-extend-fdesc-array.patch +Patch1: fix-stringop-truncation-build-error.patch ExclusiveArch: x86_64 BuildRequires: libuuid-devel numactl-devel @@ -37,7 +38,7 @@ Development package for the Intel PSM library Support for MPIs linked with PSM versions less than 2 %prep -%autosetup -n opa-psm2-PSM2_10.3.58 -p0 +%autosetup -n opa-psm2-PSM2_10.3.58 -p1 %build %make_build @@ -72,6 +73,9 @@ rm -f %{buildroot}%{_libdir}/*.a %{_sysconfdir}/modprobe.d/libpsm2-compat.conf %changelog +* Thu Jul 02 2020 senlin - 10.3.58-6 +- Fix stringop-truncation build error + * Tue Mar 17 2020 yanglijin - 10.3.58-5 - fix provides