[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - 3 commits - configure.ac download.lst external/python3

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 4 10:43:38 UTC 2019


 configure.ac                                |    5 +-
 download.lst                                |    4 -
 external/python3/UnpackedTarball_python3.mk |    1 
 external/python3/python-3.5.7-c99.patch.1   |   62 ++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+), 3 deletions(-)

New commits:
commit 1cbb2dbff27c603583a4132537c2b8967c489bb0
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Apr 3 11:03:17 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Thu Apr 4 11:36:47 2019 +0200

    python3: upgrade to release 3.5.7
    
    Fixes CVE-2019-9636 CVE-2019-5010 CVE-2018-14647
    
    Change-Id: If0a115960aed1ee90b63e6716c844669f0ec91e5
    Reviewed-on: https://gerrit.libreoffice.org/70182
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 3c7354a85a9bd47a2676aadaad2f6622fe2d959c)
    Reviewed-on: https://gerrit.libreoffice.org/70194
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit a072b91c03f7e24cc5fe99e4b7462d37ef8d703b)

diff --git a/configure.ac b/configure.ac
index cab75d8e4a15..0a912c2bf238 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8449,7 +8449,7 @@ internal)
     SYSTEM_PYTHON=
     PYTHON_VERSION_MAJOR=3
     PYTHON_VERSION_MINOR=5
-    PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.6
+    PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.7
     if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
         AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst])
     fi
diff --git a/download.lst b/download.lst
index 581ad04965f4..98e55295f5c5 100644
--- a/download.lst
+++ b/download.lst
@@ -134,8 +134,8 @@ export PNG_TARBALL := libpng-1.6.28.tar.gz
 export POPPLER_MD5SUM := 1ce581bde2f23fa55bee13d8c61ac0df
 export POPPLER_TARBALL := poppler-0.74.0.tar.xz
 export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
-export PYTHON_MD5SUM := f5a99f765e765336a3ebbb2a24ca2be3
-export PYTHON_TARBALL := Python-3.5.6.tar.xz
+export PYTHON_MD5SUM := b1b4949786732494f4d6675c184aa765
+export PYTHON_TARBALL := Python-3.5.7.tar.xz
 export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz
 export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz
 export REDLAND_TARBALL := 32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index 04def4429860..5fe0212d86e3 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
 	external/python3/ubsan.patch.0 \
 	external/python3/python-3.5.tweak.strip.soabi.patch \
 	external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 \
+	external/python3/python-3.5.7-c99.patch.1 \
 ))
 
 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/external/python3/python-3.5.7-c99.patch.1 b/external/python3/python-3.5.7-c99.patch.1
