[Python-modules-commits] r19564 - in packages/pyside/trunk/debian (3 files)

odyx at users.alioth.debian.org odyx at users.alioth.debian.org
Fri Dec 9 11:00:36 UTC 2011


    Date: Friday, December 9, 2011 @ 11:00:34
  Author: odyx
Revision: 19564

Build with hardening flags enabled:

 - Add upstream patch `Fix bug 1012 - "FTBFS with hardening flags enabled"`
 - Drop debian/rules snippet that avoided "format" hardening features.

Closes: #642591

Added:
  packages/pyside/trunk/debian/patches/u77a011a_Fix_FTBFS_with_hardening_flags.patch
Modified:
  packages/pyside/trunk/debian/patches/series
  packages/pyside/trunk/debian/rules

Modified: packages/pyside/trunk/debian/patches/series
===================================================================
--- packages/pyside/trunk/debian/patches/series	2011-12-09 11:00:21 UTC (rev 19563)
+++ packages/pyside/trunk/debian/patches/series	2011-12-09 11:00:34 UTC (rev 19564)
@@ -1,2 +1,3 @@
 lessBuildVerbosity.patch
 cmake_selectDefaultPython.patch
+u77a011a_Fix_FTBFS_with_hardening_flags.patch

Added: packages/pyside/trunk/debian/patches/u77a011a_Fix_FTBFS_with_hardening_flags.patch
===================================================================
--- packages/pyside/trunk/debian/patches/u77a011a_Fix_FTBFS_with_hardening_flags.patch	                        (rev 0)
+++ packages/pyside/trunk/debian/patches/u77a011a_Fix_FTBFS_with_hardening_flags.patch	2011-12-09 11:00:34 UTC (rev 19564)
@@ -0,0 +1,95 @@
+commit 77a011ace9986092134aeabf6e12914ea5b85084
+Author: Hugo Parente Lima <hugo.pl at gmail.com>
+Date:   Mon Oct 31 15:12:00 2011 -0200
+
+    Fix bug 1012 - "FTBFS with hardening flags enabled"
+    
+    Reviewer: Lauro Moura <lauro.neto at openbossa.org>
+              Marcelo Lira <marcelo.lira at openbossa.org>
+
+diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
+index f24d403..811f41a 100644
+--- a/PySide/QtCore/typesystem_core.xml
++++ b/PySide/QtCore/typesystem_core.xml
+@@ -1,7 +1,7 @@
+ <?xml version="1.0"?>
+ <!--
+     This file is part of PySide project.
+-    Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
++    Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).
+     Contact: PySide team <contact at pyside.org>
+ 
+     This library is free software; you can redistribute it and/or
+@@ -26,13 +26,10 @@
+     <function signature="qAtan(qreal)" since="4.6" />
+     <function signature="qAtan2(qreal,qreal)" since="4.6" />
+     <function signature="qChecksum(const char*,uint)" />
+-    <function signature="qCritical(const char*)" />
+-    <function signature="qDebug(const char*)" />
+     <function signature="qExp(qreal)" since="4.6" />
+     <function signature="qFabs(qreal)" since="4.6" />
+     <function signature="qFastCos(qreal)" since="4.6"/>
+     <function signature="qFastSin(qreal)" since="4.6" />
+-    <function signature="qFatal(const char*)" />
+     <function signature="qFuzzyCompare(double,double)" />
+     <function signature="qFuzzyIsNull(double)" since="4.6" />
+     <function signature="qIsFinite(double)" />
+@@ -43,10 +40,40 @@
+     <function signature="qTan(qreal)" since="4.6" />
+     <function signature="qtTrId(const char *, int)" since="4.6" />
+     <function signature="qVersion()" />
+-    <function signature="qWarning(const char*)" />
+     <function signature="qrand()" />
+     <function signature="qsrand(uint)" />
+ 
++    <template name="use_stream_for_format_security">
++        // Uses the stream version for security reasons
++        // see gcc man page at -Wformat-security
++        %FUNCTION_NAME() << %1;
++    </template>
++
++    <add-function signature="qDebug(const char*)">
++        <inject-code>
++            <insert-template name="use_stream_for_format_security" />
++        </inject-code>
++    </add-function>
++    <add-function signature="qCritical(const char*)">
++        <inject-code>
++            <insert-template name="use_stream_for_format_security" />
++        </inject-code>
++    </add-function>
++    <add-function signature="qFatal(const char*)">
++        <inject-code>
++            // qFatal doesn't have a stream version, so we do a
++            // qWarning call followed by a qFatal() call using a
++            // literal.
++            qWarning() << %1;
++            qFatal("[A qFatal() call was made from Python code]");
++        </inject-code>
++    </add-function>
++    <add-function signature="qWarning(const char*)">
++        <inject-code>
++            <insert-template name="use_stream_for_format_security" />
++        </inject-code>
++    </add-function>
++
+     <!-- TODO: We do not support void* or const void* as arg -->
+     <rejection class="QMetaObject" function-name="activate"/>
+     <rejection class="QMetaObject" function-name="metacall"/>
+@@ -2106,7 +2133,7 @@
+         <modify-argument index="2">
+             <remove-argument />
+         </modify-argument>
+-        <inject-code>            
++        <inject-code>
+             %CPPSELF.%FUNCTION_NAME(Shiboken::String::toCString(%PYARG_1), Shiboken::String::len(%PYARG_1));
+         </inject-code>
+     </modify-function>
+@@ -3421,6 +3448,6 @@ s1.addTransition(button.clicked, s1h)</code>
+   <!-- TODO: this need be removed -->
+   <suppress-warning text="skipping function '*', unmatched return type '*'"/>
+   <suppress-warning text="skipping function '*', unmatched parameter type '*'"/>
+-  
++
+ 
+ </typesystem>

Modified: packages/pyside/trunk/debian/rules
===================================================================
--- packages/pyside/trunk/debian/rules	2011-12-09 11:00:21 UTC (rev 19563)
+++ packages/pyside/trunk/debian/rules	2011-12-09 11:00:34 UTC (rev 19564)
@@ -1,8 +1,5 @@
 #!/usr/bin/make -f
 
-# This is upstream bug 1012. TODO: get that fixed.
-export DEB_BUILD_MAINT_OPTIONS = hardening=-format
-
 %:
 	dh $@ --with python2 --with python3 --buildsystem=cmake --parallel
 




More information about the Python-modules-commits mailing list