Kaydet (Commit) 743f9fc8 authored tarafından Michael Stahl's avatar Michael Stahl

python3: upgrade to release 3.5.3

- fixes some minor CVEs
- drop python-vc2013.patch.1
- drop python-3.3.3-py17797.patch.1:
  the bug was fixed in MSVC2015 runtime so not relevant
- drop python-lsan.patch.0:
  fixed upstream
- ubsan.patch.0:
  drop hunks that were fixed upstream
- python-3.5.0-tcltk.disable.patch:
  merge into msvc-disable.patch.1

Change-Id: I2aecae446539d28eaf3eb64ee67581596019335d
Reviewed-on: https://gerrit.libreoffice.org/33225Reviewed-by: 's avatarDavid Ostrovsky <david@ostrovsky.org>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 6ef03366
......@@ -140,8 +140,8 @@ ifeq ($(PYTHON_VERSION_MINOR),3)
export PYTHON_MD5SUM := 803a75927f8f241ca78633890c798021
export PYTHON_TARBALL := Python-3.3.5.tgz
else
export PYTHON_MD5SUM := a56c0c0b45d75a0ec9c6dee933c41c36
export PYTHON_TARBALL := Python-3.5.0.tgz
export PYTHON_MD5SUM := 6192f0e45f02575590760e68c621a488
export PYTHON_TARBALL := Python-3.5.3.tgz
endif
export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz
......
......@@ -661,7 +661,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/fixes/fix_asserts.py \
Lib/lib2to3/fixes/fix_basestring.py \
Lib/lib2to3/fixes/fix_buffer.py \
Lib/lib2to3/fixes/fix_callable.py \
Lib/lib2to3/fixes/fix_dict.py \
Lib/lib2to3/fixes/fix_except.py \
Lib/lib2to3/fixes/fix_execfile.py \
......
......@@ -19,17 +19,14 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
$(if $(filter AIX,$(OS)),external/python3/python-3.3.3-aix.patch.1) \
external/python3/python-3.3.0-darwin.patch.1 \
external/python3/python-3.3.0-msvc-disable.patch.1 \
external/python3/python-3.3.0-ssl.patch.1 \
external/python3/python-3.3.3-py17797.patch.1 \
external/python3/python-3.3.0-msvc-disable.patch.1 \
external/python3/python-3.3.0-i42553.patch.2 \
external/python3/python-3.3.0-pythreadstate.patch.1 \
external/python3/python-3.3.0-clang.patch.1 \
external/python3/python-3.3.5-pyexpat-symbols.patch.1 \
external/python3/python-lsan.patch.0 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/python-3.5.0-tcltk.disable.patch \
))
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
......@@ -44,14 +41,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
))
endif
ifeq ($(OS)-$(COM),WNT-MSC)
ifneq ($(filter 120,$(VCVER)),)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-vc2013.patch.1 \
))
endif
endif
ifneq ($(SYSTEM_ZLIB),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,python3, \
external/python3/internal-zlib.patch.0 \
......
......@@ -27,8 +27,6 @@ diff -ru python3.orig/configure python3/configure
LIPO_32BIT_FLAGS=""
ARCH_RUN_32BIT=""
;;
Only in python3: .#configure
Only in python3: #configure#
diff -ru python3.orig/Mac/Makefile.in python3/Mac/Makefile.in
--- python3.orig/Mac/Makefile.in 2015-07-05 18:50:07.000000000 +0200
+++ python3/Mac/Makefile.in 2015-07-26 17:40:14.860514100 +0200
......@@ -51,7 +49,7 @@ diff -ru python3.orig/Mac/Resources/app/Info.plist.in python3/Mac/Resources/app/
- <string>Python</string>
+ <string>LibreOfficePython</string>
<key>CFBundleGetInfoString</key>
<string>%version%, (c) 2001-2015 Python Software Foundation.</string>
<string>%version%, (c) 2001-2016 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>
diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resources/framework/Info.plist.in
--- python3.orig/Mac/Resources/framework/Info.plist.in 2015-07-05 18:50:07.000000000 +0200
......
......@@ -45,3 +45,16 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
@@ -58,12 +58,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testmultiphase", "_testmultiphase.vcxproj", "{16BFE6F0-22EF-40B5-B831-7E937119EF10}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "tcl.vcxproj", "{B5FD6F1D-129E-4BFF-9340-03606FAC7283}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tix", "tix.vcxproj", "{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyshellext", "pyshellext.vcxproj", "{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}"
EndProject
Global
......@@ -13,9 +13,9 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssleay", "ssleay.vcxproj", "{10615B24-73BF-4EFA-93AA-236916321317}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyshellext", "pyshellext.vcxproj", "{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
diff -ru python3.orig/PCbuild/_ssl.vcxproj python3/PCbuild/_ssl.vcxproj
--- python3.orig/PCbuild/_ssl.vcxproj 2015-08-11 02:52:36.000000000 +0200
+++ python3/PCbuild/_ssl.vcxproj 2015-08-22 18:19:20.744299000 +0200
......@@ -23,7 +23,7 @@ diff -ru python3.orig/PCbuild/_ssl.vcxproj python3/PCbuild/_ssl.vcxproj
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
......
http://bugs.python.org/issue17797
http://connect.microsoft.com/VisualStudio/feedback/details/785119/
Visual Studio 2013 changed return value for fileno function that breaks
when python tries to check/setup stdin/out/err
GetStdHandle on Windows XP behaves contrary to the documentation...
MSVC 14.0 fixed this bug.
diff -ru python3.orig/Python/pylifecycle.c python3/Python/pylifecycle.c
--- python3.orig/Python/pylifecycle.c 2015-07-05 18:50:08.000000000 +0200
+++ python3/Python/pylifecycle.c 2015-07-26 20:01:23.563082638 +0200
@@ -1065,15 +1065,30 @@
static int
is_valid_fd(int fd)
{
- int dummy_fd;
if (fd < 0 || !_PyVerify_fd(fd))
return 0;
- _Py_BEGIN_SUPPRESS_IPH
- dummy_fd = dup(fd);
- if (dummy_fd >= 0)
- close(dummy_fd);
- _Py_END_SUPPRESS_IPH
- return dummy_fd >= 0;
+
+#if defined(MS_WINDOWS) && defined(HAVE_FSTAT) && defined(_MSC_VER) && (_MSC_VER >= 1700 && _MSC_VER < 1900)
+ /* dup (DuplicateHandle) doesn't say fd is a valid *file* handle.
+ * It could be a current thread pseudo-handle.
+ */
+ {
+ struct stat buf;
+ if (fstat(fd, &buf) < 0 && (errno == EBADF || errno == ENOENT))
+ return 0;
+ else
+ return 1;
+ }
+#else
+ {
+ int dummy_fd = dup(fd);
+ _Py_BEGIN_SUPPRESS_IPH
+ if (dummy_fd >= 0)
+ close(dummy_fd);
+ _Py_END_SUPPRESS_IPH
+ return dummy_fd >= 0;
+ }
+#endif
}
/* Initialize sys.stdin, stdout, stderr and builtins.open */
diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
--- foo/python3.orig/PCbuild/pcbuild.sln 2015-08-22 19:12:48.508338400 +0200
+++ foo/python3/PCbuild/pcbuild.sln 2015-08-22 19:15:50.130169800 +0200
@@ -58,12 +58,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testmultiphase", "_testmultiphase.vcxproj", "{16BFE6F0-22EF-40B5-B831-7E937119EF10}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "tcl.vcxproj", "{B5FD6F1D-129E-4BFF-9340-03606FAC7283}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tix", "tix.vcxproj", "{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
--- configure
+++ configure
@@ -11821,6 +11821,7 @@
break;
}
}
+ freeaddrinfo(aitop);
}
if (!(inet4 == 0 || inet4 == 2))
@@ -11828,8 +11829,6 @@
if (!(inet6 == 0 || inet6 == 2))
goto bad;
- if (aitop)
- freeaddrinfo(aitop);
return 0;
bad:
This diff is collapsed.
--- Modules/_ctypes/_ctypes.c
+++ Modules/_ctypes/_ctypes.c
@@ -1358,8 +1358,10 @@
goto error;
}
stgdict->shape[0] = length;
- memmove(&stgdict->shape[1], itemdict->shape,
- sizeof(Py_ssize_t) * (stgdict->ndim - 1));
+ if (itemdict->shape) {
+ memmove(&stgdict->shape[1], itemdict->shape,
+ sizeof(Py_ssize_t) * (stgdict->ndim - 1));
+ }
itemsize = itemdict->size;
if (length * itemsize < 0) {
--- Modules/_ctypes/libffi/src/x86/ffi64.c
+++ Modules/_ctypes/libffi/src/x86/ffi64.c
@@ -548,11 +548,15 @@
......@@ -55,14 +40,3 @@
/* Set the carry bit if the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */
--- Objects/listobject.c
+++ Objects/listobject.c
@@ -641,7 +641,7 @@
goto Error;
}
}
- memcpy(recycle, &item[ilow], s);
+ if (s != 0) memcpy(recycle, &item[ilow], s);
if (d < 0) { /* Delete -d items */
Py_ssize_t tail;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment