[Python-apps-commits] r9557 - in packages/mypaint/trunk/debian (4 files)

achadwick-guest at users.alioth.debian.org achadwick-guest at users.alioth.debian.org
Sun Apr 21 23:02:42 UTC 2013


    Date: Sunday, April 21, 2013 @ 23:02:40
  Author: achadwick-guest
Revision: 9557

mypaint: fix hardening flags not being honoured

Addresses http://bugs.debian.org/704927

Added:
  packages/mypaint/trunk/debian/patches/0003-SConstruct-support-standard-build-environ-vars.patch
Modified:
  packages/mypaint/trunk/debian/changelog
  packages/mypaint/trunk/debian/patches/series
Deleted:
  packages/mypaint/trunk/debian/patches/0003-SConstruct-use-LDFLAGS-during-SHLINK.patch

Modified: packages/mypaint/trunk/debian/changelog
===================================================================
--- packages/mypaint/trunk/debian/changelog	2013-04-21 20:33:50 UTC (rev 9556)
+++ packages/mypaint/trunk/debian/changelog	2013-04-21 23:02:40 UTC (rev 9557)
@@ -1,6 +1,7 @@
-mypaint (1.1.0-2) UNRELEASED; urgency=low
+mypaint (1.1.0-2) unstable; urgency=low
 
   * Fix FTBFS with DEB_BUILD_OPTIONS=noopt (closes: Bug#704935)
+  * Fix hardening flags not being honoured (closes: Bug#704927) 
 
  -- Andrew Chadwick <a.t.chadwick at gmail.com>  Sun, 21 Apr 2013 20:37:02 +0100
 

Added: packages/mypaint/trunk/debian/patches/0003-SConstruct-support-standard-build-environ-vars.patch
===================================================================
--- packages/mypaint/trunk/debian/patches/0003-SConstruct-support-standard-build-environ-vars.patch	                        (rev 0)
+++ packages/mypaint/trunk/debian/patches/0003-SConstruct-support-standard-build-environ-vars.patch	2013-04-21 23:02:40 UTC (rev 9557)
@@ -0,0 +1,53 @@
+From 516d184b5db8ebdd8b184ef871050c3ab3f03fdf Mon Sep 17 00:00:00 2001
+From: Andrew Chadwick <andrewc-git at piffle.org>
+Date: Sun, 21 Apr 2013 22:51:05 +0100
+Subject: [PATCH] SConstruct: support standard build environ vars
+
+Support the standard build environment vars CC, CXX, CFLAGS, CXXFLAGS,
+CPPFLAGS, and LDFLAGS everywhere.
+
+Partially addresses https://gna.org/bugs/?20754
+---
+ SConstruct |   19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/SConstruct b/SConstruct
+index 0b55da1..ef39b9e 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1,6 +1,7 @@
+ import os, sys
+ from os.path import join, basename
+ from SCons.Script.SConscript import SConsEnvironment
++import SCons.Util
+ 
+ EnsureSConsVersion(1, 0)
+ 
+@@ -45,6 +46,24 @@ print('using %r (use scons python_config=xxx to change)' % env['python_config'])
+ if sys.platform == "win32":
+     # remove this mingw if trying VisualStudio
+     env = Environment(tools=tools + ['mingw'], ENV=os.environ, options=opts)
++
++# Respect some standard build environment stuff
++if os.environ.has_key('CC'):
++   env['CC'] = os.environ['CC']
++if os.environ.has_key('CFLAGS'):
++   env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
++if os.environ.has_key('CXX'):
++   env['CXX'] = os.environ['CXX']
++if os.environ.has_key('CXXFLAGS'):
++   env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++if os.environ.has_key('CPPFLAGS'):
++   env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CPPFLAGS'])
++   env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CPPFLAGS'])
++if os.environ.has_key('LDFLAGS'):
++   env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
++if "$CCFLAGS" in env['CXXCOM']:
++   env['CXXCOM'] = env['CXXCOM'].replace("$CCFLAGS","")
++
+ opts.Update(env)
+ 
+ env.Append(CXXFLAGS=' -Wall -Wno-sign-compare -Wno-write-strings')
+-- 
+1.7.10.4
+

Deleted: packages/mypaint/trunk/debian/patches/0003-SConstruct-use-LDFLAGS-during-SHLINK.patch
===================================================================
--- packages/mypaint/trunk/debian/patches/0003-SConstruct-use-LDFLAGS-during-SHLINK.patch	2013-04-21 20:33:50 UTC (rev 9556)
+++ packages/mypaint/trunk/debian/patches/0003-SConstruct-use-LDFLAGS-during-SHLINK.patch	2013-04-21 23:02:40 UTC (rev 9557)
@@ -1,31 +0,0 @@
-From: Andrew Chadwick <andrewc-git at piffle.org>
-Date: Tue, 15 Jan 2013 02:53:36 +0000
-Subject: SConstruct: use LDFLAGS during SHLINK
-
-Support the standard LDFLAGS environment var during linking of shared
-libraries. We already allow CFLAGS etc. to be set.
-
-Needed for hardening in Debian (and probably other configurations)
----
- SConstruct |    8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/SConstruct b/SConstruct
-index 0f3b546..60c0799 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -40,6 +40,14 @@ opts.Add('python_config', 'python-config to used', default_python_config)
- tools = ['default', 'textfile']
- 
- env = Environment(ENV=os.environ, options=opts, tools=tools)
-+
-+# Additional standard flags that SCons doesn't bother with yet
-+# See http://cgit.freedesktop.org/mesa/mesa/tree/scons/gallium.py
-+# See https://wiki.gentoo.org/wiki/SCons#Missing_CC.2C_CFLAGS.2C_LDFLAGS
-+if 'LDFLAGS' in os.environ:
-+    # LDFLAGS is omitted in SHLINKFLAGS, which is derived from LINKFLAGS
-+    env.Append(LINKFLAGS=os.environ['LDFLAGS'])
-+
- print('building for %r (use scons python_binary=xxx to change)' % env['python_binary'])
- print('using %r (use scons python_config=xxx to change)' % env['python_config'])
- if sys.platform == "win32":

Modified: packages/mypaint/trunk/debian/patches/series
===================================================================
--- packages/mypaint/trunk/debian/patches/series	2013-04-21 20:33:50 UTC (rev 9556)
+++ packages/mypaint/trunk/debian/patches/series	2013-04-21 23:02:40 UTC (rev 9557)
@@ -1,4 +1,4 @@
 0001-desktop-remove-deprecated-Encoding-key.patch
 0002-palettes-license-change-for-All_color_choice.gpl.patch
-0003-SConstruct-use-LDFLAGS-during-SHLINK.patch
+0003-SConstruct-support-standard-build-environ-vars.patch
 0004-tests-fix-test_brushlib.py-uncompress-30sec-data.patch




More information about the Python-apps-commits mailing list