new file mode 100644
index 000000000000..558166d9953f
--- /dev/null
+++ b/external/python3/python-3.5.7-c99.patch.1
@@ -0,0 +1,62 @@
+remove C99 which isn't suppored by all compilers yet
+
+--- python3/Modules/_pickle.c.orig	2019-04-03 16:34:01.380124314 +0200
++++ python3/Modules/_pickle.c	2019-04-03 16:35:18.579005171 +0200
+@@ -674,9 +674,12 @@
+         PyErr_NoMemory();
+         return NULL;
+     }
+-    for (size_t i = 0; i < self->mt_allocated; i++) {
++    {
++    size_t i;
++    for (i = 0; i < self->mt_allocated; i++) {
+         Py_XINCREF(self->mt_table[i].me_key);
+     }
++    }
+     memcpy(new->mt_table, self->mt_table,
+            sizeof(PyMemoEntry) * self->mt_allocated);
+ 
+@@ -4204,7 +4207,9 @@
+         return NULL;
+ 
+     memo = self->pickler->memo;
+-    for (size_t i = 0; i < memo->mt_allocated; ++i) {
++    {
++    size_t i;
++    for (i = 0; i < memo->mt_allocated; ++i) {
+         PyMemoEntry entry = memo->mt_table[i];
+         if (entry.me_key != NULL) {
+             int status;
+@@ -4225,6 +4230,7 @@
+                 goto error;
+         }
+     }
++    }
+     return new_memo;
+ 
+   error:
+@@ -6791,10 +6797,13 @@
+         if (new_memo == NULL)
+             return -1;
+ 
+-        for (size_t i = 0; i < new_memo_size; i++) {
++        {
++        size_t i;
++        for (i = 0; i < new_memo_size; i++) {
+             Py_XINCREF(unpickler->memo[i]);
+             new_memo[i] = unpickler->memo[i];
+         }
++        }
+     }
+     else if (PyDict_Check(obj)) {
+         Py_ssize_t i = 0;
+@@ -6839,7 +6848,8 @@
+ 
+   error:
+     if (new_memo_size) {
+-        for (size_t i = new_memo_size - 1; i != SIZE_MAX; i--) {
++        size_t i;
++        for (i = new_memo_size - 1; i != SIZE_MAX; i--) {
+             Py_XDECREF(new_memo[i]);
+         }
+         PyMem_FREE(new_memo);
commit dac227e03db6fe949db24a0ea9f5fd34f52cea35
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 17 10:50:42 2019 +0000
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Thu Apr 4 11:34:00 2019 +0200

    upgrade to python 3.5.6
    
    Change-Id: I6cdfc50b2385c426e20ce0e9b216b18c763249b8
    Reviewed-on: https://gerrit.libreoffice.org/66519
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    Tested-by: Jenkins
    (cherry picked from commit 6808e1e5e2361220988dfa81cb35d03fb6e15855)

diff --git a/configure.ac b/configure.ac
index 80a6538fe3eb..cab75d8e4a15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8449,7 +8449,7 @@ internal)
     SYSTEM_PYTHON=
     PYTHON_VERSION_MAJOR=3
     PYTHON_VERSION_MINOR=5
-    PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.5
+    PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.6
     if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
         AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst])
     fi
diff --git a/download.lst b/download.lst
index 1feed3291f40..581ad04965f4 100644
--- a/download.lst
+++ b/download.lst
@@ -134,8 +134,8 @@ export PNG_TARBALL := libpng-1.6.28.tar.gz
 export POPPLER_MD5SUM := 1ce581bde2f23fa55bee13d8c61ac0df
 export POPPLER_TARBALL := poppler-0.74.0.tar.xz
 export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
-export PYTHON_MD5SUM := f3763edf9824d5d3a15f5f646083b6e0
-export PYTHON_TARBALL := Python-3.5.5.tar.xz
+export PYTHON_MD5SUM := f5a99f765e765336a3ebbb2a24ca2be3
+export PYTHON_TARBALL := Python-3.5.6.tar.xz
 export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz
 export RASQAL_TARBALL := b12c5f9cfdb6b04efce5a4a186b8416b-rasqal-0.9.30.tar.gz
 export REDLAND_TARBALL := 32f8e1417a64d3c6f2c727f9053f55ea-redland-1.0.16.tar.gz
commit f40a1d8872264ef3b22084a4d9cb2f5ec774da50
Author:     Michael Stahl <mstahl at redhat.com>
AuthorDate: Tue Aug 22 22:26:43 2017 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Thu Apr 4 11:30:16 2019 +0200

    configure: try to keep PYTHON_VERSION from going stale
    
    Since it was set to 3.5.0, the bundled python was upgraded twice, but
    the directory is still named python-core-3.5.0 :(
    
    Change-Id: I15eec4148c2436e1f289d9851ce5bd212d4a368a
    Reviewed-on: https://gerrit.libreoffice.org/41433
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit ac3a4fe35e873de17eefb46c3f5e792aded6b0a5)
    Reviewed-on: https://gerrit.libreoffice.org/56683
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/configure.ac b/configure.ac
index a8026700e3b1..80a6538fe3eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8450,6 +8450,9 @@ internal)
     PYTHON_VERSION_MAJOR=3
     PYTHON_VERSION_MINOR=5
     PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.5
+    if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
+        AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst])
+    fi
     AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"])
     BUILD_TYPE="$BUILD_TYPE PYTHON"
     # Embedded Python dies without Home set


More information about the Libreoffice-commits mailing list