[packages/infinipath-psm] - added format patch (fixes build with -Werror=format-security) - added union patch (workaround dupl

qboosh qboosh at pld-linux.org
Fri Feb 20 23:21:12 CET 2015


commit 5125642a394f00eb2ecc1a1bc7a453e304222fe1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Feb 20 23:24:04 2015 +0100

    - added format patch (fixes build with -Werror=format-security)
    - added union patch (workaround duplicate struct member with recent gcc)
    - added link patch (add _edata symbol to exceptions, needed to build with recent toolchain)

 infinipath-psm-format.patch | 33 +++++++++++++++++++++++++++++++++
 infinipath-psm-link.patch   | 11 +++++++++++
 infinipath-psm-union.patch  | 12 ++++++++++++
 infinipath-psm.spec         |  6 ++++++
 4 files changed, 62 insertions(+)
---
diff --git a/infinipath-psm.spec b/infinipath-psm.spec
index 7770aca..d7ce9a8 100644
--- a/infinipath-psm.spec
+++ b/infinipath-psm.spec
@@ -7,6 +7,9 @@ License:	BSD or GPL v2
 Group:		Networking/Utilities
 Source0:	http://www.openfabrics.org/downloads/infinipath-psm/%{name}-%{version}.tar.gz
 # Source0-md5:	76b83f3d1c0ab12d02e9680e514f4b68
+Patch0:		%{name}-union.patch
+Patch1:		%{name}-format.patch
+Patch2:		%{name}-link.patch
 URL:		http://www.openfabrics.org/
 BuildRequires:	libuuid-devel
 ExclusiveArch:	%{ix86} %{x8664}
@@ -45,6 +48,9 @@ Pliki nagłówkowe PSM API.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 %{__make} \
diff --git a/infinipath-psm-format.patch b/infinipath-psm-format.patch
new file mode 100644
index 0000000..485f7de
--- /dev/null
+++ b/infinipath-psm-format.patch
@@ -0,0 +1,33 @@
+--- infinipath-psm-1.14/psm_context.c.orig	2011-01-17 14:52:39.000000000 +0100
++++ infinipath-psm-1.14/psm_context.c	2015-02-20 17:33:36.680804461 +0100
+@@ -377,7 +377,7 @@
+ 		else
+ 		    errmsg = "Hardware not found";
+ 
+-		psmi_handle_error(context->ep, err, errmsg);
++		psmi_handle_error(context->ep, err, "%s", errmsg);
+ 	    }
+ 	}
+     }
+--- infinipath-psm-1.14/psm_ep_connect.c.orig	2011-01-17 14:52:39.000000000 +0100
++++ infinipath-psm-1.14/psm_ep_connect.c	2015-02-20 17:47:12.077436859 +0100
+@@ -255,7 +255,7 @@
+ 	    }
+ 	}
+ 	errbuf[sizeof errbuf - 1] = '\0';
+-	err = psmi_handle_error(ep, err, errbuf);
++	err = psmi_handle_error(ep, err, "%s", errbuf);
+     }
+ 
+ fail:
+--- infinipath-psm-1.14/psm_utils.c.orig	2011-01-17 14:52:40.000000000 +0100
++++ infinipath-psm-1.14/psm_utils.c	2015-02-20 21:08:40.470262844 +0100
+@@ -1191,7 +1191,7 @@
+   
+  fail:
+   /* Unrecognized/unknown option */
+-  return psmi_handle_error(NULL, PSM_PARAM_ERR, err_string);
++  return psmi_handle_error(NULL, PSM_PARAM_ERR, "%s", err_string);
+ }
+ 
+ psm_error_t psmi_core_setopt(const void *core_obj, int optname, 
diff --git a/infinipath-psm-link.patch b/infinipath-psm-link.patch
new file mode 100644
index 0000000..28ece61
--- /dev/null
+++ b/infinipath-psm-link.patch
@@ -0,0 +1,11 @@
+--- infinipath-psm-1.14/Makefile.orig	2011-01-17 14:52:39.000000000 +0100
++++ infinipath-psm-1.14/Makefile	2015-02-20 23:05:31.813301987 +0100
+@@ -236,7 +236,7 @@
+ 	$(CC) $(LDFLAGS) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared -Wl,--unique='*fastpath*' \
+ 		${${TARGLIB}-objs} _revision.o -Lipath $(LDLIBS)
+ 	@leaks=`nm $@ | grep ' [DT] ' | \
+-	 grep -v -e ' [DT] \(_fini\|_init\|infinipath_\|ips_\|psmi\|__psmi\?_\|_\rest.pr\|_save.pr\|kcopy\)'`; \
++	 grep -v -e ' [DT] \(_edata\|_fini\|_init\|infinipath_\|ips_\|psmi\|__psmi\?_\|_\rest.pr\|_save.pr\|kcopy\)'`; \
+ 	 if test -n "$$leaks"; then echo "Build failed, leaking symbols:"; echo "$$leaks"; exit 1; fi
+ 
+ %.o: %.c
diff --git a/infinipath-psm-union.patch b/infinipath-psm-union.patch
new file mode 100644
index 0000000..f25bbae
--- /dev/null
+++ b/infinipath-psm-union.patch
@@ -0,0 +1,12 @@
+Workaround duplicate member name in two anonymous structs in union.
+--- infinipath-psm-1.14/ptl_ips/ips_proto_header.h.orig	2011-01-17 14:52:40.000000000 +0100
++++ infinipath-psm-1.14/ptl_ips/ips_proto_header.h	2015-02-20 17:35:14.310800312 +0100
+@@ -78,7 +78,7 @@
+ 	    __u16 amhdr_hidx  : 8; 
+ 	    __u16 amhdr_nargs : 3;
+ 	    __u16 amhdr_flags : 3; /* Reduced from 5 bits previously */
+-	    __u16 dst_subcontext : 2; /* Destination subcontext */
++	    __u16 adst_subcontext : 2; /* Destination subcontext */
+ 	  };
+ 	  __u16 mqhdr_org;
+ 	};
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/infinipath-psm.git/commitdiff/5125642a394f00eb2ecc1a1bc7a453e304222fe1



More information about the pld-cvs-commit mailing list