From 001a27780cc890539b77728dfdee06384be4d54b Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: Jul 02 2013 06:21:42 +0000 Subject: Fix build with libffi containing multilib wrapper for ffi.h (rhbz#979696). --- diff --git a/00184-ctypes-should-build-with-libffi-multilib-wrapper.patch b/00184-ctypes-should-build-with-libffi-multilib-wrapper.patch new file mode 100644 index 0000000..e224fc6 --- /dev/null +++ b/00184-ctypes-should-build-with-libffi-multilib-wrapper.patch @@ -0,0 +1,12 @@ +--- Python-3.3.2/setup.py.orig 2013-07-01 15:23:24.377711044 +0200 ++++ Python-3.3.2/setup.py 2013-07-01 15:23:34.094676496 +0200 +@@ -1882,7 +1882,8 @@ + if not line: + ffi_inc = None + break +- if line.startswith('#define LIBFFI_H'): ++ if line.startswith('#define LIBFFI_H') or \ ++ line.startswith('#define ffi_wrapper_h'): + break + ffi_lib = None + if ffi_inc is not None: diff --git a/python3.spec b/python3.spec index 93d8ab7..08ad043 100644 --- a/python3.spec +++ b/python3.spec @@ -126,7 +126,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.2 -Release: 2%{?dist} +Release: 3%{?dist} License: Python Group: Development/Languages @@ -594,6 +594,14 @@ Patch180: 00180-python-add-support-for-ppc64p7.patch # http://hg.python.org/cpython/rev/c627638753e2 Patch183: 00183-cve-2013-2099-fix-ssl-match_hostname-dos.patch +# 00184 # +# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=979696 +# Fixes build of ctypes against libffi with multilib wrapper +# Python recognizes ffi.h only if it contains "#define LIBFFI_H", +# but the wrapper doesn't contain that, which makes the build fail +# We patch this by also accepting "#define ffi_wrapper_h" +Patch184: 00184-ctypes-should-build-with-libffi-multilib-wrapper.patch + # (New patches go here ^^^) # @@ -851,6 +859,7 @@ done # 00181: not for python3 # 00182: upstream as of Python 3.3.2 %patch183 -p1 +%patch184 -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. @@ -1691,6 +1700,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Tue Jul 02 2013 Bohuslav Kabrda - 3.3.2-3 +- Fix build with libffi containing multilib wrapper for ffi.h (rhbz#979696). + * Mon May 20 2013 Bohuslav Kabrda - 3.3.2-2 - Add patch for CVE-2013-2099 (rhbz#963261).