[python/f16] fix db4 include path for libdb4 package (f18 and above) (patch 159)

Bohuslav Kabrda bkabrda at fedoraproject.org
Tue Jul 24 11:30:03 UTC 2012


commit 6dc4965247bb560e901ec4a57c3fffdd3248732e
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Tue Jul 24 08:51:48 2012 +0200

    fix db4 include path for libdb4 package (f18 and above) (patch 159)

 00159-correct-libdb-include-path.patch |   11 +++++++++++
 python.spec                            |   15 +++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/00159-correct-libdb-include-path.patch b/00159-correct-libdb-include-path.patch
new file mode 100644
index 0000000..f96fc20
--- /dev/null
+++ b/00159-correct-libdb-include-path.patch
@@ -0,0 +1,11 @@
+--- Python-2.7.3/Modules/Setup.dist.orig	2012-07-17 09:05:45.000000000 +0200
++++ Python-2.7.3/Modules/Setup.dist	2012-07-17 09:06:01.011696892 +0200
+@@ -412,7 +412,7 @@
+ # Edit the variables DB and DBLIBVERto point to the db top directory
+ # and the subdirectory of PORT where you built it.
+ DBLIBVER=4.8
+-DBINC=/usr/include/db4
++DBINC=/usr/include/libdb4
+ DBLIB=/usr/lib
+ _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
+ 
diff --git a/python.spec b/python.spec
index b139024..e3e9bc2 100644
--- a/python.spec
+++ b/python.spec
@@ -119,7 +119,9 @@ Provides: python(abi) = %{pybasever}
 BuildRequires: autoconf
 BuildRequires: bzip2
 BuildRequires: bzip2-devel
+%if 0%{?fedora} < 18
 BuildRequires: db4-devel >= 4.8
+%endif
 
 # expat 2.1.0 added the symbol XML_SetHashSalt without bumping SONAME.  We use
 # it (in pyexpat) in order to enable the fix in Python-2.7.3 for CVE-2012-0876:
@@ -130,6 +132,9 @@ BuildRequires: gcc-c++
 BuildRequires: gdbm-devel
 BuildRequires: glibc-devel
 BuildRequires: gmp-devel
+%if 0%{?fedora} >= 18
+BuildRequires: libdb4-devel
+%endif
 BuildRequires: libffi-devel
 BuildRequires: libGL-devel
 BuildRequires: libX11-devel
@@ -513,6 +518,12 @@ Patch131: python-2.7.2-disable-tests-in-test_io.patch
 # has been merged into patch 00146.
 Patch158: 00158-fix-hashlib-leak.patch
 
+# From F18 on, there is a libdb4 package, that replaces db4. It places header
+# files in "/usr/include/libdb4", not in "/usr/include/db4", this patch
+# fixes this.
+# Downstream only modification.
+Patch159: 00159-correct-libdb-include-path.patch
+
 # This is the generated patch to "configure"; see the description of
 #   %{regenerate_autotooling_patch}
 # above:
@@ -767,6 +778,9 @@ rm -r Modules/zlib || exit 1
 %endif
 
 %patch158 -p1
+%if 0%{?fedora} >= 18
+%patch159 -p1 -F 3
+%endif
 
 # This shouldn't be necesarry, but is right now (2.2a3)
 find -name "*~" |xargs rm -f
@@ -1827,6 +1841,7 @@ rm -fr %{buildroot}
 %changelog
 * Tue Jul 17 2012 Bohuslav Kabrda <bkabrda at redhat.com> - 2.7.3-4
 - fix memory leak in module _hashlib (patch 158, rhbz#836285)
+- fix db4 include path for libdb4 package (f18 and above) (patch 159)
 
 * Thu Apr 19 2012 David Malcolm <dmalcolm at redhat.com> - 2.7.3-3
 - add explicit version requirements on expat to avoid linkage problems with


More information about the scm-commits mailing list