[aqemu: 1/2] Changes for "-Werror=format-security"

Stephen Gordon sgordon at fedoraproject.org
Fri Jul 4 14:59:54 UTC 2014


commit 5be59e0c805ac7e771cfa711c67c185f281e175a
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 |   41 +++++++++++++++++++++++++++++++++++++
 aqemu.spec                        |   25 ++++++++++++++--------
 2 files changed, 57 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..2713c7d
--- /dev/null
+++ b/aqemu-0.8.2-format-security.patch
@@ -0,0 +1,41 @@
+--- /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..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