[python] 2.7.3-5: fix test_gdb.py (patch 156; rhbz#817072)

dmalcolm dmalcolm at fedoraproject.org
Mon Apr 30 17:05:51 UTC 2012


commit 9261681cd04196e1c4370b4888c9dfeff2b19f66
Author: David Malcolm <dmalcolm at redhat.com>
Date:   Mon Apr 30 13:04:36 2012 -0400

    2.7.3-5: fix test_gdb.py (patch 156; rhbz#817072)
    
    * Mon Apr 30 2012 David Malcolm <dmalcolm at redhat.com> - 2.7.3-5
    - fix test_gdb.py (patch 156; rhbz#817072)

 00156-gdb-autoload-safepath.patch |   16 ++++++++++++++++
 python.spec                       |   11 ++++++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/00156-gdb-autoload-safepath.patch b/00156-gdb-autoload-safepath.patch
new file mode 100644
index 0000000..258c89d
--- /dev/null
+++ b/00156-gdb-autoload-safepath.patch
@@ -0,0 +1,16 @@
+diff -up Python-2.7.3/Lib/test/test_gdb.py.gdb-autoload-safepath Python-2.7.3/Lib/test/test_gdb.py
+--- Python-2.7.3/Lib/test/test_gdb.py.gdb-autoload-safepath	2012-04-30 12:55:43.372351709 -0400
++++ Python-2.7.3/Lib/test/test_gdb.py	2012-04-30 12:58:24.355339144 -0400
+@@ -111,6 +111,12 @@ class DebuggerTests(unittest.TestCase):
+                     # Disable this:
+                     'set print entry-values no',
+ 
++                    # Recent GDBs will only auto-load scripts from certain safe
++                    # locations.
++                    # Turn off this protection during the build to ensure that
++                    # our -gdb.py script can be loaded (rhbz#817072):
++                    'set auto-load safe-path /',
++
+                     'run']
+         if cmds_after_breakpoint:
+             commands += cmds_after_breakpoint
diff --git a/python.spec b/python.spec
index a565c9b..b5ae554 100644
--- a/python.spec
+++ b/python.spec
@@ -108,7 +108,7 @@ Summary: An interpreted, interactive, object-oriented programming language
 Name: %{python}
 # Remember to also rebase python-docs when changing this:
 Version: 2.7.3
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: Python
 Group: Development/Languages
 Requires: %{python}-libs%{?_isa} = %{version}-%{release}
@@ -623,6 +623,11 @@ Patch153: 00153-fix-test_gdb-noise.patch
 # embedding Python within httpd (rhbz#814391)
 Patch155: 00155-avoid-ctypes-thunks.patch
 
+# Recent builds of gdb will only auto-load scripts from certain safe
+# locations.  Turn off this protection during the build to ensure that our
+# -gdb.py script can be loaded when running test_gdb (rhbz#817072):
+Patch156: 00156-gdb-autoload-safepath.patch
+
 # (New patches go here ^^^)
 #
 # When adding new patches to "python" and "python3" in Fedora 17 onwards,
@@ -943,6 +948,7 @@ done
 %patch153 -p0
 # 00154: not for python 2
 %patch155 -p1
+%patch156 -p1
 
 
 # This shouldn't be necesarry, but is right now (2.2a3)
@@ -1773,6 +1779,9 @@ rm -fr %{buildroot}
 # ======================================================
 
 %changelog
+* Mon Apr 30 2012 David Malcolm <dmalcolm at redhat.com> - 2.7.3-5
+- fix test_gdb.py (patch 156; rhbz#817072)
+
 * Fri Apr 20 2012 David Malcolm <dmalcolm at redhat.com> - 2.7.3-4
 - avoid allocating thunks in ctypes unless absolutely necessary, to avoid
 generating SELinux denials on "import ctypes" and "import uuid" when embedding


More information about the scm-commits mailing list