From ed386189b9326f072bd6c0bf02d8cc270eb1f2a8 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Tue, 3 Dec 2013 16:37:15 -0700 Subject: [PATCH] Fix compilation with -Werror=format-security (bug #1037231) --- openmpi-format.patch | 12 ++++++++++++ openmpi.spec | 17 ++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 openmpi-format.patch diff --git a/openmpi-format.patch b/openmpi-format.patch new file mode 100644 index 0000000..36043ae --- /dev/null +++ b/openmpi-format.patch @@ -0,0 +1,12 @@ +diff -up openmpi-1.7.3/ompi/mca/btl/usnic/btl_usnic_module.c.format openmpi-1.7.3/ompi/mca/btl/usnic/btl_usnic_module.c +--- openmpi-1.7.3/ompi/mca/btl/usnic/btl_usnic_module.c.format 2013-10-01 16:13:44.000000000 -0600 ++++ openmpi-1.7.3/ompi/mca/btl/usnic/btl_usnic_module.c 2013-12-03 16:35:41.206022575 -0700 +@@ -826,7 +826,7 @@ static void usnic_stats_callback(int fd, + } + + strncat(str, tmp, sizeof(str) - strlen(str) - 1); +- opal_output(0, str); ++ opal_output(0, "%s", str); + + if (mca_btl_usnic_component.stats_relative) { + usnic_stats_reset(module); diff --git a/openmpi.spec b/openmpi.spec index ecf93e0..c4e2ff6 100644 --- a/openmpi.spec +++ b/openmpi.spec @@ -19,7 +19,7 @@ Name: openmpi%{?_cc_name_suffix} Version: 1.7.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open Message Passing Interface Group: Development/Libraries License: BSD, MIT and Romio @@ -30,7 +30,10 @@ Source0: http://www.open-mpi.org/software/ompi/v1.7/downloads/openmpi-%{version Source1: openmpi.module.in Source2: macros.openmpi # Patch to use system ltdl for tests -Patch1: openmpi-ltdl.patch +Patch1: openmpi-ltdl.patch +# Patch to fix compilation with -Werror=format-security +# https://bugzilla.redhat.com/show_bug.cgi?id=1037231 +Patch2: openmpi-format.patch BuildRequires: gcc-gfortran #sparc 64 doesn't have valgrind @@ -67,9 +70,9 @@ software vendors, application developers, and computer science researchers. For more information, see http://www.open-mpi.org/ . %package devel -Summary: Development files for openmpi -Group: Development/Libraries -Requires: %{name} = %{version}-%{release}, gcc-gfortran +Summary: Development files for openmpi +Group: Development/Libraries +Requires: %{name} = %{version}-%{release}, gcc-gfortran Provides: mpi-devel %description devel @@ -110,6 +113,7 @@ Contains development headers and libraries for openmpi %prep %setup -q -n openmpi-%{version} %patch1 -p1 -b .ltdl +%patch2 -p1 -b .format # Make sure we don't use the local libltdl library rm -r opal/libltdl @@ -232,6 +236,9 @@ make check %{_sysconfdir}/rpm/macros.%{namearch} %changelog +* Tue Dec 2 2013 Orion Poplawski 1.7.3-2 +- Fix compilation with -Werror=format-security (bug #1037231) + * Sun Oct 20 2013 Orion Poplawski 1.7.3-1 - Update to 1.7.3 - Upstream no longer ships license incompatible files