summaryrefslogtreecommitdiff
path: root/lang/python27/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python27/files')
-rw-r--r--lang/python27/files/patch-CVE-2014-191250
-rw-r--r--lang/python27/files/patch-Doc-library-fcntl.rst11
-rw-r--r--lang/python27/files/patch-Doc__library__fcntl.rst10
-rw-r--r--lang/python27/files/patch-Modules__fcntlmodule.c (renamed from lang/python27/files/patch-Modules-fcntlmodule.c)14
-rw-r--r--lang/python27/files/patch-issue2037455
-rw-r--r--lang/python27/files/patch-setup.py66
-rw-r--r--lang/python27/files/pkg-message11
-rw-r--r--lang/python27/files/pkg-message.in18
8 files changed, 43 insertions, 192 deletions
diff --git a/lang/python27/files/patch-CVE-2014-1912 b/lang/python27/files/patch-CVE-2014-1912
deleted file mode 100644
index aa7bb906e006..000000000000
--- a/lang/python27/files/patch-CVE-2014-1912
+++ /dev/null
@@ -1,50 +0,0 @@
-# HG changeset patch
-# User Benjamin Peterson <benjamin@python.org>
-# Date 1389671978 18000
-# Node ID 87673659d8f7ba1623cd4914f09ad3d2ade034e9
-# Parent 2631d33ee7fbd5f0288931ef37872218d511d2e8
-complain when nbytes > buflen to fix possible buffer overflow (closes #20246)
-
-# HG changeset patch
-# User Stefan Krah <skrah@bytereef.org>
-# Date 1390341952 -3600
-# Node ID b6c5a37b221f5c617125faa363d1b460b0b61b42
-# Parent d55d1cbf5f9a9efa7908fc9412bae676a6b675ef
-Issue #20246: Fix test failures on FreeBSD. Patch by Ryan Smith-Roberts.
-
-diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
---- Lib/test/test_socket.py
-+++ Lib/test/test_socket.py
-@@ -1620,6 +1620,16 @@ class BufferIOTest(SocketConnectedTest):
-
- _testRecvFromIntoMemoryview = _testRecvFromIntoArray
-
-+ def testRecvFromIntoSmallBuffer(self):
-+ # See issue #20246.
-+ buf = bytearray(8)
-+ self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
-+
-+ def _testRecvFromIntoSmallBuffer(self):
-+ with test_support.check_py3k_warnings():
-+ buf = buffer(MSG)
-+ self.serv_conn.send(buf)
-+
-
- TIPC_STYPE = 2000
- TIPC_LOWER = 200
-
-diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
---- Modules/socketmodule.c
-+++ Modules/socketmodule.c
-@@ -2742,6 +2742,10 @@ sock_recvfrom_into(PySocketSockObject *s
- if (recvlen == 0) {
- /* If nbytes was not specified, use the buffer's length */
- recvlen = buflen;
-+ } else if (recvlen > buflen) {
-+ PyErr_SetString(PyExc_ValueError,
-+ "nbytes is greater than the length of the buffer");
-+ goto error;
- }
-
- readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr);
-
diff --git a/lang/python27/files/patch-Doc-library-fcntl.rst b/lang/python27/files/patch-Doc-library-fcntl.rst
deleted file mode 100644
index 0e7245689987..000000000000
--- a/lang/python27/files/patch-Doc-library-fcntl.rst
+++ /dev/null
@@ -1,11 +0,0 @@
---- Doc/library/fcntl.rst.orig 2010-08-14 16:19:09.194215129 +0800
-+++ Doc/library/fcntl.rst 2010-08-14 16:19:36.999453016 +0800
-@@ -50,8 +50,6 @@
- operations are typically defined in the library module :mod:`termios` and the
- argument handling is even more complicated.
-
-- The op parameter is limited to values that can fit in 32-bits.
--
- The parameter *arg* can be one of an integer, absent (treated identically to the
- integer ``0``), an object supporting the read-only buffer interface (most likely
- a plain Python string) or an object supporting the read-write buffer interface.
diff --git a/lang/python27/files/patch-Doc__library__fcntl.rst b/lang/python27/files/patch-Doc__library__fcntl.rst
new file mode 100644
index 000000000000..6036ba629db7
--- /dev/null
+++ b/lang/python27/files/patch-Doc__library__fcntl.rst
@@ -0,0 +1,10 @@
+--- ./Doc/library/fcntl.rst.orig 2014-07-03 21:53:41.473098625 +1000
++++ ./Doc/library/fcntl.rst 2014-07-03 21:54:04.342833056 +1000
+@@ -50,7 +50,6 @@
+ operations are typically defined in the library module :mod:`termios` and the
+ argument handling is even more complicated.
+
+- The op parameter is limited to values that can fit in 32-bits.
+ Additional constants of interest for use as the *op* argument can be
+ found in the :mod:`termios` module, under the same names as used in
+ the relevant C header files.
diff --git a/lang/python27/files/patch-Modules-fcntlmodule.c b/lang/python27/files/patch-Modules__fcntlmodule.c
index b71168e181fe..d8a701caeb26 100644
--- a/lang/python27/files/patch-Modules-fcntlmodule.c
+++ b/lang/python27/files/patch-Modules__fcntlmodule.c
@@ -1,6 +1,6 @@
---- Modules/fcntlmodule.c.orig 2010-08-14 16:36:54.991363730 +0800
-+++ Modules/fcntlmodule.c 2010-08-14 16:41:05.555822031 +0800
-@@ -97,20 +97,15 @@
+--- ./Modules/fcntlmodule.c.orig 2014-07-03 21:57:10.429953240 +1000
++++ ./Modules/fcntlmodule.c 2014-07-03 21:59:36.517210444 +1000
+@@ -98,20 +98,15 @@
{
#define IOCTL_BUFSZ 1024
int fd;
@@ -12,7 +12,7 @@
whereas the system expects it to be a 32bit bit field value
regardless of it being passed as an int or unsigned long on
- various platforms. See the termios.TIOCSWINSZ constant across
-- platforms for an example of thise.
+- platforms for an example of this.
-
- If any of the 64bit platforms ever decide to use more than 32bits
- in their unsigned long ioctl codes this will break and need
@@ -24,7 +24,7 @@
int arg;
int ret;
char *str;
-@@ -118,7 +113,7 @@
+@@ -119,7 +114,7 @@
int mutate_arg = 1;
char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
@@ -33,7 +33,7 @@
conv_descriptor, &fd, &code,
&str, &len, &mutate_arg)) {
char *arg;
-@@ -169,7 +164,7 @@
+@@ -170,7 +165,7 @@
}
PyErr_Clear();
@@ -42,7 +42,7 @@
conv_descriptor, &fd, &code, &str, &len)) {
if (len > IOCTL_BUFSZ) {
PyErr_SetString(PyExc_ValueError,
-@@ -191,7 +186,7 @@
+@@ -192,7 +187,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
diff --git a/lang/python27/files/patch-issue20374 b/lang/python27/files/patch-issue20374
deleted file mode 100644
index d6d0c829c611..000000000000
--- a/lang/python27/files/patch-issue20374
+++ /dev/null
@@ -1,55 +0,0 @@
-# Description: fix readline.so build with readline 6.3
-# Patch obtained from upstream, issue #20374
-# http://bugs.python.org/issue20374
-# PR: ports/187174
-
---- ./Modules/readline.c.orig 2013-11-10 07:36:41.000000000 +0000
-+++ ./Modules/readline.c 2014-03-01 12:40:44.000000000 +0000
-@@ -750,14 +750,22 @@
- }
-
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_startup_hook(void)
-+#else
-+on_startup_hook()
-+#endif
- {
- return on_hook(startup_hook);
- }
-
- #ifdef HAVE_RL_PRE_INPUT_HOOK
- static int
-+#if defined(_RL_FUNCTION_TYPEDEF)
- on_pre_input_hook(void)
-+#else
-+on_pre_input_hook()
-+#endif
- {
- return on_hook(pre_input_hook);
- }
-@@ -852,7 +860,7 @@
- * before calling the normal completer */
-
- static char **
--flex_complete(char *text, int start, int end)
-+flex_complete(const char *text, int start, int end)
- {
- #ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
- rl_completion_append_character ='\0';
-@@ -911,12 +919,12 @@
- rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
- rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
- /* Set our hook functions */
-- rl_startup_hook = (Function *)on_startup_hook;
-+ rl_startup_hook = on_startup_hook;
- #ifdef HAVE_RL_PRE_INPUT_HOOK
-- rl_pre_input_hook = (Function *)on_pre_input_hook;
-+ rl_pre_input_hook = on_pre_input_hook;
- #endif
- /* Set our completion function */
-- rl_attempted_completion_function = (CPPFunction *)flex_complete;
-+ rl_attempted_completion_function = flex_complete;
- /* Set Python word break characters */
- completer_word_break_characters =
- rl_completer_word_break_characters =
diff --git a/lang/python27/files/patch-setup.py b/lang/python27/files/patch-setup.py
index 3612bd9d5d43..13fdd368cdda 100644
--- a/lang/python27/files/patch-setup.py
+++ b/lang/python27/files/patch-setup.py
@@ -1,5 +1,5 @@
---- setup.py.orig 2013-04-06 18:02:41.000000000 +0400
-+++ setup.py 2013-04-07 10:52:47.000000000 +0400
+--- ./setup.py.orig 2014-07-04 18:02:21.711919294 +1000
++++ ./setup.py 2014-07-04 18:11:14.642091269 +1000
@@ -33,7 +33,7 @@
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
@@ -9,25 +9,7 @@
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
-@@ -720,7 +720,7 @@
- # use the same library for the readline and curses modules.
- if 'curses' in readline_termcap_library:
- curses_library = readline_termcap_library
-- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
-+ elif self.compiler.find_library_file(lib_dirs, 'xxxncursesw'):
- curses_library = 'ncursesw'
- elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
- curses_library = 'ncurses'
-@@ -755,7 +755,7 @@
- elif curses_library:
- readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
-- ['/usr/lib/termcap'],
-+ ['/usr/lib', '/usr/lib/termcap'],
- 'termcap'):
- readline_libs.append('termcap')
- exts.append( Extension('readline', ['readline.c'],
-@@ -862,6 +862,8 @@
+@@ -867,6 +867,8 @@
# OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
exts.append( Extension('_sha256', ['sha256module.c']) )
exts.append( Extension('_sha512', ['sha512module.c']) )
@@ -36,7 +18,7 @@
# Modules that provide persistent dictionary-like semantics. You will
# probably want to arrange for at least one of them to be available on
-@@ -1208,7 +1210,7 @@
+@@ -1212,7 +1214,7 @@
sysroot = macosx_sdk_root()
f = os.path.join(sysroot, f[1:])
@@ -45,30 +27,7 @@
data = open(f).read()
m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
if m is not None:
-@@ -1338,12 +1340,13 @@
- # provided by the ncurses library.
- panel_library = 'panel'
- if curses_library.startswith('ncurses'):
-- if curses_library == 'ncursesw':
-+ if curses_library == 'xxxncursesw':
- # Bug 1464056: If _curses.so links with ncursesw,
- # _curses_panel.so must link with panelw.
- panel_library = 'panelw'
- curses_libs = [curses_library]
- exts.append( Extension('_curses', ['_cursesmodule.c'],
-+ library_dirs = ['/usr/lib'],
- libraries = curses_libs) )
- elif curses_library == 'curses' and host_platform != 'darwin':
- # OSX has an old Berkeley curses, not good enough for
-@@ -1356,6 +1359,7 @@
- curses_libs = ['curses']
-
- exts.append( Extension('_curses', ['_cursesmodule.c'],
-+ library_dirs = ['/usr/lib'],
- libraries = curses_libs) )
- else:
- missing.append('_curses')
-@@ -1540,7 +1544,7 @@
+@@ -1551,7 +1553,7 @@
macros = dict()
libraries = []
@@ -77,16 +36,21 @@
# FreeBSD's P1003.1b semaphore support is very experimental
# and has many known problems. (as of June 2008)
macros = dict()
-@@ -1592,7 +1596,7 @@
+@@ -1602,9 +1604,10 @@
+ else:
missing.append('linuxaudiodev')
- if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
+- if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7', 'freebsd8')
-+ 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10', 'freebsd11')
- or host_platform.startswith("gnukfreebsd")):
+- or host_platform.startswith("gnukfreebsd")):
++# Initial backport of http://hg.python.org/cpython/rev/50f1922bc1d5
++
++ if any(sys.platform.startswith(prefix)
++ for prefix in ("linux", "freebsd", "gnukfreebsd")):
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:
-@@ -2176,9 +2180,7 @@
+ missing.append('ossaudiodev')
+@@ -2228,9 +2231,7 @@
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install
diff --git a/lang/python27/files/pkg-message b/lang/python27/files/pkg-message
new file mode 100644
index 000000000000..80afa60e7c7b
--- /dev/null
+++ b/lang/python27/files/pkg-message
@@ -0,0 +1,11 @@
+=====================================================================
+
+Note that some standard Python modules are provided as separate ports
+as they require additional dependencies. They are available as:
+
+bsddb databases/py-bsddb
+gdbm databases/py-gdbm
+sqlite3 databases/py-sqlite3
+tkinter x11-toolkits/py-tkinter
+
+=====================================================================
diff --git a/lang/python27/files/pkg-message.in b/lang/python27/files/pkg-message.in
deleted file mode 100644
index bc30a1259bd4..000000000000
--- a/lang/python27/files/pkg-message.in
+++ /dev/null
@@ -1,18 +0,0 @@
-====
-Note that some of the standard modules are provided as separate
-ports since they require extra dependencies:
-
-bsddb databases/py-bsddb
-gdbm databases/py-gdbm
-sqlite3 databases/py-sqlite3
-tkinter x11-toolkits/py-tkinter
-
-Install them as needed.
-====
-%%SEM%%--------------------------------------------------------
-%%SEM%%This package was built with the experimental POSIX
-%%SEM%%semaphore support. Please ensure that the kernel on the
-%%SEM%%system where you deploy this package is either compiled
-%%SEM%%with 'options P1003_1B_SEMAPHORES', or has the sem.ko
-%%SEM%%kernel module loaded.
-%%SEM%%--------------------------------------------------------