Commit 3b38074c authored by rm's avatar rm
Browse files

Remove expired lang/python32

Python 3.2 has reached it's EOL. Please update to Python 3.5

With hat:	python
parent 24f3ece4
......@@ -8127,3 +8127,4 @@ java/wildfly80||2016-02-01|Has expired: Fully EOL when version 8.2 was released
java/wildfly81||2016-02-01|Has expired: Fully EOL when version 9.0 was released
mail/phpmailer2|mail/phpmailer|2016-02-01|Has expired: Obsolete, use mail/phpmailer instead
cad/pycam|cad/py-pycam|2016-02-03|Add py- prefix to directory name
lang/python32||2016-02-02|Has expired: Full EOL reached. Please update to Python 3.5
......@@ -220,7 +220,7 @@
_INCLUDE_USES_PYTHON_MK= yes
# What Python version and what Python interpreters are currently supported?
_PYTHON_VERSIONS= 2.7 3.4 3.5 3.3 3.2 # preferred first
_PYTHON_VERSIONS= 2.7 3.4 3.5 3.3 # preferred first
_PYTHON_PORTBRANCH= 2.7 # ${_PYTHON_VERSIONS:[1]}
_PYTHON_BASECMD= ${LOCALBASE}/bin/python
_PYTHON_RELPORTDIR= ${PORTSDIR}/lang/python
......
......@@ -272,7 +272,6 @@
SUBDIR += python2
SUBDIR += python27
SUBDIR += python3
SUBDIR += python32
SUBDIR += python33
SUBDIR += python34
SUBDIR += python35
......
......@@ -6,14 +6,6 @@ SHA256 (python/python-2.7.11-docs-pdf-letter.tar.bz2) = b774f15ee0b174041351a8c5
SIZE (python/python-2.7.11-docs-pdf-letter.tar.bz2) = 10661547
SHA256 (python/python-2.7.11-docs-text.tar.bz2) = fc49ac7083123dd6dd53a91a48602f48289c5d04b073da7634322e595d1e280e
SIZE (python/python-2.7.11-docs-text.tar.bz2) = 1607237
SHA256 (python/python-3.2.6-docs-html.tar.bz2) = b746ef40a29abe7949e5f183e236a0734c58b841c0600043160a518390704c13
SIZE (python/python-3.2.6-docs-html.tar.bz2) = 4451267
SHA256 (python/python-3.2.6-docs-pdf-a4.tar.bz2) = 2bf14c32c56e92adb442fdea6bcd4a2386a76ab32ae3ecab347d103fd1a6633f
SIZE (python/python-3.2.6-docs-pdf-a4.tar.bz2) = 10369657
SHA256 (python/python-3.2.6-docs-pdf-letter.tar.bz2) = 55bf8e03442a09ccd1fd6d17ec2329345a47ebfb6e2ae28cee97b14ef6c8b92b
SIZE (python/python-3.2.6-docs-pdf-letter.tar.bz2) = 10418952
SHA256 (python/python-3.2.6-docs-text.tar.bz2) = 889a9f5358d0ded2f2c4b1027967c4b8ec0e99cf57eddefa038f2a0abba7fe88
SIZE (python/python-3.2.6-docs-text.tar.bz2) = 1573432
SHA256 (python/python-3.3.6-docs-html.tar.bz2) = 54da33f8a91be819e7ac22fdc88c5125bdd4c67494f52dd79d6b603572c41fb0
SIZE (python/python-3.3.6-docs-html.tar.bz2) = 4961517
SHA256 (python/python-3.3.6-docs-pdf-a4.tar.bz2) = 5a031f0abfe41121f9aa883cfb8a99e36363744c486d30d97a9bcf4c0b7a634b
......
# $FreeBSD$
PORTNAME= python32
PORTVERSION= ${PYTHON_PORTVERSION}
PORTREVISION= 1
CATEGORIES= lang python ipv6
MASTER_SITES= PYTHON/ftp/python/${PORTVERSION}
DISTNAME= Python-${PORTVERSION}
DIST_SUBDIR= python
MAINTAINER= python@FreeBSD.org
COMMENT= Interpreted object-oriented programming language
LICENSE= PSFL
DEPRECATED= No longer receives bug fixes, only security updates. Please update to Python 3.5
EXPIRATION_DATE= 2016-02-01
USES= cpe ncurses pkgconfig readline tar:xz
USE_OPENSSL= yes
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CPE_VENDOR= python
CPE_PRODUCT= ${CPE_VENDOR}
CPE_VERSION= ${PORTVERSION}
CONFIGURE_ARGS+= --enable-shared
CONFIGURE_ENV+= OPT="" # Null out OPT to respect user CFLAGS and remove optimizations
INSTALL_TARGET= altinstall # Don't want cloberring of unprefixed files
TEST_TARGET= buildbottest
TEST_ARGS= TESTOPTS=-j${MAKE_JOBS_NUMBER}
MAKE_ARGS+= INSTALL_SHARED="${INSTALL_LIB}" # Strip shared library
MAKE_ARGS+= LIBPC="${PREFIX}/libdata/pkgconfig" # Until pathfix gets support for files other than Makefile.in
MAKE_JOBS_UNSAFE= yes # Parser/pgen build bug. See Issue: 200622, 201974
SUB_FILES= pkg-message
SUB_LIST= PYTHON_SUFFIX=${PORTVERSION:R:S/.//g}
PLIST_SUB= ABI=${ABIFLAGS} \
OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. http://bugs.python.org/issue19554
OPTIONS_DEFINE= DEBUG IPV6 LIBFFI NLS PYMALLOC THREADS TSC UCS4
OPTIONS_DEFAULT= IPV6 LIBFFI NLS PYMALLOC THREADS UCS4
OPTIONS_SUB= yes
LIBFFI_DESC= Use libffi from ports instead of bundled version
NLS_DESC= Enable gettext support for the locale module
PYMALLOC_DESC= Enable specialized mallocs
TSC_DESC= Enable processor timestamp counter profiling
DEBUG_CONFIGURE_WITH= pydebug
IPV6_CONFIGURE_ENABLE= ipv6
LIBFFI_CONFIGURE_ON= --with-system-ffi
LIBFFI_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi
# Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat
# to break in Python 2.7, or preprocessor complaints in Python >= 3.3
# Upstream Issue: http://bugs.python.org/issue6299
NLS_USES= gettext
NLS_CPPFLAGS= -I${LOCALBASE}/include
NLS_LIBS= -L${LOCALBASE}/lib -lintl
NLS_CONFIGURE_ENV_OFF= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
PYMALLOC_CONFIGURE_WITH= pymalloc
THREADS_CONFIGURE_WITH= threads
THREADS_LDFLAGS= -lpthread
TSC_CONFIGURE_WITH= tsc
UCS4_CONFIGURE_WITH= wide-unicode
.include "${.CURDIR}/Makefile.version"
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MUCS4}
ABIFLAGS:= u${ABIFLAGS}
.endif
.if ${PORT_OPTIONS:MPYMALLOC}
ABIFLAGS:= m${ABIFLAGS}
.endif
.if ${PORT_OPTIONS:MDEBUG}
ABIFLAGS:= d${ABIFLAGS}
.endif
.if !empty(ABIFLAGS)
PLIST_FILES+= bin/python3.2%%ABI%%
PLIST_FILES+= bin/python3.2%%ABI%%-config
PLIST_FILES+= libdata/pkgconfig/python-3.2%%ABI%%.pc
.endif
.if ${ARCH} == sparc64
CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900
.endif
# See http://bugs.freebsd.org/115940 and http://bugs.freebsd.org/193650
.if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS)
PLIST_SUB+= NO_NIS="@comment "
.else
PLIST_SUB+= NO_NIS=""
.endif
post-patch:
@${REINPLACE_CMD} -e \
's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \
${PATCH_WRKSRC}/Lib/pydoc.py
# Fix for http://bugs.python.org/issue12852 (especially on 10.x+);
# not needed for python33+
@${REINPLACE_CMD} -e 's|_XOPEN_SOURCE 600|_XOPEN_SOURCE 700|' \
${WRKSRC}/configure
.if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS)
@${REINPLACE_CMD} -e 's/disabled_module_list =[^]]*/&, "nis"/' \
${WRKSRC}/setup.py
.endif
# Fix permissions for keyword.py and token.py - otherwise the cache files
# can't be properly recreated, since compileall fails with an IOError.
# This looks like an improper fix in http://bugs.python.org/issue6074
# for Python3.2
# Since side effects for other modules can't be foreseen, do not fix
# it on a source level yet.
@${CHMOD} a-x ${WRKSRC}/Lib/keyword.py ${WRKSRC}/Lib/token.py
post-install:
.if !${PORT_OPTIONS:MDEBUG}
# Upstream Issue: http://bugs.python.org/issue17975
${RM} -f ${STAGEDIR}${PREFIX}/lib/libpython3.so
.endif
# Strip shared extensions
for i in ${STAGEDIR}${PREFIX}/lib/python3.2/lib-dynload/*.so; do \
${STRIP_CMD} $$i; done
.include <bsd.port.mk>
# Mk/Uses/python.mk includes this file, don't remove it!
# $FreeBSD$
PYTHON_PORTVERSION= 3.2.6
SHA256 (python/Python-3.2.6.tar.xz) = 1d12b501819fd26afafbf8459be1aa279b56f032b4c15412de0a713ce0de7bdc
SIZE (python/Python-3.2.6.tar.xz) = 9243292
--- Lib/test/regrtest.py.orig 2011-09-03 18:16:43.000000000 +0200
+++ Lib/test/regrtest.py 2011-10-28 11:26:04.000000000 +0200
@@ -1522,6 +1522,8 @@
_expectations['freebsd6'] = _expectations['freebsd4']
_expectations['freebsd7'] = _expectations['freebsd4']
_expectations['freebsd8'] = _expectations['freebsd4']
+_expectations['freebsd9'] = _expectations['freebsd4']
+_expectations['freebsd10'] = _expectations['freebsd4']
class _ExpectedSkips:
def __init__(self):
# Description: Some python extensions can't be compiled with clang 3.4
# Issue ID: http://bugs.python.org/issue20767
# Submitted by: antoine
--- ./Lib/distutils/unixccompiler.py.orig 2014-03-09 15:23:38.647562705 +1100
+++ ./Lib/distutils/unixccompiler.py 2014-03-09 15:23:56.020904510 +1100
@@ -225,6 +225,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]
--- Lib/distutils/command/build_ext.py.orig 2014-07-20 11:51:54.000000000 +0200
+++ Lib/distutils/command/build_ext.py 2014-07-20 11:52:52.000000000 +0200
@@ -236,12 +236,9 @@
# building python standard extensions
self.library_dirs.append('.')
- # for extensions under Linux or Solaris with a shared Python library,
# Python's library directory must be appended to library_dirs
- sysconfig.get_config_var('Py_ENABLE_SHARED')
- if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')
- or sys.platform.startswith('sunos'))
- and sysconfig.get_config_var('Py_ENABLE_SHARED')):
+ # See Issues: #1600860, #4366
+ if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
# building third party extensions
self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
From 9934ce31b8447667f71c211e559a8de71e8263db Mon Sep 17 00:00:00 2001
From: Brendan Molloy <brendan@bbqsrc.net>
Date: Mon, 4 Jan 2016 23:14:06 +1100
Subject: [PATCH] Check bytecode file actually exists and tests
Should solve issue 20397, where using the --record argument results
in files that failed to generate bytecode files are added to the
record file nonetheless.
--- Lib/distutils/command/install_lib.py.orig 2014-10-12 06:52:02 UTC
+++ Lib/distutils/command/install_lib.py
@@ -165,11 +165,18 @@ class install_lib(Command):
if ext != PYTHON_SOURCE_EXTENSION:
continue
if self.compile:
- bytecode_files.append(imp.cache_from_source(
- py_file, debug_override=True))
+ candidate = imp.cache_from_source(
+ py_file, debug_override=True)
+
+ if os.path.isfile(candidate):
+ bytecode_files.append(candidate)
+
if self.optimize > 0:
- bytecode_files.append(imp.cache_from_source(
- py_file, debug_override=False))
+ candidate = imp.cache_from_source(
+ py_file, debug_override=False)
+
+ if os.path.isfile(candidate):
+ bytecode_files.append(candidate)
return bytecode_files
# Description: INSTALL_SHARED sometimes is not properly handled in the env
# Submitted by: mva
# Description: Remove duplicate CFLAGS, CPPFLAGS, LDFLAGS by stripping CONFIGURE_*
# Submitted by: koobs (r326729)
# TODO: Upstream
--- Makefile.pre.in.orig 2013-05-15 18:33:51.000000000 +0200
+++ Makefile.pre.in 2014-07-18 20:54:36.000000000 +0200
@@ -60,7 +60,7 @@
# Shared libraries must be installed with executable mode on some systems;
# rather than figuring out exactly which, we always give them executable mode.
# Also, making them read-only seems to be a good idea...
-INSTALL_SHARED= ${INSTALL} -m 555
+INSTALL_SHARED?= ${INSTALL} -m 555
MKDIR_P= @MKDIR_P@
@@ -70,18 +70,18 @@
OPT= @OPT@
BASECFLAGS= @BASECFLAGS@
BASECPPFLAGS= @BASECPPFLAGS@
-CONFIGURE_CFLAGS= @CFLAGS@
-CONFIGURE_CPPFLAGS= @CPPFLAGS@
-CONFIGURE_LDFLAGS= @LDFLAGS@
+CFLAGS= @CFLAGS@
+CPPFLAGS= @CPPFLAGS@
+LDFLAGS= @LDFLAGS@
# Avoid assigning CFLAGS, LDFLAGS, etc. so users can use them on the
# command line to append to these values without stomping the pre-set
# values.
-PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
+PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CFLAGS) $(EXTRA_CFLAGS)
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
# be able to build extension modules using the directories specified in the
# environment variables
-PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CONFIGURE_CPPFLAGS) $(CPPFLAGS)
-PY_LDFLAGS= $(CONFIGURE_LDFLAGS) $(LDFLAGS)
+PY_CPPFLAGS= $(BASECPPFLAGS) -I. -IInclude -I$(srcdir)/Include $(CPPFLAGS)
+PY_LDFLAGS= $(LDFLAGS)
NO_AS_NEEDED= @NO_AS_NEEDED@
LDLAST= @LDLAST@
SGI_ABI= @SGI_ABI@
@@ -676,7 +676,7 @@
Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
- $(OPCODETARGETGEN) $(OPCODETARGETS_H)
+# $(OPCODETARGETGEN) $(OPCODETARGETS_H)
Python/ceval.o: $(OPCODETARGETS_H) Python/ceval_gil.h
@@ -686,7 +686,7 @@
Objects/typeobject.o: Objects/typeslots.inc
Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
- $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
+# $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > Objects/typeslots.inc
############################################################################
# Header files
@@ -908,12 +908,6 @@
else true; \
fi
(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3$(EXE))
- -if test "$(VERSION)" != "$(LDVERSION)"; then \
- rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
- (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
- rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
- (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
- fi
-rm -f $(DESTDIR)$(BINDIR)/python3-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
-rm -f $(DESTDIR)$(LIBPC)/python3.pc
@@ -1126,6 +1120,12 @@
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
+ -if test "$(VERSION)" != "$(LDVERSION)"; then \
+ rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)-config; \
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(LDVERSION)-config python$(VERSION)-config); \
+ rm -f $(DESTDIR)$(LIBPC)/python-$(LDVERSION).pc; \
+ (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python-$(LDVERSION).pc); \
+ fi
rm python-config
@if [ -s Modules/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
# pythonx.y-config --ldflags out of /usr and missing -L<install_lib_dir>
# https://bugs.python.org/issue7352
# Fix library order returned by python-config. [#18096]
# bugs.python.org/18096
--- Misc/python-config.in.orig 2013-05-15 16:33:52 UTC
+++ Misc/python-config.in
@@ -22,6 +22,7 @@ except getopt.error:
if not opts:
exit_with_usage()
+libdir = sysconfig.get_config_var('exec_prefix') + '/lib'
pyver = sysconfig.get_config_var('VERSION')
getvar = sysconfig.get_config_var
@@ -45,11 +46,13 @@ for opt in opt_flags:
print(' '.join(flags))
elif opt in ('--libs', '--ldflags'):
- libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
- libs.append('-lpython' + pyver + sys.abiflags)
+ libs = ['-lpython' + pyver + sys.abiflags]
+ libs += getvar('LIBS').split()
+ libs += getvar('SYSLIBS').split()
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
# shared library in prefix/lib/.
if opt == '--ldflags':
+ libs.insert(0, '-L' + libdir)
if not getvar('Py_ENABLE_SHARED'):
libs.insert(0, '-L' + getvar('LIBPL'))
if not getvar('PYTHONFRAMEWORK'):
--- Modules/_ctypes/libffi/configure.orig 2011-02-05 04:03:34.000000000 +0000
+++ Modules/_ctypes/libffi/configure 2011-02-05 04:04:43.000000000 +0000
@@ -6289,7 +6289,7 @@
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
--- ./Modules/_ctypes/libffi/fficonfig.py.in.orig 2013-05-12 07:32:49.000000000 +0400
+++ ./Modules/_ctypes/libffi/fficonfig.py.in 2013-06-05 10:36:24.000000000 +0400
@@ -1,7 +1,6 @@
ffi_sources = """
src/prep_cif.c
src/closures.c
-src/dlmalloc.c
""".split()
ffi_platforms = {
--- Modules/fcntlmodule.c.orig 2010-12-14 09:44:03.000000000 +0800
+++ Modules/fcntlmodule.c 2010-12-14 09:47:17.000000000 +0800
@@ -97,20 +97,15 @@
{
#define IOCTL_BUFSZ 1024
int fd;
- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
format for the 'code' parameter because Python turns 0x8000000
into either a large positive number (PyLong or PyInt on 64-bit
platforms) or a negative number on others (32-bit PyInt)
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.
-
- If any of the 64bit platforms ever decide to use more than 32bits
- in their unsigned long ioctl codes this will break and need
- special casing based on the platform being built on.
+ various platforms.
*/
- unsigned int code;
+ unsigned long code;
int arg;
int ret;
Py_buffer pstr;
@@ -119,7 +114,7 @@
int mutate_arg = 1;
char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
- if (PyArg_ParseTuple(args, "O&Iw*|i:ioctl",
+ if (PyArg_ParseTuple(args, "O&kw*|i:ioctl",
conv_descriptor, &fd, &code,
&pstr, &mutate_arg)) {
char *arg;
@@ -174,7 +169,7 @@
}
PyErr_Clear();
- if (PyArg_ParseTuple(args, "O&Is*:ioctl",
+ if (PyArg_ParseTuple(args, "O&ks*:ioctl",
conv_descriptor, &fd, &code, &pstr)) {
str = pstr.buf;
len = pstr.len;
@@ -201,7 +196,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
- "O&I|i;ioctl requires a file or file descriptor,"
+ "O&k|i;ioctl requires a file or file descriptor,"
" an integer and optionally an integer or buffer argument",
conv_descriptor, &fd, &code, &arg)) {
return NULL;
# Description: Fix _ctypes abort on import for FreeBSD/ARM. This is an issue
# for anything !apple that is using the libcompiler_rt provided by clang on arm
# PR: ports/149167 ports/184517
# Patch by: cognet@ (to be upstreamed @ LLVM)
--- ./Modules/_ctypes/libffi/src/arm/ffi.c.orig 2013-05-16 02:33:52.000000000 +1000
+++ ./Modules/_ctypes/libffi/src/arm/ffi.c 2013-12-03 19:19:36.700951785 +1100
@@ -33,6 +33,11 @@
#include <stdlib.h>
+#if defined(__FreeBSD__) && defined(__arm__)
+#include <sys/types.h>
+#include <machine/sysarch.h>
+#endif
+
/* Forward declares. */
static int vfp_type_p (ffi_type *);
static void layout_vfp_args (ffi_cif *);
@@ -582,6 +587,16 @@
#else
+#if defined(__FreeBSD__) && defined(__arm__)
+#define __clear_cache(start, end) do { \
+ struct arm_sync_icache_args ua; \
+ \
+ ua.addr = (uintptr_t)(start); \
+ ua.len = (char *)(end) - (char *)start; \
+ sysarch(ARM_SYNC_ICACHE, &ua); \
+ } while (0);
+#endif
+
#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
--- ./Modules/selectmodule.c.orig 2013-11-30 23:03:20.030929248 +1100
+++ ./Modules/selectmodule.c 2013-11-30 23:03:56.111022639 +1100
@@ -1246,7 +1246,7 @@
PyObject *pfd;
static char *kwlist[] = {"ident", "filter", "flags", "fflags",
"data", "udata", NULL};
- static char *fmt = "O|hhi" INTPTRT_FMT_UNIT UINTPTRT_FMT_UNIT ":kevent";
+ static char *fmt = "O|hHI" INTPTRT_FMT_UNIT UINTPTRT_FMT_UNIT ":kevent";
EV_SET(&(self->e), 0, EVFILT_READ, EV_ADD, 0, 0, 0); /* defaults */
--- Lib/ssl.py.orig 2014-10-12 08:52:02.000000000 +0200
+++ Lib/ssl.py 2015-12-23 11:29:24.243085919 +0100
@@ -63,7 +63,16 @@ from _ssl import OPENSSL_VERSION_NUMBER,
from _ssl import _SSLContext, SSLError
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
from _ssl import OP_ALL, OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_TLSv1
-from _ssl import RAND_status, RAND_egd, RAND_add
+### Fix build with LibreSSL (does not have RAND_egd)
+### PR195513, http://bugs.python.org/issue21356
+from _ssl import RAND_status, RAND_add
+try:
+ from _ssl import RAND_egd
+except ImportError:
+ # LibreSSL does not provide RAND_egd
+ pass
+### End PR195513
+
from _ssl import (
SSL_ERROR_ZERO_RETURN,
SSL_ERROR_WANT_READ,
@@ -76,13 +85,12 @@ from _ssl import (
SSL_ERROR_INVALID_ERROR_CODE,
)
from _ssl import HAS_SNI
-from _ssl import PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
+from _ssl import PROTOCOL_SSLv23, PROTOCOL_TLSv1
from _ssl import _OPENSSL_API_VERSION
_PROTOCOL_NAMES = {
PROTOCOL_TLSv1: "TLSv1",
PROTOCOL_SSLv23: "SSLv23",
- PROTOCOL_SSLv3: "SSLv3",
}
try:
from _ssl import PROTOCOL_SSLv2
@@ -91,6 +99,13 @@ except ImportError:
_SSLv2_IF_EXISTS = None
else:
_PROTOCOL_NAMES[PROTOCOL_SSLv2] = "SSLv2"
+try:
+ from _ssl import PROTOCOL_SSLv3
+ _SSLv3_IF_EXISTS = PROTOCOL_SSLv3
+except ImportError:
+ _SSLv3_IF_EXISTS = None
+else:
+ _PROTOCOL_NAMES[PROTOCOL_SSLv3] = "SSLv3"
from socket import getnameinfo as _getnameinfo
from socket import error as socket_error
@@ -557,7 +572,7 @@ def PEM_cert_to_DER_cert(pem_cert_string
d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
return base64.decodebytes(d.encode('ASCII', 'strict'))
-def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
"""Retrieve the certificate from the server at the specified address,
and return it as a PEM-encoded string.
If 'ca_certs' is specified, validate the server cert against it.
--- Lib/test/test_ssl.py.orig 2014-10-12 08:52:03.000000000 +0200
+++ Lib/test/test_ssl.py 2015-12-23 11:29:24.245086385 +0100
@@ -21,11 +21,12 @@ import functools
ssl = support.import_module("ssl")
PROTOCOLS = [
- ssl.PROTOCOL_SSLv3,
ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1
]
if hasattr(ssl, 'PROTOCOL_SSLv2'):
PROTOCOLS.append(ssl.PROTOCOL_SSLv2)
+if hasattr(ssl, 'PROTOCOL_SSLv3'):
+ PROTOCOLS.append(ssl.PROTOCOL_SSLv3)
HOST = support.HOST
@@ -104,8 +105,12 @@ class BasicSocketTests(unittest.TestCase
sys.stdout.write("\n RAND_status is %d (%s)\n"
% (v, (v and "sufficient randomness") or
"insufficient randomness"))
- self.assertRaises(TypeError, ssl.RAND_egd, 1)
- self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
+### Fix build with LibreSSL (does not have RAND_egd)
+### PR195513, http://bugs.python.org/issue21356
+ if hasattr(ssl, 'RAND_egd'):