[Midnightbsd-cvs] mports [16366] fix several bugs with this port
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Apr 25 19:58:06 EDT 2014
Revision: 16366
http://svnweb.midnightbsd.org/mports/?rev=16366
Author: laffer1
Date: 2014-04-25 19:58:05 -0400 (Fri, 25 Apr 2014)
Log Message:
-----------
fix several bugs with this port
Modified Paths:
--------------
trunk/lang/python27/Makefile
trunk/lang/python27/files/patch-Makefile.pre.in
trunk/lang/python27/files/pkg-message.in
trunk/lang/python27/pkg-plist
Added Paths:
-----------
trunk/lang/python27/files/patch-CVE-2014-1912
trunk/lang/python27/files/patch-Lib__distutils__unixccompiler.py
trunk/lang/python27/files/patch-issue20374
Property Changed:
----------------
trunk/lang/python27/files/extra-patch-configure-pth
trunk/lang/python27/files/extra-patch-setup.py
trunk/lang/python27/files/patch-Doc-library-fcntl.rst
trunk/lang/python27/files/patch-Lib-test-test_fcntl.py
trunk/lang/python27/files/patch-Lib-test-test_ioctl.py
trunk/lang/python27/files/patch-Makefile.pre.in
trunk/lang/python27/files/patch-Modules-_ctypes-libffi-configure
trunk/lang/python27/files/patch-Modules-fcntlmodule.c
trunk/lang/python27/files/patch-Python_thread__pthread.h
trunk/lang/python27/files/patch-configure
trunk/lang/python27/files/patch-setup.py
trunk/lang/python27/files/pkg-message.in
Modified: trunk/lang/python27/Makefile
===================================================================
--- trunk/lang/python27/Makefile 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/Makefile 2014-04-25 23:58:05 UTC (rev 16366)
@@ -2,7 +2,7 @@
PORTNAME= python27
PORTVERSION= 2.7.6
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= lang python ipv6
MASTER_SITES= PYTHON
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
@@ -18,7 +18,7 @@
PATCH_WRKSRC= ${PYTHON_WRKSRC}
GNU_CONFIGURE= yes
CONFIGURE_SCRIPT= ../configure # must be relative
-CONFIGURE_ENV= OPT="${CFLAGS}" SVNVERSION="echo midnightbsd" ac_cv_opt_olimit_ok=no
+CONFIGURE_ENV= SVNVERSION="echo midnightbsd" ac_cv_opt_olimit_ok=no
CONFIGURE_TARGET= --build=${ARCH}-portbld-midnightbsd${OSREL} \
--host=${ARCH}-portbld-midnightbsd${OSREL}
MAKE_ENV= VPATH="${PYTHON_WRKSRC}"
@@ -26,7 +26,7 @@
INSTALL_TARGET= altinstall
USE_PYTHON= yes
-USES= tar:xz
+USES= readline tar:xz
PYTHON_VERSION= python2.7
PYTHON_NO_DEPENDS= yes
@@ -62,13 +62,8 @@
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 3000
-PLIST_SUB+= CTYPE="@comment "
-.else
CONFIGURE_ARGS+= --with-system-ffi
LIB_DEPENDS+= ffi:${PORTSDIR}/devel/libffi
-PLIST_SUB+= CTYPE=""
-.endif
SEM_MSG= "@comment "
@@ -238,7 +233,7 @@
${PREFIX}/lib
cd ${PREFIX}/lib; ${LN} -sf lib${PYTHON_VERSION}.so.1 \
lib${PYTHON_VERSION}.so
- ${LN} -sf ${PREFIX}/lib/lib${PYTHON_VERSION}.so ${PYTHONPREFIX_LIBDIR}/config
+ cd ${PREFIX}/lib; ${LN} -sf lib${PYTHON_VERSION}.so python2.7/config/lib${PYTHON_VERSION}.so
${INSTALL_PROGRAM} \
${SHARED_WRKSRC}/${PYTHON_VERSION:S/thon/thon-shared/} \
${PREFIX}/bin
Index: trunk/lang/python27/files/extra-patch-configure-pth
===================================================================
--- trunk/lang/python27/files/extra-patch-configure-pth 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/extra-patch-configure-pth 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/extra-patch-configure-pth
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/lang/python27/files/extra-patch-setup.py
===================================================================
--- trunk/lang/python27/files/extra-patch-setup.py 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/extra-patch-setup.py 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/extra-patch-setup.py
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Added: trunk/lang/python27/files/patch-CVE-2014-1912
===================================================================
--- trunk/lang/python27/files/patch-CVE-2014-1912 (rev 0)
+++ trunk/lang/python27/files/patch-CVE-2014-1912 2014-04-25 23:58:05 UTC (rev 16366)
@@ -0,0 +1,50 @@
+# HG changeset patch
+# User Benjamin Peterson <benjamin at 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 at 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);
+
Index: trunk/lang/python27/files/patch-Doc-library-fcntl.rst
===================================================================
--- trunk/lang/python27/files/patch-Doc-library-fcntl.rst 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-Doc-library-fcntl.rst 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/patch-Doc-library-fcntl.rst
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/lang/python27/files/patch-Lib-test-test_fcntl.py
===================================================================
--- trunk/lang/python27/files/patch-Lib-test-test_fcntl.py 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-Lib-test-test_fcntl.py 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/patch-Lib-test-test_fcntl.py
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Index: trunk/lang/python27/files/patch-Lib-test-test_ioctl.py
===================================================================
--- trunk/lang/python27/files/patch-Lib-test-test_ioctl.py 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-Lib-test-test_ioctl.py 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/patch-Lib-test-test_ioctl.py
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Added: trunk/lang/python27/files/patch-Lib__distutils__unixccompiler.py
===================================================================
--- trunk/lang/python27/files/patch-Lib__distutils__unixccompiler.py (rev 0)
+++ trunk/lang/python27/files/patch-Lib__distutils__unixccompiler.py 2014-04-25 23:58:05 UTC (rev 16366)
@@ -0,0 +1,11 @@
+--- ./Lib/distutils/unixccompiler.py.orig 2013-11-10 07:36:40.000000000 +0000
++++ ./Lib/distutils/unixccompiler.py 2014-02-19 15:41:48.000000000 +0000
+@@ -228,6 +228,8 @@
+ if sys.platform[:6] == "darwin":
+ # MacOSX's linker doesn't understand the -R flag at all
+ return "-L" + dir
++ elif sys.platform[:7] == "freebsd":
++ return "-Wl,-rpath=" + dir
+ elif sys.platform[:5] == "hp-ux":
+ if self._is_gcc(compiler):
+ return ["-Wl,+s", "-L" + dir]
Modified: trunk/lang/python27/files/patch-Makefile.pre.in
===================================================================
--- trunk/lang/python27/files/patch-Makefile.pre.in 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-Makefile.pre.in 2014-04-25 23:58:05 UTC (rev 16366)
@@ -1,6 +1,6 @@
---- ./Makefile.pre.in.orig 2013-04-06 18:02:34.000000000 +0400
-+++ ./Makefile.pre.in 2013-04-07 22:30:19.000000000 +0400
-@@ -281,9 +281,9 @@
+--- ./Makefile.pre.in.orig 2013-11-10 07:36:41.000000000 +0000
++++ ./Makefile.pre.in 2014-04-04 09:16:00.000000000 +0000
+@@ -285,9 +285,9 @@
##########################################################################
# AST
@@ -12,3 +12,28 @@
AST_C= $(AST_C_DIR)/Python-ast.c
AST_ASDL= $(srcdir)/Parser/Python.asdl
+@@ -1006,12 +1006,12 @@
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(PYTHON_FOR_BUILD) -B -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
++ $(PYTHON_FOR_BUILD) -B -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+@@ -1089,8 +1089,8 @@
+ if test "$(SO)" = .dll; then \
+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+ else \
++ $(RANLIB) $(LIBRARY) ; \
+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+ fi; \
+ else \
+ echo Skip install of $(LIBRARY) - use make frameworkinstall; \
Property changes on: trunk/lang/python27/files/patch-Makefile.pre.in
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/lang/python27/files/patch-Modules-_ctypes-libffi-configure
===================================================================
--- trunk/lang/python27/files/patch-Modules-_ctypes-libffi-configure 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-Modules-_ctypes-libffi-configure 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/patch-Modules-_ctypes-libffi-configure
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/lang/python27/files/patch-Modules-fcntlmodule.c
===================================================================
--- trunk/lang/python27/files/patch-Modules-fcntlmodule.c 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-Modules-fcntlmodule.c 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/patch-Modules-fcntlmodule.c
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/lang/python27/files/patch-Python_thread__pthread.h
===================================================================
--- trunk/lang/python27/files/patch-Python_thread__pthread.h 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-Python_thread__pthread.h 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/patch-Python_thread__pthread.h
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Index: trunk/lang/python27/files/patch-configure
===================================================================
--- trunk/lang/python27/files/patch-configure 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-configure 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/patch-configure
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Added: trunk/lang/python27/files/patch-issue20374
===================================================================
--- trunk/lang/python27/files/patch-issue20374 (rev 0)
+++ trunk/lang/python27/files/patch-issue20374 2014-04-25 23:58:05 UTC (rev 16366)
@@ -0,0 +1,55 @@
+# 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 =
Index: trunk/lang/python27/files/patch-setup.py
===================================================================
--- trunk/lang/python27/files/patch-setup.py 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/patch-setup.py 2014-04-25 23:58:05 UTC (rev 16366)
Property changes on: trunk/lang/python27/files/patch-setup.py
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Modified: trunk/lang/python27/files/pkg-message.in
===================================================================
--- trunk/lang/python27/files/pkg-message.in 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/files/pkg-message.in 2014-04-25 23:58:05 UTC (rev 16366)
@@ -13,6 +13,6 @@
%%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 'option P1003_1B_SEMAPHORES', or has the sem.ko
+%%SEM%%with 'options P1003_1B_SEMAPHORES', or has the sem.ko
%%SEM%%kernel module loaded.
%%SEM%%--------------------------------------------------------
Property changes on: trunk/lang/python27/files/pkg-message.in
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.2
\ No newline at end of property
Modified: trunk/lang/python27/pkg-plist
===================================================================
--- trunk/lang/python27/pkg-plist 2014-04-23 01:11:25 UTC (rev 16365)
+++ trunk/lang/python27/pkg-plist 2014-04-25 23:58:05 UTC (rev 16366)
@@ -976,10 +976,7 @@
%%PYTHON_LIBDIR%%/pickletools.py
%%PYTHON_LIBDIR%%/pipes.py
%%PYTHON_LIBDIR%%/pkgutil.py
-%%PYTHON_LIBDIR%%/plat-freebsd6/IN.py
-%%PYTHON_LIBDIR%%/plat-freebsd6/regen
-%%PYTHON_LIBDIR%%/plat-freebsd7/IN.py
-%%PYTHON_LIBDIR%%/plat-freebsd7/regen
+%%PYTHON_LIBDIR%%/plat-midnightbsd0/regen
%%PYTHON_LIBDIR%%/platform.py
%%PYTHON_LIBDIR%%/plistlib.py
%%PYTHON_LIBDIR%%/popen2.py
@@ -2393,8 +2390,6 @@
@dirrm %%PYTHON_LIBDIR%%/sqlite3
@dirrm %%PYTHON_LIBDIR%%/site-packages
@dirrm %%PYTHON_LIBDIR%%/pydoc_data
- at dirrm %%PYTHON_LIBDIR%%/plat-freebsd7
- at dirrm %%PYTHON_LIBDIR%%/plat-freebsd6
@dirrm %%PYTHON_LIBDIR%%/plat-midnightbsd0
@dirrm %%PYTHON_LIBDIR%%/multiprocessing/dummy
@dirrm %%PYTHON_LIBDIR%%/multiprocessing
More information about the Midnightbsd-cvs
mailing list