diff options
34 files changed, 368 insertions, 2820 deletions
diff --git a/meta/conf/distro/include/default-versions.inc b/meta/conf/distro/include/default-versions.inc index 6e92aa5499..573063edfb 100644 --- a/meta/conf/distro/include/default-versions.inc +++ b/meta/conf/distro/include/default-versions.inc | |||
@@ -4,8 +4,8 @@ | |||
4 | 4 | ||
5 | # Force the python versions in one place | 5 | # Force the python versions in one place |
6 | PYTHON_BASEVERSION ?= "2.7" | 6 | PYTHON_BASEVERSION ?= "2.7" |
7 | PREFERRED_VERSION_python ?= "2.7.3" | 7 | PREFERRED_VERSION_python ?= "2.7.9" |
8 | PREFERRED_VERSION_python-native ?= "2.7.3" | 8 | PREFERRED_VERSION_python-native ?= "2.7.9" |
9 | 9 | ||
10 | # Force the older version of liberation-fonts until we fix the fontforge issue | 10 | # Force the older version of liberation-fonts until we fix the fontforge issue |
11 | PREFERRED_VERSION_liberation-fonts ?= "1.04" | 11 | PREFERRED_VERSION_liberation-fonts ?= "1.04" |
diff --git a/meta/recipes-devtools/python/python-2.7-manifest.inc b/meta/recipes-devtools/python/python-2.7-manifest.inc index 2e68a26cbd..12f775efeb 100644 --- a/meta/recipes-devtools/python/python-2.7-manifest.inc +++ b/meta/recipes-devtools/python/python-2.7-manifest.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. | 2 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. |
3 | # Generator: 'scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | 3 | # Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> |
4 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy | 4 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy |
5 | 5 | ||
6 | 6 | ||
@@ -41,13 +41,13 @@ SUMMARY_${PN}-compression="Python high-level compression support" | |||
41 | RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib" | 41 | RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib" |
42 | FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so " | 42 | FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so " |
43 | 43 | ||
44 | SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts. See PEP 343." | 44 | SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts." |
45 | RDEPENDS_${PN}-contextlib="${PN}-core" | 45 | RDEPENDS_${PN}-contextlib="${PN}-core" |
46 | FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.py* " | 46 | FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.* " |
47 | 47 | ||
48 | SUMMARY_${PN}-core="Python interpreter and core modules" | 48 | SUMMARY_${PN}-core="Python interpreter and core modules" |
49 | RDEPENDS_${PN}-core="${PN}-lang ${PN}-re" | 49 | RDEPENDS_${PN}-core="${PN}-lang ${PN}-re" |
50 | FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py " | 50 | FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py " |
51 | 51 | ||
52 | SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support" | 52 | SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support" |
53 | RDEPENDS_${PN}-crypt="${PN}-core" | 53 | RDEPENDS_${PN}-crypt="${PN}-core" |
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch index 0526031ada..8ca89e7c51 100644 --- a/meta/recipes-devtools/python/python-native/multilib.patch +++ b/meta/recipes-devtools/python/python-native/multilib.patch | |||
@@ -1,15 +1,6 @@ | |||
1 | commit 248279e54467a8cd5cde98fc124d1d1384703513 | 1 | Rebased for Python 2.7.9 |
2 | Author: Yu Ke <ke.yu@intel.com> | ||
3 | Date: Tue Jun 28 21:21:29 2011 +0800 | ||
4 | |||
5 | SUSE patch for the lib64 issue | ||
6 | |||
7 | see detail in http://bugs.python.org/issue1294959 | ||
8 | |||
9 | also rebased a bit for Yocto python 2.6.6 | ||
10 | |||
11 | Picked-by: Yu Ke <ke.yu@intel.com> | ||
12 | 2 | ||
3 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
13 | 4 | ||
14 | 2011/09/29 | 5 | 2011/09/29 |
15 | The python recipe building was failing because python-native | 6 | The python recipe building was failing because python-native |
@@ -21,10 +12,10 @@ Upstream-Status: Inappropriate [oe-specific] | |||
21 | 12 | ||
22 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | 13 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> |
23 | 14 | ||
24 | Index: Python-2.7.2/Include/pythonrun.h | 15 | Index: Python-2.7.9/Include/pythonrun.h |
25 | =================================================================== | 16 | =================================================================== |
26 | --- Python-2.7.2.orig/Include/pythonrun.h | 17 | --- Python-2.7.9.orig/Include/pythonrun.h |
27 | +++ Python-2.7.2/Include/pythonrun.h | 18 | +++ Python-2.7.9/Include/pythonrun.h |
28 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); | 19 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); |
29 | /* In their own files */ | 20 | /* In their own files */ |
30 | PyAPI_FUNC(const char *) Py_GetVersion(void); | 21 | PyAPI_FUNC(const char *) Py_GetVersion(void); |
@@ -33,10 +24,10 @@ Index: Python-2.7.2/Include/pythonrun.h | |||
33 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | 24 | PyAPI_FUNC(const char *) Py_GetCopyright(void); |
34 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | 25 | PyAPI_FUNC(const char *) Py_GetCompiler(void); |
35 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | 26 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); |
36 | Index: Python-2.7.2/Lib/distutils/command/install.py | 27 | Index: Python-2.7.9/Lib/distutils/command/install.py |
37 | =================================================================== | 28 | =================================================================== |
38 | --- Python-2.7.2.orig/Lib/distutils/command/install.py | 29 | --- Python-2.7.9.orig/Lib/distutils/command/install.py |
39 | +++ Python-2.7.2/Lib/distutils/command/install.py | 30 | +++ Python-2.7.9/Lib/distutils/command/install.py |
40 | @@ -22,6 +22,8 @@ from site import USER_BASE | 31 | @@ -22,6 +22,8 @@ from site import USER_BASE |
41 | from site import USER_SITE | 32 | from site import USER_SITE |
42 | 33 | ||
@@ -55,11 +46,11 @@ Index: Python-2.7.2/Lib/distutils/command/install.py | |||
55 | 'headers': '$base/include/python$py_version_short/$dist_name', | 46 | 'headers': '$base/include/python$py_version_short/$dist_name', |
56 | 'scripts': '$base/bin', | 47 | 'scripts': '$base/bin', |
57 | 'data' : '$base', | 48 | 'data' : '$base', |
58 | Index: Python-2.7.2/Lib/pydoc.py | 49 | Index: Python-2.7.9/Lib/pydoc.py |
59 | =================================================================== | 50 | =================================================================== |
60 | --- Python-2.7.2.orig/Lib/pydoc.py | 51 | --- Python-2.7.9.orig/Lib/pydoc.py |
61 | +++ Python-2.7.2/Lib/pydoc.py | 52 | +++ Python-2.7.9/Lib/pydoc.py |
62 | @@ -352,7 +352,7 @@ class Doc: | 53 | @@ -383,7 +383,7 @@ class Doc: |
63 | 54 | ||
64 | docloc = os.environ.get("PYTHONDOCS", | 55 | docloc = os.environ.get("PYTHONDOCS", |
65 | "http://docs.python.org/library") | 56 | "http://docs.python.org/library") |
@@ -68,11 +59,11 @@ Index: Python-2.7.2/Lib/pydoc.py | |||
68 | "python"+sys.version[0:3]) | 59 | "python"+sys.version[0:3]) |
69 | if (isinstance(object, type(os)) and | 60 | if (isinstance(object, type(os)) and |
70 | (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', | 61 | (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', |
71 | Index: Python-2.7.2/Lib/site.py | 62 | Index: Python-2.7.9/Lib/site.py |
72 | =================================================================== | 63 | =================================================================== |
73 | --- Python-2.7.2.orig/Lib/site.py | 64 | --- Python-2.7.9.orig/Lib/site.py |
74 | +++ Python-2.7.2/Lib/site.py | 65 | +++ Python-2.7.9/Lib/site.py |
75 | @@ -300,13 +300,19 @@ def getsitepackages(): | 66 | @@ -288,13 +288,19 @@ def getsitepackages(): |
76 | if sys.platform in ('os2emx', 'riscos'): | 67 | if sys.platform in ('os2emx', 'riscos'): |
77 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) | 68 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) |
78 | elif os.sep == '/': | 69 | elif os.sep == '/': |
@@ -95,11 +86,11 @@ Index: Python-2.7.2/Lib/site.py | |||
95 | if sys.platform == "darwin": | 86 | if sys.platform == "darwin": |
96 | # for framework builds *only* we add the standard Apple | 87 | # for framework builds *only* we add the standard Apple |
97 | # locations. | 88 | # locations. |
98 | Index: Python-2.7.2/Lib/test/test_dl.py | 89 | Index: Python-2.7.9/Lib/test/test_dl.py |
99 | =================================================================== | 90 | =================================================================== |
100 | --- Python-2.7.2.orig/Lib/test/test_dl.py | 91 | --- Python-2.7.9.orig/Lib/test/test_dl.py |
101 | +++ Python-2.7.2/Lib/test/test_dl.py | 92 | +++ Python-2.7.9/Lib/test/test_dl.py |
102 | @@ -5,10 +5,11 @@ | 93 | @@ -4,10 +4,11 @@ |
103 | import unittest | 94 | import unittest |
104 | from test.test_support import verbose, import_module | 95 | from test.test_support import verbose, import_module |
105 | dl = import_module('dl', deprecated=True) | 96 | dl = import_module('dl', deprecated=True) |
@@ -113,11 +104,11 @@ Index: Python-2.7.2/Lib/test/test_dl.py | |||
113 | ('/usr/bin/cygwin1.dll', 'getpid'), | 104 | ('/usr/bin/cygwin1.dll', 'getpid'), |
114 | ('/usr/lib/libc.dylib', 'getpid'), | 105 | ('/usr/lib/libc.dylib', 'getpid'), |
115 | ] | 106 | ] |
116 | Index: Python-2.7.2/Lib/trace.py | 107 | Index: Python-2.7.9/Lib/trace.py |
117 | =================================================================== | 108 | =================================================================== |
118 | --- Python-2.7.2.orig/Lib/trace.py | 109 | --- Python-2.7.9.orig/Lib/trace.py |
119 | +++ Python-2.7.2/Lib/trace.py | 110 | +++ Python-2.7.9/Lib/trace.py |
120 | @@ -762,10 +762,10 @@ def main(argv=None): | 111 | @@ -754,10 +754,10 @@ def main(argv=None): |
121 | # should I also call expanduser? (after all, could use $HOME) | 112 | # should I also call expanduser? (after all, could use $HOME) |
122 | 113 | ||
123 | s = s.replace("$prefix", | 114 | s = s.replace("$prefix", |
@@ -130,19 +121,19 @@ Index: Python-2.7.2/Lib/trace.py | |||
130 | "python" + sys.version[:3])) | 121 | "python" + sys.version[:3])) |
131 | s = os.path.normpath(s) | 122 | s = os.path.normpath(s) |
132 | ignore_dirs.append(s) | 123 | ignore_dirs.append(s) |
133 | Index: Python-2.7.2/Makefile.pre.in | 124 | Index: Python-2.7.9/Makefile.pre.in |
134 | =================================================================== | 125 | =================================================================== |
135 | --- Python-2.7.2.orig/Makefile.pre.in | 126 | --- Python-2.7.9.orig/Makefile.pre.in |
136 | +++ Python-2.7.2/Makefile.pre.in | 127 | +++ Python-2.7.9/Makefile.pre.in |
137 | @@ -81,6 +81,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG | 128 | @@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG |
138 | 129 | ||
139 | # Machine-dependent subdirectories | 130 | # Machine-dependent subdirectories |
140 | MACHDEP= @MACHDEP@ | 131 | MACHDEP= @MACHDEP@ |
141 | +LIB= @LIB@ | 132 | +LIB= @LIB@ |
142 | 133 | ||
143 | # Install prefix for architecture-independent files | 134 | # Multiarch directory (may be empty) |
144 | prefix= @prefix@ | 135 | MULTIARCH= @MULTIARCH@ |
145 | @@ -97,7 +98,7 @@ LIBDIR= @libdir@ | 136 | @@ -106,7 +107,7 @@ LIBDIR= @libdir@ |
146 | MANDIR= @mandir@ | 137 | MANDIR= @mandir@ |
147 | INCLUDEDIR= @includedir@ | 138 | INCLUDEDIR= @includedir@ |
148 | CONFINCLUDEDIR= $(exec_prefix)/include | 139 | CONFINCLUDEDIR= $(exec_prefix)/include |
@@ -151,7 +142,7 @@ Index: Python-2.7.2/Makefile.pre.in | |||
151 | 142 | ||
152 | # Detailed destination directories | 143 | # Detailed destination directories |
153 | BINLIBDEST= $(LIBDIR)/python$(VERSION) | 144 | BINLIBDEST= $(LIBDIR)/python$(VERSION) |
154 | @@ -532,6 +533,7 @@ Modules/getpath.o: $(srcdir)/Modules/get | 145 | @@ -597,6 +598,7 @@ Modules/getpath.o: $(srcdir)/Modules/get |
155 | -DEXEC_PREFIX='"$(exec_prefix)"' \ | 146 | -DEXEC_PREFIX='"$(exec_prefix)"' \ |
156 | -DVERSION='"$(VERSION)"' \ | 147 | -DVERSION='"$(VERSION)"' \ |
157 | -DVPATH='"$(VPATH)"' \ | 148 | -DVPATH='"$(VPATH)"' \ |
@@ -159,7 +150,7 @@ Index: Python-2.7.2/Makefile.pre.in | |||
159 | -o $@ $(srcdir)/Modules/getpath.c | 150 | -o $@ $(srcdir)/Modules/getpath.c |
160 | 151 | ||
161 | Modules/python.o: $(srcdir)/Modules/python.c | 152 | Modules/python.o: $(srcdir)/Modules/python.c |
162 | @@ -566,7 +568,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) | 153 | @@ -639,7 +641,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) |
163 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) | 154 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) |
164 | 155 | ||
165 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | 156 | Python/getplatform.o: $(srcdir)/Python/getplatform.c |
@@ -168,10 +159,10 @@ Index: Python-2.7.2/Makefile.pre.in | |||
168 | 159 | ||
169 | Python/importdl.o: $(srcdir)/Python/importdl.c | 160 | Python/importdl.o: $(srcdir)/Python/importdl.c |
170 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | 161 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c |
171 | Index: Python-2.7.2/Modules/getpath.c | 162 | Index: Python-2.7.9/Modules/getpath.c |
172 | =================================================================== | 163 | =================================================================== |
173 | --- Python-2.7.2.orig/Modules/getpath.c | 164 | --- Python-2.7.9.orig/Modules/getpath.c |
174 | +++ Python-2.7.2/Modules/getpath.c | 165 | +++ Python-2.7.9/Modules/getpath.c |
175 | @@ -116,9 +116,11 @@ | 166 | @@ -116,9 +116,11 @@ |
176 | #define EXEC_PREFIX PREFIX | 167 | #define EXEC_PREFIX PREFIX |
177 | #endif | 168 | #endif |
@@ -195,10 +186,10 @@ Index: Python-2.7.2/Modules/getpath.c | |||
195 | 186 | ||
196 | static void | 187 | static void |
197 | reduce(char *dir) | 188 | reduce(char *dir) |
198 | Index: Python-2.7.2/Python/getplatform.c | 189 | Index: Python-2.7.9/Python/getplatform.c |
199 | =================================================================== | 190 | =================================================================== |
200 | --- Python-2.7.2.orig/Python/getplatform.c | 191 | --- Python-2.7.9.orig/Python/getplatform.c |
201 | +++ Python-2.7.2/Python/getplatform.c | 192 | +++ Python-2.7.9/Python/getplatform.c |
202 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) | 193 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) |
203 | { | 194 | { |
204 | return PLATFORM; | 195 | return PLATFORM; |
@@ -213,11 +204,11 @@ Index: Python-2.7.2/Python/getplatform.c | |||
213 | +{ | 204 | +{ |
214 | + return LIB; | 205 | + return LIB; |
215 | +} | 206 | +} |
216 | Index: Python-2.7.2/Python/sysmodule.c | 207 | Index: Python-2.7.9/Python/sysmodule.c |
217 | =================================================================== | 208 | =================================================================== |
218 | --- Python-2.7.2.orig/Python/sysmodule.c | 209 | --- Python-2.7.9.orig/Python/sysmodule.c |
219 | +++ Python-2.7.2/Python/sysmodule.c | 210 | +++ Python-2.7.9/Python/sysmodule.c |
220 | @@ -1416,6 +1416,8 @@ _PySys_Init(void) | 211 | @@ -1437,6 +1437,8 @@ _PySys_Init(void) |
221 | PyString_FromString(Py_GetCopyright())); | 212 | PyString_FromString(Py_GetCopyright())); |
222 | SET_SYS_FROM_STRING("platform", | 213 | SET_SYS_FROM_STRING("platform", |
223 | PyString_FromString(Py_GetPlatform())); | 214 | PyString_FromString(Py_GetPlatform())); |
@@ -226,11 +217,11 @@ Index: Python-2.7.2/Python/sysmodule.c | |||
226 | SET_SYS_FROM_STRING("executable", | 217 | SET_SYS_FROM_STRING("executable", |
227 | PyString_FromString(Py_GetProgramFullPath())); | 218 | PyString_FromString(Py_GetProgramFullPath())); |
228 | SET_SYS_FROM_STRING("prefix", | 219 | SET_SYS_FROM_STRING("prefix", |
229 | Index: Python-2.7.2/configure.in | 220 | Index: Python-2.7.9/configure.ac |
230 | =================================================================== | 221 | =================================================================== |
231 | --- Python-2.7.2.orig/configure.in | 222 | --- Python-2.7.9.orig/configure.ac |
232 | +++ Python-2.7.2/configure.in | 223 | +++ Python-2.7.9/configure.ac |
233 | @@ -629,6 +629,10 @@ SunOS*) | 224 | @@ -736,6 +736,11 @@ SunOS*) |
234 | ;; | 225 | ;; |
235 | esac | 226 | esac |
236 | 227 | ||
@@ -238,6 +229,7 @@ Index: Python-2.7.2/configure.in | |||
238 | +AC_MSG_CHECKING(LIB) | 229 | +AC_MSG_CHECKING(LIB) |
239 | +LIB=`basename ${libdir}` | 230 | +LIB=`basename ${libdir}` |
240 | +AC_MSG_RESULT($LIB) | 231 | +AC_MSG_RESULT($LIB) |
232 | + | ||
241 | 233 | ||
242 | AC_SUBST(LIBRARY) | 234 | AC_SUBST(LIBRARY) |
243 | AC_MSG_CHECKING(LIBRARY) | 235 | AC_MSG_CHECKING(LIBRARY) |
diff --git a/meta/recipes-devtools/python/python-native/nohostlibs.patch b/meta/recipes-devtools/python/python-native/nohostlibs.patch index 09c3fb808a..8a452e94dc 100644 --- a/meta/recipes-devtools/python/python-native/nohostlibs.patch +++ b/meta/recipes-devtools/python/python-native/nohostlibs.patch | |||
@@ -1,25 +1,28 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | 1 | Upstream-Status: Inappropriate [embedded specific] |
2 | 2 | ||
3 | 2011/09/29 | 3 | 2014/12/15 |
4 | rebased for python-2.7.2 | 4 | Rebased for python-2.7.9 |
5 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | 5 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> |
6 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
6 | 7 | ||
7 | Index: Python-2.7.2/setup.py | 8 | Index: Python-2.7.9/setup.py |
8 | =================================================================== | 9 | =================================================================== |
9 | --- Python-2.7.2.orig/setup.py | 10 | --- Python-2.7.9.orig/setup.py |
10 | +++ Python-2.7.2/setup.py | 11 | +++ Python-2.7.9/setup.py |
11 | @@ -369,8 +369,8 @@ class PyBuildExt(build_ext): | 12 | @@ -439,9 +439,9 @@ class PyBuildExt(build_ext): |
12 | 13 | ||
13 | def detect_modules(self): | 14 | def detect_modules(self): |
14 | # Ensure that /usr/local is always used | 15 | # Ensure that /usr/local is always used |
15 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | 16 | - if not cross_compiling: |
16 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 17 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') |
17 | + #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | 18 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') |
18 | + #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 19 | + # if not cross_compiling: |
20 | + # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
21 | + # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
22 | if cross_compiling: | ||
23 | self.add_gcc_paths() | ||
19 | self.add_multiarch_paths() | 24 | self.add_multiarch_paths() |
20 | 25 | @@ -480,15 +480,15 @@ class PyBuildExt(build_ext): | |
21 | # Add paths specified in the environment variables LDFLAGS and | ||
22 | @@ -407,15 +407,15 @@ class PyBuildExt(build_ext): | ||
23 | for directory in reversed(options.dirs): | 26 | for directory in reversed(options.dirs): |
24 | add_dir_to_list(dir_list, directory) | 27 | add_dir_to_list(dir_list, directory) |
25 | 28 | ||
@@ -39,29 +42,13 @@ Index: Python-2.7.2/setup.py | |||
39 | sysconfig.get_config_var("INCLUDEDIR")) | 42 | sysconfig.get_config_var("INCLUDEDIR")) |
40 | 43 | ||
41 | try: | 44 | try: |
42 | @@ -426,11 +426,8 @@ class PyBuildExt(build_ext): | 45 | @@ -761,8 +761,7 @@ class PyBuildExt(build_ext): |
43 | # lib_dirs and inc_dirs are used to search for files; | ||
44 | # if a file is found in one of those directories, it can | ||
45 | # be assumed that no additional -I,-L directives are needed. | ||
46 | - lib_dirs = self.compiler.library_dirs + [ | ||
47 | - '/lib64', '/usr/lib64', | ||
48 | - '/lib', '/usr/lib', | ||
49 | - ] | ||
50 | - inc_dirs = self.compiler.include_dirs + ['/usr/include'] | ||
51 | + lib_dirs = self.compiler.library_dirs | ||
52 | + inc_dirs = self.compiler.include_dirs | ||
53 | exts = [] | ||
54 | missing = [] | ||
55 | |||
56 | @@ -676,9 +673,8 @@ class PyBuildExt(build_ext): | ||
57 | pass # Issue 7384: Already linked against curses or tinfo. | 46 | pass # Issue 7384: Already linked against curses or tinfo. |
58 | elif curses_library: | 47 | elif curses_library: |
59 | readline_libs.append(curses_library) | 48 | readline_libs.append(curses_library) |
60 | - elif self.compiler.find_library_file(lib_dirs + | 49 | - elif self.compiler.find_library_file(lib_dirs + |
61 | - ['/usr/lib/termcap'], | 50 | - ['/usr/lib/termcap'], |
62 | - 'termcap'): | ||
63 | + elif self.compiler.find_library_file(lib_dirs, | 51 | + elif self.compiler.find_library_file(lib_dirs, |
64 | + 'termcap'): | 52 | 'termcap'): |
65 | readline_libs.append('termcap') | 53 | readline_libs.append('termcap') |
66 | exts.append( Extension('readline', ['readline.c'], | 54 | exts.append( Extension('readline', ['readline.c'], |
67 | library_dirs=['/usr/lib/termcap'], | ||
diff --git a/meta/recipes-devtools/python/python-native_2.7.3.bb b/meta/recipes-devtools/python/python-native_2.7.9.bb index e55f5feac2..dfde36129f 100644 --- a/meta/recipes-devtools/python/python-native_2.7.3.bb +++ b/meta/recipes-devtools/python/python-native_2.7.9.bb | |||
@@ -6,7 +6,6 @@ PR = "${INC_PR}.1" | |||
6 | 6 | ||
7 | SRC_URI += "\ | 7 | SRC_URI += "\ |
8 | file://05-enable-ctypes-cross-build.patch \ | 8 | file://05-enable-ctypes-cross-build.patch \ |
9 | file://06-ctypes-libffi-fix-configure.patch \ | ||
10 | file://10-distutils-fix-swig-parameter.patch \ | 9 | file://10-distutils-fix-swig-parameter.patch \ |
11 | file://11-distutils-never-modify-shebang-line.patch \ | 10 | file://11-distutils-never-modify-shebang-line.patch \ |
12 | file://12-distutils-prefix-is-inside-staging-area.patch \ | 11 | file://12-distutils-prefix-is-inside-staging-area.patch \ |
@@ -17,9 +16,6 @@ SRC_URI += "\ | |||
17 | file://add-md5module-support.patch \ | 16 | file://add-md5module-support.patch \ |
18 | file://builddir.patch \ | 17 | file://builddir.patch \ |
19 | file://parallel-makeinst-create-bindir.patch \ | 18 | file://parallel-makeinst-create-bindir.patch \ |
20 | file://python-fix-build-error-with-Readline-6.3.patch \ | ||
21 | file://gcc-4.8-fix-configure-Wformat.patch \ | ||
22 | file://json-flaw-fix.patch \ | ||
23 | " | 19 | " |
24 | S = "${WORKDIR}/Python-${PV}" | 20 | S = "${WORKDIR}/Python-${PV}" |
25 | 21 | ||
@@ -58,7 +54,7 @@ do_install() { | |||
58 | # (these often end up too long for the #! parser in the kernel as the | 54 | # (these often end up too long for the #! parser in the kernel as the |
59 | # buffer is 128 bytes long). | 55 | # buffer is 128 bytes long). |
60 | ln -s python-native/python ${D}${bindir}/nativepython | 56 | ln -s python-native/python ${D}${bindir}/nativepython |
61 | 57 | ||
62 | # We don't want modules in ~/.local being used in preference to those | 58 | # We don't want modules in ~/.local being used in preference to those |
63 | # installed in the native sysroot, so disable user site support. | 59 | # installed in the native sysroot, so disable user site support. |
64 | sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py | 60 | sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py |
diff --git a/meta/recipes-devtools/python/python.inc b/meta/recipes-devtools/python/python.inc index bc5e5b91f7..e18ab8e99a 100644 --- a/meta/recipes-devtools/python/python.inc +++ b/meta/recipes-devtools/python/python.inc | |||
@@ -5,12 +5,12 @@ SECTION = "devel/python" | |||
5 | # bump this on every change in contrib/python/generate-manifest-2.7.py | 5 | # bump this on every change in contrib/python/generate-manifest-2.7.py |
6 | INC_PR = "r1" | 6 | INC_PR = "r1" |
7 | 7 | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ed3abfd1059e2d3a36a8cff3986f9bb6" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=dff3d00f049545862992d2d097831a13" |
9 | 9 | ||
10 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2" | 10 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" |
11 | 11 | ||
12 | SRC_URI[md5sum] = "c57477edd6d18bd9eeca2f21add73919" | 12 | SRC_URI[md5sum] = "38d530f7efc373d64a8fb1637e3baaa7" |
13 | SRC_URI[sha256sum] = "726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a338663c" | 13 | SRC_URI[sha256sum] = "90d27e14ea7e03570026850e2e50ba71ad20b7eb31035aada1cf3def8f8d4916" |
14 | 14 | ||
15 | PYTHON_MAJMIN = "2.7" | 15 | PYTHON_MAJMIN = "2.7" |
16 | 16 | ||
diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch index 691beada03..1257ca6557 100644 --- a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch | |||
@@ -1,102 +1,83 @@ | |||
1 | We need to ensure our host tools get run during build, not the freshly | ||
2 | built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN. | ||
3 | |||
1 | Upstream-Status: Inappropriate [embedded specific] | 4 | Upstream-Status: Inappropriate [embedded specific] |
2 | 5 | ||
3 | # We need to ensure our host tools get run during build, not the freshly | 6 | Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de> |
4 | # built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN. | 7 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> |
5 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | 8 | |
9 | Rebased for python-2.7.9 | ||
10 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
6 | 11 | ||
7 | Index: Python-2.7.2/Makefile.pre.in | 12 | Index: Python-2.7.9/Makefile.pre.in |
8 | =================================================================== | 13 | =================================================================== |
9 | --- Python-2.7.2.orig/Makefile.pre.in | 14 | --- Python-2.7.9.orig/Makefile.pre.in |
10 | +++ Python-2.7.2/Makefile.pre.in | 15 | +++ Python-2.7.9/Makefile.pre.in |
11 | @@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ | 16 | @@ -234,6 +234,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ |
12 | |||
13 | PYTHON= python$(EXE) | ||
14 | BUILDPYTHON= python$(BUILDEXE) | ||
15 | +HOSTPYTHON= $(BUILDPYTHON) | ||
16 | |||
17 | # The task to run while instrument when building the profile-opt target | ||
18 | PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck | ||
19 | @@ -214,7 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ | ||
20 | ########################################################################## | 17 | ########################################################################## |
21 | # Parser | 18 | # Parser |
22 | PGEN= Parser/pgen$(EXE) | 19 | PGEN= Parser/pgen$(EXE) |
23 | - | ||
24 | +HOSTPGEN= $(PGEN)$(EXE) | 20 | +HOSTPGEN= $(PGEN)$(EXE) |
25 | POBJS= \ | ||
26 | Parser/acceler.o \ | ||
27 | Parser/grammar1.o \ | ||
28 | @@ -401,14 +402,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA | ||
29 | $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) | ||
30 | |||
31 | platform: $(BUILDPYTHON) | ||
32 | - $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform | ||
33 | + $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform | ||
34 | 21 | ||
22 | PSRCS= \ | ||
23 | Parser/acceler.c \ | ||
24 | @@ -445,7 +446,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA | ||
25 | $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) | ||
35 | 26 | ||
36 | # Build the shared modules | 27 | platform: $(BUILDPYTHON) pybuilddir.txt |
37 | sharedmods: $(BUILDPYTHON) | 28 | - $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform |
38 | @case $$MAKEFLAGS in \ | 29 | + $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform |
39 | - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ | ||
40 | - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ | ||
41 | + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ | ||
42 | + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ | ||
43 | esac | ||
44 | 30 | ||
45 | # Build static library | 31 | # Create build directory and generate the sysconfig build-time data there. |
46 | @@ -542,7 +543,7 @@ Modules/python.o: $(srcdir)/Modules/pyth | 32 | # pybuilddir.txt contains the name of the build dir and is used for |
47 | $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp | 33 | @@ -611,7 +612,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p |
48 | Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT) | 34 | $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) |
49 | -@$(INSTALL) -d Include | 35 | @$(MKDIR_P) Include |
36 | $(MAKE) $(PGEN) | ||
50 | - $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | 37 | - $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
51 | + $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | 38 | + $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
52 | -touch Parser/pgen.stamp | 39 | $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) |
53 | 40 | $(MAKE) $(GRAMMAR_H) | |
54 | $(PGEN): $(PGENOBJS) | 41 | touch $(GRAMMAR_C) |
55 | @@ -926,25 +927,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL | 42 | @@ -1043,27 +1044,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL |
56 | done | 43 | $(DESTDIR)$(LIBDEST)/distutils/tests ; \ |
57 | $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt | 44 | fi |
58 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 45 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
59 | - ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | 46 | - $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
60 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | 47 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
61 | -d $(LIBDEST) -f \ | 48 | -d $(LIBDEST) -f \ |
62 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | 49 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
63 | $(DESTDIR)$(LIBDEST) | 50 | $(DESTDIR)$(LIBDEST) |
64 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 51 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
65 | - ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 52 | - $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
66 | + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 53 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
67 | -d $(LIBDEST) -f \ | 54 | -d $(LIBDEST) -f \ |
68 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | 55 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
69 | $(DESTDIR)$(LIBDEST) | 56 | $(DESTDIR)$(LIBDEST) |
70 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 57 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
71 | - ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | 58 | - $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ |
72 | + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | 59 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
73 | -d $(LIBDEST)/site-packages -f \ | 60 | -d $(LIBDEST)/site-packages -f \ |
74 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | 61 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
75 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 62 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
76 | - ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 63 | - $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
77 | + $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 64 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
78 | -d $(LIBDEST)/site-packages -f \ | 65 | -d $(LIBDEST)/site-packages -f \ |
79 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | 66 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
80 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 67 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
81 | - ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" | 68 | - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt |
82 | + $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" | 69 | + $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt |
70 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
71 | - $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt | ||
72 | + $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt | ||
83 | 73 | ||
84 | # Create the PLATDIR source directory, if one wasn't distributed.. | 74 | # Create the PLATDIR source directory, if one wasn't distributed.. |
85 | $(srcdir)/Lib/$(PLATDIR): | 75 | $(srcdir)/Lib/$(PLATDIR): |
86 | @@ -1049,7 +1050,7 @@ libainstall: all python-config | 76 | Index: Python-2.7.9/setup.py |
87 | # Install the dynamically loadable modules | ||
88 | # This goes into $(exec_prefix) | ||
89 | sharedinstall: sharedmods | ||
90 | - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ | ||
91 | + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ | ||
92 | --prefix=$(prefix) \ | ||
93 | --install-scripts=$(BINDIR) \ | ||
94 | --install-platlib=$(DESTSHARED) \ | ||
95 | Index: Python-2.7.2/setup.py | ||
96 | =================================================================== | 77 | =================================================================== |
97 | --- Python-2.7.2.orig/setup.py | 78 | --- Python-2.7.9.orig/setup.py |
98 | +++ Python-2.7.2/setup.py | 79 | +++ Python-2.7.9/setup.py |
99 | @@ -313,6 +313,7 @@ class PyBuildExt(build_ext): | 80 | @@ -334,6 +334,7 @@ class PyBuildExt(build_ext): |
100 | self.failed.append(ext.name) | 81 | self.failed.append(ext.name) |
101 | self.announce('*** WARNING: renaming "%s" since importing it' | 82 | self.announce('*** WARNING: renaming "%s" since importing it' |
102 | ' failed: %s' % (ext.name, why), level=3) | 83 | ' failed: %s' % (ext.name, why), level=3) |
@@ -104,18 +85,7 @@ Index: Python-2.7.2/setup.py | |||
104 | assert not self.inplace | 85 | assert not self.inplace |
105 | basename, tail = os.path.splitext(ext_filename) | 86 | basename, tail = os.path.splitext(ext_filename) |
106 | newname = basename + "_failed" + tail | 87 | newname = basename + "_failed" + tail |
107 | @@ -369,8 +370,8 @@ class PyBuildExt(build_ext): | 88 | @@ -558,6 +559,9 @@ class PyBuildExt(build_ext): |
108 | |||
109 | def detect_modules(self): | ||
110 | # Ensure that /usr/local is always used | ||
111 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
112 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
113 | + #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
114 | + #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
115 | self.add_multiarch_paths() | ||
116 | |||
117 | # Add paths specified in the environment variables LDFLAGS and | ||
118 | @@ -475,6 +476,9 @@ class PyBuildExt(build_ext): | ||
119 | 89 | ||
120 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules | 90 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules |
121 | 91 | ||
@@ -125,14 +95,3 @@ Index: Python-2.7.2/setup.py | |||
125 | # | 95 | # |
126 | # The following modules are all pretty straightforward, and compile | 96 | # The following modules are all pretty straightforward, and compile |
127 | # on pretty much any POSIXish platform. | 97 | # on pretty much any POSIXish platform. |
128 | @@ -677,8 +681,8 @@ class PyBuildExt(build_ext): | ||
129 | elif curses_library: | ||
130 | readline_libs.append(curses_library) | ||
131 | elif self.compiler.find_library_file(lib_dirs + | ||
132 | - ['/usr/lib/termcap'], | ||
133 | - 'termcap'): | ||
134 | + ['/usr/lib/termcap'], | ||
135 | + 'termcap'): | ||
136 | readline_libs.append('termcap') | ||
137 | exts.append( Extension('readline', ['readline.c'], | ||
138 | library_dirs=['/usr/lib/termcap'], | ||
diff --git a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch index d74e4b1776..650ceb5951 100644 --- a/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch +++ b/meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch | |||
@@ -1,14 +1,18 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | 1 | Upstream-Status: Inappropriate [embedded specific] |
2 | 2 | ||
3 | # We need to supply STAGING_INCDIR here, otherwise the Tk headers | 3 | We need to supply STAGING_INCDIR here, otherwise the Tk headers |
4 | # will not be found. | 4 | will not be found. |
5 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille.de> | ||
6 | 5 | ||
7 | Index: Python-2.6.1/setup.py | 6 | Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille.de> |
8 | =================================================================== | 7 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> |
9 | --- Python-2.6.1.orig/setup.py | 8 | |
10 | +++ Python-2.6.1/setup.py | 9 | Rebased for python-2.7.9 |
11 | @@ -1543,7 +1543,7 @@ class PyBuildExt(build_ext): | 10 | |
11 | diff --git a/setup.py b/setup.py | ||
12 | index 8fe1fb8..67eda74 100644 | ||
13 | --- a/setup.py | ||
14 | +++ b/setup.py | ||
15 | @@ -1892,7 +1892,7 @@ class PyBuildExt(build_ext): | ||
12 | dotversion = dotversion[:-1] + '.' + dotversion[-1] | 16 | dotversion = dotversion[:-1] + '.' + dotversion[-1] |
13 | tcl_include_sub = [] | 17 | tcl_include_sub = [] |
14 | tk_include_sub = [] | 18 | tk_include_sub = [] |
@@ -17,12 +21,12 @@ Index: Python-2.6.1/setup.py | |||
17 | tcl_include_sub += [dir + os.sep + "tcl" + dotversion] | 21 | tcl_include_sub += [dir + os.sep + "tcl" + dotversion] |
18 | tk_include_sub += [dir + os.sep + "tk" + dotversion] | 22 | tk_include_sub += [dir + os.sep + "tk" + dotversion] |
19 | tk_include_sub += tcl_include_sub | 23 | tk_include_sub += tcl_include_sub |
20 | @@ -1562,22 +1562,6 @@ class PyBuildExt(build_ext): | 24 | @@ -1911,22 +1911,6 @@ class PyBuildExt(build_ext): |
21 | if dir not in include_dirs: | 25 | if dir not in include_dirs: |
22 | include_dirs.append(dir) | 26 | include_dirs.append(dir) |
23 | 27 | ||
24 | - # Check for various platform-specific directories | 28 | - # Check for various platform-specific directories |
25 | - if platform == 'sunos5': | 29 | - if host_platform == 'sunos5': |
26 | - include_dirs.append('/usr/openwin/include') | 30 | - include_dirs.append('/usr/openwin/include') |
27 | - added_lib_dirs.append('/usr/openwin/lib') | 31 | - added_lib_dirs.append('/usr/openwin/lib') |
28 | - elif os.path.exists('/usr/X11R6/include'): | 32 | - elif os.path.exists('/usr/X11R6/include'): |
@@ -38,5 +42,5 @@ Index: Python-2.6.1/setup.py | |||
38 | - added_lib_dirs.append('/usr/X11/lib') | 42 | - added_lib_dirs.append('/usr/X11/lib') |
39 | - | 43 | - |
40 | # If Cygwin, then verify that X is installed before proceeding | 44 | # If Cygwin, then verify that X is installed before proceeding |
41 | if platform == 'cygwin': | 45 | if host_platform == 'cygwin': |
42 | x11_inc = find_file('X11/Xlib.h', [], include_dirs) | 46 | x11_inc = find_file('X11/Xlib.h', [], include_dirs) |
diff --git a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch index a68a20620a..5cc8742462 100644 --- a/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch +++ b/meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch | |||
@@ -1,25 +1,22 @@ | |||
1 | Rebased for python 2.7.9 | ||
2 | |||
1 | Upstream-Status: Inappropriate [embedded specific] | 3 | Upstream-Status: Inappropriate [embedded specific] |
2 | 4 | ||
3 | # CTypes need to know the actual host we are building on. | 5 | # CTypes need to know the actual host we are building on. |
4 | # Signed-Off: Michael Dietrich <mdt@emdete.de> | 6 | # Signed-Off: Michael Dietrich <mdt@emdete.de> |
5 | 7 | ||
6 | Index: Python-2.6.1/setup.py | 8 | Index: Python-2.7.9/setup.py |
7 | =================================================================== | 9 | =================================================================== |
8 | --- Python-2.6.1.orig/setup.py | 10 | --- Python-2.7.9.orig/setup.py |
9 | +++ Python-2.6.1/setup.py | 11 | +++ Python-2.7.9/setup.py |
10 | @@ -1656,16 +1656,16 @@ class PyBuildExt(build_ext): | 12 | @@ -2028,12 +2028,12 @@ class PyBuildExt(build_ext): |
11 | ffi_configfile): | ||
12 | from distutils.dir_util import mkpath | ||
13 | mkpath(ffi_builddir) | ||
14 | - config_args = [] | ||
15 | + config_args = ['--host=%s' % os.environ["HOST_SYS"], ] | ||
16 | 13 | ||
17 | # Pass empty CFLAGS because we'll just append the resulting | 14 | # Pass empty CFLAGS because we'll just append the resulting |
18 | # CFLAGS to Python's; -g or -O2 is to be avoided. | 15 | # CFLAGS to Python's; -g or -O2 is to be avoided. |
19 | - cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ | 16 | - cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ |
20 | - % (ffi_builddir, ffi_srcdir, " ".join(config_args)) | 17 | - % (ffi_builddir, ffi_srcdir, " ".join(config_args)) |
21 | + cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ | 18 | + cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ |
22 | + % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) | 19 | + % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) |
23 | 20 | ||
24 | res = os.system(cmd) | 21 | res = os.system(cmd) |
25 | if res or not os.path.exists(ffi_configfile): | 22 | if res or not os.path.exists(ffi_configfile): |
diff --git a/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch b/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch index f8ab0e71e9..e452cb6ac4 100644 --- a/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch +++ b/meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch | |||
@@ -13,18 +13,20 @@ Nitin A Kamble <nitin.a.kamble@intel.com> | |||
13 | Rebased for python 2.7.2 | 13 | Rebased for python 2.7.2 |
14 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | 14 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> |
15 | 15 | ||
16 | Index: Python-2.7.2/setup.py | 16 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> |
17 | =================================================================== | 17 | |
18 | --- Python-2.7.2.orig/setup.py | 18 | diff --git a/setup.py b/setup.py |
19 | +++ Python-2.7.2/setup.py | 19 | index 67eda74..59c537e 100644 |
20 | @@ -680,12 +680,10 @@ class PyBuildExt(build_ext): | 20 | --- a/setup.py |
21 | +++ b/setup.py | ||
22 | @@ -761,12 +761,10 @@ class PyBuildExt(build_ext): | ||
21 | pass # Issue 7384: Already linked against curses or tinfo. | 23 | pass # Issue 7384: Already linked against curses or tinfo. |
22 | elif curses_library: | 24 | elif curses_library: |
23 | readline_libs.append(curses_library) | 25 | readline_libs.append(curses_library) |
24 | - elif self.compiler.find_library_file(lib_dirs + | 26 | - elif self.compiler.find_library_file(lib_dirs + |
25 | - ['/usr/lib/termcap'], | 27 | - ['/usr/lib/termcap'], |
26 | + elif self.compiler.find_library_file(lib_dirs, | 28 | + elif self.compiler.find_library_file(lib_dirs, |
27 | 'termcap'): | 29 | 'termcap'): |
28 | readline_libs.append('termcap') | 30 | readline_libs.append('termcap') |
29 | exts.append( Extension('readline', ['readline.c'], | 31 | exts.append( Extension('readline', ['readline.c'], |
30 | - library_dirs=['/usr/lib/termcap'], | 32 | - library_dirs=['/usr/lib/termcap'], |
diff --git a/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch b/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch deleted file mode 100644 index abd63d2a96..0000000000 --- a/meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | This fixes configure issues with recent autoconf, e.g: | ||
2 | autoreconf: Entering directory `Modules/_ctypes/libffi' | ||
3 | autoreconf: configure.ac: not using Gettext | ||
4 | autoreconf: running: aclocal --force | ||
5 | configure.ac:26: error: m4_copy: won't overwrite defined macro: _AC_ARG_VAR_PRECIOUS | ||
6 | configure.ac:26: the top level | ||
7 | |||
8 | The problem is still present in python-2.6.5 but fixed in python-svn. | ||
9 | |||
10 | Upstream-Status: Accepted [python-svn] | ||
11 | |||
12 | Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> | ||
13 | Acked-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
14 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
15 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
16 | |||
17 | |||
18 | 2011/09/29 | ||
19 | Rebased for python 2.7.2 | ||
20 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
21 | |||
22 | |||
23 | Index: Python-2.7.2/Modules/_ctypes/libffi/Makefile.am | ||
24 | =================================================================== | ||
25 | --- Python-2.7.2.orig/Modules/_ctypes/libffi/Makefile.am | ||
26 | +++ Python-2.7.2/Modules/_ctypes/libffi/Makefile.am | ||
27 | @@ -2,7 +2,7 @@ | ||
28 | |||
29 | AUTOMAKE_OPTIONS = foreign subdir-objects | ||
30 | |||
31 | -SUBDIRS = include testsuite man | ||
32 | +SUBDIRS = include | ||
33 | |||
34 | EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \ | ||
35 | src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \ | ||
36 | @@ -34,8 +34,6 @@ EXTRA_DIST = LICENSE ChangeLog.v1 Change | ||
37 | libtool-version ChangeLog.libffi m4/libtool.m4 \ | ||
38 | m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 | ||
39 | |||
40 | -info_TEXINFOS = doc/libffi.texi | ||
41 | - | ||
42 | ## ################################################################ | ||
43 | |||
44 | ## | ||
diff --git a/meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch b/meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch deleted file mode 100644 index 0d17463052..0000000000 --- a/meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch +++ /dev/null | |||
@@ -1,251 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
4 | |||
5 | diff -r 9ddc63c039ba Lib/test/nullbytecert.pem | ||
6 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | ||
7 | +++ b/Lib/test/nullbytecert.pem Sun Aug 11 18:13:17 2013 +0200 | ||
8 | @@ -0,0 +1,90 @@ | ||
9 | +Certificate: | ||
10 | + Data: | ||
11 | + Version: 3 (0x2) | ||
12 | + Serial Number: 0 (0x0) | ||
13 | + Signature Algorithm: sha1WithRSAEncryption | ||
14 | + Issuer: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org | ||
15 | + Validity | ||
16 | + Not Before: Aug 7 13:11:52 2013 GMT | ||
17 | + Not After : Aug 7 13:12:52 2013 GMT | ||
18 | + Subject: C=US, ST=Oregon, L=Beaverton, O=Python Software Foundation, OU=Python Core Development, CN=null.python.org\x00example.org/emailAddress=python-dev@python.org | ||
19 | + Subject Public Key Info: | ||
20 | + Public Key Algorithm: rsaEncryption | ||
21 | + Public-Key: (2048 bit) | ||
22 | + Modulus: | ||
23 | + 00:b5:ea:ed:c9:fb:46:7d:6f:3b:76:80:dd:3a:f3: | ||
24 | + 03:94:0b:a7:a6:db:ec:1d:df:ff:23:74:08:9d:97: | ||
25 | + 16:3f:a3:a4:7b:3e:1b:0e:96:59:25:03:a7:26:e2: | ||
26 | + 88:a9:cf:79:cd:f7:04:56:b0:ab:79:32:6e:59:c1: | ||
27 | + 32:30:54:eb:58:a8:cb:91:f0:42:a5:64:27:cb:d4: | ||
28 | + 56:31:88:52:ad:cf:bd:7f:f0:06:64:1f:cc:27:b8: | ||
29 | + a3:8b:8c:f3:d8:29:1f:25:0b:f5:46:06:1b:ca:02: | ||
30 | + 45:ad:7b:76:0a:9c:bf:bb:b9:ae:0d:16:ab:60:75: | ||
31 | + ae:06:3e:9c:7c:31:dc:92:2f:29:1a:e0:4b:0c:91: | ||
32 | + 90:6c:e9:37:c5:90:d7:2a:d7:97:15:a3:80:8f:5d: | ||
33 | + 7b:49:8f:54:30:d4:97:2c:1c:5b:37:b5:ab:69:30: | ||
34 | + 68:43:d3:33:78:4b:02:60:f5:3c:44:80:a1:8f:e7: | ||
35 | + f0:0f:d1:5e:87:9e:46:cf:62:fc:f9:bf:0c:65:12: | ||
36 | + f1:93:c8:35:79:3f:c8:ec:ec:47:f5:ef:be:44:d5: | ||
37 | + ae:82:1e:2d:9a:9f:98:5a:67:65:e1:74:70:7c:cb: | ||
38 | + d3:c2:ce:0e:45:49:27:dc:e3:2d:d4:fb:48:0e:2f: | ||
39 | + 9e:77:b8:14:46:c0:c4:36:ca:02:ae:6a:91:8c:da: | ||
40 | + 2f:85 | ||
41 | + Exponent: 65537 (0x10001) | ||
42 | + X509v3 extensions: | ||
43 | + X509v3 Basic Constraints: critical | ||
44 | + CA:FALSE | ||
45 | + X509v3 Subject Key Identifier: | ||
46 | + 88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C | ||
47 | + X509v3 Key Usage: | ||
48 | + Digital Signature, Non Repudiation, Key Encipherment | ||
49 | + X509v3 Subject Alternative Name: | ||
50 | + ************************************************************* | ||
51 | + WARNING: The values for DNS, email and URI are WRONG. OpenSSL | ||
52 | + doesn't print the text after a NULL byte. | ||
53 | + ************************************************************* | ||
54 | + DNS:altnull.python.org, email:null@python.org, URI:http://null.python.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1 | ||
55 | + Signature Algorithm: sha1WithRSAEncryption | ||
56 | + ac:4f:45:ef:7d:49:a8:21:70:8e:88:59:3e:d4:36:42:70:f5: | ||
57 | + a3:bd:8b:d7:a8:d0:58:f6:31:4a:b1:a4:a6:dd:6f:d9:e8:44: | ||
58 | + 3c:b6:0a:71:d6:7f:b1:08:61:9d:60:ce:75:cf:77:0c:d2:37: | ||
59 | + 86:02:8d:5e:5d:f9:0f:71:b4:16:a8:c1:3d:23:1c:f1:11:b3: | ||
60 | + 56:6e:ca:d0:8d:34:94:e6:87:2a:99:f2:ae:ae:cc:c2:e8:86: | ||
61 | + de:08:a8:7f:c5:05:fa:6f:81:a7:82:e6:d0:53:9d:34:f4:ac: | ||
62 | + 3e:40:fe:89:57:7a:29:a4:91:7e:0b:c6:51:31:e5:10:2f:a4: | ||
63 | + 60:76:cd:95:51:1a:be:8b:a1:b0:fd:ad:52:bd:d7:1b:87:60: | ||
64 | + d2:31:c7:17:c4:18:4f:2d:08:25:a3:a7:4f:b7:92:ca:e2:f5: | ||
65 | + 25:f1:54:75:81:9d:b3:3d:61:a2:f7:da:ed:e1:c6:6f:2c:60: | ||
66 | + 1f:d8:6f:c5:92:05:ab:c9:09:62:49:a9:14:ad:55:11:cc:d6: | ||
67 | + 4a:19:94:99:97:37:1d:81:5f:8b:cf:a3:a8:96:44:51:08:3d: | ||
68 | + 0b:05:65:12:eb:b6:70:80:88:48:72:4f:c6:c2:da:cf:cd:8e: | ||
69 | + 5b:ba:97:2f:60:b4:96:56:49:5e:3a:43:76:63:04:be:2a:f6: | ||
70 | + c1:ca:a9:94 | ||
71 | +-----BEGIN CERTIFICATE----- | ||
72 | +MIIE2DCCA8CgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBxTELMAkGA1UEBhMCVVMx | ||
73 | +DzANBgNVBAgMBk9yZWdvbjESMBAGA1UEBwwJQmVhdmVydG9uMSMwIQYDVQQKDBpQ | ||
74 | +eXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEgMB4GA1UECwwXUHl0aG9uIENvcmUg | ||
75 | +RGV2ZWxvcG1lbnQxJDAiBgNVBAMMG251bGwucHl0aG9uLm9yZwBleGFtcGxlLm9y | ||
76 | +ZzEkMCIGCSqGSIb3DQEJARYVcHl0aG9uLWRldkBweXRob24ub3JnMB4XDTEzMDgw | ||
77 | +NzEzMTE1MloXDTEzMDgwNzEzMTI1MlowgcUxCzAJBgNVBAYTAlVTMQ8wDQYDVQQI | ||
78 | +DAZPcmVnb24xEjAQBgNVBAcMCUJlYXZlcnRvbjEjMCEGA1UECgwaUHl0aG9uIFNv | ||
79 | +ZnR3YXJlIEZvdW5kYXRpb24xIDAeBgNVBAsMF1B5dGhvbiBDb3JlIERldmVsb3Bt | ||
80 | +ZW50MSQwIgYDVQQDDBtudWxsLnB5dGhvbi5vcmcAZXhhbXBsZS5vcmcxJDAiBgkq | ||
81 | +hkiG9w0BCQEWFXB5dGhvbi1kZXZAcHl0aG9uLm9yZzCCASIwDQYJKoZIhvcNAQEB | ||
82 | +BQADggEPADCCAQoCggEBALXq7cn7Rn1vO3aA3TrzA5QLp6bb7B3f/yN0CJ2XFj+j | ||
83 | +pHs+Gw6WWSUDpybiiKnPec33BFawq3kyblnBMjBU61ioy5HwQqVkJ8vUVjGIUq3P | ||
84 | +vX/wBmQfzCe4o4uM89gpHyUL9UYGG8oCRa17dgqcv7u5rg0Wq2B1rgY+nHwx3JIv | ||
85 | +KRrgSwyRkGzpN8WQ1yrXlxWjgI9de0mPVDDUlywcWze1q2kwaEPTM3hLAmD1PESA | ||
86 | +oY/n8A/RXoeeRs9i/Pm/DGUS8ZPINXk/yOzsR/XvvkTVroIeLZqfmFpnZeF0cHzL | ||
87 | +08LODkVJJ9zjLdT7SA4vnne4FEbAxDbKAq5qkYzaL4UCAwEAAaOB0DCBzTAMBgNV | ||
88 | +HRMBAf8EAjAAMB0GA1UdDgQWBBSIWlXAUv9hzVKjNQ/qWpwkOCL3XDALBgNVHQ8E | ||
89 | +BAMCBeAwgZAGA1UdEQSBiDCBhYIeYWx0bnVsbC5weXRob24ub3JnAGV4YW1wbGUu | ||
90 | +Y29tgSBudWxsQHB5dGhvbi5vcmcAdXNlckBleGFtcGxlLm9yZ4YpaHR0cDovL251 | ||
91 | +bGwucHl0aG9uLm9yZwBodHRwOi8vZXhhbXBsZS5vcmeHBMAAAgGHECABDbgAAAAA | ||
92 | +AAAAAAAAAAEwDQYJKoZIhvcNAQEFBQADggEBAKxPRe99SaghcI6IWT7UNkJw9aO9 | ||
93 | +i9eo0Fj2MUqxpKbdb9noRDy2CnHWf7EIYZ1gznXPdwzSN4YCjV5d+Q9xtBaowT0j | ||
94 | +HPERs1ZuytCNNJTmhyqZ8q6uzMLoht4IqH/FBfpvgaeC5tBTnTT0rD5A/olXeimk | ||
95 | +kX4LxlEx5RAvpGB2zZVRGr6LobD9rVK91xuHYNIxxxfEGE8tCCWjp0+3ksri9SXx | ||
96 | +VHWBnbM9YaL32u3hxm8sYB/Yb8WSBavJCWJJqRStVRHM1koZlJmXNx2BX4vPo6iW | ||
97 | +RFEIPQsFZRLrtnCAiEhyT8bC2s/Njlu6ly9gtJZWSV46Q3ZjBL4q9sHKqZQ= | ||
98 | +-----END CERTIFICATE----- | ||
99 | diff -r 9ddc63c039ba Lib/test/test_ssl.py | ||
100 | --- a/Lib/test/test_ssl.py Sun Aug 11 13:04:50 2013 +0300 | ||
101 | +++ b/Lib/test/test_ssl.py Sun Aug 11 18:13:17 2013 +0200 | ||
102 | @@ -25,6 +25,7 @@ | ||
103 | HOST = test_support.HOST | ||
104 | CERTFILE = None | ||
105 | SVN_PYTHON_ORG_ROOT_CERT = None | ||
106 | +NULLBYTECERT = None | ||
107 | |||
108 | def handle_error(prefix): | ||
109 | exc_format = ' '.join(traceback.format_exception(*sys.exc_info())) | ||
110 | @@ -123,6 +124,27 @@ | ||
111 | ('DNS', 'projects.forum.nokia.com')) | ||
112 | ) | ||
113 | |||
114 | + def test_parse_cert_CVE_2013_4073(self): | ||
115 | + p = ssl._ssl._test_decode_cert(NULLBYTECERT) | ||
116 | + if test_support.verbose: | ||
117 | + sys.stdout.write("\n" + pprint.pformat(p) + "\n") | ||
118 | + subject = ((('countryName', 'US'),), | ||
119 | + (('stateOrProvinceName', 'Oregon'),), | ||
120 | + (('localityName', 'Beaverton'),), | ||
121 | + (('organizationName', 'Python Software Foundation'),), | ||
122 | + (('organizationalUnitName', 'Python Core Development'),), | ||
123 | + (('commonName', 'null.python.org\x00example.org'),), | ||
124 | + (('emailAddress', 'python-dev@python.org'),)) | ||
125 | + self.assertEqual(p['subject'], subject) | ||
126 | + self.assertEqual(p['issuer'], subject) | ||
127 | + self.assertEqual(p['subjectAltName'], | ||
128 | + (('DNS', 'altnull.python.org\x00example.com'), | ||
129 | + ('email', 'null@python.org\x00user@example.org'), | ||
130 | + ('URI', 'http://null.python.org\x00http://example.org'), | ||
131 | + ('IP Address', '192.0.2.1'), | ||
132 | + ('IP Address', '2001:DB8:0:0:0:0:0:1\n')) | ||
133 | + ) | ||
134 | + | ||
135 | def test_DER_to_PEM(self): | ||
136 | with open(SVN_PYTHON_ORG_ROOT_CERT, 'r') as f: | ||
137 | pem = f.read() | ||
138 | @@ -1360,7 +1382,7 @@ | ||
139 | |||
140 | |||
141 | def test_main(verbose=False): | ||
142 | - global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT | ||
143 | + global CERTFILE, SVN_PYTHON_ORG_ROOT_CERT, NOKIACERT, NULLBYTECERT | ||
144 | CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir, | ||
145 | "keycert.pem") | ||
146 | SVN_PYTHON_ORG_ROOT_CERT = os.path.join( | ||
147 | @@ -1368,10 +1390,13 @@ | ||
148 | "https_svn_python_org_root.pem") | ||
149 | NOKIACERT = os.path.join(os.path.dirname(__file__) or os.curdir, | ||
150 | "nokia.pem") | ||
151 | + NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir, | ||
152 | + "nullbytecert.pem") | ||
153 | |||
154 | if (not os.path.exists(CERTFILE) or | ||
155 | not os.path.exists(SVN_PYTHON_ORG_ROOT_CERT) or | ||
156 | - not os.path.exists(NOKIACERT)): | ||
157 | + not os.path.exists(NOKIACERT) or | ||
158 | + not os.path.exists(NULLBYTECERT)): | ||
159 | raise test_support.TestFailed("Can't read certificate files!") | ||
160 | |||
161 | tests = [BasicTests, BasicSocketTests] | ||
162 | diff -r 9ddc63c039ba Modules/_ssl.c | ||
163 | --- a/Modules/_ssl.c Sun Aug 11 13:04:50 2013 +0300 | ||
164 | +++ b/Modules/_ssl.c Sun Aug 11 18:13:17 2013 +0200 | ||
165 | @@ -741,8 +741,13 @@ | ||
166 | |||
167 | /* get a rendering of each name in the set of names */ | ||
168 | |||
169 | + int gntype; | ||
170 | + ASN1_STRING *as = NULL; | ||
171 | + | ||
172 | name = sk_GENERAL_NAME_value(names, j); | ||
173 | - if (name->type == GEN_DIRNAME) { | ||
174 | + gntype = name-> type; | ||
175 | + switch (gntype) { | ||
176 | + case GEN_DIRNAME: | ||
177 | |||
178 | /* we special-case DirName as a tuple of tuples of attributes */ | ||
179 | |||
180 | @@ -764,11 +769,61 @@ | ||
181 | goto fail; | ||
182 | } | ||
183 | PyTuple_SET_ITEM(t, 1, v); | ||
184 | + break; | ||
185 | |||
186 | - } else { | ||
187 | + case GEN_EMAIL: | ||
188 | + case GEN_DNS: | ||
189 | + case GEN_URI: | ||
190 | + /* GENERAL_NAME_print() doesn't handle NUL bytes in ASN1_string | ||
191 | + correctly. */ | ||
192 | + t = PyTuple_New(2); | ||
193 | + if (t == NULL) | ||
194 | + goto fail; | ||
195 | + switch (gntype) { | ||
196 | + case GEN_EMAIL: | ||
197 | + v = PyUnicode_FromString("email"); | ||
198 | + as = name->d.rfc822Name; | ||
199 | + break; | ||
200 | + case GEN_DNS: | ||
201 | + v = PyUnicode_FromString("DNS"); | ||
202 | + as = name->d.dNSName; | ||
203 | + break; | ||
204 | + case GEN_URI: | ||
205 | + v = PyUnicode_FromString("URI"); | ||
206 | + as = name->d.uniformResourceIdentifier; | ||
207 | + break; | ||
208 | + } | ||
209 | + if (v == NULL) { | ||
210 | + Py_DECREF(t); | ||
211 | + goto fail; | ||
212 | + } | ||
213 | + PyTuple_SET_ITEM(t, 0, v); | ||
214 | + v = PyString_FromStringAndSize((char *)ASN1_STRING_data(as), | ||
215 | + ASN1_STRING_length(as)); | ||
216 | + if (v == NULL) { | ||
217 | + Py_DECREF(t); | ||
218 | + goto fail; | ||
219 | + } | ||
220 | + PyTuple_SET_ITEM(t, 1, v); | ||
221 | + break; | ||
222 | |||
223 | + default: | ||
224 | /* for everything else, we use the OpenSSL print form */ | ||
225 | - | ||
226 | + switch (gntype) { | ||
227 | + /* check for new general name type */ | ||
228 | + case GEN_OTHERNAME: | ||
229 | + case GEN_X400: | ||
230 | + case GEN_EDIPARTY: | ||
231 | + case GEN_IPADD: | ||
232 | + case GEN_RID: | ||
233 | + break; | ||
234 | + default: | ||
235 | + if (PyErr_Warn(PyExc_RuntimeWarning, | ||
236 | + "Unknown general name type") == -1) { | ||
237 | + goto fail; | ||
238 | + } | ||
239 | + break; | ||
240 | + } | ||
241 | (void) BIO_reset(biobuf); | ||
242 | GENERAL_NAME_print(biobuf, name); | ||
243 | len = BIO_gets(biobuf, buf, sizeof(buf)-1); | ||
244 | @@ -794,6 +849,7 @@ | ||
245 | goto fail; | ||
246 | } | ||
247 | PyTuple_SET_ITEM(t, 1, v); | ||
248 | + break; | ||
249 | } | ||
250 | |||
251 | /* and add that rendering to the list */ | ||
diff --git a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch index bedc3909d8..208c57c822 100644 --- a/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch +++ b/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch | |||
@@ -2,22 +2,17 @@ _tkinter module needs tk module along with tcl. tk is not yet integrated | |||
2 | in yocto so we skip the check for this module. | 2 | in yocto so we skip the check for this module. |
3 | Avoid a warning by not adding this module to missing variable. | 3 | Avoid a warning by not adding this module to missing variable. |
4 | 4 | ||
5 | Also simply disable the tk module since its not in DEPENDS. | ||
6 | |||
7 | Upstream-Status: Inappropriate [distribution] | 5 | Upstream-Status: Inappropriate [distribution] |
8 | 6 | ||
9 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> | 7 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> |
10 | 8 | ||
11 | Index: Python-2.7.3/setup.py | 9 | Index: Python-2.7.2/setup.py |
12 | =================================================================== | 10 | =================================================================== |
13 | --- Python-2.7.3.orig/setup.py 2014-07-07 13:45:15.056233820 +0000 | 11 | --- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300 |
14 | +++ Python-2.7.3/setup.py 2014-07-16 16:06:37.145656284 +0000 | 12 | +++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300 |
15 | @@ -1639,10 +1639,12 @@ | 13 | @@ -1634,8 +1634,10 @@ |
16 | self.extensions.extend(exts) | ||
17 | |||
18 | # Call the method for detecting whether _tkinter can be compiled | 14 | # Call the method for detecting whether _tkinter can be compiled |
19 | - self.detect_tkinter(inc_dirs, lib_dirs) | 15 | self.detect_tkinter(inc_dirs, lib_dirs) |
20 | + #self.detect_tkinter(inc_dirs, lib_dirs) | ||
21 | 16 | ||
22 | - if '_tkinter' not in [e.name for e in self.extensions]: | 17 | - if '_tkinter' not in [e.name for e in self.extensions]: |
23 | - missing.append('_tkinter') | 18 | - missing.append('_tkinter') |
diff --git a/meta/recipes-devtools/python/python/builddir.patch b/meta/recipes-devtools/python/python/builddir.patch index 930170b95a..ad629a022e 100644 --- a/meta/recipes-devtools/python/python/builddir.patch +++ b/meta/recipes-devtools/python/python/builddir.patch | |||
@@ -7,11 +7,11 @@ python recipe. | |||
7 | Upstream-Status: Inappropriate | 7 | Upstream-Status: Inappropriate |
8 | RP 2012/11/13 | 8 | RP 2012/11/13 |
9 | 9 | ||
10 | Index: Python-2.7.3/Lib/sysconfig.py | 10 | Index: Python-2.7.9/Lib/sysconfig.py |
11 | =================================================================== | 11 | =================================================================== |
12 | --- Python-2.7.3.orig/Lib/sysconfig.py 2012-11-13 14:36:08.429167199 +0000 | 12 | --- Python-2.7.9.orig/Lib/sysconfig.py |
13 | +++ Python-2.7.3/Lib/sysconfig.py 2012-11-13 21:58:31.788551800 +0000 | 13 | +++ Python-2.7.9/Lib/sysconfig.py |
14 | @@ -93,6 +93,7 @@ | 14 | @@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix) |
15 | _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) | 15 | _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) |
16 | _CONFIG_VARS = None | 16 | _CONFIG_VARS = None |
17 | _USER_BASE = None | 17 | _USER_BASE = None |
@@ -19,7 +19,7 @@ Index: Python-2.7.3/Lib/sysconfig.py | |||
19 | 19 | ||
20 | def _safe_realpath(path): | 20 | def _safe_realpath(path): |
21 | try: | 21 | try: |
22 | @@ -100,7 +102,9 @@ | 22 | @@ -100,7 +101,9 @@ def _safe_realpath(path): |
23 | except OSError: | 23 | except OSError: |
24 | return path | 24 | return path |
25 | 25 | ||
@@ -30,11 +30,11 @@ Index: Python-2.7.3/Lib/sysconfig.py | |||
30 | _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable)) | 30 | _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable)) |
31 | else: | 31 | else: |
32 | # sys.executable can be empty if argv[0] has been changed and Python is | 32 | # sys.executable can be empty if argv[0] has been changed and Python is |
33 | Index: Python-2.7.3/Lib/distutils/sysconfig.py | 33 | Index: Python-2.7.9/Lib/distutils/sysconfig.py |
34 | =================================================================== | 34 | =================================================================== |
35 | --- Python-2.7.3.orig/Lib/distutils/sysconfig.py 2012-11-13 14:36:08.005167209 +0000 | 35 | --- Python-2.7.9.orig/Lib/distutils/sysconfig.py |
36 | +++ Python-2.7.3/Lib/distutils/sysconfig.py 2012-11-13 22:07:05.644540695 +0000 | 36 | +++ Python-2.7.9/Lib/distutils/sysconfig.py |
37 | @@ -26,6 +26,9 @@ | 37 | @@ -26,6 +26,9 @@ EXEC_PREFIX = os.path.normpath(sys.exec_ |
38 | # live in project/PCBuild9. If we're dealing with an x64 Windows build, | 38 | # live in project/PCBuild9. If we're dealing with an x64 Windows build, |
39 | # it'll live in project/PCbuild/amd64. | 39 | # it'll live in project/PCbuild/amd64. |
40 | project_base = os.path.dirname(os.path.abspath(sys.executable)) | 40 | project_base = os.path.dirname(os.path.abspath(sys.executable)) |
@@ -44,12 +44,3 @@ Index: Python-2.7.3/Lib/distutils/sysconfig.py | |||
44 | if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): | 44 | if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): |
45 | project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) | 45 | project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) |
46 | # PC/VS7.1 | 46 | # PC/VS7.1 |
47 | @@ -247,7 +250,7 @@ | ||
48 | def get_makefile_filename(): | ||
49 | """Return full pathname of installed Makefile from the Python build.""" | ||
50 | if python_build: | ||
51 | - return os.path.join(os.path.dirname(sys.executable), "Makefile") | ||
52 | + return os.path.join(project_base, "Makefile") | ||
53 | lib_dir = get_python_lib(plat_specific=1, standard_lib=1) | ||
54 | return os.path.join(lib_dir, "config", "Makefile") | ||
55 | |||
diff --git a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch index 50d3915425..e4262d9ef0 100644 --- a/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch +++ b/meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch | |||
@@ -11,72 +11,67 @@ Updated for python 2.7.3 | |||
11 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | 11 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> |
12 | Date: 2012/05/01 | 12 | Date: 2012/05/01 |
13 | 13 | ||
14 | Index: Python-2.7.3/Lib/sysconfig.py | 14 | Rebased for python-2.7.9 |
15 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
16 | |||
17 | |||
18 | Index: Python-2.7.9/Lib/sysconfig.py | ||
15 | =================================================================== | 19 | =================================================================== |
16 | --- Python-2.7.3.orig/Lib/sysconfig.py | 20 | --- Python-2.7.9.orig/Lib/sysconfig.py |
17 | +++ Python-2.7.3/Lib/sysconfig.py | 21 | +++ Python-2.7.9/Lib/sysconfig.py |
18 | @@ -7,10 +7,10 @@ from os.path import pardir, realpath | 22 | @@ -9,7 +9,7 @@ _INSTALL_SCHEMES = { |
19 | |||
20 | _INSTALL_SCHEMES = { | ||
21 | 'posix_prefix': { | 23 | 'posix_prefix': { |
22 | - 'stdlib': '{base}/lib/python{py_version_short}', | 24 | 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', |
23 | - 'platstdlib': '{platbase}/lib/python{py_version_short}', | 25 | 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', |
24 | - 'purelib': '{base}/lib/python{py_version_short}/site-packages', | 26 | - 'purelib': '{base}/lib/python{py_version_short}/site-packages', |
25 | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', | ||
26 | + 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', | ||
27 | + 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', | ||
28 | + 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages', | 27 | + 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages', |
29 | + 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', | 28 | 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', |
30 | 'include': '{base}/include/python{py_version_short}', | 29 | 'include': '{base}/include/python{py_version_short}', |
31 | 'platinclude': '{platbase}/include/python{py_version_short}', | 30 | 'platinclude': '{platbase}/include/python{py_version_short}', |
32 | 'scripts': '{base}/bin', | 31 | @@ -67,7 +67,7 @@ _INSTALL_SCHEMES = { |
33 | @@ -65,10 +65,10 @@ _INSTALL_SCHEMES = { | ||
34 | 'data' : '{userbase}', | ||
35 | }, | ||
36 | 'posix_user': { | 32 | 'posix_user': { |
37 | - 'stdlib': '{userbase}/lib/python{py_version_short}', | 33 | 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', |
38 | - 'platstdlib': '{userbase}/lib/python{py_version_short}', | 34 | 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', |
39 | - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', | 35 | - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', |
40 | - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
41 | + 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
42 | + 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
43 | + 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', | 36 | + 'purelib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', |
44 | + 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', | 37 | 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', |
45 | 'include': '{userbase}/include/python{py_version_short}', | 38 | 'include': '{userbase}/include/python{py_version_short}', |
46 | 'scripts': '{userbase}/bin', | 39 | 'scripts': '{userbase}/bin', |
47 | 'data' : '{userbase}', | 40 | Index: Python-2.7.9/Makefile.pre.in |
48 | Index: Python-2.7.3/Makefile.pre.in | ||
49 | =================================================================== | 41 | =================================================================== |
50 | --- Python-2.7.3.orig/Makefile.pre.in | 42 | --- Python-2.7.9.orig/Makefile.pre.in |
51 | +++ Python-2.7.3/Makefile.pre.in | 43 | +++ Python-2.7.9/Makefile.pre.in |
52 | @@ -941,25 +941,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL | 44 | @@ -1046,27 +1046,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL |
53 | $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ | 45 | $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ |
54 | $(DESTDIR)$(LIBDEST)/distutils/tests ; \ | 46 | $(DESTDIR)$(LIBDEST)/distutils/tests ; \ |
55 | fi | 47 | fi |
56 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 48 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
57 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 49 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
58 | $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | 50 | $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
59 | -d $(LIBDEST) -f \ | 51 | -d $(LIBDEST) -f \ |
60 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | 52 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
61 | $(DESTDIR)$(LIBDEST) | 53 | $(DESTDIR)$(LIBDEST) |
62 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 54 | - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
63 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 55 | + PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH}$(RUNSHARED) \ |
64 | $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 56 | $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
65 | -d $(LIBDEST) -f \ | 57 | -d $(LIBDEST) -f \ |
66 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ | 58 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
67 | $(DESTDIR)$(LIBDEST) | 59 | $(DESTDIR)$(LIBDEST) |
68 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 60 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
69 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 61 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
70 | $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | 62 | $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
71 | -d $(LIBDEST)/site-packages -f \ | 63 | -d $(LIBDEST)/site-packages -f \ |
72 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | 64 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
73 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 65 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
74 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 66 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
75 | $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 67 | $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
76 | -d $(LIBDEST)/site-packages -f \ | 68 | -d $(LIBDEST)/site-packages -f \ |
77 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages | 69 | -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages |
78 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 70 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
79 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | 71 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ |
80 | $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" | 72 | $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt |
73 | - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | ||
74 | + -PYTHONPATH=$(DESTDIR)$(LIBDEST):${CROSSPYTHONPATH} $(RUNSHARED) \ | ||
75 | $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt | ||
81 | 76 | ||
82 | # Create the PLATDIR source directory, if one wasn't distributed.. | 77 | # Create the PLATDIR source directory, if one wasn't distributed.. |
diff --git a/meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch b/meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch deleted file mode 100644 index b5d9d5d424..0000000000 --- a/meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | backport bug 17547 from http://hg.python.org/cpython/rev/9d50af4c482f/ | ||
2 | |||
3 | -Wformat is needed by gcc 4.8 | ||
4 | |||
5 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
6 | |||
7 | Upstream-Status: Backport | ||
8 | Index: Python-2.7.3/configure.in | ||
9 | =================================================================== | ||
10 | --- Python-2.7.3.orig/configure.in 2013-06-11 02:22:04.186529212 -0700 | ||
11 | +++ Python-2.7.3/configure.in 2013-06-13 02:17:06.324403327 -0700 | ||
12 | @@ -1196,7 +1196,7 @@ | ||
13 | then | ||
14 | AC_MSG_CHECKING(whether gcc supports ParseTuple __format__) | ||
15 | save_CFLAGS=$CFLAGS | ||
16 | - CFLAGS="$CFLAGS -Werror" | ||
17 | + CFLAGS="$CFLAGS -Werror -Wformat" | ||
18 | AC_COMPILE_IFELSE([ | ||
19 | AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]]) | ||
20 | ],[ | ||
diff --git a/meta/recipes-devtools/python/python/host_include_contamination.patch b/meta/recipes-devtools/python/python/host_include_contamination.patch index 62cb8b16da..e0aafb218b 100644 --- a/meta/recipes-devtools/python/python/host_include_contamination.patch +++ b/meta/recipes-devtools/python/python/host_include_contamination.patch | |||
@@ -12,16 +12,17 @@ so we add a check here. | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | Upstream-Status: Pending | 13 | Upstream-Status: Pending |
14 | 14 | ||
15 | Index: Python-2.7.2/setup.py | 15 | |
16 | =================================================================== | 16 | diff --git a/setup.py b/setup.py |
17 | --- Python-2.7.2.orig/setup.py 2012-02-03 12:10:42.307057756 -0800 | 17 | index ba2d242..bf859be 100644 |
18 | +++ Python-2.7.2/setup.py 2012-02-03 12:11:12.363059210 -0800 | 18 | --- a/setup.py |
19 | @@ -360,6 +360,8 @@ | 19 | +++ b/setup.py |
20 | # https://wiki.ubuntu.com/MultiarchSpec | 20 | @@ -393,6 +393,8 @@ class PyBuildExt(build_ext): |
21 | |||
21 | if not find_executable('dpkg-architecture'): | 22 | if not find_executable('dpkg-architecture'): |
22 | return | 23 | return |
23 | + if os.environ.get('CROSS_COMPILE') is not None: | 24 | + if os.environ.get('CROSS_COMPILE') is not None: |
24 | + return | 25 | + return |
25 | tmpfile = os.path.join(self.build_temp, 'multiarch') | 26 | opt = '' |
26 | if not os.path.exists(self.build_temp): | 27 | if cross_compiling: |
27 | os.makedirs(self.build_temp) | 28 | opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE') |
diff --git a/meta/recipes-devtools/python/python/json-flaw-fix.patch b/meta/recipes-devtools/python/python/json-flaw-fix.patch deleted file mode 100644 index e9a6cca017..0000000000 --- a/meta/recipes-devtools/python/python/json-flaw-fix.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | |||
2 | python: fix _json module arbitrary process memory read vulnerability | ||
3 | |||
4 | Upstream-Status: submitted | ||
5 | |||
6 | Signed-off-by: Daniel BORNAZ <daniel.bornaz@enea.com> | ||
7 | |||
8 | --- a/Modules/_json.c 2014-07-15 15:37:17.151046356 +0200 | ||
9 | +++ b/Modules/_json.c 2014-07-15 15:38:37.335605042 +0200 | ||
10 | @@ -1491,7 +1491,7 @@ scan_once_str(PyScannerObject *s, PyObje | ||
11 | PyObject *res; | ||
12 | char *str = PyString_AS_STRING(pystr); | ||
13 | Py_ssize_t length = PyString_GET_SIZE(pystr); | ||
14 | - if (idx >= length) { | ||
15 | + if ( idx < 0 || idx >= length) { | ||
16 | PyErr_SetNone(PyExc_StopIteration); | ||
17 | return NULL; | ||
18 | } | ||
19 | @@ -1578,7 +1578,7 @@ scan_once_unicode(PyScannerObject *s, Py | ||
20 | PyObject *res; | ||
21 | Py_UNICODE *str = PyUnicode_AS_UNICODE(pystr); | ||
22 | Py_ssize_t length = PyUnicode_GET_SIZE(pystr); | ||
23 | - if (idx >= length) { | ||
24 | + if ( idx < 0 || idx >= length) { | ||
25 | PyErr_SetNone(PyExc_StopIteration); | ||
26 | return NULL; | ||
27 | } | ||
diff --git a/meta/recipes-devtools/python/python/multilib.patch b/meta/recipes-devtools/python/python/multilib.patch index df470f7c09..0bfa0d2cf4 100644 --- a/meta/recipes-devtools/python/python/multilib.patch +++ b/meta/recipes-devtools/python/python/multilib.patch | |||
@@ -1,26 +1,25 @@ | |||
1 | commit 248279e54467a8cd5cde98fc124d1d1384703513 | 1 | Rebased for python-2.7.9 |
2 | Author: Yu Ke <ke.yu@intel.com> | 2 | Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> |
3 | Date: Tue Jun 28 21:21:29 2011 +0800 | ||
4 | 3 | ||
5 | SUSE patch for the lib64 issue | 4 | Index: Python-2.7.9/configure.ac |
6 | |||
7 | see detail in http://bugs.python.org/issue1294959 | ||
8 | |||
9 | also rebased a bit for Yocto python 2.6.6 | ||
10 | |||
11 | Picked-by: Yu Ke <ke.yu@intel.com> | ||
12 | |||
13 | 2011/09/29 | ||
14 | Rebased for python 2.7.2 | ||
15 | |||
16 | Upstream-Status: Inappropriate [configuration] | ||
17 | |||
18 | Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
19 | |||
20 | Index: Python-2.7.2/Include/pythonrun.h | ||
21 | =================================================================== | 5 | =================================================================== |
22 | --- Python-2.7.2.orig/Include/pythonrun.h | 6 | --- Python-2.7.9.orig/configure.ac |
23 | +++ Python-2.7.2/Include/pythonrun.h | 7 | +++ Python-2.7.9/configure.ac |
8 | @@ -736,6 +736,10 @@ SunOS*) | ||
9 | ;; | ||
10 | esac | ||
11 | |||
12 | +AC_SUBST(LIB) | ||
13 | +AC_MSG_CHECKING(LIB) | ||
14 | +LIB=`basename ${libdir}` | ||
15 | +AC_MSG_RESULT($LIB) | ||
16 | |||
17 | AC_SUBST(LIBRARY) | ||
18 | AC_MSG_CHECKING(LIBRARY) | ||
19 | Index: Python-2.7.9/Include/pythonrun.h | ||
20 | =================================================================== | ||
21 | --- Python-2.7.9.orig/Include/pythonrun.h | ||
22 | +++ Python-2.7.9/Include/pythonrun.h | ||
24 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); | 23 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); |
25 | /* In their own files */ | 24 | /* In their own files */ |
26 | PyAPI_FUNC(const char *) Py_GetVersion(void); | 25 | PyAPI_FUNC(const char *) Py_GetVersion(void); |
@@ -29,10 +28,10 @@ Index: Python-2.7.2/Include/pythonrun.h | |||
29 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | 28 | PyAPI_FUNC(const char *) Py_GetCopyright(void); |
30 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | 29 | PyAPI_FUNC(const char *) Py_GetCompiler(void); |
31 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | 30 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); |
32 | Index: Python-2.7.2/Lib/distutils/command/install.py | 31 | Index: Python-2.7.9/Lib/distutils/command/install.py |
33 | =================================================================== | 32 | =================================================================== |
34 | --- Python-2.7.2.orig/Lib/distutils/command/install.py | 33 | --- Python-2.7.9.orig/Lib/distutils/command/install.py |
35 | +++ Python-2.7.2/Lib/distutils/command/install.py | 34 | +++ Python-2.7.9/Lib/distutils/command/install.py |
36 | @@ -22,6 +22,8 @@ from site import USER_BASE | 35 | @@ -22,6 +22,8 @@ from site import USER_BASE |
37 | from site import USER_SITE | 36 | from site import USER_SITE |
38 | 37 | ||
@@ -51,11 +50,11 @@ Index: Python-2.7.2/Lib/distutils/command/install.py | |||
51 | 'headers': '$base/include/python$py_version_short/$dist_name', | 50 | 'headers': '$base/include/python$py_version_short/$dist_name', |
52 | 'scripts': '$base/bin', | 51 | 'scripts': '$base/bin', |
53 | 'data' : '$base', | 52 | 'data' : '$base', |
54 | Index: Python-2.7.2/Lib/distutils/sysconfig.py | 53 | Index: Python-2.7.9/Lib/distutils/sysconfig.py |
55 | =================================================================== | 54 | =================================================================== |
56 | --- Python-2.7.2.orig/Lib/distutils/sysconfig.py | 55 | --- Python-2.7.9.orig/Lib/distutils/sysconfig.py |
57 | +++ Python-2.7.2/Lib/distutils/sysconfig.py | 56 | +++ Python-2.7.9/Lib/distutils/sysconfig.py |
58 | @@ -114,8 +114,11 @@ def get_python_lib(plat_specific=0, stan | 57 | @@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan |
59 | prefix = plat_specific and EXEC_PREFIX or PREFIX | 58 | prefix = plat_specific and EXEC_PREFIX or PREFIX |
60 | 59 | ||
61 | if os.name == "posix": | 60 | if os.name == "posix": |
@@ -69,11 +68,11 @@ Index: Python-2.7.2/Lib/distutils/sysconfig.py | |||
69 | if standard_lib: | 68 | if standard_lib: |
70 | return libpython | 69 | return libpython |
71 | else: | 70 | else: |
72 | Index: Python-2.7.2/Lib/pydoc.py | 71 | Index: Python-2.7.9/Lib/pydoc.py |
73 | =================================================================== | 72 | =================================================================== |
74 | --- Python-2.7.2.orig/Lib/pydoc.py | 73 | --- Python-2.7.9.orig/Lib/pydoc.py |
75 | +++ Python-2.7.2/Lib/pydoc.py | 74 | +++ Python-2.7.9/Lib/pydoc.py |
76 | @@ -352,7 +352,7 @@ class Doc: | 75 | @@ -383,7 +383,7 @@ class Doc: |
77 | 76 | ||
78 | docloc = os.environ.get("PYTHONDOCS", | 77 | docloc = os.environ.get("PYTHONDOCS", |
79 | "http://docs.python.org/library") | 78 | "http://docs.python.org/library") |
@@ -82,11 +81,11 @@ Index: Python-2.7.2/Lib/pydoc.py | |||
82 | "python"+sys.version[0:3]) | 81 | "python"+sys.version[0:3]) |
83 | if (isinstance(object, type(os)) and | 82 | if (isinstance(object, type(os)) and |
84 | (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', | 83 | (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', |
85 | Index: Python-2.7.2/Lib/site.py | 84 | Index: Python-2.7.9/Lib/site.py |
86 | =================================================================== | 85 | =================================================================== |
87 | --- Python-2.7.2.orig/Lib/site.py | 86 | --- Python-2.7.9.orig/Lib/site.py |
88 | +++ Python-2.7.2/Lib/site.py | 87 | +++ Python-2.7.9/Lib/site.py |
89 | @@ -300,13 +300,19 @@ def getsitepackages(): | 88 | @@ -288,13 +288,18 @@ def getsitepackages(): |
90 | if sys.platform in ('os2emx', 'riscos'): | 89 | if sys.platform in ('os2emx', 'riscos'): |
91 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) | 90 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) |
92 | elif os.sep == '/': | 91 | elif os.sep == '/': |
@@ -95,12 +94,11 @@ Index: Python-2.7.2/Lib/site.py | |||
95 | "python" + sys.version[:3], | 94 | "python" + sys.version[:3], |
96 | "site-packages")) | 95 | "site-packages")) |
97 | - sitepackages.append(os.path.join(prefix, "lib", "site-python")) | 96 | - sitepackages.append(os.path.join(prefix, "lib", "site-python")) |
98 | + if sys.lib != "lib": | ||
99 | + sitepackages.append(os.path.join(prefix, "lib", | ||
100 | + "python" + sys.version[:3], | ||
101 | + "site-packages")) | ||
102 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) | 97 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) |
103 | + if sys.lib != "lib": | 98 | + if sys.lib != "lib": |
99 | + sitepackages.append(os.path.join(prefix, "lib", | ||
100 | + "python" + sys.version[:3], | ||
101 | + "site-packages")) | ||
104 | + sitepackages.append(os.path.join(prefix, "lib", "site-python")) | 102 | + sitepackages.append(os.path.join(prefix, "lib", "site-python")) |
105 | else: | 103 | else: |
106 | sitepackages.append(prefix) | 104 | sitepackages.append(prefix) |
@@ -109,11 +107,43 @@ Index: Python-2.7.2/Lib/site.py | |||
109 | if sys.platform == "darwin": | 107 | if sys.platform == "darwin": |
110 | # for framework builds *only* we add the standard Apple | 108 | # for framework builds *only* we add the standard Apple |
111 | # locations. | 109 | # locations. |
112 | Index: Python-2.7.2/Lib/test/test_dl.py | 110 | Index: Python-2.7.9/Lib/sysconfig.py |
111 | =================================================================== | ||
112 | --- Python-2.7.9.orig/Lib/sysconfig.py | ||
113 | +++ Python-2.7.9/Lib/sysconfig.py | ||
114 | @@ -7,10 +7,10 @@ from os.path import pardir, realpath | ||
115 | |||
116 | _INSTALL_SCHEMES = { | ||
117 | 'posix_prefix': { | ||
118 | - 'stdlib': '{base}/lib/python{py_version_short}', | ||
119 | - 'platstdlib': '{platbase}/lib/python{py_version_short}', | ||
120 | + 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', | ||
121 | + 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', | ||
122 | 'purelib': '{base}/lib/python{py_version_short}/site-packages', | ||
123 | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', | ||
124 | + 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
125 | 'include': '{base}/include/python{py_version_short}', | ||
126 | 'platinclude': '{platbase}/include/python{py_version_short}', | ||
127 | 'scripts': '{base}/bin', | ||
128 | @@ -65,10 +65,10 @@ _INSTALL_SCHEMES = { | ||
129 | 'data' : '{userbase}', | ||
130 | }, | ||
131 | 'posix_user': { | ||
132 | - 'stdlib': '{userbase}/lib/python{py_version_short}', | ||
133 | - 'platstdlib': '{userbase}/lib/python{py_version_short}', | ||
134 | + 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
135 | + 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
136 | 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
137 | - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
138 | + 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
139 | 'include': '{userbase}/include/python{py_version_short}', | ||
140 | 'scripts': '{userbase}/bin', | ||
141 | 'data' : '{userbase}', | ||
142 | Index: Python-2.7.9/Lib/test/test_dl.py | ||
113 | =================================================================== | 143 | =================================================================== |
114 | --- Python-2.7.2.orig/Lib/test/test_dl.py | 144 | --- Python-2.7.9.orig/Lib/test/test_dl.py |
115 | +++ Python-2.7.2/Lib/test/test_dl.py | 145 | +++ Python-2.7.9/Lib/test/test_dl.py |
116 | @@ -5,10 +5,11 @@ | 146 | @@ -4,10 +4,11 @@ |
117 | import unittest | 147 | import unittest |
118 | from test.test_support import verbose, import_module | 148 | from test.test_support import verbose, import_module |
119 | dl = import_module('dl', deprecated=True) | 149 | dl = import_module('dl', deprecated=True) |
@@ -127,11 +157,35 @@ Index: Python-2.7.2/Lib/test/test_dl.py | |||
127 | ('/usr/bin/cygwin1.dll', 'getpid'), | 157 | ('/usr/bin/cygwin1.dll', 'getpid'), |
128 | ('/usr/lib/libc.dylib', 'getpid'), | 158 | ('/usr/lib/libc.dylib', 'getpid'), |
129 | ] | 159 | ] |
130 | Index: Python-2.7.2/Lib/trace.py | 160 | Index: Python-2.7.9/Lib/test/test_site.py |
131 | =================================================================== | 161 | =================================================================== |
132 | --- Python-2.7.2.orig/Lib/trace.py | 162 | --- Python-2.7.9.orig/Lib/test/test_site.py |
133 | +++ Python-2.7.2/Lib/trace.py | 163 | +++ Python-2.7.9/Lib/test/test_site.py |
134 | @@ -762,10 +762,10 @@ def main(argv=None): | 164 | @@ -241,12 +241,16 @@ class HelperFunctionsTests(unittest.Test |
165 | self.assertEqual(dirs[2], wanted) | ||
166 | elif os.sep == '/': | ||
167 | # OS X non-framwework builds, Linux, FreeBSD, etc | ||
168 | - self.assertEqual(len(dirs), 2) | ||
169 | wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], | ||
170 | 'site-packages') | ||
171 | - self.assertEqual(dirs[0], wanted) | ||
172 | + self.assertTrue(wanted in dirs) | ||
173 | wanted = os.path.join('xoxo', 'lib', 'site-python') | ||
174 | - self.assertEqual(dirs[1], wanted) | ||
175 | + self.assertTrue(wanted in dirs) | ||
176 | + wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3], | ||
177 | + 'site-packages') | ||
178 | + self.assertTrue(wanted in dirs) | ||
179 | + wanted = os.path.join('xoxo', sys.lib, 'site-python') | ||
180 | + self.assertTrue(wanted in dirs) | ||
181 | else: | ||
182 | # other platforms | ||
183 | self.assertEqual(len(dirs), 2) | ||
184 | Index: Python-2.7.9/Lib/trace.py | ||
185 | =================================================================== | ||
186 | --- Python-2.7.9.orig/Lib/trace.py | ||
187 | +++ Python-2.7.9/Lib/trace.py | ||
188 | @@ -754,10 +754,10 @@ def main(argv=None): | ||
135 | # should I also call expanduser? (after all, could use $HOME) | 189 | # should I also call expanduser? (after all, could use $HOME) |
136 | 190 | ||
137 | s = s.replace("$prefix", | 191 | s = s.replace("$prefix", |
@@ -144,19 +198,19 @@ Index: Python-2.7.2/Lib/trace.py | |||
144 | "python" + sys.version[:3])) | 198 | "python" + sys.version[:3])) |
145 | s = os.path.normpath(s) | 199 | s = os.path.normpath(s) |
146 | ignore_dirs.append(s) | 200 | ignore_dirs.append(s) |
147 | Index: Python-2.7.2/Makefile.pre.in | 201 | Index: Python-2.7.9/Makefile.pre.in |
148 | =================================================================== | 202 | =================================================================== |
149 | --- Python-2.7.2.orig/Makefile.pre.in | 203 | --- Python-2.7.9.orig/Makefile.pre.in |
150 | +++ Python-2.7.2/Makefile.pre.in | 204 | +++ Python-2.7.9/Makefile.pre.in |
151 | @@ -81,6 +81,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG | 205 | @@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG |
152 | 206 | ||
153 | # Machine-dependent subdirectories | 207 | # Machine-dependent subdirectories |
154 | MACHDEP= @MACHDEP@ | 208 | MACHDEP= @MACHDEP@ |
155 | +LIB= @LIB@ | 209 | +LIB= @LIB@ |
156 | 210 | ||
157 | # Install prefix for architecture-independent files | 211 | # Multiarch directory (may be empty) |
158 | prefix= @prefix@ | 212 | MULTIARCH= @MULTIARCH@ |
159 | @@ -97,7 +98,7 @@ LIBDIR= @libdir@ | 213 | @@ -106,7 +107,7 @@ LIBDIR= @libdir@ |
160 | MANDIR= @mandir@ | 214 | MANDIR= @mandir@ |
161 | INCLUDEDIR= @includedir@ | 215 | INCLUDEDIR= @includedir@ |
162 | CONFINCLUDEDIR= $(exec_prefix)/include | 216 | CONFINCLUDEDIR= $(exec_prefix)/include |
@@ -165,7 +219,7 @@ Index: Python-2.7.2/Makefile.pre.in | |||
165 | 219 | ||
166 | # Detailed destination directories | 220 | # Detailed destination directories |
167 | BINLIBDEST= $(LIBDIR)/python$(VERSION) | 221 | BINLIBDEST= $(LIBDIR)/python$(VERSION) |
168 | @@ -533,6 +534,7 @@ Modules/getpath.o: $(srcdir)/Modules/get | 222 | @@ -598,6 +599,7 @@ Modules/getpath.o: $(srcdir)/Modules/get |
169 | -DEXEC_PREFIX='"$(exec_prefix)"' \ | 223 | -DEXEC_PREFIX='"$(exec_prefix)"' \ |
170 | -DVERSION='"$(VERSION)"' \ | 224 | -DVERSION='"$(VERSION)"' \ |
171 | -DVPATH='"$(VPATH)"' \ | 225 | -DVPATH='"$(VPATH)"' \ |
@@ -173,7 +227,7 @@ Index: Python-2.7.2/Makefile.pre.in | |||
173 | -o $@ $(srcdir)/Modules/getpath.c | 227 | -o $@ $(srcdir)/Modules/getpath.c |
174 | 228 | ||
175 | Modules/python.o: $(srcdir)/Modules/python.c | 229 | Modules/python.o: $(srcdir)/Modules/python.c |
176 | @@ -567,7 +569,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) | 230 | @@ -640,7 +642,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) |
177 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) | 231 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) |
178 | 232 | ||
179 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | 233 | Python/getplatform.o: $(srcdir)/Python/getplatform.c |
@@ -182,10 +236,10 @@ Index: Python-2.7.2/Makefile.pre.in | |||
182 | 236 | ||
183 | Python/importdl.o: $(srcdir)/Python/importdl.c | 237 | Python/importdl.o: $(srcdir)/Python/importdl.c |
184 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | 238 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c |
185 | Index: Python-2.7.2/Modules/getpath.c | 239 | Index: Python-2.7.9/Modules/getpath.c |
186 | =================================================================== | 240 | =================================================================== |
187 | --- Python-2.7.2.orig/Modules/getpath.c | 241 | --- Python-2.7.9.orig/Modules/getpath.c |
188 | +++ Python-2.7.2/Modules/getpath.c | 242 | +++ Python-2.7.9/Modules/getpath.c |
189 | @@ -116,9 +116,11 @@ | 243 | @@ -116,9 +116,11 @@ |
190 | #define EXEC_PREFIX PREFIX | 244 | #define EXEC_PREFIX PREFIX |
191 | #endif | 245 | #endif |
@@ -209,10 +263,10 @@ Index: Python-2.7.2/Modules/getpath.c | |||
209 | 263 | ||
210 | static void | 264 | static void |
211 | reduce(char *dir) | 265 | reduce(char *dir) |
212 | Index: Python-2.7.2/Python/getplatform.c | 266 | Index: Python-2.7.9/Python/getplatform.c |
213 | =================================================================== | 267 | =================================================================== |
214 | --- Python-2.7.2.orig/Python/getplatform.c | 268 | --- Python-2.7.9.orig/Python/getplatform.c |
215 | +++ Python-2.7.2/Python/getplatform.c | 269 | +++ Python-2.7.9/Python/getplatform.c |
216 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) | 270 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) |
217 | { | 271 | { |
218 | return PLATFORM; | 272 | return PLATFORM; |
@@ -227,31 +281,16 @@ Index: Python-2.7.2/Python/getplatform.c | |||
227 | +{ | 281 | +{ |
228 | + return LIB; | 282 | + return LIB; |
229 | +} | 283 | +} |
230 | Index: Python-2.7.2/Python/sysmodule.c | 284 | Index: Python-2.7.9/Python/sysmodule.c |
231 | =================================================================== | 285 | =================================================================== |
232 | --- Python-2.7.2.orig/Python/sysmodule.c | 286 | --- Python-2.7.9.orig/Python/sysmodule.c |
233 | +++ Python-2.7.2/Python/sysmodule.c | 287 | +++ Python-2.7.9/Python/sysmodule.c |
234 | @@ -1416,6 +1416,8 @@ _PySys_Init(void) | 288 | @@ -1437,6 +1437,8 @@ _PySys_Init(void) |
235 | PyString_FromString(Py_GetCopyright())); | 289 | PyString_FromString(Py_GetCopyright())); |
236 | SET_SYS_FROM_STRING("platform", | 290 | SET_SYS_FROM_STRING("platform", |
237 | PyString_FromString(Py_GetPlatform())); | 291 | PyString_FromString(Py_GetPlatform())); |
238 | + SET_SYS_FROM_STRING("lib", | 292 | + SET_SYS_FROM_STRING("lib", |
239 | + PyString_FromString(Py_GetLib())); | 293 | + PyString_FromString(Py_GetLib())); |
240 | SET_SYS_FROM_STRING("executable", | 294 | SET_SYS_FROM_STRING("executable", |
241 | PyString_FromString(Py_GetProgramFullPath())); | 295 | PyString_FromString(Py_GetProgramFullPath())); |
242 | SET_SYS_FROM_STRING("prefix", | 296 | SET_SYS_FROM_STRING("prefix", |
243 | Index: Python-2.7.2/configure.in | ||
244 | =================================================================== | ||
245 | --- Python-2.7.2.orig/configure.in | ||
246 | +++ Python-2.7.2/configure.in | ||
247 | @@ -629,6 +629,10 @@ SunOS*) | ||
248 | ;; | ||
249 | esac | ||
250 | |||
251 | +AC_SUBST(LIB) | ||
252 | +AC_MSG_CHECKING(LIB) | ||
253 | +LIB=`basename ${libdir}` | ||
254 | +AC_MSG_RESULT($LIB) | ||
255 | |||
256 | AC_SUBST(LIBRARY) | ||
257 | AC_MSG_CHECKING(LIBRARY) | ||
diff --git a/meta/recipes-devtools/python/python/posix_close.patch b/meta/recipes-devtools/python/python/posix_close.patch deleted file mode 100644 index 725531a240..0000000000 --- a/meta/recipes-devtools/python/python/posix_close.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | backport from http://bugs.python.org/issue20594 | ||
2 | |||
3 | - Issue #20594: Avoid name clash with the libc function posix_close. | ||
4 | |||
5 | Upstream-Status: Backport | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | |||
9 | # HG changeset patch | ||
10 | # User Benjamin Peterson <benjamin@python.org> | ||
11 | # Date 1392131776 18000 | ||
12 | # Node ID 1d253360d5a6d8d987fb2480e26f4fcc2d730932 | ||
13 | # Parent 41e49f1c5bd8ff48a6c18804c958e82c659daab3 | ||
14 | avoid name clash with posix_close (closes #20594) | ||
15 | |||
16 | diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c | ||
17 | --- a/Modules/posixmodule.c | ||
18 | +++ b/Modules/posixmodule.c | ||
19 | @@ -6581,8 +6581,12 @@ PyDoc_STRVAR(posix_close__doc__, | ||
20 | "close(fd)\n\n\ | ||
21 | Close a file descriptor (for low level IO)."); | ||
22 | |||
23 | -static PyObject * | ||
24 | -posix_close(PyObject *self, PyObject *args) | ||
25 | +/* | ||
26 | +The underscore at end of function name avoids a name clash with the libc | ||
27 | +function posix_close. | ||
28 | +*/ | ||
29 | +static PyObject * | ||
30 | +posix_close_(PyObject *self, PyObject *args) | ||
31 | { | ||
32 | int fd, res; | ||
33 | if (!PyArg_ParseTuple(args, "i:close", &fd)) | ||
34 | @@ -8960,7 +8964,7 @@ static PyMethodDef posix_methods[] = { | ||
35 | {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__}, | ||
36 | #endif /* HAVE_TCSETPGRP */ | ||
37 | {"open", posix_open, METH_VARARGS, posix_open__doc__}, | ||
38 | - {"close", posix_close, METH_VARARGS, posix_close__doc__}, | ||
39 | + {"close", posix_close_, METH_VARARGS, posix_close__doc__}, | ||
40 | {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__}, | ||
41 | {"dup", posix_dup, METH_VARARGS, posix_dup__doc__}, | ||
42 | {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__}, | ||
43 | |||
diff --git a/meta/recipes-devtools/python/python/pypirc-secure.patch b/meta/recipes-devtools/python/python/pypirc-secure.patch deleted file mode 100644 index 8e2df677b6..0000000000 --- a/meta/recipes-devtools/python/python/pypirc-secure.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | # HG changeset patch | ||
2 | # User Philip Jenvey <pjenvey@underboss.org> | ||
3 | # Date 1322701507 28800 | ||
4 | # Branch 2.7 | ||
5 | # Node ID e7c20a8476a0e2ca18f8040864cbc400818d8f24 | ||
6 | # Parent 3ecddf168f1f554a17a047384fe0b02f2d688277 | ||
7 | create the .pypirc securely | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | |||
11 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
12 | |||
13 | |||
14 | diff -r 3ecddf168f1f -r e7c20a8476a0 Lib/distutils/config.py | ||
15 | --- a/Lib/distutils/config.py Tue Nov 29 00:53:09 2011 +0100 | ||
16 | +++ b/Lib/distutils/config.py Wed Nov 30 17:05:07 2011 -0800 | ||
17 | @@ -42,16 +42,8 @@ | ||
18 | def _store_pypirc(self, username, password): | ||
19 | """Creates a default .pypirc file.""" | ||
20 | rc = self._get_rc_file() | ||
21 | - f = open(rc, 'w') | ||
22 | - try: | ||
23 | - f.write(DEFAULT_PYPIRC % (username, password)) | ||
24 | - finally: | ||
25 | - f.close() | ||
26 | - try: | ||
27 | - os.chmod(rc, 0600) | ||
28 | - except OSError: | ||
29 | - # should do something better here | ||
30 | - pass | ||
31 | + with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0600), 'w') as fp: | ||
32 | + fp.write(DEFAULT_PYPIRC % (username, password)) | ||
33 | |||
34 | def _read_pypirc(self): | ||
35 | """Reads the .pypirc file.""" | ||
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch deleted file mode 100644 index 3afdbc0f6e..0000000000 --- a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Reference:http://bugs.python.org/issue14579 | ||
4 | |||
5 | The utf-16 decoder in Python 3.1 through 3.3 does not update the | ||
6 | aligned_end variable after calling the unicode_decode_call_errorhandler | ||
7 | function, which allows remote attackers to obtain sensitive information | ||
8 | (process memory) or cause a denial of service (memory corruption and crash) | ||
9 | via unspecified vectors. | ||
10 | |||
11 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135 | ||
12 | |||
13 | diff -urpN a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py | ||
14 | --- a/Lib/test/test_codecs.py | ||
15 | +++ b/Lib/test/test_codecs.py | ||
16 | @@ -495,8 +495,21 @@ class UTF16LETest(ReadTest): | ||
17 | ) | ||
18 | |||
19 | def test_errors(self): | ||
20 | - self.assertRaises(UnicodeDecodeError, codecs.utf_16_le_decode, "\xff", "strict", True) | ||
21 | - | ||
22 | + tests = [ | ||
23 | + (b'\xff', u'\ufffd'), | ||
24 | + (b'A\x00Z', u'A\ufffd'), | ||
25 | + (b'A\x00B\x00C\x00D\x00Z', u'ABCD\ufffd'), | ||
26 | + (b'\x00\xd8', u'\ufffd'), | ||
27 | + (b'\x00\xd8A', u'\ufffd'), | ||
28 | + (b'\x00\xd8A\x00', u'\ufffdA'), | ||
29 | + (b'\x00\xdcA\x00', u'\ufffdA'), | ||
30 | + ] | ||
31 | + for raw, expected in tests: | ||
32 | + print('*****', raw, expected) | ||
33 | + self.assertRaises(UnicodeDecodeError, codecs.utf_16_le_decode, | ||
34 | + raw, 'strict', True) | ||
35 | + self.assertEqual(raw.decode('utf-16le', 'replace'), expected) | ||
36 | + | ||
37 | class UTF16BETest(ReadTest): | ||
38 | encoding = "utf-16-be" | ||
39 | |||
40 | @@ -516,7 +529,20 @@ class UTF16BETest(ReadTest): | ||
41 | ) | ||
42 | |||
43 | def test_errors(self): | ||
44 | - self.assertRaises(UnicodeDecodeError, codecs.utf_16_be_decode, "\xff", "strict", True) | ||
45 | + tests = [ | ||
46 | + (b'\xff', u'\ufffd'), | ||
47 | + (b'\x00A\xff', u'A\ufffd'), | ||
48 | + (b'\x00A\x00B\x00C\x00DZ', u'ABCD\ufffd'), | ||
49 | + (b'\xd8\x00', u'\ufffd'), | ||
50 | + (b'\xd8\x00\xdc', u'\ufffd'), | ||
51 | + (b'\xd8\x00\x00A', u'\ufffdA'), | ||
52 | + (b'\xdc\x00\x00A', u'\ufffdA'), | ||
53 | + ] | ||
54 | + for raw, expected in tests: | ||
55 | + print('*****', raw, expected) | ||
56 | + self.assertRaises(UnicodeDecodeError, codecs.utf_16_be_decode, | ||
57 | + raw, 'strict', True) | ||
58 | + self.assertEqual(raw.decode('utf-16be', 'replace'), expected) | ||
59 | |||
60 | class UTF8Test(ReadTest): | ||
61 | encoding = "utf-8" | ||
62 | diff -urpN a/Objects/unicodeobject.c b/Objects/unicodeobject.c | ||
63 | --- a/Objects/unicodeobject.c 2013-03-04 11:34:34.000000000 +0800 | ||
64 | +++ b/Objects/unicodeobject.c 2013-03-04 11:36:01.000000000 +0800 | ||
65 | @@ -2564,7 +2564,7 @@ PyUnicode_DecodeUTF16Stateful(const char | ||
66 | } | ||
67 | |||
68 | /* UTF-16 code pair: */ | ||
69 | - if (q >= e) { | ||
70 | + if (e - q < 2) { | ||
71 | errmsg = "unexpected end of data"; | ||
72 | startinpos = (((const char *)q)-2)-starts; | ||
73 | endinpos = ((const char *)e)-starts; | ||
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch deleted file mode 100644 index f34ff40ea5..0000000000 --- a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Reference: http://bugs.python.org/issue16042 | ||
4 | |||
5 | CVE-2013-1752: smtplib: Limit amount of data read by limiting the | ||
6 | call to readline(). Original patch by Christian Heimes | ||
7 | |||
8 | Signed-off-by: Maxin B. John <maxin.john@enea.com> | ||
9 | --- | ||
10 | diff -Naur Python-2.7.3-orig/Lib/smtplib.py Python-2.7.3/Lib/smtplib.py | ||
11 | --- Python-2.7.3-orig/Lib/smtplib.py 2012-04-10 01:07:31.000000000 +0200 | ||
12 | +++ Python-2.7.3/Lib/smtplib.py 2014-02-27 14:15:24.444198465 +0100 | ||
13 | @@ -57,6 +57,7 @@ | ||
14 | SMTP_PORT = 25 | ||
15 | SMTP_SSL_PORT = 465 | ||
16 | CRLF = "\r\n" | ||
17 | +_MAXLINE = 8192 # more than 8 times larger than RFC 821, 4.5.3 | ||
18 | |||
19 | OLDSTYLE_AUTH = re.compile(r"auth=(.*)", re.I) | ||
20 | |||
21 | @@ -179,10 +180,14 @@ | ||
22 | def __init__(self, sslobj): | ||
23 | self.sslobj = sslobj | ||
24 | |||
25 | - def readline(self): | ||
26 | + def readline(self, size=-1): | ||
27 | + if size < 0: | ||
28 | + size = None | ||
29 | str = "" | ||
30 | chr = None | ||
31 | while chr != "\n": | ||
32 | + if size is not None and len(str) >= size: | ||
33 | + break | ||
34 | chr = self.sslobj.read(1) | ||
35 | if not chr: | ||
36 | break | ||
37 | @@ -351,7 +356,7 @@ | ||
38 | self.file = self.sock.makefile('rb') | ||
39 | while 1: | ||
40 | try: | ||
41 | - line = self.file.readline() | ||
42 | + line = self.file.readline(_MAXLINE + 1) | ||
43 | except socket.error as e: | ||
44 | self.close() | ||
45 | raise SMTPServerDisconnected("Connection unexpectedly closed: " | ||
46 | @@ -361,6 +366,8 @@ | ||
47 | raise SMTPServerDisconnected("Connection unexpectedly closed") | ||
48 | if self.debuglevel > 0: | ||
49 | print>>stderr, 'reply:', repr(line) | ||
50 | + if len(line) > _MAXLINE: | ||
51 | + raise SMTPResponseException(500, "Line too long.") | ||
52 | resp.append(line[4:].strip()) | ||
53 | code = line[:3] | ||
54 | # Check that the error code is syntactically correct. | ||
55 | diff -Naur Python-2.7.3-orig/Lib/test/test_smtplib.py Python-2.7.3/Lib/test/test_smtplib.py | ||
56 | --- Python-2.7.3-orig/Lib/test/test_smtplib.py 2012-04-10 01:07:32.000000000 +0200 | ||
57 | +++ Python-2.7.3/Lib/test/test_smtplib.py 2014-02-27 14:15:24.448198293 +0100 | ||
58 | @@ -292,6 +292,33 @@ | ||
59 | HOST, self.port, 'localhost', 3) | ||
60 | |||
61 | |||
62 | +@unittest.skipUnless(threading, 'Threading required for this test.') | ||
63 | +class TooLongLineTests(unittest.TestCase): | ||
64 | + respdata = '250 OK' + ('.' * smtplib._MAXLINE * 2) + '\n' | ||
65 | + | ||
66 | + def setUp(self): | ||
67 | + self.old_stdout = sys.stdout | ||
68 | + self.output = StringIO.StringIO() | ||
69 | + sys.stdout = self.output | ||
70 | + | ||
71 | + self.evt = threading.Event() | ||
72 | + self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
73 | + self.sock.settimeout(15) | ||
74 | + self.port = test_support.bind_port(self.sock) | ||
75 | + servargs = (self.evt, self.respdata, self.sock) | ||
76 | + threading.Thread(target=server, args=servargs).start() | ||
77 | + self.evt.wait() | ||
78 | + self.evt.clear() | ||
79 | + | ||
80 | + def tearDown(self): | ||
81 | + self.evt.wait() | ||
82 | + sys.stdout = self.old_stdout | ||
83 | + | ||
84 | + def testLineTooLong(self): | ||
85 | + self.assertRaises(smtplib.SMTPResponseException, smtplib.SMTP, | ||
86 | + HOST, self.port, 'localhost', 3) | ||
87 | + | ||
88 | + | ||
89 | sim_users = {'Mr.A@somewhere.com':'John A', | ||
90 | 'Ms.B@somewhere.com':'Sally B', | ||
91 | 'Mrs.C@somewhereesle.com':'Ruth C', | ||
92 | @@ -511,7 +538,8 @@ | ||
93 | def test_main(verbose=None): | ||
94 | test_support.run_unittest(GeneralTests, DebuggingServerTests, | ||
95 | NonConnectingTests, | ||
96 | - BadHELOServerTests, SMTPSimTests) | ||
97 | + BadHELOServerTests, SMTPSimTests, | ||
98 | + TooLongLineTests) | ||
99 | |||
100 | if __name__ == '__main__': | ||
101 | test_main() | ||
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch deleted file mode 100644 index 02cc83d314..0000000000 --- a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Reference: http://bugs.python.org/issue20246 | ||
4 | |||
5 | CVE-2014-1912: Python buffer overflow in socket.recvfrom_into() | ||
6 | lets remote users execute arbitrary code.Original patch by Benjamin Peterson | ||
7 | |||
8 | Signed-off-by: Maxin B. John <maxin.john@enea.com> | ||
9 | --- | ||
10 | diff -r 40fb60df4755 Modules/socketmodule.c | ||
11 | --- a/Modules/socketmodule.c Sun Jan 12 12:11:47 2014 +0200 | ||
12 | +++ b/Modules/socketmodule.c Mon Jan 13 16:36:35 2014 -0800 | ||
13 | @@ -2744,6 +2744,13 @@ | ||
14 | recvlen = buflen; | ||
15 | } | ||
16 | |||
17 | + /* Check if the buffer is large enough */ | ||
18 | + if (buflen < recvlen) { | ||
19 | + PyErr_SetString(PyExc_ValueError, | ||
20 | + "buffer too small for requested bytes"); | ||
21 | + goto error; | ||
22 | + } | ||
23 | + | ||
24 | readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr); | ||
25 | if (readlen < 0) { | ||
26 | /* Return an error */ | ||
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch b/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch deleted file mode 100644 index 60ef145c7c..0000000000 --- a/meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | From 104eb318283dde5203aa6cf7384287bef181e308 Mon Sep 17 00:00:00 2001 | ||
2 | From: Wenzong Fan <wenzong.fan@windriver.com> | ||
3 | Date: Wed, 12 Nov 2014 01:58:02 -0500 | ||
4 | Subject: [PATCH] python: fix CVE-2014-7185 | ||
5 | |||
6 | Reference: http://bugs.python.org/issue21831 | ||
7 | |||
8 | CVE-2014-7185: Integer overflow in bufferobject.c in Python before | ||
9 | 2.7.8 allows context-dependent attackers to obtain sensitive | ||
10 | information from process memory via a large size and offset in a | ||
11 | "buffer" function. | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | |||
15 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
16 | --- | ||
17 | Lib/test/test_buffer.py | 6 ++++++ | ||
18 | Misc/NEWS | 3 +++ | ||
19 | Objects/bufferobject.c | 2 +- | ||
20 | 3 files changed, 10 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py | ||
23 | index 6bdc34d..3ac1f8c 100644 | ||
24 | --- a/Lib/test/test_buffer.py | ||
25 | +++ b/Lib/test/test_buffer.py | ||
26 | @@ -4,6 +4,7 @@ For now, tests just new or changed functionality. | ||
27 | |||
28 | """ | ||
29 | |||
30 | +import sys | ||
31 | import unittest | ||
32 | from test import test_support | ||
33 | |||
34 | @@ -21,6 +22,11 @@ class BufferTests(unittest.TestCase): | ||
35 | self.assertEqual(b[start:stop:step], | ||
36 | s[start:stop:step]) | ||
37 | |||
38 | + def test_large_buffer_size_and_offset(self): | ||
39 | + data = bytearray('hola mundo') | ||
40 | + buf = buffer(data, sys.maxsize, sys.maxsize) | ||
41 | + self.assertEqual(buf[:4096], "") | ||
42 | + | ||
43 | |||
44 | def test_main(): | ||
45 | with test_support.check_py3k_warnings(("buffer.. not supported", | ||
46 | diff --git a/Misc/NEWS b/Misc/NEWS | ||
47 | index e8778ad..77396c5 100644 | ||
48 | --- a/Misc/NEWS | ||
49 | +++ b/Misc/NEWS | ||
50 | @@ -1896,6 +1896,9 @@ What's New in Python 2.7 Release Candidate 1? | ||
51 | Core and Builtins | ||
52 | ----------------- | ||
53 | |||
54 | +- Issue #21831: Avoid integer overflow when large sizes and offsets are given to | ||
55 | + the buffer type. CVE-2014-7185. | ||
56 | + | ||
57 | - Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the | ||
58 | start byte and the continuation byte(s) are now considered invalid, instead | ||
59 | of the number of bytes specified by the start byte. | ||
60 | diff --git a/Objects/bufferobject.c b/Objects/bufferobject.c | ||
61 | index c52f0bc..c542506 100644 | ||
62 | --- a/Objects/bufferobject.c | ||
63 | +++ b/Objects/bufferobject.c | ||
64 | @@ -88,7 +88,7 @@ get_buf(PyBufferObject *self, void **ptr, Py_ssize_t *size, | ||
65 | *size = count; | ||
66 | else | ||
67 | *size = self->b_size; | ||
68 | - if (offset + *size > count) | ||
69 | + if (*size > count - offset) | ||
70 | *size = count - offset; | ||
71 | } | ||
72 | return 1; | ||
73 | -- | ||
74 | 1.7.9.5 | ||
75 | |||
diff --git a/meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch b/meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch deleted file mode 100644 index 3df33368ec..0000000000 --- a/meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch +++ /dev/null | |||
@@ -1,1572 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [not author] | ||
2 | |||
3 | Fix to support db 5.3 for bsddb module in python 2.7.2 | ||
4 | |||
5 | This patch is made from the db5.1.diff in | ||
6 | http://archive.ubuntu.com/ubuntu/pool/main/p/python2.7/python2.7_2.7.3-0ubuntu3.diff.gz | ||
7 | |||
8 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
9 | --- | ||
10 | Lib/bsddb/__init__.py | 2 +- | ||
11 | Lib/bsddb/test/test_all.py | 5 +- | ||
12 | Lib/bsddb/test/test_dbenv.py | 29 +++- | ||
13 | Modules/_bsddb.c | 439 +++++++++++++++++++++++------------------- | ||
14 | Modules/bsddb.h | 20 +- | ||
15 | setup.py | 25 +++- | ||
16 | 6 files changed, 307 insertions(+), 213 deletions(-) | ||
17 | |||
18 | diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py | ||
19 | index ed4deea..1b1c388 100644 | ||
20 | --- a/Lib/bsddb/__init__.py | ||
21 | +++ b/Lib/bsddb/__init__.py | ||
22 | @@ -33,7 +33,7 @@ | ||
23 | #---------------------------------------------------------------------- | ||
24 | |||
25 | |||
26 | -"""Support for Berkeley DB 4.1 through 4.8 with a simple interface. | ||
27 | +"""Support for Berkeley DB 4.2 through 5.3 with a simple interface. | ||
28 | |||
29 | For the full featured object oriented interface use the bsddb.db module | ||
30 | instead. It mirrors the Oracle Berkeley DB C API. | ||
31 | diff --git a/Lib/bsddb/test/test_all.py b/Lib/bsddb/test/test_all.py | ||
32 | index e9fe618..6a25f4a 100644 | ||
33 | --- a/Lib/bsddb/test/test_all.py | ||
34 | +++ b/Lib/bsddb/test/test_all.py | ||
35 | @@ -484,6 +484,8 @@ def print_versions(): | ||
36 | print '-=' * 38 | ||
37 | print db.DB_VERSION_STRING | ||
38 | print 'bsddb.db.version(): %s' % (db.version(), ) | ||
39 | + if db.version() >= (5, 0) : | ||
40 | + print 'bsddb.db.full_version(): %s' %repr(db.full_version()) | ||
41 | print 'bsddb.db.__version__: %s' % db.__version__ | ||
42 | print 'bsddb.db.cvsid: %s' % db.cvsid | ||
43 | |||
44 | @@ -528,7 +530,8 @@ def get_new_database_path() : | ||
45 | |||
46 | # This path can be overriden via "set_test_path_prefix()". | ||
47 | import os, os.path | ||
48 | -get_new_path.prefix=os.path.join(os.sep,"tmp","z-Berkeley_DB") | ||
49 | +get_new_path.prefix=os.path.join(os.environ.get("TMPDIR", | ||
50 | + os.path.join(os.sep,"tmp")), "z-Berkeley_DB") | ||
51 | get_new_path.num=0 | ||
52 | |||
53 | def get_test_path_prefix() : | ||
54 | diff --git a/Lib/bsddb/test/test_dbenv.py b/Lib/bsddb/test/test_dbenv.py | ||
55 | index 37281df..6ac1e54 100644 | ||
56 | --- a/Lib/bsddb/test/test_dbenv.py | ||
57 | +++ b/Lib/bsddb/test/test_dbenv.py | ||
58 | @@ -25,12 +25,31 @@ class DBEnv(unittest.TestCase): | ||
59 | test_support.rmtree(self.homeDir) | ||
60 | |||
61 | class DBEnv_general(DBEnv) : | ||
62 | + def test_get_open_flags(self) : | ||
63 | + flags = db.DB_CREATE | db.DB_INIT_MPOOL | ||
64 | + self.env.open(self.homeDir, flags) | ||
65 | + self.assertEqual(flags, self.env.get_open_flags()) | ||
66 | + | ||
67 | + def test_get_open_flags2(self) : | ||
68 | + flags = db.DB_CREATE | db.DB_INIT_MPOOL | \ | ||
69 | + db.DB_INIT_LOCK | db.DB_THREAD | ||
70 | + self.env.open(self.homeDir, flags) | ||
71 | + self.assertEqual(flags, self.env.get_open_flags()) | ||
72 | + | ||
73 | if db.version() >= (4, 7) : | ||
74 | def test_lk_partitions(self) : | ||
75 | for i in [10, 20, 40] : | ||
76 | self.env.set_lk_partitions(i) | ||
77 | self.assertEqual(i, self.env.get_lk_partitions()) | ||
78 | |||
79 | + def test_getset_intermediate_dir_mode(self) : | ||
80 | + self.assertEqual(None, self.env.get_intermediate_dir_mode()) | ||
81 | + for mode in ["rwx------", "rw-rw-rw-", "rw-r--r--"] : | ||
82 | + self.env.set_intermediate_dir_mode(mode) | ||
83 | + self.assertEqual(mode, self.env.get_intermediate_dir_mode()) | ||
84 | + self.assertRaises(db.DBInvalidArgError, | ||
85 | + self.env.set_intermediate_dir_mode, "abcde") | ||
86 | + | ||
87 | if db.version() >= (4, 6) : | ||
88 | def test_thread(self) : | ||
89 | for i in [16, 100, 1000] : | ||
90 | @@ -115,7 +134,7 @@ class DBEnv_general(DBEnv) : | ||
91 | self.assertEqual(i, self.env.get_lk_max_lockers()) | ||
92 | |||
93 | def test_lg_regionmax(self) : | ||
94 | - for i in [128, 256, 1024] : | ||
95 | + for i in [128, 256, 1000] : | ||
96 | i = i*1024*1024 | ||
97 | self.env.set_lg_regionmax(i) | ||
98 | j = self.env.get_lg_regionmax() | ||
99 | @@ -172,8 +191,12 @@ class DBEnv_general(DBEnv) : | ||
100 | self.env.open(self.homeDir, db.DB_CREATE | db.DB_INIT_MPOOL) | ||
101 | cachesize = (0, 2*1024*1024, 1) | ||
102 | self.assertRaises(db.DBInvalidArgError, | ||
103 | - self.env.set_cachesize, *cachesize) | ||
104 | - self.assertEqual(cachesize2, self.env.get_cachesize()) | ||
105 | + self.env.set_cachesize, *cachesize) | ||
106 | + cachesize3 = self.env.get_cachesize() | ||
107 | + self.assertEqual(cachesize2[0], cachesize3[0]) | ||
108 | + self.assertEqual(cachesize2[2], cachesize3[2]) | ||
109 | + # In Berkeley DB 5.3, the cachesize can change when opening the Env | ||
110 | + self.assertTrue(cachesize2[1] <= cachesize3[1]) | ||
111 | |||
112 | def test_set_cachesize_dbenv_db(self) : | ||
113 | # You can not configure the cachesize using | ||
114 | diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c | ||
115 | index d2d12ff..e98e4bc 100644 | ||
116 | --- a/Modules/_bsddb.c | ||
117 | +++ b/Modules/_bsddb.c | ||
118 | @@ -187,8 +187,10 @@ static PyObject* DBOldVersionError; /* DB_OLD_VERSION */ | ||
119 | static PyObject* DBRunRecoveryError; /* DB_RUNRECOVERY */ | ||
120 | static PyObject* DBVerifyBadError; /* DB_VERIFY_BAD */ | ||
121 | static PyObject* DBNoServerError; /* DB_NOSERVER */ | ||
122 | +#if (DBVER < 52) | ||
123 | static PyObject* DBNoServerHomeError; /* DB_NOSERVER_HOME */ | ||
124 | static PyObject* DBNoServerIDError; /* DB_NOSERVER_ID */ | ||
125 | +#endif | ||
126 | static PyObject* DBPageNotFoundError; /* DB_PAGE_NOTFOUND */ | ||
127 | static PyObject* DBSecondaryBadError; /* DB_SECONDARY_BAD */ | ||
128 | |||
129 | @@ -202,9 +204,7 @@ static PyObject* DBFileExistsError; /* EEXIST */ | ||
130 | static PyObject* DBNoSuchFileError; /* ENOENT */ | ||
131 | static PyObject* DBPermissionsError; /* EPERM */ | ||
132 | |||
133 | -#if (DBVER >= 42) | ||
134 | static PyObject* DBRepHandleDeadError; /* DB_REP_HANDLE_DEAD */ | ||
135 | -#endif | ||
136 | #if (DBVER >= 44) | ||
137 | static PyObject* DBRepLockoutError; /* DB_REP_LOCKOUT */ | ||
138 | #endif | ||
139 | @@ -696,8 +696,10 @@ static int makeDBError(int err) | ||
140 | case DB_RUNRECOVERY: errObj = DBRunRecoveryError; break; | ||
141 | case DB_VERIFY_BAD: errObj = DBVerifyBadError; break; | ||
142 | case DB_NOSERVER: errObj = DBNoServerError; break; | ||
143 | +#if (DBVER < 52) | ||
144 | case DB_NOSERVER_HOME: errObj = DBNoServerHomeError; break; | ||
145 | case DB_NOSERVER_ID: errObj = DBNoServerIDError; break; | ||
146 | +#endif | ||
147 | case DB_PAGE_NOTFOUND: errObj = DBPageNotFoundError; break; | ||
148 | case DB_SECONDARY_BAD: errObj = DBSecondaryBadError; break; | ||
149 | case DB_BUFFER_SMALL: errObj = DBNoMemoryError; break; | ||
150 | @@ -715,9 +717,7 @@ static int makeDBError(int err) | ||
151 | case ENOENT: errObj = DBNoSuchFileError; break; | ||
152 | case EPERM : errObj = DBPermissionsError; break; | ||
153 | |||
154 | -#if (DBVER >= 42) | ||
155 | case DB_REP_HANDLE_DEAD : errObj = DBRepHandleDeadError; break; | ||
156 | -#endif | ||
157 | #if (DBVER >= 44) | ||
158 | case DB_REP_LOCKOUT : errObj = DBRepLockoutError; break; | ||
159 | #endif | ||
160 | @@ -2132,7 +2132,7 @@ DB_get_size(DBObject* self, PyObject* args, PyObject* kwargs) | ||
161 | MYDB_BEGIN_ALLOW_THREADS; | ||
162 | err = self->db->get(self->db, txn, &key, &data, flags); | ||
163 | MYDB_END_ALLOW_THREADS; | ||
164 | - if (err == DB_BUFFER_SMALL) { | ||
165 | + if ((err == DB_BUFFER_SMALL) || (err == 0)) { | ||
166 | retval = NUMBER_FromLong((long)data.size); | ||
167 | err = 0; | ||
168 | } | ||
169 | @@ -2385,9 +2385,7 @@ DB_open(DBObject* self, PyObject* args, PyObject* kwargs) | ||
170 | return NULL; | ||
171 | } | ||
172 | |||
173 | -#if (DBVER >= 42) | ||
174 | self->db->get_flags(self->db, &self->setflags); | ||
175 | -#endif | ||
176 | |||
177 | self->flags = flags; | ||
178 | |||
179 | @@ -2539,6 +2537,37 @@ DB_get_priority(DBObject* self) | ||
180 | #endif | ||
181 | |||
182 | static PyObject* | ||
183 | +DB_get_dbname(DBObject* self) | ||
184 | +{ | ||
185 | + int err; | ||
186 | + const char *filename, *dbname; | ||
187 | + | ||
188 | + CHECK_DB_NOT_CLOSED(self); | ||
189 | + | ||
190 | + MYDB_BEGIN_ALLOW_THREADS; | ||
191 | + err = self->db->get_dbname(self->db, &filename, &dbname); | ||
192 | + MYDB_END_ALLOW_THREADS; | ||
193 | + RETURN_IF_ERR(); | ||
194 | + /* If "dbname==NULL", it is correctly converted to "None" */ | ||
195 | + return Py_BuildValue("(ss)", filename, dbname); | ||
196 | +} | ||
197 | + | ||
198 | +static PyObject* | ||
199 | +DB_get_open_flags(DBObject* self) | ||
200 | +{ | ||
201 | + int err; | ||
202 | + unsigned int flags; | ||
203 | + | ||
204 | + CHECK_DB_NOT_CLOSED(self); | ||
205 | + | ||
206 | + MYDB_BEGIN_ALLOW_THREADS; | ||
207 | + err = self->db->get_open_flags(self->db, &flags); | ||
208 | + MYDB_END_ALLOW_THREADS; | ||
209 | + RETURN_IF_ERR(); | ||
210 | + return NUMBER_FromLong(flags); | ||
211 | +} | ||
212 | + | ||
213 | +static PyObject* | ||
214 | DB_set_q_extentsize(DBObject* self, PyObject* args) | ||
215 | { | ||
216 | int err; | ||
217 | @@ -2555,7 +2584,6 @@ DB_set_q_extentsize(DBObject* self, PyObject* args) | ||
218 | RETURN_NONE(); | ||
219 | } | ||
220 | |||
221 | -#if (DBVER >= 42) | ||
222 | static PyObject* | ||
223 | DB_get_q_extentsize(DBObject* self) | ||
224 | { | ||
225 | @@ -2570,7 +2598,6 @@ DB_get_q_extentsize(DBObject* self) | ||
226 | RETURN_IF_ERR(); | ||
227 | return NUMBER_FromLong(extentsize); | ||
228 | } | ||
229 | -#endif | ||
230 | |||
231 | static PyObject* | ||
232 | DB_set_bt_minkey(DBObject* self, PyObject* args) | ||
233 | @@ -2588,7 +2615,6 @@ DB_set_bt_minkey(DBObject* self, PyObject* args) | ||
234 | RETURN_NONE(); | ||
235 | } | ||
236 | |||
237 | -#if (DBVER >= 42) | ||
238 | static PyObject* | ||
239 | DB_get_bt_minkey(DBObject* self) | ||
240 | { | ||
241 | @@ -2603,7 +2629,6 @@ DB_get_bt_minkey(DBObject* self) | ||
242 | RETURN_IF_ERR(); | ||
243 | return NUMBER_FromLong(bt_minkey); | ||
244 | } | ||
245 | -#endif | ||
246 | |||
247 | static int | ||
248 | _default_cmp(const DBT *leftKey, | ||
249 | @@ -2759,7 +2784,6 @@ DB_set_cachesize(DBObject* self, PyObject* args) | ||
250 | RETURN_NONE(); | ||
251 | } | ||
252 | |||
253 | -#if (DBVER >= 42) | ||
254 | static PyObject* | ||
255 | DB_get_cachesize(DBObject* self) | ||
256 | { | ||
257 | @@ -2777,7 +2801,6 @@ DB_get_cachesize(DBObject* self) | ||
258 | |||
259 | return Py_BuildValue("(iii)", gbytes, bytes, ncache); | ||
260 | } | ||
261 | -#endif | ||
262 | |||
263 | static PyObject* | ||
264 | DB_set_flags(DBObject* self, PyObject* args) | ||
265 | @@ -2797,7 +2820,6 @@ DB_set_flags(DBObject* self, PyObject* args) | ||
266 | RETURN_NONE(); | ||
267 | } | ||
268 | |||
269 | -#if (DBVER >= 42) | ||
270 | static PyObject* | ||
271 | DB_get_flags(DBObject* self) | ||
272 | { | ||
273 | @@ -2812,6 +2834,35 @@ DB_get_flags(DBObject* self) | ||
274 | RETURN_IF_ERR(); | ||
275 | return NUMBER_FromLong(flags); | ||
276 | } | ||
277 | + | ||
278 | +#if (DBVER >= 43) | ||
279 | +static PyObject* | ||
280 | +DB_get_transactional(DBObject* self) | ||
281 | +{ | ||
282 | + int err; | ||
283 | + | ||
284 | + CHECK_DB_NOT_CLOSED(self); | ||
285 | + | ||
286 | + MYDB_BEGIN_ALLOW_THREADS; | ||
287 | + err = self->db->get_transactional(self->db); | ||
288 | + MYDB_END_ALLOW_THREADS; | ||
289 | + | ||
290 | + if(err == 0) { | ||
291 | + Py_INCREF(Py_False); | ||
292 | + return Py_False; | ||
293 | + } else if(err == 1) { | ||
294 | + Py_INCREF(Py_True); | ||
295 | + return Py_True; | ||
296 | + } | ||
297 | + | ||
298 | + /* | ||
299 | + ** If we reach there, there was an error. The | ||
300 | + ** "return" should be unreachable. | ||
301 | + */ | ||
302 | + RETURN_IF_ERR(); | ||
303 | + assert(0); /* This coude SHOULD be unreachable */ | ||
304 | + return NULL; | ||
305 | +} | ||
306 | #endif | ||
307 | |||
308 | static PyObject* | ||
309 | @@ -2830,7 +2881,6 @@ DB_set_h_ffactor(DBObject* self, PyObject* args) | ||
310 | RETURN_NONE(); | ||
311 | } | ||
312 | |||
313 | -#if (DBVER >= 42) | ||
314 | static PyObject* | ||
315 | DB_get_h_ffactor(DBObject* self) | ||
316 | { | ||
317 | @@ -2845,7 +2895,6 @@ DB_get_h_ffactor(DBObject* self) | ||
318 | RETURN_IF_ERR(); | ||
319 | return NUMBER_FromLong(ffactor); | ||
320 | } | ||
321 | -#endif | ||
322 | |||
323 | static PyObject* | ||
324 | DB_set_h_nelem(DBObject* self, PyObject* args) | ||
325 | @@ -2863,7 +2912,6 @@ DB_set_h_nelem(DBObject* self, PyObject* args) | ||
326 | RETURN_NONE(); | ||
327 | } | ||
328 | |||
329 | -#if (DBVER >= 42) | ||
330 | static PyObject* | ||
331 | DB_get_h_nelem(DBObject* self) | ||
332 | { | ||
333 | @@ -2878,7 +2926,6 @@ DB_get_h_nelem(DBObject* self) | ||
334 | RETURN_IF_ERR(); | ||
335 | return NUMBER_FromLong(nelem); | ||
336 | } | ||
337 | -#endif | ||
338 | |||
339 | static PyObject* | ||
340 | DB_set_lorder(DBObject* self, PyObject* args) | ||
341 | @@ -2896,7 +2943,6 @@ DB_set_lorder(DBObject* self, PyObject* args) | ||
342 | RETURN_NONE(); | ||
343 | } | ||
344 | |||
345 | -#if (DBVER >= 42) | ||
346 | static PyObject* | ||
347 | DB_get_lorder(DBObject* self) | ||
348 | { | ||
349 | @@ -2911,7 +2957,6 @@ DB_get_lorder(DBObject* self) | ||
350 | RETURN_IF_ERR(); | ||
351 | return NUMBER_FromLong(lorder); | ||
352 | } | ||
353 | -#endif | ||
354 | |||
355 | static PyObject* | ||
356 | DB_set_pagesize(DBObject* self, PyObject* args) | ||
357 | @@ -2929,7 +2974,6 @@ DB_set_pagesize(DBObject* self, PyObject* args) | ||
358 | RETURN_NONE(); | ||
359 | } | ||
360 | |||
361 | -#if (DBVER >= 42) | ||
362 | static PyObject* | ||
363 | DB_get_pagesize(DBObject* self) | ||
364 | { | ||
365 | @@ -2944,7 +2988,6 @@ DB_get_pagesize(DBObject* self) | ||
366 | RETURN_IF_ERR(); | ||
367 | return NUMBER_FromLong(pagesize); | ||
368 | } | ||
369 | -#endif | ||
370 | |||
371 | static PyObject* | ||
372 | DB_set_re_delim(DBObject* self, PyObject* args) | ||
373 | @@ -2967,7 +3010,6 @@ DB_set_re_delim(DBObject* self, PyObject* args) | ||
374 | RETURN_NONE(); | ||
375 | } | ||
376 | |||
377 | -#if (DBVER >= 42) | ||
378 | static PyObject* | ||
379 | DB_get_re_delim(DBObject* self) | ||
380 | { | ||
381 | @@ -2981,7 +3023,6 @@ DB_get_re_delim(DBObject* self) | ||
382 | RETURN_IF_ERR(); | ||
383 | return NUMBER_FromLong(re_delim); | ||
384 | } | ||
385 | -#endif | ||
386 | |||
387 | static PyObject* | ||
388 | DB_set_re_len(DBObject* self, PyObject* args) | ||
389 | @@ -2999,7 +3040,6 @@ DB_set_re_len(DBObject* self, PyObject* args) | ||
390 | RETURN_NONE(); | ||
391 | } | ||
392 | |||
393 | -#if (DBVER >= 42) | ||
394 | static PyObject* | ||
395 | DB_get_re_len(DBObject* self) | ||
396 | { | ||
397 | @@ -3014,7 +3054,6 @@ DB_get_re_len(DBObject* self) | ||
398 | RETURN_IF_ERR(); | ||
399 | return NUMBER_FromLong(re_len); | ||
400 | } | ||
401 | -#endif | ||
402 | |||
403 | static PyObject* | ||
404 | DB_set_re_pad(DBObject* self, PyObject* args) | ||
405 | @@ -3036,7 +3075,6 @@ DB_set_re_pad(DBObject* self, PyObject* args) | ||
406 | RETURN_NONE(); | ||
407 | } | ||
408 | |||
409 | -#if (DBVER >= 42) | ||
410 | static PyObject* | ||
411 | DB_get_re_pad(DBObject* self) | ||
412 | { | ||
413 | @@ -3050,7 +3088,6 @@ DB_get_re_pad(DBObject* self) | ||
414 | RETURN_IF_ERR(); | ||
415 | return NUMBER_FromLong(re_pad); | ||
416 | } | ||
417 | -#endif | ||
418 | |||
419 | static PyObject* | ||
420 | DB_set_re_source(DBObject* self, PyObject* args) | ||
421 | @@ -3069,7 +3106,6 @@ DB_set_re_source(DBObject* self, PyObject* args) | ||
422 | RETURN_NONE(); | ||
423 | } | ||
424 | |||
425 | -#if (DBVER >= 42) | ||
426 | static PyObject* | ||
427 | DB_get_re_source(DBObject* self) | ||
428 | { | ||
429 | @@ -3084,7 +3120,6 @@ DB_get_re_source(DBObject* self) | ||
430 | RETURN_IF_ERR(); | ||
431 | return PyBytes_FromString(source); | ||
432 | } | ||
433 | -#endif | ||
434 | |||
435 | static PyObject* | ||
436 | DB_stat(DBObject* self, PyObject* args, PyObject* kwargs) | ||
437 | @@ -3381,7 +3416,6 @@ DB_set_encrypt(DBObject* self, PyObject* args, PyObject* kwargs) | ||
438 | RETURN_NONE(); | ||
439 | } | ||
440 | |||
441 | -#if (DBVER >= 42) | ||
442 | static PyObject* | ||
443 | DB_get_encrypt_flags(DBObject* self) | ||
444 | { | ||
445 | @@ -3396,7 +3430,6 @@ DB_get_encrypt_flags(DBObject* self) | ||
446 | |||
447 | return NUMBER_FromLong(flags); | ||
448 | } | ||
449 | -#endif | ||
450 | |||
451 | |||
452 | |||
453 | @@ -4987,7 +5020,6 @@ DBEnv_set_encrypt(DBEnvObject* self, PyObject* args, PyObject* kwargs) | ||
454 | RETURN_NONE(); | ||
455 | } | ||
456 | |||
457 | -#if (DBVER >= 42) | ||
458 | static PyObject* | ||
459 | DBEnv_get_encrypt_flags(DBEnvObject* self) | ||
460 | { | ||
461 | @@ -5025,7 +5057,6 @@ DBEnv_get_timeout(DBEnvObject* self, PyObject* args, PyObject* kwargs) | ||
462 | RETURN_IF_ERR(); | ||
463 | return NUMBER_FromLong(timeout); | ||
464 | } | ||
465 | -#endif | ||
466 | |||
467 | |||
468 | static PyObject* | ||
469 | @@ -5064,7 +5095,6 @@ DBEnv_set_shm_key(DBEnvObject* self, PyObject* args) | ||
470 | RETURN_NONE(); | ||
471 | } | ||
472 | |||
473 | -#if (DBVER >= 42) | ||
474 | static PyObject* | ||
475 | DBEnv_get_shm_key(DBEnvObject* self) | ||
476 | { | ||
477 | @@ -5081,7 +5111,6 @@ DBEnv_get_shm_key(DBEnvObject* self) | ||
478 | |||
479 | return NUMBER_FromLong(shm_key); | ||
480 | } | ||
481 | -#endif | ||
482 | |||
483 | #if (DBVER >= 46) | ||
484 | static PyObject* | ||
485 | @@ -5170,7 +5199,6 @@ DBEnv_set_cachesize(DBEnvObject* self, PyObject* args) | ||
486 | RETURN_NONE(); | ||
487 | } | ||
488 | |||
489 | -#if (DBVER >= 42) | ||
490 | static PyObject* | ||
491 | DBEnv_get_cachesize(DBEnvObject* self) | ||
492 | { | ||
493 | @@ -5188,7 +5216,6 @@ DBEnv_get_cachesize(DBEnvObject* self) | ||
494 | |||
495 | return Py_BuildValue("(iii)", gbytes, bytes, ncache); | ||
496 | } | ||
497 | -#endif | ||
498 | |||
499 | |||
500 | static PyObject* | ||
501 | @@ -5208,7 +5235,6 @@ DBEnv_set_flags(DBEnvObject* self, PyObject* args) | ||
502 | RETURN_NONE(); | ||
503 | } | ||
504 | |||
505 | -#if (DBVER >= 42) | ||
506 | static PyObject* | ||
507 | DBEnv_get_flags(DBEnvObject* self) | ||
508 | { | ||
509 | @@ -5223,7 +5249,6 @@ DBEnv_get_flags(DBEnvObject* self) | ||
510 | RETURN_IF_ERR(); | ||
511 | return NUMBER_FromLong(flags); | ||
512 | } | ||
513 | -#endif | ||
514 | |||
515 | #if (DBVER >= 47) | ||
516 | static PyObject* | ||
517 | @@ -5423,7 +5448,6 @@ DBEnv_set_data_dir(DBEnvObject* self, PyObject* args) | ||
518 | RETURN_NONE(); | ||
519 | } | ||
520 | |||
521 | -#if (DBVER >= 42) | ||
522 | static PyObject* | ||
523 | DBEnv_get_data_dirs(DBEnvObject* self) | ||
524 | { | ||
525 | @@ -5463,7 +5487,6 @@ DBEnv_get_data_dirs(DBEnvObject* self) | ||
526 | } | ||
527 | return tuple; | ||
528 | } | ||
529 | -#endif | ||
530 | |||
531 | #if (DBVER >= 44) | ||
532 | static PyObject* | ||
533 | @@ -5513,7 +5536,6 @@ DBEnv_set_lg_bsize(DBEnvObject* self, PyObject* args) | ||
534 | RETURN_NONE(); | ||
535 | } | ||
536 | |||
537 | -#if (DBVER >= 42) | ||
538 | static PyObject* | ||
539 | DBEnv_get_lg_bsize(DBEnvObject* self) | ||
540 | { | ||
541 | @@ -5528,7 +5550,6 @@ DBEnv_get_lg_bsize(DBEnvObject* self) | ||
542 | RETURN_IF_ERR(); | ||
543 | return NUMBER_FromLong(lg_bsize); | ||
544 | } | ||
545 | -#endif | ||
546 | |||
547 | static PyObject* | ||
548 | DBEnv_set_lg_dir(DBEnvObject* self, PyObject* args) | ||
549 | @@ -5547,7 +5568,6 @@ DBEnv_set_lg_dir(DBEnvObject* self, PyObject* args) | ||
550 | RETURN_NONE(); | ||
551 | } | ||
552 | |||
553 | -#if (DBVER >= 42) | ||
554 | static PyObject* | ||
555 | DBEnv_get_lg_dir(DBEnvObject* self) | ||
556 | { | ||
557 | @@ -5562,7 +5582,6 @@ DBEnv_get_lg_dir(DBEnvObject* self) | ||
558 | RETURN_IF_ERR(); | ||
559 | return PyBytes_FromString(dirp); | ||
560 | } | ||
561 | -#endif | ||
562 | |||
563 | static PyObject* | ||
564 | DBEnv_set_lg_max(DBEnvObject* self, PyObject* args) | ||
565 | @@ -5580,7 +5599,6 @@ DBEnv_set_lg_max(DBEnvObject* self, PyObject* args) | ||
566 | RETURN_NONE(); | ||
567 | } | ||
568 | |||
569 | -#if (DBVER >= 42) | ||
570 | static PyObject* | ||
571 | DBEnv_get_lg_max(DBEnvObject* self) | ||
572 | { | ||
573 | @@ -5595,8 +5613,6 @@ DBEnv_get_lg_max(DBEnvObject* self) | ||
574 | RETURN_IF_ERR(); | ||
575 | return NUMBER_FromLong(lg_max); | ||
576 | } | ||
577 | -#endif | ||
578 | - | ||
579 | |||
580 | static PyObject* | ||
581 | DBEnv_set_lg_regionmax(DBEnvObject* self, PyObject* args) | ||
582 | @@ -5614,7 +5630,6 @@ DBEnv_set_lg_regionmax(DBEnvObject* self, PyObject* args) | ||
583 | RETURN_NONE(); | ||
584 | } | ||
585 | |||
586 | -#if (DBVER >= 42) | ||
587 | static PyObject* | ||
588 | DBEnv_get_lg_regionmax(DBEnvObject* self) | ||
589 | { | ||
590 | @@ -5629,7 +5644,6 @@ DBEnv_get_lg_regionmax(DBEnvObject* self) | ||
591 | RETURN_IF_ERR(); | ||
592 | return NUMBER_FromLong(lg_regionmax); | ||
593 | } | ||
594 | -#endif | ||
595 | |||
596 | #if (DBVER >= 47) | ||
597 | static PyObject* | ||
598 | @@ -5680,7 +5694,6 @@ DBEnv_set_lk_detect(DBEnvObject* self, PyObject* args) | ||
599 | RETURN_NONE(); | ||
600 | } | ||
601 | |||
602 | -#if (DBVER >= 42) | ||
603 | static PyObject* | ||
604 | DBEnv_get_lk_detect(DBEnvObject* self) | ||
605 | { | ||
606 | @@ -5695,8 +5708,6 @@ DBEnv_get_lk_detect(DBEnvObject* self) | ||
607 | RETURN_IF_ERR(); | ||
608 | return NUMBER_FromLong(lk_detect); | ||
609 | } | ||
610 | -#endif | ||
611 | - | ||
612 | |||
613 | #if (DBVER < 45) | ||
614 | static PyObject* | ||
615 | @@ -5734,7 +5745,6 @@ DBEnv_set_lk_max_locks(DBEnvObject* self, PyObject* args) | ||
616 | RETURN_NONE(); | ||
617 | } | ||
618 | |||
619 | -#if (DBVER >= 42) | ||
620 | static PyObject* | ||
621 | DBEnv_get_lk_max_locks(DBEnvObject* self) | ||
622 | { | ||
623 | @@ -5749,7 +5759,6 @@ DBEnv_get_lk_max_locks(DBEnvObject* self) | ||
624 | RETURN_IF_ERR(); | ||
625 | return NUMBER_FromLong(lk_max); | ||
626 | } | ||
627 | -#endif | ||
628 | |||
629 | static PyObject* | ||
630 | DBEnv_set_lk_max_lockers(DBEnvObject* self, PyObject* args) | ||
631 | @@ -5767,7 +5776,6 @@ DBEnv_set_lk_max_lockers(DBEnvObject* self, PyObject* args) | ||
632 | RETURN_NONE(); | ||
633 | } | ||
634 | |||
635 | -#if (DBVER >= 42) | ||
636 | static PyObject* | ||
637 | DBEnv_get_lk_max_lockers(DBEnvObject* self) | ||
638 | { | ||
639 | @@ -5782,7 +5790,6 @@ DBEnv_get_lk_max_lockers(DBEnvObject* self) | ||
640 | RETURN_IF_ERR(); | ||
641 | return NUMBER_FromLong(lk_max); | ||
642 | } | ||
643 | -#endif | ||
644 | |||
645 | static PyObject* | ||
646 | DBEnv_set_lk_max_objects(DBEnvObject* self, PyObject* args) | ||
647 | @@ -5800,7 +5807,6 @@ DBEnv_set_lk_max_objects(DBEnvObject* self, PyObject* args) | ||
648 | RETURN_NONE(); | ||
649 | } | ||
650 | |||
651 | -#if (DBVER >= 42) | ||
652 | static PyObject* | ||
653 | DBEnv_get_lk_max_objects(DBEnvObject* self) | ||
654 | { | ||
655 | @@ -5815,9 +5821,7 @@ DBEnv_get_lk_max_objects(DBEnvObject* self) | ||
656 | RETURN_IF_ERR(); | ||
657 | return NUMBER_FromLong(lk_max); | ||
658 | } | ||
659 | -#endif | ||
660 | |||
661 | -#if (DBVER >= 42) | ||
662 | static PyObject* | ||
663 | DBEnv_get_mp_mmapsize(DBEnvObject* self) | ||
664 | { | ||
665 | @@ -5832,8 +5836,6 @@ DBEnv_get_mp_mmapsize(DBEnvObject* self) | ||
666 | RETURN_IF_ERR(); | ||
667 | return NUMBER_FromLong(mmapsize); | ||
668 | } | ||
669 | -#endif | ||
670 | - | ||
671 | |||
672 | static PyObject* | ||
673 | DBEnv_set_mp_mmapsize(DBEnvObject* self, PyObject* args) | ||
674 | @@ -5869,8 +5871,6 @@ DBEnv_set_tmp_dir(DBEnvObject* self, PyObject* args) | ||
675 | RETURN_NONE(); | ||
676 | } | ||
677 | |||
678 | - | ||
679 | -#if (DBVER >= 42) | ||
680 | static PyObject* | ||
681 | DBEnv_get_tmp_dir(DBEnvObject* self) | ||
682 | { | ||
683 | @@ -5887,8 +5887,6 @@ DBEnv_get_tmp_dir(DBEnvObject* self) | ||
684 | |||
685 | return PyBytes_FromString(dirpp); | ||
686 | } | ||
687 | -#endif | ||
688 | - | ||
689 | |||
690 | static PyObject* | ||
691 | DBEnv_txn_recover(DBEnvObject* self) | ||
692 | @@ -5899,7 +5897,7 @@ DBEnv_txn_recover(DBEnvObject* self) | ||
693 | DBTxnObject *txn; | ||
694 | #define PREPLIST_LEN 16 | ||
695 | DB_PREPLIST preplist[PREPLIST_LEN]; | ||
696 | -#if (DBVER < 48) | ||
697 | +#if (DBVER < 48 || DBVER > 51) | ||
698 | long retp; | ||
699 | #else | ||
700 | u_int32_t retp; | ||
701 | @@ -6003,8 +6001,6 @@ DBEnv_txn_checkpoint(DBEnvObject* self, PyObject* args) | ||
702 | RETURN_NONE(); | ||
703 | } | ||
704 | |||
705 | - | ||
706 | -#if (DBVER >= 42) | ||
707 | static PyObject* | ||
708 | DBEnv_get_tx_max(DBEnvObject* self) | ||
709 | { | ||
710 | @@ -6019,8 +6015,6 @@ DBEnv_get_tx_max(DBEnvObject* self) | ||
711 | RETURN_IF_ERR(); | ||
712 | return PyLong_FromUnsignedLong(max); | ||
713 | } | ||
714 | -#endif | ||
715 | - | ||
716 | |||
717 | static PyObject* | ||
718 | DBEnv_set_tx_max(DBEnvObject* self, PyObject* args) | ||
719 | @@ -6038,8 +6032,6 @@ DBEnv_set_tx_max(DBEnvObject* self, PyObject* args) | ||
720 | RETURN_NONE(); | ||
721 | } | ||
722 | |||
723 | - | ||
724 | -#if (DBVER >= 42) | ||
725 | static PyObject* | ||
726 | DBEnv_get_tx_timestamp(DBEnvObject* self) | ||
727 | { | ||
728 | @@ -6054,7 +6046,6 @@ DBEnv_get_tx_timestamp(DBEnvObject* self) | ||
729 | RETURN_IF_ERR(); | ||
730 | return NUMBER_FromLong(timestamp); | ||
731 | } | ||
732 | -#endif | ||
733 | |||
734 | static PyObject* | ||
735 | DBEnv_set_tx_timestamp(DBEnvObject* self, PyObject* args) | ||
736 | @@ -6756,6 +6747,55 @@ DBEnv_set_private(DBEnvObject* self, PyObject* private_obj) | ||
737 | RETURN_NONE(); | ||
738 | } | ||
739 | |||
740 | +#if (DBVER >= 47) | ||
741 | +static PyObject* | ||
742 | +DBEnv_set_intermediate_dir_mode(DBEnvObject* self, PyObject* args) | ||
743 | +{ | ||
744 | + int err; | ||
745 | + const char *mode; | ||
746 | + | ||
747 | + if (!PyArg_ParseTuple(args,"s:set_intermediate_dir_mode", &mode)) | ||
748 | + return NULL; | ||
749 | + | ||
750 | + CHECK_ENV_NOT_CLOSED(self); | ||
751 | + | ||
752 | + MYDB_BEGIN_ALLOW_THREADS; | ||
753 | + err = self->db_env->set_intermediate_dir_mode(self->db_env, mode); | ||
754 | + MYDB_END_ALLOW_THREADS; | ||
755 | + RETURN_IF_ERR(); | ||
756 | + RETURN_NONE(); | ||
757 | +} | ||
758 | + | ||
759 | +static PyObject* | ||
760 | +DBEnv_get_intermediate_dir_mode(DBEnvObject* self) | ||
761 | +{ | ||
762 | + int err; | ||
763 | + const char *mode; | ||
764 | + | ||
765 | + CHECK_ENV_NOT_CLOSED(self); | ||
766 | + | ||
767 | + MYDB_BEGIN_ALLOW_THREADS; | ||
768 | + err = self->db_env->get_intermediate_dir_mode(self->db_env, &mode); | ||
769 | + MYDB_END_ALLOW_THREADS; | ||
770 | + RETURN_IF_ERR(); | ||
771 | + return Py_BuildValue("s", mode); | ||
772 | +} | ||
773 | +#endif | ||
774 | + | ||
775 | +static PyObject* | ||
776 | +DBEnv_get_open_flags(DBEnvObject* self) | ||
777 | +{ | ||
778 | + int err; | ||
779 | + unsigned int flags; | ||
780 | + | ||
781 | + CHECK_ENV_NOT_CLOSED(self); | ||
782 | + | ||
783 | + MYDB_BEGIN_ALLOW_THREADS; | ||
784 | + err = self->db_env->get_open_flags(self->db_env, &flags); | ||
785 | + MYDB_END_ALLOW_THREADS; | ||
786 | + RETURN_IF_ERR(); | ||
787 | + return NUMBER_FromLong(flags); | ||
788 | +} | ||
789 | |||
790 | #if (DBVER < 48) | ||
791 | static PyObject* | ||
792 | @@ -6875,7 +6915,6 @@ DBEnv_set_verbose(DBEnvObject* self, PyObject* args) | ||
793 | RETURN_NONE(); | ||
794 | } | ||
795 | |||
796 | -#if (DBVER >= 42) | ||
797 | static PyObject* | ||
798 | DBEnv_get_verbose(DBEnvObject* self, PyObject* args) | ||
799 | { | ||
800 | @@ -6893,7 +6932,6 @@ DBEnv_get_verbose(DBEnvObject* self, PyObject* args) | ||
801 | RETURN_IF_ERR(); | ||
802 | return PyBool_FromLong(verbose); | ||
803 | } | ||
804 | -#endif | ||
805 | |||
806 | #if (DBVER >= 45) | ||
807 | static void | ||
808 | @@ -6975,9 +7013,7 @@ DBEnv_rep_process_message(DBEnvObject* self, PyObject* args) | ||
809 | PyObject *control_py, *rec_py; | ||
810 | DBT control, rec; | ||
811 | int envid; | ||
812 | -#if (DBVER >= 42) | ||
813 | DB_LSN lsn; | ||
814 | -#endif | ||
815 | |||
816 | if (!PyArg_ParseTuple(args, "OOi:rep_process_message", &control_py, | ||
817 | &rec_py, &envid)) | ||
818 | @@ -6994,13 +7030,8 @@ DBEnv_rep_process_message(DBEnvObject* self, PyObject* args) | ||
819 | err = self->db_env->rep_process_message(self->db_env, &control, &rec, | ||
820 | envid, &lsn); | ||
821 | #else | ||
822 | -#if (DBVER >= 42) | ||
823 | err = self->db_env->rep_process_message(self->db_env, &control, &rec, | ||
824 | &envid, &lsn); | ||
825 | -#else | ||
826 | - err = self->db_env->rep_process_message(self->db_env, &control, &rec, | ||
827 | - &envid); | ||
828 | -#endif | ||
829 | #endif | ||
830 | MYDB_END_ALLOW_THREADS; | ||
831 | switch (err) { | ||
832 | @@ -7029,12 +7060,10 @@ DBEnv_rep_process_message(DBEnvObject* self, PyObject* args) | ||
833 | return r; | ||
834 | break; | ||
835 | } | ||
836 | -#if (DBVER >= 42) | ||
837 | case DB_REP_NOTPERM : | ||
838 | case DB_REP_ISPERM : | ||
839 | return Py_BuildValue("(i(ll))", err, lsn.file, lsn.offset); | ||
840 | break; | ||
841 | -#endif | ||
842 | } | ||
843 | RETURN_IF_ERR(); | ||
844 | return Py_BuildValue("(OO)", Py_None, Py_None); | ||
845 | @@ -7086,20 +7115,6 @@ _DBEnv_rep_transportCallback(DB_ENV* db_env, const DBT* control, const DBT* rec, | ||
846 | return ret; | ||
847 | } | ||
848 | |||
849 | -#if (DBVER <= 41) | ||
850 | -static int | ||
851 | -_DBEnv_rep_transportCallbackOLD(DB_ENV* db_env, const DBT* control, const DBT* rec, | ||
852 | - int envid, u_int32_t flags) | ||
853 | -{ | ||
854 | - DB_LSN lsn; | ||
855 | - | ||
856 | - lsn.file = -1; /* Dummy values */ | ||
857 | - lsn.offset = -1; | ||
858 | - return _DBEnv_rep_transportCallback(db_env, control, rec, &lsn, envid, | ||
859 | - flags); | ||
860 | -} | ||
861 | -#endif | ||
862 | - | ||
863 | static PyObject* | ||
864 | DBEnv_rep_set_transport(DBEnvObject* self, PyObject* args) | ||
865 | { | ||
866 | @@ -7120,13 +7135,8 @@ DBEnv_rep_set_transport(DBEnvObject* self, PyObject* args) | ||
867 | err = self->db_env->rep_set_transport(self->db_env, envid, | ||
868 | &_DBEnv_rep_transportCallback); | ||
869 | #else | ||
870 | -#if (DBVER >= 42) | ||
871 | err = self->db_env->set_rep_transport(self->db_env, envid, | ||
872 | &_DBEnv_rep_transportCallback); | ||
873 | -#else | ||
874 | - err = self->db_env->set_rep_transport(self->db_env, envid, | ||
875 | - &_DBEnv_rep_transportCallbackOLD); | ||
876 | -#endif | ||
877 | #endif | ||
878 | MYDB_END_ALLOW_THREADS; | ||
879 | RETURN_IF_ERR(); | ||
880 | @@ -7608,6 +7618,7 @@ DBEnv_repmgr_start(DBEnvObject* self, PyObject* args, PyObject* | ||
881 | RETURN_NONE(); | ||
882 | } | ||
883 | |||
884 | +#if (DBVER < 52) | ||
885 | static PyObject* | ||
886 | DBEnv_repmgr_set_local_site(DBEnvObject* self, PyObject* args, PyObject* | ||
887 | kwargs) | ||
888 | @@ -7654,6 +7665,7 @@ DBEnv_repmgr_add_remote_site(DBEnvObject* self, PyObject* args, PyObject* | ||
889 | RETURN_IF_ERR(); | ||
890 | return NUMBER_FromLong(eidp); | ||
891 | } | ||
892 | +#endif | ||
893 | |||
894 | static PyObject* | ||
895 | DBEnv_repmgr_set_ack_policy(DBEnvObject* self, PyObject* args) | ||
896 | @@ -8482,65 +8494,43 @@ static PyMethodDef DB_methods[] = { | ||
897 | {"remove", (PyCFunction)DB_remove, METH_VARARGS|METH_KEYWORDS}, | ||
898 | {"rename", (PyCFunction)DB_rename, METH_VARARGS}, | ||
899 | {"set_bt_minkey", (PyCFunction)DB_set_bt_minkey, METH_VARARGS}, | ||
900 | -#if (DBVER >= 42) | ||
901 | {"get_bt_minkey", (PyCFunction)DB_get_bt_minkey, METH_NOARGS}, | ||
902 | -#endif | ||
903 | {"set_bt_compare", (PyCFunction)DB_set_bt_compare, METH_O}, | ||
904 | {"set_cachesize", (PyCFunction)DB_set_cachesize, METH_VARARGS}, | ||
905 | -#if (DBVER >= 42) | ||
906 | {"get_cachesize", (PyCFunction)DB_get_cachesize, METH_NOARGS}, | ||
907 | -#endif | ||
908 | {"set_encrypt", (PyCFunction)DB_set_encrypt, METH_VARARGS|METH_KEYWORDS}, | ||
909 | -#if (DBVER >= 42) | ||
910 | {"get_encrypt_flags", (PyCFunction)DB_get_encrypt_flags, METH_NOARGS}, | ||
911 | -#endif | ||
912 | - | ||
913 | {"set_flags", (PyCFunction)DB_set_flags, METH_VARARGS}, | ||
914 | -#if (DBVER >= 42) | ||
915 | {"get_flags", (PyCFunction)DB_get_flags, METH_NOARGS}, | ||
916 | +#if (DBVER >= 43) | ||
917 | + {"get_transactional", (PyCFunction)DB_get_transactional, METH_NOARGS}, | ||
918 | #endif | ||
919 | {"set_h_ffactor", (PyCFunction)DB_set_h_ffactor, METH_VARARGS}, | ||
920 | -#if (DBVER >= 42) | ||
921 | {"get_h_ffactor", (PyCFunction)DB_get_h_ffactor, METH_NOARGS}, | ||
922 | -#endif | ||
923 | {"set_h_nelem", (PyCFunction)DB_set_h_nelem, METH_VARARGS}, | ||
924 | -#if (DBVER >= 42) | ||
925 | {"get_h_nelem", (PyCFunction)DB_get_h_nelem, METH_NOARGS}, | ||
926 | -#endif | ||
927 | {"set_lorder", (PyCFunction)DB_set_lorder, METH_VARARGS}, | ||
928 | -#if (DBVER >= 42) | ||
929 | {"get_lorder", (PyCFunction)DB_get_lorder, METH_NOARGS}, | ||
930 | -#endif | ||
931 | {"set_pagesize", (PyCFunction)DB_set_pagesize, METH_VARARGS}, | ||
932 | -#if (DBVER >= 42) | ||
933 | {"get_pagesize", (PyCFunction)DB_get_pagesize, METH_NOARGS}, | ||
934 | -#endif | ||
935 | {"set_re_delim", (PyCFunction)DB_set_re_delim, METH_VARARGS}, | ||
936 | -#if (DBVER >= 42) | ||
937 | {"get_re_delim", (PyCFunction)DB_get_re_delim, METH_NOARGS}, | ||
938 | -#endif | ||
939 | {"set_re_len", (PyCFunction)DB_set_re_len, METH_VARARGS}, | ||
940 | -#if (DBVER >= 42) | ||
941 | {"get_re_len", (PyCFunction)DB_get_re_len, METH_NOARGS}, | ||
942 | -#endif | ||
943 | {"set_re_pad", (PyCFunction)DB_set_re_pad, METH_VARARGS}, | ||
944 | -#if (DBVER >= 42) | ||
945 | {"get_re_pad", (PyCFunction)DB_get_re_pad, METH_NOARGS}, | ||
946 | -#endif | ||
947 | {"set_re_source", (PyCFunction)DB_set_re_source, METH_VARARGS}, | ||
948 | -#if (DBVER >= 42) | ||
949 | {"get_re_source", (PyCFunction)DB_get_re_source, METH_NOARGS}, | ||
950 | -#endif | ||
951 | {"set_q_extentsize",(PyCFunction)DB_set_q_extentsize, METH_VARARGS}, | ||
952 | -#if (DBVER >= 42) | ||
953 | {"get_q_extentsize",(PyCFunction)DB_get_q_extentsize, METH_NOARGS}, | ||
954 | -#endif | ||
955 | {"set_private", (PyCFunction)DB_set_private, METH_O}, | ||
956 | {"get_private", (PyCFunction)DB_get_private, METH_NOARGS}, | ||
957 | #if (DBVER >= 46) | ||
958 | {"set_priority", (PyCFunction)DB_set_priority, METH_VARARGS}, | ||
959 | {"get_priority", (PyCFunction)DB_get_priority, METH_NOARGS}, | ||
960 | #endif | ||
961 | + {"get_dbname", (PyCFunction)DB_get_dbname, METH_NOARGS}, | ||
962 | + {"get_open_flags", (PyCFunction)DB_get_open_flags, METH_NOARGS}, | ||
963 | {"stat", (PyCFunction)DB_stat, METH_VARARGS|METH_KEYWORDS}, | ||
964 | #if (DBVER >= 43) | ||
965 | {"stat_print", (PyCFunction)DB_stat_print, | ||
966 | @@ -8639,24 +8629,18 @@ static PyMethodDef DBEnv_methods[] = { | ||
967 | {"get_thread_count", (PyCFunction)DBEnv_get_thread_count, METH_NOARGS}, | ||
968 | #endif | ||
969 | {"set_encrypt", (PyCFunction)DBEnv_set_encrypt, METH_VARARGS|METH_KEYWORDS}, | ||
970 | -#if (DBVER >= 42) | ||
971 | {"get_encrypt_flags", (PyCFunction)DBEnv_get_encrypt_flags, METH_NOARGS}, | ||
972 | {"get_timeout", (PyCFunction)DBEnv_get_timeout, | ||
973 | METH_VARARGS|METH_KEYWORDS}, | ||
974 | -#endif | ||
975 | {"set_timeout", (PyCFunction)DBEnv_set_timeout, METH_VARARGS|METH_KEYWORDS}, | ||
976 | {"set_shm_key", (PyCFunction)DBEnv_set_shm_key, METH_VARARGS}, | ||
977 | -#if (DBVER >= 42) | ||
978 | {"get_shm_key", (PyCFunction)DBEnv_get_shm_key, METH_NOARGS}, | ||
979 | -#endif | ||
980 | #if (DBVER >= 46) | ||
981 | {"set_cache_max", (PyCFunction)DBEnv_set_cache_max, METH_VARARGS}, | ||
982 | {"get_cache_max", (PyCFunction)DBEnv_get_cache_max, METH_NOARGS}, | ||
983 | #endif | ||
984 | {"set_cachesize", (PyCFunction)DBEnv_set_cachesize, METH_VARARGS}, | ||
985 | -#if (DBVER >= 42) | ||
986 | {"get_cachesize", (PyCFunction)DBEnv_get_cachesize, METH_NOARGS}, | ||
987 | -#endif | ||
988 | {"memp_trickle", (PyCFunction)DBEnv_memp_trickle, METH_VARARGS}, | ||
989 | {"memp_sync", (PyCFunction)DBEnv_memp_sync, METH_VARARGS}, | ||
990 | {"memp_stat", (PyCFunction)DBEnv_memp_stat, | ||
991 | @@ -8685,33 +8669,21 @@ static PyMethodDef DBEnv_methods[] = { | ||
992 | #endif | ||
993 | #endif | ||
994 | {"set_data_dir", (PyCFunction)DBEnv_set_data_dir, METH_VARARGS}, | ||
995 | -#if (DBVER >= 42) | ||
996 | {"get_data_dirs", (PyCFunction)DBEnv_get_data_dirs, METH_NOARGS}, | ||
997 | -#endif | ||
998 | -#if (DBVER >= 42) | ||
999 | {"get_flags", (PyCFunction)DBEnv_get_flags, METH_NOARGS}, | ||
1000 | -#endif | ||
1001 | {"set_flags", (PyCFunction)DBEnv_set_flags, METH_VARARGS}, | ||
1002 | #if (DBVER >= 47) | ||
1003 | {"log_set_config", (PyCFunction)DBEnv_log_set_config, METH_VARARGS}, | ||
1004 | {"log_get_config", (PyCFunction)DBEnv_log_get_config, METH_VARARGS}, | ||
1005 | #endif | ||
1006 | {"set_lg_bsize", (PyCFunction)DBEnv_set_lg_bsize, METH_VARARGS}, | ||
1007 | -#if (DBVER >= 42) | ||
1008 | {"get_lg_bsize", (PyCFunction)DBEnv_get_lg_bsize, METH_NOARGS}, | ||
1009 | -#endif | ||
1010 | {"set_lg_dir", (PyCFunction)DBEnv_set_lg_dir, METH_VARARGS}, | ||
1011 | -#if (DBVER >= 42) | ||
1012 | {"get_lg_dir", (PyCFunction)DBEnv_get_lg_dir, METH_NOARGS}, | ||
1013 | -#endif | ||
1014 | {"set_lg_max", (PyCFunction)DBEnv_set_lg_max, METH_VARARGS}, | ||
1015 | -#if (DBVER >= 42) | ||
1016 | {"get_lg_max", (PyCFunction)DBEnv_get_lg_max, METH_NOARGS}, | ||
1017 | -#endif | ||
1018 | {"set_lg_regionmax",(PyCFunction)DBEnv_set_lg_regionmax, METH_VARARGS}, | ||
1019 | -#if (DBVER >= 42) | ||
1020 | {"get_lg_regionmax",(PyCFunction)DBEnv_get_lg_regionmax, METH_NOARGS}, | ||
1021 | -#endif | ||
1022 | #if (DBVER >= 44) | ||
1023 | {"set_lg_filemode", (PyCFunction)DBEnv_set_lg_filemode, METH_VARARGS}, | ||
1024 | {"get_lg_filemode", (PyCFunction)DBEnv_get_lg_filemode, METH_NOARGS}, | ||
1025 | @@ -8721,36 +8693,24 @@ static PyMethodDef DBEnv_methods[] = { | ||
1026 | {"get_lk_partitions", (PyCFunction)DBEnv_get_lk_partitions, METH_NOARGS}, | ||
1027 | #endif | ||
1028 | {"set_lk_detect", (PyCFunction)DBEnv_set_lk_detect, METH_VARARGS}, | ||
1029 | -#if (DBVER >= 42) | ||
1030 | {"get_lk_detect", (PyCFunction)DBEnv_get_lk_detect, METH_NOARGS}, | ||
1031 | -#endif | ||
1032 | #if (DBVER < 45) | ||
1033 | {"set_lk_max", (PyCFunction)DBEnv_set_lk_max, METH_VARARGS}, | ||
1034 | #endif | ||
1035 | {"set_lk_max_locks", (PyCFunction)DBEnv_set_lk_max_locks, METH_VARARGS}, | ||
1036 | -#if (DBVER >= 42) | ||
1037 | {"get_lk_max_locks", (PyCFunction)DBEnv_get_lk_max_locks, METH_NOARGS}, | ||
1038 | -#endif | ||
1039 | {"set_lk_max_lockers", (PyCFunction)DBEnv_set_lk_max_lockers, METH_VARARGS}, | ||
1040 | -#if (DBVER >= 42) | ||
1041 | {"get_lk_max_lockers", (PyCFunction)DBEnv_get_lk_max_lockers, METH_NOARGS}, | ||
1042 | -#endif | ||
1043 | {"set_lk_max_objects", (PyCFunction)DBEnv_set_lk_max_objects, METH_VARARGS}, | ||
1044 | -#if (DBVER >= 42) | ||
1045 | {"get_lk_max_objects", (PyCFunction)DBEnv_get_lk_max_objects, METH_NOARGS}, | ||
1046 | -#endif | ||
1047 | #if (DBVER >= 43) | ||
1048 | {"stat_print", (PyCFunction)DBEnv_stat_print, | ||
1049 | METH_VARARGS|METH_KEYWORDS}, | ||
1050 | #endif | ||
1051 | {"set_mp_mmapsize", (PyCFunction)DBEnv_set_mp_mmapsize, METH_VARARGS}, | ||
1052 | -#if (DBVER >= 42) | ||
1053 | {"get_mp_mmapsize", (PyCFunction)DBEnv_get_mp_mmapsize, METH_NOARGS}, | ||
1054 | -#endif | ||
1055 | {"set_tmp_dir", (PyCFunction)DBEnv_set_tmp_dir, METH_VARARGS}, | ||
1056 | -#if (DBVER >= 42) | ||
1057 | {"get_tmp_dir", (PyCFunction)DBEnv_get_tmp_dir, METH_NOARGS}, | ||
1058 | -#endif | ||
1059 | {"txn_begin", (PyCFunction)DBEnv_txn_begin, METH_VARARGS|METH_KEYWORDS}, | ||
1060 | {"txn_checkpoint", (PyCFunction)DBEnv_txn_checkpoint, METH_VARARGS}, | ||
1061 | {"txn_stat", (PyCFunction)DBEnv_txn_stat, METH_VARARGS}, | ||
1062 | @@ -8758,10 +8718,8 @@ static PyMethodDef DBEnv_methods[] = { | ||
1063 | {"txn_stat_print", (PyCFunction)DBEnv_txn_stat_print, | ||
1064 | METH_VARARGS|METH_KEYWORDS}, | ||
1065 | #endif | ||
1066 | -#if (DBVER >= 42) | ||
1067 | {"get_tx_max", (PyCFunction)DBEnv_get_tx_max, METH_NOARGS}, | ||
1068 | {"get_tx_timestamp", (PyCFunction)DBEnv_get_tx_timestamp, METH_NOARGS}, | ||
1069 | -#endif | ||
1070 | {"set_tx_max", (PyCFunction)DBEnv_set_tx_max, METH_VARARGS}, | ||
1071 | {"set_tx_timestamp", (PyCFunction)DBEnv_set_tx_timestamp, METH_VARARGS}, | ||
1072 | {"lock_detect", (PyCFunction)DBEnv_lock_detect, METH_VARARGS}, | ||
1073 | @@ -8804,11 +8762,16 @@ static PyMethodDef DBEnv_methods[] = { | ||
1074 | {"get_mp_max_write", (PyCFunction)DBEnv_get_mp_max_write, METH_NOARGS}, | ||
1075 | #endif | ||
1076 | {"set_verbose", (PyCFunction)DBEnv_set_verbose, METH_VARARGS}, | ||
1077 | -#if (DBVER >= 42) | ||
1078 | - {"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS}, | ||
1079 | + {"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS}, | ||
1080 | + {"set_private", (PyCFunction)DBEnv_set_private, METH_O}, | ||
1081 | + {"get_private", (PyCFunction)DBEnv_get_private, METH_NOARGS}, | ||
1082 | + {"get_open_flags", (PyCFunction)DBEnv_get_open_flags, METH_NOARGS}, | ||
1083 | +#if (DBVER >= 47) | ||
1084 | + {"set_intermediate_dir_mode", (PyCFunction)DBEnv_set_intermediate_dir_mode, | ||
1085 | + METH_VARARGS}, | ||
1086 | + {"get_intermediate_dir_mode", (PyCFunction)DBEnv_get_intermediate_dir_mode, | ||
1087 | + METH_NOARGS}, | ||
1088 | #endif | ||
1089 | - {"set_private", (PyCFunction)DBEnv_set_private, METH_O}, | ||
1090 | - {"get_private", (PyCFunction)DBEnv_get_private, METH_NOARGS}, | ||
1091 | {"rep_start", (PyCFunction)DBEnv_rep_start, | ||
1092 | METH_VARARGS|METH_KEYWORDS}, | ||
1093 | {"rep_set_transport", (PyCFunction)DBEnv_rep_set_transport, METH_VARARGS}, | ||
1094 | @@ -8855,10 +8818,12 @@ static PyMethodDef DBEnv_methods[] = { | ||
1095 | #if (DBVER >= 45) | ||
1096 | {"repmgr_start", (PyCFunction)DBEnv_repmgr_start, | ||
1097 | METH_VARARGS|METH_KEYWORDS}, | ||
1098 | +#if (DBVER < 52) | ||
1099 | {"repmgr_set_local_site", (PyCFunction)DBEnv_repmgr_set_local_site, | ||
1100 | METH_VARARGS|METH_KEYWORDS}, | ||
1101 | {"repmgr_add_remote_site", (PyCFunction)DBEnv_repmgr_add_remote_site, | ||
1102 | METH_VARARGS|METH_KEYWORDS}, | ||
1103 | +#endif | ||
1104 | {"repmgr_set_ack_policy", (PyCFunction)DBEnv_repmgr_set_ack_policy, | ||
1105 | METH_VARARGS}, | ||
1106 | {"repmgr_get_ack_policy", (PyCFunction)DBEnv_repmgr_get_ack_policy, | ||
1107 | @@ -8922,13 +8887,9 @@ DBEnv_db_home_get(DBEnvObject* self) | ||
1108 | |||
1109 | CHECK_ENV_NOT_CLOSED(self); | ||
1110 | |||
1111 | -#if (DBVER >= 42) | ||
1112 | MYDB_BEGIN_ALLOW_THREADS; | ||
1113 | self->db_env->get_home(self->db_env, &home); | ||
1114 | MYDB_END_ALLOW_THREADS; | ||
1115 | -#else | ||
1116 | - home=self->db_env->db_home; | ||
1117 | -#endif | ||
1118 | |||
1119 | if (home == NULL) { | ||
1120 | RETURN_NONE(); | ||
1121 | @@ -9298,10 +9259,25 @@ bsddb_version(PyObject* self) | ||
1122 | { | ||
1123 | int major, minor, patch; | ||
1124 | |||
1125 | + /* This should be instantaneous, no need to release the GIL */ | ||
1126 | db_version(&major, &minor, &patch); | ||
1127 | return Py_BuildValue("(iii)", major, minor, patch); | ||
1128 | } | ||
1129 | |||
1130 | +#if (DBVER >= 50) | ||
1131 | +static PyObject* | ||
1132 | +bsddb_version_full(PyObject* self) | ||
1133 | +{ | ||
1134 | + char *version_string; | ||
1135 | + int family, release, major, minor, patch; | ||
1136 | + | ||
1137 | + /* This should be instantaneous, no need to release the GIL */ | ||
1138 | + version_string = db_full_version(&family, &release, &major, &minor, &patch); | ||
1139 | + return Py_BuildValue("(siiiii)", | ||
1140 | + version_string, family, release, major, minor, patch); | ||
1141 | +} | ||
1142 | +#endif | ||
1143 | + | ||
1144 | |||
1145 | /* List of functions defined in the module */ | ||
1146 | static PyMethodDef bsddb_methods[] = { | ||
1147 | @@ -9311,6 +9287,9 @@ static PyMethodDef bsddb_methods[] = { | ||
1148 | {"DBSequence", (PyCFunction)DBSequence_construct, METH_VARARGS | METH_KEYWORDS }, | ||
1149 | #endif | ||
1150 | {"version", (PyCFunction)bsddb_version, METH_NOARGS, bsddb_version_doc}, | ||
1151 | +#if (DBVER >= 50) | ||
1152 | + {"full_version", (PyCFunction)bsddb_version_full, METH_NOARGS}, | ||
1153 | +#endif | ||
1154 | {NULL, NULL} /* sentinel */ | ||
1155 | }; | ||
1156 | |||
1157 | @@ -9328,6 +9307,11 @@ static BSDDB_api bsddb_api; | ||
1158 | */ | ||
1159 | #define ADD_INT(dict, NAME) _addIntToDict(dict, #NAME, NAME) | ||
1160 | |||
1161 | +/* | ||
1162 | +** We can rename the module at import time, so the string allocated | ||
1163 | +** must be big enough, and any use of the name must use this particular | ||
1164 | +** string. | ||
1165 | +*/ | ||
1166 | #define MODULE_NAME_MAX_LEN 11 | ||
1167 | static char _bsddbModuleName[MODULE_NAME_MAX_LEN+1] = "_bsddb"; | ||
1168 | |||
1169 | @@ -9428,16 +9412,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1170 | ADD_INT(d, DB_MAX_RECORDS); | ||
1171 | |||
1172 | #if (DBVER < 48) | ||
1173 | -#if (DBVER >= 42) | ||
1174 | ADD_INT(d, DB_RPCCLIENT); | ||
1175 | -#else | ||
1176 | - ADD_INT(d, DB_CLIENT); | ||
1177 | - /* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */ | ||
1178 | - _addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT); | ||
1179 | -#endif | ||
1180 | #endif | ||
1181 | |||
1182 | -#if (DBVER < 48) | ||
1183 | +#if (DBVER < 48 || DBVER > 51) | ||
1184 | ADD_INT(d, DB_XA_CREATE); | ||
1185 | #endif | ||
1186 | |||
1187 | @@ -9477,6 +9455,14 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1188 | ADD_INT(d, DB_TXN_SYNC); | ||
1189 | ADD_INT(d, DB_TXN_NOWAIT); | ||
1190 | |||
1191 | +#if (DBVER >= 51) | ||
1192 | + ADD_INT(d, DB_TXN_BULK); | ||
1193 | +#endif | ||
1194 | + | ||
1195 | +#if (DBVER >= 48) | ||
1196 | + ADD_INT(d, DB_CURSOR_BULK); | ||
1197 | +#endif | ||
1198 | + | ||
1199 | #if (DBVER >= 46) | ||
1200 | ADD_INT(d, DB_TXN_WAIT); | ||
1201 | #endif | ||
1202 | @@ -9561,9 +9547,7 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1203 | ADD_INT(d, DB_ARCH_ABS); | ||
1204 | ADD_INT(d, DB_ARCH_DATA); | ||
1205 | ADD_INT(d, DB_ARCH_LOG); | ||
1206 | -#if (DBVER >= 42) | ||
1207 | ADD_INT(d, DB_ARCH_REMOVE); | ||
1208 | -#endif | ||
1209 | |||
1210 | ADD_INT(d, DB_BTREE); | ||
1211 | ADD_INT(d, DB_HASH); | ||
1212 | @@ -9591,9 +9575,6 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1213 | ADD_INT(d, DB_CACHED_COUNTS); | ||
1214 | #endif | ||
1215 | |||
1216 | -#if (DBVER <= 41) | ||
1217 | - ADD_INT(d, DB_COMMIT); | ||
1218 | -#endif | ||
1219 | ADD_INT(d, DB_CONSUME); | ||
1220 | ADD_INT(d, DB_CONSUME_WAIT); | ||
1221 | ADD_INT(d, DB_CURRENT); | ||
1222 | @@ -9651,8 +9632,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1223 | ADD_INT(d, DB_LOCK_DEADLOCK); | ||
1224 | ADD_INT(d, DB_LOCK_NOTGRANTED); | ||
1225 | ADD_INT(d, DB_NOSERVER); | ||
1226 | +#if (DBVER < 52) | ||
1227 | ADD_INT(d, DB_NOSERVER_HOME); | ||
1228 | ADD_INT(d, DB_NOSERVER_ID); | ||
1229 | +#endif | ||
1230 | ADD_INT(d, DB_NOTFOUND); | ||
1231 | ADD_INT(d, DB_OLD_VERSION); | ||
1232 | ADD_INT(d, DB_RUNRECOVERY); | ||
1233 | @@ -9671,6 +9654,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1234 | #if (DBVER >= 43) | ||
1235 | ADD_INT(d, DB_STAT_SUBSYSTEM); | ||
1236 | ADD_INT(d, DB_STAT_MEMP_HASH); | ||
1237 | + ADD_INT(d, DB_STAT_LOCK_CONF); | ||
1238 | + ADD_INT(d, DB_STAT_LOCK_LOCKERS); | ||
1239 | + ADD_INT(d, DB_STAT_LOCK_OBJECTS); | ||
1240 | + ADD_INT(d, DB_STAT_LOCK_PARAMS); | ||
1241 | #endif | ||
1242 | |||
1243 | #if (DBVER >= 48) | ||
1244 | @@ -9690,7 +9677,6 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1245 | ADD_INT(d, DB_EID_INVALID); | ||
1246 | ADD_INT(d, DB_EID_BROADCAST); | ||
1247 | |||
1248 | -#if (DBVER >= 42) | ||
1249 | ADD_INT(d, DB_TIME_NOTGRANTED); | ||
1250 | ADD_INT(d, DB_TXN_NOT_DURABLE); | ||
1251 | ADD_INT(d, DB_TXN_WRITE_NOSYNC); | ||
1252 | @@ -9698,9 +9684,8 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1253 | ADD_INT(d, DB_INIT_REP); | ||
1254 | ADD_INT(d, DB_ENCRYPT); | ||
1255 | ADD_INT(d, DB_CHKSUM); | ||
1256 | -#endif | ||
1257 | |||
1258 | -#if (DBVER >= 42) && (DBVER < 47) | ||
1259 | +#if (DBVER < 47) | ||
1260 | ADD_INT(d, DB_LOG_AUTOREMOVE); | ||
1261 | ADD_INT(d, DB_DIRECT_LOG); | ||
1262 | #endif | ||
1263 | @@ -9733,6 +9718,20 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1264 | ADD_INT(d, DB_VERB_REPLICATION); | ||
1265 | ADD_INT(d, DB_VERB_WAITSFOR); | ||
1266 | |||
1267 | +#if (DBVER >= 50) | ||
1268 | + ADD_INT(d, DB_VERB_REP_SYSTEM); | ||
1269 | +#endif | ||
1270 | + | ||
1271 | +#if (DBVER >= 47) | ||
1272 | + ADD_INT(d, DB_VERB_REP_ELECT); | ||
1273 | + ADD_INT(d, DB_VERB_REP_LEASE); | ||
1274 | + ADD_INT(d, DB_VERB_REP_MISC); | ||
1275 | + ADD_INT(d, DB_VERB_REP_MSGS); | ||
1276 | + ADD_INT(d, DB_VERB_REP_SYNC); | ||
1277 | + ADD_INT(d, DB_VERB_REPMGR_CONNFAIL); | ||
1278 | + ADD_INT(d, DB_VERB_REPMGR_MISC); | ||
1279 | +#endif | ||
1280 | + | ||
1281 | #if (DBVER >= 45) | ||
1282 | ADD_INT(d, DB_EVENT_PANIC); | ||
1283 | ADD_INT(d, DB_EVENT_REP_CLIENT); | ||
1284 | @@ -9748,16 +9747,25 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1285 | ADD_INT(d, DB_EVENT_WRITE_FAILED); | ||
1286 | #endif | ||
1287 | |||
1288 | +#if (DBVER >= 50) | ||
1289 | + ADD_INT(d, DB_REPMGR_CONF_ELECTIONS); | ||
1290 | + ADD_INT(d, DB_EVENT_REP_MASTER_FAILURE); | ||
1291 | + ADD_INT(d, DB_EVENT_REP_DUPMASTER); | ||
1292 | + ADD_INT(d, DB_EVENT_REP_ELECTION_FAILED); | ||
1293 | +#endif | ||
1294 | +#if (DBVER >= 48) | ||
1295 | + ADD_INT(d, DB_EVENT_REG_ALIVE); | ||
1296 | + ADD_INT(d, DB_EVENT_REG_PANIC); | ||
1297 | +#endif | ||
1298 | + | ||
1299 | ADD_INT(d, DB_REP_DUPMASTER); | ||
1300 | ADD_INT(d, DB_REP_HOLDELECTION); | ||
1301 | #if (DBVER >= 44) | ||
1302 | ADD_INT(d, DB_REP_IGNORE); | ||
1303 | ADD_INT(d, DB_REP_JOIN_FAILURE); | ||
1304 | #endif | ||
1305 | -#if (DBVER >= 42) | ||
1306 | ADD_INT(d, DB_REP_ISPERM); | ||
1307 | ADD_INT(d, DB_REP_NOTPERM); | ||
1308 | -#endif | ||
1309 | ADD_INT(d, DB_REP_NEWSITE); | ||
1310 | |||
1311 | ADD_INT(d, DB_REP_MASTER); | ||
1312 | @@ -9766,7 +9774,13 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1313 | ADD_INT(d, DB_REP_PERMANENT); | ||
1314 | |||
1315 | #if (DBVER >= 44) | ||
1316 | +#if (DBVER >= 50) | ||
1317 | + ADD_INT(d, DB_REP_CONF_AUTOINIT); | ||
1318 | +#else | ||
1319 | ADD_INT(d, DB_REP_CONF_NOAUTOINIT); | ||
1320 | +#endif /* 5.0 */ | ||
1321 | +#endif /* 4.4 */ | ||
1322 | +#if (DBVER >= 44) | ||
1323 | ADD_INT(d, DB_REP_CONF_DELAYCLIENT); | ||
1324 | ADD_INT(d, DB_REP_CONF_BULK); | ||
1325 | ADD_INT(d, DB_REP_CONF_NOWAIT); | ||
1326 | @@ -9774,9 +9788,7 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1327 | ADD_INT(d, DB_REP_REREQUEST); | ||
1328 | #endif | ||
1329 | |||
1330 | -#if (DBVER >= 42) | ||
1331 | ADD_INT(d, DB_REP_NOBUFFER); | ||
1332 | -#endif | ||
1333 | |||
1334 | #if (DBVER >= 46) | ||
1335 | ADD_INT(d, DB_REP_LEASE_EXPIRED); | ||
1336 | @@ -9819,6 +9831,28 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1337 | ADD_INT(d, DB_STAT_ALL); | ||
1338 | #endif | ||
1339 | |||
1340 | +#if (DBVER >= 51) | ||
1341 | + ADD_INT(d, DB_REPMGR_ACKS_ALL_AVAILABLE); | ||
1342 | +#endif | ||
1343 | + | ||
1344 | +#if (DBVER >= 48) | ||
1345 | + ADD_INT(d, DB_REP_CONF_INMEM); | ||
1346 | +#endif | ||
1347 | + | ||
1348 | + ADD_INT(d, DB_TIMEOUT); | ||
1349 | + | ||
1350 | +#if (DBVER >= 50) | ||
1351 | + ADD_INT(d, DB_FORCESYNC); | ||
1352 | +#endif | ||
1353 | + | ||
1354 | +#if (DBVER >= 48) | ||
1355 | + ADD_INT(d, DB_FAILCHK); | ||
1356 | +#endif | ||
1357 | + | ||
1358 | +#if (DBVER >= 51) | ||
1359 | + ADD_INT(d, DB_HOTBACKUP_IN_PROGRESS); | ||
1360 | +#endif | ||
1361 | + | ||
1362 | #if (DBVER >= 43) | ||
1363 | ADD_INT(d, DB_BUFFER_SMALL); | ||
1364 | ADD_INT(d, DB_SEQ_DEC); | ||
1365 | @@ -9856,6 +9890,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1366 | ADD_INT(d, DB_SET_LOCK_TIMEOUT); | ||
1367 | ADD_INT(d, DB_SET_TXN_TIMEOUT); | ||
1368 | |||
1369 | +#if (DBVER >= 48) | ||
1370 | + ADD_INT(d, DB_SET_REG_TIMEOUT); | ||
1371 | +#endif | ||
1372 | + | ||
1373 | /* The exception name must be correct for pickled exception * | ||
1374 | * objects to unpickle properly. */ | ||
1375 | #ifdef PYBSDDB_STANDALONE /* different value needed for standalone pybsddb */ | ||
1376 | @@ -9912,8 +9950,10 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1377 | MAKE_EX(DBRunRecoveryError); | ||
1378 | MAKE_EX(DBVerifyBadError); | ||
1379 | MAKE_EX(DBNoServerError); | ||
1380 | +#if (DBVER >= 44 && DBVER < 52) | ||
1381 | MAKE_EX(DBNoServerHomeError); | ||
1382 | MAKE_EX(DBNoServerIDError); | ||
1383 | +#endif | ||
1384 | MAKE_EX(DBPageNotFoundError); | ||
1385 | MAKE_EX(DBSecondaryBadError); | ||
1386 | |||
1387 | @@ -9927,9 +9967,7 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1388 | MAKE_EX(DBNoSuchFileError); | ||
1389 | MAKE_EX(DBPermissionsError); | ||
1390 | |||
1391 | -#if (DBVER >= 42) | ||
1392 | MAKE_EX(DBRepHandleDeadError); | ||
1393 | -#endif | ||
1394 | #if (DBVER >= 44) | ||
1395 | MAKE_EX(DBRepLockoutError); | ||
1396 | #endif | ||
1397 | @@ -9947,6 +9985,7 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1398 | #undef MAKE_EX | ||
1399 | |||
1400 | /* Initialise the C API structure and add it to the module */ | ||
1401 | + bsddb_api.api_version = PYBSDDB_API_VERSION; | ||
1402 | bsddb_api.db_type = &DB_Type; | ||
1403 | bsddb_api.dbcursor_type = &DBCursor_Type; | ||
1404 | bsddb_api.dblogcursor_type = &DBLogCursor_Type; | ||
1405 | @@ -9955,19 +9994,25 @@ PyMODINIT_FUNC PyInit__bsddb(void) /* Note the two underscores */ | ||
1406 | bsddb_api.dblock_type = &DBLock_Type; | ||
1407 | #if (DBVER >= 43) | ||
1408 | bsddb_api.dbsequence_type = &DBSequence_Type; | ||
1409 | +#else | ||
1410 | + bsddb_api.dbsequence_type = NULL; | ||
1411 | #endif | ||
1412 | bsddb_api.makeDBError = makeDBError; | ||
1413 | |||
1414 | /* | ||
1415 | - ** Capsules exist from Python 3.1, but I | ||
1416 | - ** don't want to break the API compatibility | ||
1417 | - ** for already published Python versions. | ||
1418 | + ** Capsules exist from Python 2.7 and 3.1. | ||
1419 | + ** We don't support Python 3.0 anymore, so... | ||
1420 | + ** #if (PY_VERSION_HEX < ((PY_MAJOR_VERSION < 3) ? 0x02070000 : 0x03020000)) | ||
1421 | */ | ||
1422 | -#if (PY_VERSION_HEX < 0x03020000) | ||
1423 | +#if (PY_VERSION_HEX < 0x02070000) | ||
1424 | py_api = PyCObject_FromVoidPtr((void*)&bsddb_api, NULL); | ||
1425 | #else | ||
1426 | { | ||
1427 | - char py_api_name[250]; | ||
1428 | + /* | ||
1429 | + ** The data must outlive the call!!. So, the static definition. | ||
1430 | + ** The buffer must be big enough... | ||
1431 | + */ | ||
1432 | + static char py_api_name[MODULE_NAME_MAX_LEN+10]; | ||
1433 | |||
1434 | strcpy(py_api_name, _bsddbModuleName); | ||
1435 | strcat(py_api_name, ".api"); | ||
1436 | diff --git a/Modules/bsddb.h b/Modules/bsddb.h | ||
1437 | index a3a687b..c1d862a 100644 | ||
1438 | --- a/Modules/bsddb.h | ||
1439 | +++ b/Modules/bsddb.h | ||
1440 | @@ -109,7 +109,7 @@ | ||
1441 | #error "eek! DBVER can't handle minor versions > 9" | ||
1442 | #endif | ||
1443 | |||
1444 | -#define PY_BSDDB_VERSION "4.8.4.2" | ||
1445 | +#define PY_BSDDB_VERSION "5.3.15" | ||
1446 | |||
1447 | /* Python object definitions */ | ||
1448 | |||
1449 | @@ -236,7 +236,7 @@ typedef struct DBSequenceObject { | ||
1450 | /* To access the structure from an external module, use code like the | ||
1451 | following (error checking missed out for clarity): | ||
1452 | |||
1453 | - // If you are using Python before 3.2: | ||
1454 | + // If you are using Python before 2.7: | ||
1455 | BSDDB_api* bsddb_api; | ||
1456 | PyObject* mod; | ||
1457 | PyObject* cobj; | ||
1458 | @@ -249,7 +249,7 @@ typedef struct DBSequenceObject { | ||
1459 | Py_DECREF(mod); | ||
1460 | |||
1461 | |||
1462 | - // If you are using Python 3.2 or up: | ||
1463 | + // If you are using Python 2.7 or up: (except Python 3.0, unsupported) | ||
1464 | BSDDB_api* bsddb_api; | ||
1465 | |||
1466 | // Use "bsddb3._pybsddb.api" if you're using | ||
1467 | @@ -257,10 +257,14 @@ typedef struct DBSequenceObject { | ||
1468 | bsddb_api = (void **)PyCapsule_Import("bsddb._bsddb.api", 1); | ||
1469 | |||
1470 | |||
1471 | + Check "api_version" number before trying to use the API. | ||
1472 | + | ||
1473 | The structure's members must not be changed. | ||
1474 | */ | ||
1475 | |||
1476 | +#define PYBSDDB_API_VERSION 1 | ||
1477 | typedef struct { | ||
1478 | + unsigned int api_version; | ||
1479 | /* Type objects */ | ||
1480 | PyTypeObject* db_type; | ||
1481 | PyTypeObject* dbcursor_type; | ||
1482 | @@ -268,9 +272,7 @@ typedef struct { | ||
1483 | PyTypeObject* dbenv_type; | ||
1484 | PyTypeObject* dbtxn_type; | ||
1485 | PyTypeObject* dblock_type; | ||
1486 | -#if (DBVER >= 43) | ||
1487 | - PyTypeObject* dbsequence_type; | ||
1488 | -#endif | ||
1489 | + PyTypeObject* dbsequence_type; /* If DBVER < 43 -> NULL */ | ||
1490 | |||
1491 | /* Functions */ | ||
1492 | int (*makeDBError)(int err); | ||
1493 | @@ -289,9 +291,9 @@ typedef struct { | ||
1494 | #define DBEnvObject_Check(v) ((v)->ob_type == bsddb_api->dbenv_type) | ||
1495 | #define DBTxnObject_Check(v) ((v)->ob_type == bsddb_api->dbtxn_type) | ||
1496 | #define DBLockObject_Check(v) ((v)->ob_type == bsddb_api->dblock_type) | ||
1497 | -#if (DBVER >= 43) | ||
1498 | -#define DBSequenceObject_Check(v) ((v)->ob_type == bsddb_api->dbsequence_type) | ||
1499 | -#endif | ||
1500 | +#define DBSequenceObject_Check(v) \ | ||
1501 | + ((bsddb_api->dbsequence_type) && \ | ||
1502 | + ((v)->ob_type == bsddb_api->dbsequence_type)) | ||
1503 | |||
1504 | #endif /* COMPILING_BSDDB_C */ | ||
1505 | |||
1506 | diff --git a/setup.py b/setup.py | ||
1507 | index 6b47451..e8ac96c 100644 | ||
1508 | --- a/setup.py | ||
1509 | +++ b/setup.py | ||
1510 | @@ -799,7 +799,7 @@ class PyBuildExt(build_ext): | ||
1511 | # a release. Most open source OSes come with one or more | ||
1512 | # versions of BerkeleyDB already installed. | ||
1513 | |||
1514 | - max_db_ver = (4, 8) | ||
1515 | + max_db_ver = (5, 3) | ||
1516 | min_db_ver = (4, 1) | ||
1517 | db_setup_debug = False # verbose debug prints from this script? | ||
1518 | |||
1519 | @@ -821,7 +821,11 @@ class PyBuildExt(build_ext): | ||
1520 | return True | ||
1521 | |||
1522 | def gen_db_minor_ver_nums(major): | ||
1523 | - if major == 4: | ||
1524 | + if major == 5: | ||
1525 | + for x in range(max_db_ver[1]+1): | ||
1526 | + if allow_db_ver((5, x)): | ||
1527 | + yield x | ||
1528 | + elif major == 4: | ||
1529 | for x in range(max_db_ver[1]+1): | ||
1530 | if allow_db_ver((4, x)): | ||
1531 | yield x | ||
1532 | @@ -835,6 +839,9 @@ class PyBuildExt(build_ext): | ||
1533 | # construct a list of paths to look for the header file in on | ||
1534 | # top of the normal inc_dirs. | ||
1535 | db_inc_paths = [ | ||
1536 | + '/usr/include/db5', | ||
1537 | + '/usr/local/include/db5', | ||
1538 | + '/opt/sfw/include/db5', | ||
1539 | '/usr/include/db4', | ||
1540 | '/usr/local/include/db4', | ||
1541 | '/opt/sfw/include/db4', | ||
1542 | @@ -845,6 +852,16 @@ class PyBuildExt(build_ext): | ||
1543 | '/sw/include/db4', | ||
1544 | '/sw/include/db3', | ||
1545 | ] | ||
1546 | + # 5.x minor number specific paths | ||
1547 | + for x in gen_db_minor_ver_nums(5): | ||
1548 | + db_inc_paths.append('/usr/include/db5%d' % x) | ||
1549 | + db_inc_paths.append('/usr/include/db5.%d' % x) | ||
1550 | + db_inc_paths.append('/usr/local/BerkeleyDB.5.%d/include' % x) | ||
1551 | + db_inc_paths.append('/usr/local/include/db5%d' % x) | ||
1552 | + db_inc_paths.append('/pkg/db-5.%d/include' % x) | ||
1553 | + db_inc_paths.append('/opt/db-5.%d/include' % x) | ||
1554 | + # MacPorts default (http://www.macports.org/) | ||
1555 | + db_inc_paths.append('/opt/local/include/db5%d' % x) | ||
1556 | # 4.x minor number specific paths | ||
1557 | for x in gen_db_minor_ver_nums(4): | ||
1558 | db_inc_paths.append('/usr/include/db4%d' % x) | ||
1559 | @@ -871,6 +888,10 @@ class PyBuildExt(build_ext): | ||
1560 | for dn in inc_dirs: | ||
1561 | std_variants.append(os.path.join(dn, 'db3')) | ||
1562 | std_variants.append(os.path.join(dn, 'db4')) | ||
1563 | + std_variants.append(os.path.join(dn, 'db5')) | ||
1564 | + for x in gen_db_minor_ver_nums(5): | ||
1565 | + std_variants.append(os.path.join(dn, "db5%d"%x)) | ||
1566 | + std_variants.append(os.path.join(dn, "db5.%d"%x)) | ||
1567 | for x in gen_db_minor_ver_nums(4): | ||
1568 | std_variants.append(os.path.join(dn, "db4%d"%x)) | ||
1569 | std_variants.append(os.path.join(dn, "db4.%d"%x)) | ||
1570 | -- | ||
1571 | 1.7.7 | ||
1572 | |||
diff --git a/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch b/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch deleted file mode 100644 index b84f8c3461..0000000000 --- a/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | python: fix build error with Readline 6.3 | ||
2 | |||
3 | Backport two patches from upstream: | ||
4 | |||
5 | use new readline function types (closes #20374) | ||
6 | Issue #20374: Avoid compiler warnings when compiling readline with libedit. | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | |||
10 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
11 | --- | ||
12 | Modules/readline.c | 15 ++++++++++++--- | ||
13 | 1 file changed, 12 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/Modules/readline.c b/Modules/readline.c | ||
16 | index b5e258d..d3f52aa 100644 | ||
17 | --- a/Modules/readline.c | ||
18 | +++ b/Modules/readline.c | ||
19 | @@ -735,15 +735,24 @@ on_hook(PyObject *func) | ||
20 | return result; | ||
21 | } | ||
22 | |||
23 | + | ||
24 | static int | ||
25 | +#if defined(_RL_FUNCTION_TYPEDEF) | ||
26 | on_startup_hook(void) | ||
27 | +#else | ||
28 | +on_startup_hook() | ||
29 | +#endif | ||
30 | { | ||
31 | return on_hook(startup_hook); | ||
32 | } | ||
33 | |||
34 | #ifdef HAVE_RL_PRE_INPUT_HOOK | ||
35 | static int | ||
36 | +#if defined(_RL_FUNCTION_TYPEDEF) | ||
37 | on_pre_input_hook(void) | ||
38 | +#else | ||
39 | +on_pre_input_hook() | ||
40 | +#endif | ||
41 | { | ||
42 | return on_hook(pre_input_hook); | ||
43 | } | ||
44 | @@ -886,12 +895,12 @@ setup_readline(void) | ||
45 | rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap); | ||
46 | rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap); | ||
47 | /* Set our hook functions */ | ||
48 | - rl_startup_hook = (Function *)on_startup_hook; | ||
49 | + rl_startup_hook = (rl_hook_func_t *)on_startup_hook; | ||
50 | #ifdef HAVE_RL_PRE_INPUT_HOOK | ||
51 | - rl_pre_input_hook = (Function *)on_pre_input_hook; | ||
52 | + rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook; | ||
53 | #endif | ||
54 | /* Set our completion function */ | ||
55 | - rl_attempted_completion_function = (CPPFunction *)flex_complete; | ||
56 | + rl_attempted_completion_function = (rl_completion_func_t *)flex_complete; | ||
57 | /* Set Python word break characters */ | ||
58 | rl_completer_word_break_characters = | ||
59 | strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?"); | ||
60 | -- | ||
61 | 1.7.9.5 | ||
62 | |||
diff --git a/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch b/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch deleted file mode 100644 index 2d35520a6d..0000000000 --- a/meta/recipes-devtools/python/python/python2.7.3-nossl3.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | python: Building without SSLv3 support | ||
2 | |||
3 | Building without SSLv3 support when openssl is built | ||
4 | without any support for SSLv3 | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Reference: | ||
9 | https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=76A8611#22 | ||
10 | |||
11 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
12 | --- | ||
13 | diff -ruN a/Modules/_ssl.c b/Modules/_ssl.c | ||
14 | --- a/Modules/_ssl.c 2014-11-26 07:43:58.755679939 +0100 | ||
15 | +++ b/Modules/_ssl.c 2014-11-26 07:49:10.454182400 +0100 | ||
16 | @@ -302,8 +302,10 @@ | ||
17 | PySSL_BEGIN_ALLOW_THREADS | ||
18 | if (proto_version == PY_SSL_VERSION_TLS1) | ||
19 | self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */ | ||
20 | +#ifndef OPENSSL_NO_SSL3 | ||
21 | else if (proto_version == PY_SSL_VERSION_SSL3) | ||
22 | self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */ | ||
23 | +#endif | ||
24 | #ifndef OPENSSL_NO_SSL2 | ||
25 | else if (proto_version == PY_SSL_VERSION_SSL2) | ||
26 | self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */ | ||
27 | @@ -1777,8 +1779,10 @@ | ||
28 | PyModule_AddIntConstant(m, "PROTOCOL_SSLv2", | ||
29 | PY_SSL_VERSION_SSL2); | ||
30 | #endif | ||
31 | +#ifndef OPENSSL_NO_SSL3 | ||
32 | PyModule_AddIntConstant(m, "PROTOCOL_SSLv3", | ||
33 | PY_SSL_VERSION_SSL3); | ||
34 | +#endif | ||
35 | PyModule_AddIntConstant(m, "PROTOCOL_SSLv23", | ||
36 | PY_SSL_VERSION_SSL23); | ||
37 | PyModule_AddIntConstant(m, "PROTOCOL_TLSv1", | ||
diff --git a/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch deleted file mode 100644 index 3462620917..0000000000 --- a/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | # HG changeset patch | ||
2 | # User Vinay Sajip <vinay_sajip@yahoo.co.uk> | ||
3 | # Date 1334583503 -3600 | ||
4 | # Node ID af46a001d5eca99a7ff44ed18256c235c5c3f1d0 | ||
5 | # Parent 33bc53e0aa9ea42c6a6bb077d182e62c8c569aa1 | ||
6 | Issue #14452: remove BOM insertion code. | ||
7 | |||
8 | Backport from https://hg.python.org/cpython/rev/af46a001d5ec. | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
12 | --- | ||
13 | diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py | ||
14 | --- a/Lib/logging/handlers.py | ||
15 | +++ b/Lib/logging/handlers.py | ||
16 | @@ -821,8 +821,6 @@ class SysLogHandler(logging.Handler): | ||
17 | # Message is a string. Convert to bytes as required by RFC 5424 | ||
18 | if type(msg) is unicode: | ||
19 | msg = msg.encode('utf-8') | ||
20 | - if codecs: | ||
21 | - msg = codecs.BOM_UTF8 + msg | ||
22 | msg = prio + msg | ||
23 | try: | ||
24 | if self.unixsocket: | ||
diff --git a/meta/recipes-devtools/python/python/remove_sqlite_rpath.patch b/meta/recipes-devtools/python/python/remove_sqlite_rpath.patch deleted file mode 100644 index 4ec627ea51..0000000000 --- a/meta/recipes-devtools/python/python/remove_sqlite_rpath.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | This patch removes the RPATH setting which contains a pointer to | ||
2 | the target relocated sysroot, which is incorrect. | ||
3 | |||
4 | Upstream-Status: Inappropriate [Embedded Specific] | ||
5 | |||
6 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
7 | |||
8 | Index: Python-2.6.6/setup.py | ||
9 | =================================================================== | ||
10 | --- Python-2.6.6.orig/setup.py 2011-09-28 14:22:57.000000000 -0700 | ||
11 | +++ Python-2.6.6/setup.py 2011-09-28 16:11:25.147279633 -0700 | ||
12 | @@ -1079,7 +1079,6 @@ | ||
13 | include_dirs=["Modules/_sqlite", | ||
14 | sqlite_incdir], | ||
15 | library_dirs=sqlite_libdir, | ||
16 | - runtime_library_dirs=sqlite_libdir, | ||
17 | extra_link_args=sqlite_extra_link_args, | ||
18 | libraries=["sqlite3",])) | ||
19 | else: | ||
diff --git a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch index 0c1f1741cb..dacb552ec7 100644 --- a/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch +++ b/meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch | |||
@@ -6,26 +6,21 @@ Upstream-Status: Inappropriate [distribution] | |||
6 | 6 | ||
7 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> | 7 | Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> |
8 | 8 | ||
9 | Index: Python-2.7.2/setup.py | 9 | |
10 | =================================================================== | 10 | diff --git a/setup.py b/setup.py |
11 | --- Python-2.7.2.orig/setup.py 2012-04-05 22:27:22.437199989 +0300 | 11 | index b887808..ae51607 100644 |
12 | +++ Python-2.7.2/setup.py 2012-04-05 22:26:38.000000000 +0300 | 12 | --- a/setup.py |
13 | @@ -1141,12 +1141,12 @@ | 13 | +++ b/setup.py |
14 | @@ -1237,6 +1237,8 @@ class PyBuildExt(build_ext): | ||
14 | # the more recent berkeleydb's db.h file first in the include path | 15 | # the more recent berkeleydb's db.h file first in the include path |
15 | # when attempting to compile and it will fail. | 16 | # when attempting to compile and it will fail. |
16 | f = "/usr/include/db.h" | 17 | f = "/usr/include/db.h" |
17 | - | ||
18 | + if len(inc_dirs) != 0: | 18 | + if len(inc_dirs) != 0: |
19 | + f = os.path.join(inc_dirs[0], "db.h") | 19 | + f = os.path.join(inc_dirs[0], "db.h") |
20 | if sys.platform == 'darwin': | 20 | |
21 | if host_platform == 'darwin': | ||
21 | if is_macosx_sdk_path(f): | 22 | if is_macosx_sdk_path(f): |
22 | sysroot = macosx_sdk_root() | 23 | @@ -1257,8 +1259,10 @@ class PyBuildExt(build_ext): |
23 | f = os.path.join(sysroot, f[1:]) | ||
24 | - | ||
25 | if os.path.exists(f) and not db_incs: | ||
26 | data = open(f).read() | ||
27 | m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data) | ||
28 | @@ -1161,8 +1161,10 @@ | ||
29 | libraries=libraries)) | 24 | libraries=libraries)) |
30 | else: | 25 | else: |
31 | exts.append(Extension('bsddb185', ['bsddbmodule.c'])) | 26 | exts.append(Extension('bsddb185', ['bsddbmodule.c'])) |
diff --git a/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch b/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch new file mode 100644 index 0000000000..2c657861c8 --- /dev/null +++ b/meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Python tries to use ncursesw from the host, | ||
2 | if it is not found causes an error on configure, | ||
3 | we should use ncursesw from sysroot instead | ||
4 | |||
5 | |||
6 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
7 | |||
8 | Index: Python-2.7.9/configure.ac | ||
9 | =================================================================== | ||
10 | --- Python-2.7.9.orig/configure.ac | ||
11 | +++ Python-2.7.9/configure.ac | ||
12 | @@ -4311,7 +4311,7 @@ fi | ||
13 | |||
14 | # first curses configure check | ||
15 | ac_save_cppflags="$CPPFLAGS" | ||
16 | -CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" | ||
17 | +CPPFLAGS="$CPPFLAGS -I=/usr/include/ncursesw" | ||
18 | |||
19 | AC_CHECK_HEADERS(curses.h ncurses.h) | ||
20 | |||
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.9.bb index a4c95c18e0..048ec3903a 100644 --- a/meta/recipes-devtools/python/python_2.7.3.bb +++ b/meta/recipes-devtools/python/python_2.7.9.bb | |||
@@ -1,19 +1,16 @@ | |||
1 | require python.inc | 1 | require python.inc |
2 | DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" | 2 | DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" |
3 | PR = "${INC_PR}.3" | 3 | PR = "${INC_PR}" |
4 | 4 | ||
5 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | 5 | DISTRO_SRC_URI ?= "file://sitecustomize.py" |
6 | DISTRO_SRC_URI_linuxstdbase = "" | 6 | DISTRO_SRC_URI_linuxstdbase = "" |
7 | SRC_URI += "\ | 7 | SRC_URI += "\ |
8 | file://01-use-proper-tools-for-cross-build.patch \ | 8 | file://01-use-proper-tools-for-cross-build.patch \ |
9 | file://03-fix-tkinter-detection.patch \ | 9 | file://03-fix-tkinter-detection.patch \ |
10 | file://05-enable-ctypes-cross-build.patch \ | ||
11 | file://06-ctypes-libffi-fix-configure.patch \ | ||
12 | file://06-avoid_usr_lib_termcap_path_in_linking.patch \ | 10 | file://06-avoid_usr_lib_termcap_path_in_linking.patch \ |
13 | ${DISTRO_SRC_URI} \ | 11 | ${DISTRO_SRC_URI} \ |
14 | file://multilib.patch \ | 12 | file://multilib.patch \ |
15 | file://cgi_py.patch \ | 13 | file://cgi_py.patch \ |
16 | file://remove_sqlite_rpath.patch \ | ||
17 | file://setup_py_skip_cross_import_check.patch \ | 14 | file://setup_py_skip_cross_import_check.patch \ |
18 | file://add-md5module-support.patch \ | 15 | file://add-md5module-support.patch \ |
19 | file://host_include_contamination.patch \ | 16 | file://host_include_contamination.patch \ |
@@ -23,24 +20,11 @@ SRC_URI += "\ | |||
23 | file://search_db_h_in_inc_dirs_and_avoid_warning.patch \ | 20 | file://search_db_h_in_inc_dirs_and_avoid_warning.patch \ |
24 | file://avoid_warning_about_tkinter.patch \ | 21 | file://avoid_warning_about_tkinter.patch \ |
25 | file://avoid_warning_for_sunos_specific_module.patch \ | 22 | file://avoid_warning_for_sunos_specific_module.patch \ |
26 | file://python-2.7.3-berkeley-db-5.3.patch \ | ||
27 | file://python-2.7.3-remove-bsdb-rpath.patch \ | 23 | file://python-2.7.3-remove-bsdb-rpath.patch \ |
28 | file://builddir.patch \ | ||
29 | file://python-2.7.3-CVE-2012-2135.patch \ | ||
30 | file://gcc-4.8-fix-configure-Wformat.patch \ | ||
31 | file://fix-makefile-for-ptest.patch \ | 24 | file://fix-makefile-for-ptest.patch \ |
32 | file://run-ptest \ | 25 | file://run-ptest \ |
33 | file://CVE-2013-4073_py27.patch \ | ||
34 | file://pypirc-secure.patch \ | ||
35 | file://parallel-makeinst-create-bindir.patch \ | 26 | file://parallel-makeinst-create-bindir.patch \ |
36 | file://python-2.7.3-CVE-2013-1752-smtplib-fix.patch \ | 27 | file://use_sysroot_ncurses_instead_of_host.patch \ |
37 | file://python-fix-build-error-with-Readline-6.3.patch \ | ||
38 | file://python-2.7.3-CVE-2014-1912.patch \ | ||
39 | file://json-flaw-fix.patch \ | ||
40 | file://posix_close.patch \ | ||
41 | file://remove-BOM-insection-code.patch \ | ||
42 | file://python-2.7.3-CVE-2014-7185.patch \ | ||
43 | file://python2.7.3-nossl3.patch \ | ||
44 | " | 28 | " |
45 | 29 | ||
46 | S = "${WORKDIR}/Python-${PV}" | 30 | S = "${WORKDIR}/Python-${PV}" |
@@ -53,7 +37,7 @@ TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__" | |||
53 | TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" | 37 | TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" |
54 | 38 | ||
55 | # The following is a hack until we drop ac_cv_sizeof_off_t from site files | 39 | # The following is a hack until we drop ac_cv_sizeof_off_t from site files |
56 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}" | 40 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)} ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no" |
57 | 41 | ||
58 | do_configure_prepend() { | 42 | do_configure_prepend() { |
59 | rm -f ${S}/Makefile.orig | 43 | rm -f ${S}/Makefile.orig |
diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py index 52224fb934..99bdca8994 100755 --- a/scripts/contrib/python/generate-manifest-2.7.py +++ b/scripts/contrib/python/generate-manifest-2.7.py | |||
@@ -170,8 +170,8 @@ if __name__ == "__main__": | |||
170 | "warnings.* site.* stat.* " + | 170 | "warnings.* site.* stat.* " + |
171 | "UserDict.* UserList.* UserString.* " + | 171 | "UserDict.* UserList.* UserString.* " + |
172 | "lib-dynload/binascii.so lib-dynload/_struct.so lib-dynload/time.so " + | 172 | "lib-dynload/binascii.so lib-dynload/_struct.so lib-dynload/time.so " + |
173 | "lib-dynload/xreadlines.so types.* platform.* ${bindir}/python* " + | 173 | "lib-dynload/xreadlines.so types.* platform.* ${bindir}/python* " + |
174 | "_weakrefset.* sysconfig.* config/Makefile " + | 174 | "_weakrefset.* sysconfig.* _sysconfigdata.* config/Makefile " + |
175 | "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " + | 175 | "${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h " + |
176 | "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ") | 176 | "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ") |
177 | 177 | ||