[aqemu] Changes for "-Werror=format-security"

Stephen Gordon sgordon at fedoraproject.org
Fri Jul 4 14:36:28 UTC 2014


commit d4a3ac069646724e8af698500aff08697e11c685
Author: Stephen Gordon <sgordon at redhat.com>
Date:   Fri Jul 4 10:36:06 2014 -0400

    Changes for "-Werror=format-security"
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1036992

 aqemu-0.8.2-format-security.patch |   96 +++++++++++++++++++++++++++++++++++++
 aqemu.spec                        |   25 ++++++----
 2 files changed, 112 insertions(+), 9 deletions(-)
---
diff --git a/aqemu-0.8.2-format-security.patch b/aqemu-0.8.2-format-security.patch
new file mode 100644
index 0000000..f3c3c96
--- /dev/null
+++ b/aqemu-0.8.2-format-security.patch
@@ -0,0 +1,96 @@
+From 25b16e75c81ae241a980d1ce43b2ac95ef8e0f6f Mon Sep 17 00:00:00 2001
+From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
+Date: Thu, 3 Jul 2014 18:14:54 -0500
+Subject: [PATCH] Fix FTBFS with -Werror=format-security (#1036992, #1105965)
+
+---
+ aqemu-0.8.2-format-security.patch | 38 ++++++++++++++++++++++++++++++++++++++
+ aqemu.spec                        |  8 +++++++-
+ 2 files changed, 45 insertions(+), 1 deletion(-)
+ create mode 100644 aqemu-0.8.2-format-security.patch
+
+diff --git a/aqemu-0.8.2-format-security.patch b/aqemu-0.8.2-format-security.patch
+new file mode 100644
+index 0000000..ec9b48c
+--- /dev/null
++++ b/aqemu-0.8.2-format-security.patch
+@@ -0,0 +1,38 @@
++--- a/Utils.cpp
+++++ b/Utils.cpp
++@@ -66,9 +66,9 @@ void AQDebug( const QString &sender, const QString &mes )
++ 		std::cout << QString( "\nAQEMU Debug [%1] >>>\nSender: %2\nMessage: %3" )
++ 							  .arg(Messages_Index).arg(sender).arg(mes).toStdString();
++ 	#else
++-		qDebug( qPrintable(QString(
+++		qDebug() << QString(
++ 			"\n\33[32mAQEMU Debug\33[0m [%1] >>>\n\33[32mSender:\33[0m %2\n\33[32mMessage:\33[0m %3")
++-			.arg(Messages_Index).arg(sender).arg(mes)) );
+++			.arg(Messages_Index).arg(sender).arg(mes);
++ 	#endif
++ 	}
++ 	
++@@ -87,9 +87,9 @@ void AQWarning( const QString &sender, const QString &mes )
++ 		std::cout << QString( "\nAQEMU Warning [%1] >>>\nSender: %2\nMessage: %3" )
++ 							  .arg(Messages_Index).arg(sender).arg(mes).toStdString();
++ 	#else
++-		qDebug( qPrintable(QString(
+++		qDebug() << QString(
++ 			"\n\33[34mAQEMU Warning\33[0m [%1] >>>\n\33[34mSender:\33[0m %2\n\33[34mMessage:\33[0m %3")
++-			.arg(Messages_Index).arg(sender).arg(mes)) );
+++			.arg(Messages_Index).arg(sender).arg(mes);
++ 	#endif
++ 	}
++ 	
++@@ -108,9 +108,9 @@ void AQError( const QString &sender, const QString &mes )
++ 		std::cout << QString( "\nAQEMU Error [%1] >>>\nSender: %2\nMessage: %3" )
++ 							  .arg(Messages_Index).arg(sender).arg(mes).toStdString();
++ 	#else
++-		qDebug( qPrintable(QString(
+++		qDebug() << QString(
++ 			"\n\33[31mAQEMU Error\33[0m [%1] >>>\n\33[31mSender:\33[0m %2\n\33[31mMessage:\33[0m %3")
++-			.arg(Messages_Index).arg(sender).arg(mes)) );
+++			.arg(Messages_Index).arg(sender).arg(mes);
++ 	#endif
++ 	}
++ 	
+diff --git a/aqemu.spec b/aqemu.spec
+index ee6d576..e9d6396 100644
+--- a/aqemu.spec
++++ b/aqemu.spec
+@@ -1,6 +1,6 @@
+ Name: aqemu
+ Version: 0.8.2
+-Release: 11%{?dist}
++Release: 12%{?dist}
+ Summary: A QT graphical interface to QEMU and KVM
+ Group: Applications/Emulators
+ License: GPLv2+
+@@ -12,6 +12,8 @@ Patch0: aqemu-0.8.2-fedora-desktop.patch
+ # Fatch for vncview.cp file to disable macro that clashes with QT 4.8.
+ # Upstram: http://sourceforge.net/tracker/?func=detail&aid=3429937&group_id=229794&atid=1078458
+ Patch1: aqemu-0.8.2-qt48.patch
++# -Werror=format-security
++Patch2: aqemu-0.8.2-format-security.patch
+ BuildRequires: qt-devel 
+ BuildRequires: cmake 
+ BuildRequires: libvncserver-devel
+@@ -28,6 +30,7 @@ majority of QEMU and KVM options on their virtual machines.
+ %setup -q
+ %patch0 
+ %patch1  
++%patch2 -p1
+ 
+ %build
+ %cmake
+@@ -70,6 +73,9 @@ fi
+ %{_mandir}/man1/%{name}.1*
+ 
+ %changelog
++* Thu Jul 03 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 0.8.2-12
++- Fix FTBFS with -Werror=format-security (#1036992, #1105965)
++
+ * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.2-11
+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+ 
+-- 
+1.9.3
\ No newline at end of file
diff --git a/aqemu.spec b/aqemu.spec
index ee6d576..c678d22 100644
--- a/aqemu.spec
+++ b/aqemu.spec
@@ -1,6 +1,6 @@
 Name: aqemu
 Version: 0.8.2
-Release: 11%{?dist}
+Release: 12%{?dist}
 Summary: A QT graphical interface to QEMU and KVM
 Group: Applications/Emulators
 License: GPLv2+
@@ -9,25 +9,29 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
 # Patch for desktop file to ensure it shows up in the GNOME overview.
 # Upstream: http://sourceforge.net/tracker/?func=detail&aid=3430317&group_id=229794&atid=1078458
 Patch0: aqemu-0.8.2-fedora-desktop.patch
-# Fatch for vncview.cp file to disable macro that clashes with QT 4.8.
-# Upstram: http://sourceforge.net/tracker/?func=detail&aid=3429937&group_id=229794&atid=1078458
+# Patch for vncview.cp file to disable macro that clashes with QT 4.8.
+# Upstream: http://sourceforge.net/tracker/?func=detail&aid=3429937&group_id=229794&atid=1078458
 Patch1: aqemu-0.8.2-qt48.patch
-BuildRequires: qt-devel 
-BuildRequires: cmake 
+# Patch to build if "-Werror=format-security" flag is used.
+# https://fedoraproject.org/wiki/Format-Security-FAQ for more information.
+Patch2: aqemu-0.8.2-format-security.patch
+BuildRequires: qt-devel
+BuildRequires: cmake
 BuildRequires: libvncserver-devel
 BuildRequires: desktop-file-utils
 BuildRequires: gnutls-devel
 BuildRequires: hicolor-icon-theme
 
 %description
-AQEMU is a graphical user interface to QEMU and KVM, written in Qt4. The 
-program has a user-friendly interface and allows user to set the 
+AQEMU is a graphical user interface to QEMU and KVM, written in Qt4. The
+program has a user-friendly interface and allows user to set the
 majority of QEMU and KVM options on their virtual machines.
 
 %prep
 %setup -q
-%patch0 
-%patch1  
+%patch0
+%patch1
+%patch2
 
 %build
 %cmake
@@ -70,6 +74,9 @@ fi
 %{_mandir}/man1/%{name}.1*
 
 %changelog
+* Fri Jul 04 2014 Stephen Gordon <sgordon at redhat.com> - 0.8.2-12
+- Apply changes for "-Werror=format-security" (bz#1036992)
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.8.2-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list