diff -u python2.5-2.5.2/debian/patches/distutils-sysconfig.dpatch python2.5-2.5.2/debian/patches/distutils-sysconfig.dpatch --- python2.5-2.5.2/debian/patches/distutils-sysconfig.dpatch +++ python2.5-2.5.2/debian/patches/distutils-sysconfig.dpatch @@ -1,7 +1,7 @@ #! /bin/sh -e -# DP: get LDSHARED and CCSHARED (like, CC, CXX, CPP, CFLAGS) from -# DP: the environment +# DP: Allow setting BASECFLAGS, OPT and EXTRA_LDFLAGS (like, CC, CXX, CPP, +# DP: CFLAGS, CPPFLAGS, CCSHARED, LDSHARED) from the environment. dir= if [ $# -eq 3 -a "$2" = '-d' ]; then @@ -29,13 +29,28 @@ ---- Lib/distutils/sysconfig.py~ 2003-02-10 15:02:33.000000000 +0100 -+++ Lib/distutils/sysconfig.py 2004-02-03 10:53:21.000000000 +0100 -@@ -153,6 +153,10 @@ - cc = os.environ['CC'] - if os.environ.has_key('CXX'): - cxx = os.environ['CXX'] -+ if os.environ.has_key('LDSHARED'): -+ ldshared = os.environ['LDSHARED'] -+ if os.environ.has_key('CCSHARED'): -+ ccshared = os.environ['CCSHARED'] - if os.environ.has_key('CPP'): - cpp = os.environ['CPP'] - else: +--- Lib/distutils/sysconfig.py.orig 2008-04-27 10:39:39.000000000 +0200 ++++ Lib/distutils/sysconfig.py 2008-04-27 11:09:50.000000000 +0200 +@@ -146,8 +146,8 @@ + varies across Unices and is stored in Python's Makefile. + """ + if compiler.compiler_type == "unix": +- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext) = \ +- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', ++ (cc, cxx, opt, extra_cflags, basecflags, cflags, ccshared, ldshared, so_ext) = \ ++ get_config_vars('CC', 'CXX', 'OPT', 'EXTRA_CFLAGS', 'BASECFLAGS', 'CFLAGS', + 'CCSHARED', 'LDSHARED', 'SO') + + if os.environ.has_key('CC'): +@@ -162,8 +162,13 @@ + cpp = cc + " -E" # not always + if os.environ.has_key('LDFLAGS'): + ldshared = ldshared + ' ' + os.environ['LDFLAGS'] ++ if os.environ.has_key('BASECFLAGS'): ++ basecflags = os.environ['BASECFLAGS'] ++ if os.environ.has_key('OPT'): ++ opt = os.environ['OPT'] ++ cflags = ' '.join(str(x) for x in (basecflags, opt, extra_cflags) if x) + if os.environ.has_key('CFLAGS'): +- cflags = opt + ' ' + os.environ['CFLAGS'] ++ cflags = ' '.join(str(x) for x in (basecflags, opt, os.environ['CFLAGS'], extra_cflags) if x) + ldshared = ldshared + ' ' + os.environ['CFLAGS'] + if os.environ.has_key('CPPFLAGS'): + cpp = cpp + ' ' + os.environ['CPPFLAGS'] diff -u python2.5-2.5.2/debian/rules python2.5-2.5.2/debian/rules --- python2.5-2.5.2/debian/rules +++ python2.5-2.5.2/debian/rules @@ -925,6 +925,7 @@ deb-locations \ locale-module \ distutils-link \ + distutils-sysconfig \ test-sundry \ tkinter-import \ link-opt \ diff -u python2.5-2.5.2/debian/changelog python2.5-2.5.2/debian/changelog --- python2.5-2.5.2/debian/changelog +++ python2.5-2.5.2/debian/changelog @@ -1,3 +1,10 @@ +python2.5 (2.5.2-2ubuntu5) hardy-proposed; urgency=low + + * Allow setting BASECFLAGS, OPT and EXTRA_LDFLAGS (like, CC, CXX, CPP, + CFLAGS, CPPFLAGS, CCSHARED, LDSHARED) from the environment. LP: #227686. + + -- Matthias Klose Wed, 07 May 2008 10:49:45 +0000 + python2.5 (2.5.2-2ubuntu4) hardy; urgency=low * Fix CVE-2008-1679, integer overflows in the imageop module.