From 10e7a4e0f4cfdcba648aeb31be979f11389b44ea Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 27 Feb 2017 11:30:06 -0700 Subject: [PATCH] Add patch to handle gcc format option changes --- cmake-format.patch | 12 ++++++++++++ cmake.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 cmake-format.patch diff --git a/cmake-format.patch b/cmake-format.patch new file mode 100644 index 0000000..83e36fa --- /dev/null +++ b/cmake-format.patch @@ -0,0 +1,12 @@ +diff -up cmake-3.7.2/Utilities/KWIML/test/CMakeLists.txt.format cmake-3.7.2/Utilities/KWIML/test/CMakeLists.txt +--- cmake-3.7.2/Utilities/KWIML/test/CMakeLists.txt.format 2017-01-13 07:05:42.000000000 -0700 ++++ cmake-3.7.2/Utilities/KWIML/test/CMakeLists.txt 2017-02-27 11:09:30.789844778 -0700 +@@ -10,7 +10,7 @@ endif() + # Suppress printf/scanf format warnings; we test if the sizes match. + foreach(lang C CXX) + if(KWIML_LANGUAGE_${lang} AND CMAKE_${lang}_COMPILER_ID STREQUAL "GNU") +- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format") ++ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wno-format -Wno-format-security") + endif() + endforeach() + diff --git a/cmake.spec b/cmake.spec index 23847f6..746243d 100644 --- a/cmake.spec +++ b/cmake.spec @@ -43,7 +43,7 @@ Name: %{orig_name}%{?name_suffix} Version: %{major_version}.%{minor_version}.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -66,6 +66,9 @@ Source4: %{name}.prov Patch2: %{name}-findruby.patch # replace release flag -O3 with -O2 for fedora Patch3: %{name}-fedora-flag_release.patch +# Handle -Werror=format-security +# https://gitlab.kitware.com/cmake/cmake/merge_requests/529 +Patch4: %{name}-format.patch # Patch for renaming on EPEL %if 0%{?name_suffix:1} @@ -178,6 +181,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}. # We cannot use backups with patches to Modules as they end up being installed %patch2 -p1 %patch3 -p1 +%patch4 -p1 -b .format %if %{with python3} echo '#!%{__python3}' > %{name}.prov @@ -399,6 +403,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Mon Feb 27 2017 Rex Dieter - 3.7.2-4 +- Add patch to handle gcc format option changes + * Mon Feb 20 2017 Rex Dieter - 3.7.2-3 - Fix ambiguous file lookup in cmake.prov