3.2.3-4: avoid allocating thunks in ctypes unless absolutely necessary (patch 155; rhbz#814391)
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-4 - avoid allocating thunks in ctypes unless absolutely necessary, to avoid generating SELinux denials on "import ctypes" and "import uuid" when embedding Python within httpd (patch 155; rhbz#814391)
This commit is contained in:
parent
5974f19981
commit
8a28107df1
15
00155-avoid-ctypes-thunks.patch
Normal file
15
00155-avoid-ctypes-thunks.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up Python-3.2.3/Lib/ctypes/__init__.py.rhbz814391 Python-3.2.3/Lib/ctypes/__init__.py
|
||||
--- Python-3.2.3/Lib/ctypes/__init__.py.rhbz814391 2012-04-20 15:12:49.017867692 -0400
|
||||
+++ Python-3.2.3/Lib/ctypes/__init__.py 2012-04-20 15:15:09.501111408 -0400
|
||||
@@ -275,11 +275,6 @@ def _reset_cache():
|
||||
# _SimpleCData.c_char_p_from_param
|
||||
POINTER(c_char).from_param = c_char_p.from_param
|
||||
_pointer_type_cache[None] = c_void_p
|
||||
- # XXX for whatever reasons, creating the first instance of a callback
|
||||
- # function is needed for the unittests on Win64 to succeed. This MAY
|
||||
- # be a compiler bug, since the problem occurs only when _ctypes is
|
||||
- # compiled with the MS SDK compiler. Or an uninitialized variable?
|
||||
- CFUNCTYPE(c_int)(lambda: None)
|
||||
|
||||
def create_unicode_buffer(init, size=None):
|
||||
"""create_unicode_buffer(aString) -> character array
|
17
python3.spec
17
python3.spec
@ -122,7 +122,7 @@
|
||||
Summary: Version 3 of the Python programming language aka Python 3000
|
||||
Name: python3
|
||||
Version: %{pybasever}.3
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: Python
|
||||
Group: Development/Languages
|
||||
|
||||
@ -386,6 +386,14 @@ Patch152: 00152-fix-test-gdb-regex.patch
|
||||
# which values are printed as "v@entry" rather than just "v":
|
||||
Patch153: 00153-fix-test_gdb-noise.patch
|
||||
|
||||
# python3.spec on f15 has:
|
||||
# Patch154: 00154-skip-urllib-test-requiring-working-DNS.patch
|
||||
|
||||
# Avoid allocating thunks in ctypes unless absolutely necessary, to avoid
|
||||
# generating SELinux denials on "import ctypes" and "import uuid" when
|
||||
# embedding Python within httpd (rhbz#814391)
|
||||
Patch155: 00155-avoid-ctypes-thunks.patch
|
||||
|
||||
# (New patches go here ^^^)
|
||||
#
|
||||
# When adding new patches to "python" and "python3" in Fedora 17 onwards,
|
||||
@ -610,6 +618,8 @@ done
|
||||
# 00151: not for python3
|
||||
%patch152 -p0
|
||||
%patch153 -p0
|
||||
# 00154: not for this branch
|
||||
%patch155 -p1
|
||||
|
||||
# Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there
|
||||
# are many differences between 2.6 and the Python 3 library.
|
||||
@ -1432,6 +1442,11 @@ rm -fr %{buildroot}
|
||||
# ======================================================
|
||||
|
||||
%changelog
|
||||
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-4
|
||||
- avoid allocating thunks in ctypes unless absolutely necessary, to avoid
|
||||
generating SELinux denials on "import ctypes" and "import uuid" when embedding
|
||||
Python within httpd (patch 155; rhbz#814391)
|
||||
|
||||
* Fri Apr 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.2.3-3
|
||||
- add explicit version requirements on expat to avoid linkage problems with
|
||||
XML_SetHashSalt
|
||||
|
Loading…
Reference in New Issue
Block a user