Skip to contentSkip to conversation

python: Fix to support the python module _bsddb built with db 5.3

PATCH New [email protected] 1 participant 2 messages Aug 4, 2012

lore
Share & tools
lore
#0 lore raw

cover python: Fix to support the python module _bsddb built with db 5.3

From: Jackie Huang <[email protected]>

_bsddb module in python 2.7 could be built only with db version between 4.1 and 4.7. A patch was added to avoid build warning about this for [YOCTO #1937] but not actually fixed it.

This patch enable _bsddb module be built with db 5.3, and remove --disable-statistics from the DB5_CONFIG to fix segmentation fault when using _bsddb module in python.

[YOCTO #2749]

---
The following changes since commit a9d0cbe1d84bb26fc1a1f48764fe514cf9f9c548:

gcc: Bump PR since there have been several gcc changes and various problems reported and this should flush anything stale out (2012-08-03 10:32:24 +0100)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib jhuang0/bug2749_bsddb_0804
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jhuang0/bug2749_bsddb_0804

Jackie Huang (1):
python: Fix to support the python module _bsddb built with db 5.3

 .../python/python/avoid_warning_about_bsddb.patch  |   23 -
 .../python/python-2.7.3-berkeley-db-5.3.patch      | 1570 ++++++++++++++++++++
 .../python/python-2.7.3-remove-bsdb-rpath.patch    |   22 +
 meta/recipes-devtools/python/python_2.7.3.bb       |    5 +-
 meta/recipes-support/db/db_5.3.15.bb               |    4 +-
 5 files changed, 1597 insertions(+), 27 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python/avoid_warning_about_bsddb.patch
 create mode 100644 meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch
 create mode 100644 meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch
Signature · 1 line
1.7.4
#1 lore raw

PATCH 1/1 python: Fix to support the python module _bsddb built with db 5.3

From: Jackie Huang <[email protected]>

_bsddb module in python 2.7 could be built only with db version between 4.1 and 4.7. A patch was added to avoid build warning about this for [YOCTO #1937] but not actually fixed it.

This patch enable _bsddb module be built with db 5.3, and remove --disable-statistics from the DB5_CONFIG to fix segmentation fault when using _bsddb module in python.

[YOCTO #2749]

---
 .../python/python/avoid_warning_about_bsddb.patch  |   23 -
 .../python/python-2.7.3-berkeley-db-5.3.patch      | 1570 ++++++++++++++++++++
 .../python/python-2.7.3-remove-bsdb-rpath.patch    |   22 +
 meta/recipes-devtools/python/python_2.7.3.bb       |    5 +-
 meta/recipes-support/db/db_5.3.15.bb               |    4 +-
 5 files changed, 1597 insertions(+), 27 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python/avoid_warning_about_bsddb.patch
 create mode 100644 meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch
 create mode 100644 meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch
meta/recipes-devtools/python/python/avoid_warning_about_bsddb.patch deleted +0 -23
deleted file mode 100644
index 4968744..0000000
@@ -1,23 +0,0 @@
-_bsddb module can be built only with db version between 4.1 and 4.7.
-Avoid a warning by not adding this module to missing variable.
-
-Upstream-Status: Inappropriate [distribution]
-
-Signed-off-by: Andrei Gherzan <[email protected]>
-
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py	2012-04-05 23:16:49.268139840 +0300
-+++ Python-2.7.2/setup.py	2012-04-05 23:17:30.912138622 +0300
-@@ -1024,7 +1024,9 @@
-             db_incs = None
-             dblibs = []
-             dblib_dir = None
--            missing.append('_bsddb')
-+            # We need db version between 4.1 and 4.7
-+            # Avoid this warning
-+            #missing.append('_bsddb')
- 
-         # The sqlite interface
-         sqlite_setup_debug = False   # verbose debug prints from this script?
meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch new file +1570 -0

1,570 lines not on this page · raw message

meta/recipes-devtools/python/python/python-2.7.3-remove-bsdb-rpath.patch new file +22 -0
new file mode 100644
index 0000000..4b8953a
@@ -0,0 +1,22 @@
+Remove the RPTH to avoid QA issue warning.
+
+Signed-off-by: Jackie Huang <[email protected]>
+---
+ setup.py |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 83b5e56..1fd5487 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1025,7 +1025,6 @@ class PyBuildExt(build_ext):
+             exts.append(Extension('_bsddb', ['_bsddb.c'],
+                                   depends = ['bsddb.h'],
+                                   library_dirs=dblib_dir,
+-                                  runtime_library_dirs=dblib_dir,
+                                   include_dirs=db_incs,
+                                   libraries=dblibs))
+         else:
+-- 
+1.7.4
+
meta/recipes-devtools/python/python_2.7.3.bb +3 -2
index d27ff05..9c648fe 100644
@@ -1,6 +1,6 @@
 require python.inc
 DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 
 DISTRO_SRC_URI ?= "file://sitecustomize.py"
 DISTRO_SRC_URI_linuxstdbase = ""
@@ -23,9 +23,10 @@ SRC_URI += "\
   file://setuptweaks.patch \
   file://check-if-target-is-64b-not-host.patch \
   file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
-  file://avoid_warning_about_bsddb.patch \
   file://avoid_warning_about_tkinter.patch \
   file://avoid_warning_for_sunos_specific_module.patch \
+  file://python-2.7.3-berkeley-db-5.3.patch \
+  file://python-2.7.3-remove-bsdb-rpath.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
meta/recipes-support/db/db_5.3.15.bb +2 -2
index 0fc396e..063954a 100644
@@ -14,7 +14,7 @@ HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
 LICENSE = "Sleepycat"
 VIRTUAL_NAME ?= "virtual/db"
 RCONFLICTS_${PN} = "db3"
-PR = "r7"
+PR = "r8"
 
 SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
 SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.."
@@ -56,7 +56,7 @@ FILES_SOLIBSDEV = "${libdir}/libdb.so"
 
 #configuration - set in local.conf to override
 # All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
-DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-statistics --disable-verify --disable-compat185 --disable-sql"
+DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
 
 EXTRA_OECONF = "${DB5_CONFIG}"
 
Signature · 1 line
1.7.4