Makefile.fetch | 1 RepositoryExternal.mk | 9 bin/check-elf-dynamic-objects | 3 bin/update_pch_bisect | 2 configure.ac | 17 download.lst | 6 external/Module_external.mk | 1 external/libffi/ExternalPackage_libffi.mk | 20 external/libffi/ExternalProject_libffi.mk | 50 external/libffi/Makefile | 7 external/libffi/Module_libffi.mk | 18 external/libffi/README | 3 external/libffi/UnpackedTarball_libffi.mk | 14 external/openssl/ExternalPackage_openssl.mk | 8 external/openssl/ExternalProject_openssl.mk | 2 external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 | 59 external/python3/0001-3.6-closes-bpo-42938-Replace-snprintf-with-Python-un.patch.1 | 175 external/python3/ExternalPackage_python3.mk | 333 external/python3/ExternalProject_python3.mk | 55 external/python3/UnpackedTarball_python3.mk | 15 external/python3/i100492-freebsd.patch.1 | 49 external/python3/internal-zlib.patch.0 | 22 external/python3/python-3.3.0-clang.patch.1 | 13 external/python3/python-3.3.0-darwin.patch.1 | 22 external/python3/python-3.3.0-pythreadstate.patch.1 | 15 external/python3/python-3.3.3-aix.patch.1 | 146 external/python3/python-3.3.3-disable-obmalloc.patch.0 | 23 external/python3/python-3.3.3-elf-rpath.patch.1 | 15 external/python3/python-3.5.4-msvc-disable.patch.1 | 21 external/python3/python-3.5.4-ssl.patch.1 | 83 external/python3/python-3.5.tweak.strip.soabi.patch | 2 external/python3/python-3.7.6-msvc-ssl.patch.1 | 26 external/python3/python3-osx-avoid-new-10.13.patch.1 | 61 external/python3/ubsan.patch.0 | 45 librelogo/source/LibreLogo/LibreLogo.py | 17 pyuno/inc/pyuno.hxx | 8 pyuno/source/loader/pythonloader.py | 5 pyuno/source/loader/pyuno_loader.cxx | 9 pyuno/source/module/pyuno.cxx | 37 pyuno/source/module/pyuno_callable.cxx | 12 pyuno/source/module/pyuno_dlopenwrapper.c | 10 pyuno/source/module/pyuno_impl.hxx | 47 pyuno/source/module/pyuno_iterator.cxx | 24 pyuno/source/module/pyuno_module.cxx | 10 pyuno/source/module/pyuno_runtime.cxx | 81 pyuno/source/module/pyuno_struct.cxx | 12 pyuno/source/module/pyuno_type.cxx | 4 pyuno/source/module/pyuno_util.cxx | 12 pyuno/source/module/uno.py | 22 readlicense_oo/license/LICENSE | 25 readlicense_oo/license/LICENSE.fodt | 3241 +-- readlicense_oo/license/LICENSE.html | 9587 +++++++++- scripting/source/pyprov/mailmerge.py | 29 scripting/source/pyprov/pythonscript.py | 8 solenv/bin/version.py | 1 solenv/gbuild/gen-autoinstall.py | 2 unotest/source/python/org/libreoffice/unotest.py | 3 writerfilter/source/ooxml/factory_ns.py | 1 writerfilter/source/ooxml/factoryimpl.py | 1 writerfilter/source/ooxml/factoryimpl_ns.py | 1 writerfilter/source/ooxml/factoryinc.py | 1 writerfilter/source/ooxml/modelpreprocess.py | 1 writerfilter/source/ooxml/qnametostr.py | 1 writerfilter/source/ooxml/resourceids.py | 1 64 files changed, 11702 insertions(+), 2852 deletions(-)
New commits: commit 24aea36ab2fe34b259c60d7b6ed3ea544da6cb5b Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Mon Aug 28 10:13:28 2023 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Nov 10 10:10:28 2023 +0100 python3: upgrade to release 3.8.18 Fixes CVE-2023-40217 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156183 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit c1586ef57b5770f80ef200ab38ff4538c2dfb145) Change-Id: Ie08af471009b7f5c42aa6875dd4f9d886ad1d617 diff --git a/configure.ac b/configure.ac index 7c1847ceb887..dfd79d97a9e5 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.17 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 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 a0c95030e5bc..78b59898748f 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -PYTHON_SHA256SUM := 2e54b0c68191f16552f6de2e97a2396540572a219f6bbb28591a137cecc490a9 -PYTHON_TARBALL := Python-3.8.17.tar.xz +export PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f +export PYTHON_TARBALL := Python-3.8.18.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c commit 1706c9047c541f69847067b9540316a428056046 Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> AuthorDate: Wed Aug 2 21:19:13 2023 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Nov 10 10:04:59 2023 +0100 Un-break Python3 build Some bits were missed from the openssl 1.1 update due to the older Python main version, now apply those things from commit 0911b0a26356aa53bb94a1d2171f36e6c2e28749 Change-Id: I3b48fe6dbc2fe065762cafd8fa6908a6e9976750 diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index a70457f7dd27..8dfb926bb5f3 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -43,7 +43,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) : /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \ /p:Platform=$(python3_WIN_PLATFORM_MSBUILD) \ /p:opensslIncludeDir=$(call gb_UnpackedTarball_get_dir,openssl)/include \ - /p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl)/out32dll \ + /p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl)/ \ /p:zlibDir=$(call gb_UnpackedTarball_get_dir,zlib) \ /p:libffiOutDir=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/.libs \ /p:libffiIncludeDir=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/include \ diff --git a/external/python3/python-3.7.6-msvc-ssl.patch.1 b/external/python3/python-3.7.6-msvc-ssl.patch.1 index ca41f13b6ca5..11d6f85aaffb 100644 --- a/external/python3/python-3.7.6-msvc-ssl.patch.1 +++ b/external/python3/python-3.7.6-msvc-ssl.patch.1 @@ -14,12 +14,13 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC <ResourceCompile Include="..\PC\python_nt.rc" /> --- python3/PCbuild/openssl.props.orig 2019-12-23 16:20:34.588135900 +0100 +++ python3/PCbuild/openssl.props 2019-12-23 16:20:51.074001300 +0100 -@@ -6,7 +6,7 @@ - </ClCompile> - <Link> - <AdditionalLibraryDirectories>$(opensslOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> -- <AdditionalDependencies>ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies> -+ <AdditionalDependencies>ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> +@@ -11,8 +11,6 @@ </ItemDefinitionGroup> <PropertyGroup> + <_DLLSuffix>-1_1</_DLLSuffix> +- <_DLLSuffix Condition="$(Platform) == 'ARM'">$(_DLLSuffix)-arm</_DLLSuffix> +- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix> + </PropertyGroup> + <ItemGroup> + <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" /> + commit fb0e95960a8f6f42a9dc4b3ee4b4659ee02894bf Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Wed Jun 7 11:16:03 2023 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Nov 10 10:04:25 2023 +0100 python3: upgrade to release 3.8.17 Fixes CVE-2023-24329 and a few more obscure security issues. Change-Id: I4b073ce02c0377e2791e4593d20f2b756de0c8cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152696 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/configure.ac b/configure.ac index e185db7e4ab8..7c1847ceb887 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.16 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.17 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 b140607dba3e..a0c95030e5bc 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := d85dbb3774132473d8081dcb158f34a10ccad7a90b96c7e50ea4bb61f5ce4562 -export PYTHON_TARBALL := Python-3.8.16.tar.xz +PYTHON_SHA256SUM := 2e54b0c68191f16552f6de2e97a2396540572a219f6bbb28591a137cecc490a9 +PYTHON_TARBALL := Python-3.8.17.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c diff --git a/external/python3/python-3.3.0-darwin.patch.1 b/external/python3/python-3.3.0-darwin.patch.1 index 39d3c9180a19..d262d55cd5b3 100644 --- a/external/python3/python-3.3.0-darwin.patch.1 +++ b/external/python3/python-3.3.0-darwin.patch.1 @@ -49,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-2020 Python Software Foundation.</string> + <string>%version%, (c) 2001-2023 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 commit 7e14456eacf67f2ca3b095254c463e61505f8768 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Dec 9 11:51:22 2022 +0100 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Nov 10 10:01:57 2023 +0100 python3: upgrade to release 3.8.16 Fixes CVE-2022-37454 and a few other ones that look less relevant including CVE-2022-45061 and CVE-2015-20107. Change-Id: I10fd254f7f0801d47119234bb3436874e98d8c91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143849 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/configure.ac b/configure.ac index 17d02b7992c3..e185db7e4ab8 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.15 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.16 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 df6ef6e3adee..b140607dba3e 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := 5114fc7918a2a5e20eb5aac696b30c36f412c6ef24b13f5c9eb9e056982d9550 -export PYTHON_TARBALL := Python-3.8.15.tar.xz +export PYTHON_SHA256SUM := d85dbb3774132473d8081dcb158f34a10ccad7a90b96c7e50ea4bb61f5ce4562 +export PYTHON_TARBALL := Python-3.8.16.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c commit e273cd3327de32acfdcef7bd0f93384cf78844d1 Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Mon Oct 24 00:52:04 2022 +0900 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Nov 10 09:59:17 2023 +0100 Python3: update to 3.8.15 * Fixes CVE-2022-40674 * Removed 0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 as fixed upstream Change-Id: I8e71f9a6b013ca4c45bf8774b284be98eee71bab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141691 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/configure.ac b/configure.ac index 9ff2381a38e7..17d02b7992c3 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.14 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.15 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 4d5c1bb06091..df6ef6e3adee 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := 5d77e278271ba803e9909a41a4f3baca006181c93ada682a5e5fe8dc4a24c5f3 -export PYTHON_TARBALL := Python-3.8.14.tar.xz +export PYTHON_SHA256SUM := 5114fc7918a2a5e20eb5aac696b30c36f412c6ef24b13f5c9eb9e056982d9550 +export PYTHON_TARBALL := Python-3.8.15.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c diff --git a/external/python3/i100492-freebsd.patch.1 b/external/python3/i100492-freebsd.patch.1 index 074e5fc489f8..b2ca1ee7117f 100644 --- a/external/python3/i100492-freebsd.patch.1 +++ b/external/python3/i100492-freebsd.patch.1 @@ -2,7 +2,7 @@ FreeBSD porting fixes, patch by m...@openoffice.org --- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000 +++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000 -@@ -186,6 +189,9 @@ +@@ -238,6 +238,9 @@ { pthread_t th; int status; @@ -12,7 +12,7 @@ FreeBSD porting fixes, patch by m...@openoffice.org #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) pthread_attr_t attrs; #endif -@@ -214,6 +220,10 @@ +@@ -277,6 +280,10 @@ callback->func = func; callback->arg = arg; @@ -23,7 +23,7 @@ FreeBSD porting fixes, patch by m...@openoffice.org status = pthread_create(&th, #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) &attrs, -@@ -225,6 +234,9 @@ +@@ -285,6 +292,9 @@ #endif pythread_wrapper, callback); diff --git a/external/python3/internal-zlib.patch.0 b/external/python3/internal-zlib.patch.0 index de68d9e7dec8..27bb737db0c7 100644 --- a/external/python3/internal-zlib.patch.0 +++ b/external/python3/internal-zlib.patch.0 @@ -19,7 +19,7 @@ --- setup.py +++ setup.py -@@ -1362,7 +1362,7 @@ +@@ -1483,7 +1483,7 @@ # # You can upgrade zlib to version 1.1.4 yourself by going to # http://www.gzip.org/zlib/ @@ -28,7 +28,7 @@ have_zlib = False if zlib_inc is not None: zlib_h = zlib_inc[0] + '/zlib.h' -@@ -1379,13 +1379,13 @@ +@@ -1500,13 +1500,13 @@ version = line.split()[2] break if version >= version_req: @@ -44,7 +44,7 @@ extra_link_args=zlib_extra_link_args)) have_zlib = True else: -@@ -1399,7 +1399,7 @@ +@@ -1520,7 +1520,7 @@ # crc32 if we have it. Otherwise binascii uses its own. if have_zlib: extra_compile_args = ['-DUSE_ZLIB_CRC32'] diff --git a/external/python3/python-3.3.0-darwin.patch.1 b/external/python3/python-3.3.0-darwin.patch.1 index 27a355e2ad21..39d3c9180a19 100644 --- a/external/python3/python-3.3.0-darwin.patch.1 +++ b/external/python3/python-3.3.0-darwin.patch.1 @@ -5,7 +5,7 @@ LO needs to build both against MacOSX SDK and not produce universal binaries. diff -ru python3.orig/configure python3/configure --- python3.orig/configure 2015-07-26 17:36:11.808497783 +0200 +++ python3/configure 2015-07-26 17:38:49.016508337 +0200 -@@ -6794,7 +6794,20 @@ +@@ -7385,7 +7385,20 @@ then case "$UNIVERSAL_ARCHS" in 32-bit) @@ -30,7 +30,7 @@ diff -ru python3.orig/configure 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 -@@ -43,7 +43,7 @@ +@@ -44,7 +44,7 @@ INSTALL_SCRIPT= @INSTALL_SCRIPT@ INSTALL_DATA=@INSTALL_DATA@ LN=@LN@ diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 b/external/python3/python-3.3.3-disable-obmalloc.patch.0 index 0963a5f1bb1d..c4a1dea61ecf 100644 --- a/external/python3/python-3.3.3-disable-obmalloc.patch.0 +++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0 @@ -1,6 +1,6 @@ --- Objects/obmalloc.c +++ Objects/obmalloc.c -@@ -413,8 +413,8 @@ +@@ -712,8 +712,8 @@ #ifdef WITH_PYMALLOC @@ -10,7 +10,7 @@ /* If we're using GCC, use __builtin_expect() to reduce overhead of the valgrind checks */ -@@ -1181,7 +1181,7 @@ +@@ -1430,7 +1430,7 @@ #ifdef WITH_VALGRIND if (UNLIKELY(running_on_valgrind == -1)) { diff --git a/external/python3/python-3.3.3-elf-rpath.patch.1 b/external/python3/python-3.3.3-elf-rpath.patch.1 index 55546afd9844..a408858f5917 100644 --- a/external/python3/python-3.3.3-elf-rpath.patch.1 +++ b/external/python3/python-3.3.3-elf-rpath.patch.1 @@ -5,7 +5,7 @@ set RPATH (only to be used on ELF platforms) diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in --- python3.orig/Makefile.pre.in 2015-07-26 20:29:07.126194320 +0200 +++ python3/Makefile.pre.in 2015-07-26 20:37:21.814227530 +0200 -@@ -563,7 +563,7 @@ +@@ -566,7 +566,7 @@ # Build the interpreter $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) @@ -14,7 +14,7 @@ diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in platform: $(BUILDPYTHON) pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform -@@ -625,7 +625,7 @@ +@@ -628,7 +628,7 @@ fi libpython3.so: libpython$(LDVERSION).so diff --git a/external/python3/python-3.5.4-msvc-disable.patch.1 b/external/python3/python-3.5.4-msvc-disable.patch.1 index 52c007d7d5b6..d5b4e3f6264b 100644 --- a/external/python3/python-3.5.4-msvc-disable.patch.1 +++ b/external/python3/python-3.5.4-msvc-disable.patch.1 @@ -3,7 +3,7 @@ Disable some stuff LO does not need, especially stuff with external dependencies diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln --- python3.orig/PCbuild/pcbuild.sln 2017-08-10 00:04:44.359879894 +0200 +++ python3/PCbuild/pcbuild.sln 2017-08-10 00:13:51.179873748 +0200 -@@ -12,8 +12,6 @@ +@@ -15,8 +15,6 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" EndProject @@ -12,7 +12,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}" -@@ -28,34 +26,20 @@ +@@ -31,34 +29,20 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" EndProject @@ -47,7 +47,7 @@ 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}" -@@ -75,8 +75,6 @@ +@@ -93,8 +77,6 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queue", "_queue.vcxproj", "{78D80A15-BD8C-44E2-B49E-1F05B0A0A687}" EndProject diff --git a/external/python3/python-3.5.tweak.strip.soabi.patch b/external/python3/python-3.5.tweak.strip.soabi.patch index 48ac7f82f8be..4c2bb2bb9a29 100644 --- a/external/python3/python-3.5.tweak.strip.soabi.patch +++ b/external/python3/python-3.5.tweak.strip.soabi.patch @@ -1,7 +1,7 @@ diff -ru python3.orig/configure python3/configure --- misc/python3.orig/configure 2015-07-26 21:14:31.127377193 +0200 +++ misc/python3/configure 2015-07-26 21:21:34.975405648 +0200 -@@ -14388,7 +14388,7 @@ +@@ -15229,7 +15229,7 @@ $as_echo "$ABIFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 $as_echo_n "checking SOABI... " >&6; } diff --git a/external/python3/python-3.7.6-msvc-ssl.patch.1 b/external/python3/python-3.7.6-msvc-ssl.patch.1 index 14e7cca0a8ce..ca41f13b6ca5 100644 --- a/external/python3/python-3.7.6-msvc-ssl.patch.1 +++ b/external/python3/python-3.7.6-msvc-ssl.patch.1 @@ -2,7 +2,7 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC --- python3/PCbuild/_ssl.vcxproj.orig2 2019-12-23 15:54:19.254298900 +0100 +++ python3/PCbuild/_ssl.vcxproj 2019-12-23 15:54:24.693251200 +0100 -@@ -67,9 +67,6 @@ +@@ -99,9 +99,6 @@ </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\Modules\_ssl.c" /> diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0 index 938acc1f1725..d44fbe055c86 100644 --- a/external/python3/ubsan.patch.0 +++ b/external/python3/ubsan.patch.0 @@ -18,3 +18,26 @@ /* Set the carry bit if the function uses any sse registers. This is clc or stc, together with the first byte of the jmp. */ +--- Modules/posixmodule.c ++++ Modules/posixmodule.c +@@ -13998,6 +13998,9 @@ + }; + + static int ++#if defined __clang__ ++__attribute__((no_sanitize("shift-base"))) // MFD_HUGE_16GB in /usr/include/linux/memfd.h ++#endif + all_ins(PyObject *m) + { + #ifdef F_OK +--- Objects/listobject.c ++++ Objects/listobject.c +@@ -554,7 +554,7 @@ + dest[i] = v; + } + src = b->ob_item; +- dest = np->ob_item + Py_SIZE(a); ++ dest = Py_SIZE(a) == 0 ? np->ob_item : np->ob_item + Py_SIZE(a); + for (i = 0; i < Py_SIZE(b); i++) { + PyObject *v = src[i]; + Py_INCREF(v); commit 6b8a453d2716959c7e541d5ddbc9dc1897d9fc34 Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Sat Sep 10 17:20:58 2022 +0900 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 23:58:03 2023 +0100 Python3: upgrade to release 3.8.14 Fixes CVE-2020-10735. Change-Id: I028bb1fe6154beffdd80c0190c9de40ab8a80c4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139747 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/configure.ac b/configure.ac index 8a854c7da4b2..9ff2381a38e7 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.13 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.14 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 f8c4be6b01bc..4d5c1bb06091 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := 6f309077012040aa39fe8f0c61db8c0fa1c45136763299d375c9e5756f09cf57 -export PYTHON_TARBALL := Python-3.8.13.tar.xz +export PYTHON_SHA256SUM := 5d77e278271ba803e9909a41a4f3baca006181c93ada682a5e5fe8dc4a24c5f3 +export PYTHON_TARBALL := Python-3.8.14.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c commit 123bf59761fa954a09a462571d9bb6f9fa4a7fb8 Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Tue Sep 6 21:10:53 2022 +0900 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 23:55:10 2023 +0100 python3: upgrade to release 3.8.13 Remove some code in external/python3/darwin.patch.0 as it was fixed upstream(https://bugs.python.org/issue45405). Change-Id: Ie6bfb2456f96a63adbf0dbcb9c902dc56f1151ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139493 Tested-by: Jenkins Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/configure.ac b/configure.ac index a58a772ae6c2..8a854c7da4b2 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.12 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.13 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 18f4f77a9f14..f8c4be6b01bc 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea -export PYTHON_TARBALL := Python-3.8.12.tar.xz +export PYTHON_SHA256SUM := 6f309077012040aa39fe8f0c61db8c0fa1c45136763299d375c9e5756f09cf57 +export PYTHON_TARBALL := Python-3.8.13.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c commit a83090e1399675b95b046ef9f5466468d8b08c33 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Sat Feb 22 07:30:15 2020 +0300 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 23:49:21 2023 +0100 python 3.8.2 compile: add tp_print to PyTypeObject I couldn't find this documented on the Internet though, as the 3.9 and 3.8.2rc documentation didn't mention it as an added item... I'm using Ubuntu 20.04 alpha with python3 --version Python 3.8.2rc1 This fixes pyuno/source/module/pyuno.cxx:1689:1: error: missing initializer for member ‘_typeobject::tp_print’ [-Werror=missing-field-initializers] Change-Id: Idec5720050572b34628267cd94557dabf7edbf3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89247 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index 4ae7533941b6..09fb401c460d 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1666,6 +1666,9 @@ static PyTypeObject PyUNOType = , nullptr #if PY_VERSION_HEX >= 0x03080000 , nullptr // vectorcallfunc tp_vectorcall +#if PY_VERSION_HEX >= 0x03080200 + , 0 //Py_ssize_t tp_print +#endif #endif #endif }; diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx index 2a1f3b823465..f09b5bb6b467 100644 --- a/pyuno/source/module/pyuno_callable.cxx +++ b/pyuno/source/module/pyuno_callable.cxx @@ -234,6 +234,9 @@ static PyTypeObject PyUNO_callable_Type = , nullptr #if PY_VERSION_HEX >= 0x03080000 , nullptr // vectorcallfunc tp_vectorcall +#if PY_VERSION_HEX >= 0x03080200 + , 0 //Py_ssize_t tp_print +#endif #endif #endif }; diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx index 2f805fad77f5..5a7007713071 100644 --- a/pyuno/source/module/pyuno_iterator.cxx +++ b/pyuno/source/module/pyuno_iterator.cxx @@ -169,6 +169,9 @@ static PyTypeObject PyUNO_iterator_Type = , nullptr #if PY_VERSION_HEX >= 0x03080000 , nullptr // vectorcallfunc tp_vectorcall +#if PY_VERSION_HEX >= 0x03080200 + , 0 //Py_ssize_t tp_print +#endif #endif #endif }; @@ -306,6 +309,9 @@ static PyTypeObject PyUNO_list_iterator_Type = , nullptr #if PY_VERSION_HEX >= 0x03080000 , nullptr // vectorcallfunc tp_vectorcall +#if PY_VERSION_HEX >= 0x03080200 + , 0 //Py_ssize_t tp_print +#endif #endif #endif }; diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 349583548540..1bd09f0c0f83 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -127,6 +127,9 @@ static PyTypeObject RuntimeImpl_Type = , nullptr #if PY_VERSION_HEX >= 0x03080000 , nullptr // vectorcallfunc tp_vectorcall +#if PY_VERSION_HEX >= 0x03080200 + , 0 //Py_ssize_t tp_print +#endif #endif #endif }; diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx index a8de6a199ced..abdc4bd4ea4c 100644 --- a/pyuno/source/module/pyuno_struct.cxx +++ b/pyuno/source/module/pyuno_struct.cxx @@ -351,6 +351,9 @@ static PyTypeObject PyUNOStructType = , nullptr #if PY_VERSION_HEX >= 0x03080000 , nullptr // vectorcallfunc tp_vectorcall +#if PY_VERSION_HEX >= 0x03080200 + , 0 //Py_ssize_t tp_print +#endif #endif #endif }; commit eb88f1aa5ed1e27c6fc6b617f57d597ce3f6dc3e Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Jan 22 13:07:23 2022 +0000 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 23:47:14 2023 +0100 upgrade to Python-3.8.12 Change-Id: I0dd1a767c5c65e5789e690e13958ba4ad92a7e16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128770 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/configure.ac b/configure.ac index 9f859158608f..a58a772ae6c2 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.10 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.12 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 de3859447d8c..18f4f77a9f14 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := 6af24a66093dd840bcccf371d4044a3027e655cf24591ce26e48022bc79219d9 -export PYTHON_TARBALL := Python-3.8.10.tar.xz +export PYTHON_SHA256SUM := b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea +export PYTHON_TARBALL := Python-3.8.12.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c commit e57ab9ddbb6bcac622f420e8f97ad59ccbb88c67 Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Thu Jun 24 08:26:33 2021 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 23:14:47 2023 +0100 python3: update to 3.8.10 So we don't build 3.8.8rc1 anymore. I didn't look into 3.9. Change-Id: Ife7d898c913b9b164168b0ef23a055deea55815f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117757 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/configure.ac b/configure.ac index 93aac7bbc4df..9f859158608f 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.8 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.10 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 3983f2eb0385..de3859447d8c 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := bd746ed1ad9ccfa9b2a8d13736a5c452025c3600913d000078e6ed1df3d767b6 -export PYTHON_TARBALL := Python-3.8.8rc1.tar.xz +export PYTHON_SHA256SUM := 6af24a66093dd840bcccf371d4044a3027e655cf24591ce26e48022bc79219d9 +export PYTHON_TARBALL := Python-3.8.10.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c commit 5267d8788312f57e2057c6ba53ec6025ca33a7ba Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Feb 19 11:53:27 2021 +0100 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 23:09:49 2023 +0100 python3: upgrade to release 3.8.8rc1 Fixes CVE-2021-3177 plus these less important ones: CVE-2021-23336 CVE-2020-27619 CVE-2020-26116 CVE-2019-20907 Change-Id: Idbe072a9db1faf8363b4f7795b9fde71c26969f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111208 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/configure.ac b/configure.ac index 970cf3ae13b1..93aac7bbc4df 100644 --- a/configure.ac +++ b/configure.ac @@ -8293,7 +8293,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.4 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.8 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 4c4cb872bc21..3983f2eb0385 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := 5f41968a95afe9bc12192d7e6861aab31e80a46c46fa59d3d837def6a4cd4d37 -export PYTHON_TARBALL := Python-3.8.4.tar.xz +export PYTHON_SHA256SUM := bd746ed1ad9ccfa9b2a8d13736a5c452025c3600913d000078e6ed1df3d767b6 +export PYTHON_TARBALL := Python-3.8.8rc1.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c commit 0ab8fbc16023df240827f4ab4566d75f0c6796fe Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jun 7 15:57:13 2019 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 23:06:08 2023 +0100 Adapt to upcoming Python 3.8 ...which changed PyTypeObject in <https://github.com/python/cpython/commit/ aacc77fbd77640a8f03638216fa09372cc21673d> "bpo-36974: implement PEP 590 (GH-13185)". Change-Id: I687ec38aeda05d0747b9ed08221db75a758bed51 Reviewed-on: https://gerrit.libreoffice.org/73664 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 2bd585f31d7abb066e3f53d9b29c822af20aea69) Reviewed-on: https://gerrit.libreoffice.org/73778 diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index fbe0ccccdf1c..4ae7533941b6 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1614,7 +1614,11 @@ static PyTypeObject PyUNOType = sizeof (PyUNO), 0, PyUNO_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif PyUNO_getattr, PyUNO_setattr, /* this type does not exist in Python 3: (cmpfunc) */ nullptr, @@ -1660,6 +1664,9 @@ static PyTypeObject PyUNOType = #endif #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx index b52e8d6b517a..2a1f3b823465 100644 --- a/pyuno/source/module/pyuno_callable.cxx +++ b/pyuno/source/module/pyuno_callable.cxx @@ -182,7 +182,11 @@ static PyTypeObject PyUNO_callable_Type = sizeof (PyUNO_callable), 0, ::pyuno::PyUNO_callable_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif nullptr, nullptr, nullptr, @@ -228,6 +232,9 @@ static PyTypeObject PyUNO_callable_Type = #endif #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; diff --git a/pyuno/source/module/pyuno_iterator.cxx b/pyuno/source/module/pyuno_iterator.cxx index 5a36a32d516d..2f805fad77f5 100644 --- a/pyuno/source/module/pyuno_iterator.cxx +++ b/pyuno/source/module/pyuno_iterator.cxx @@ -119,7 +119,11 @@ static PyTypeObject PyUNO_iterator_Type = sizeof (PyUNO_iterator), 0, PyUNO_iterator_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif nullptr, nullptr, nullptr, @@ -163,6 +167,9 @@ static PyTypeObject PyUNO_iterator_Type = 0 #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; @@ -249,7 +256,11 @@ static PyTypeObject PyUNO_list_iterator_Type = sizeof (PyUNO_list_iterator), 0, PyUNO_list_iterator_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif nullptr, nullptr, nullptr, @@ -293,6 +304,9 @@ static PyTypeObject PyUNO_list_iterator_Type = 0 #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 39433f6517c9..349583548540 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -75,7 +75,11 @@ static PyTypeObject RuntimeImpl_Type = sizeof (RuntimeImpl), 0, RuntimeImpl::del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif nullptr, nullptr, nullptr, @@ -121,6 +125,9 @@ static PyTypeObject RuntimeImpl_Type = #endif #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx index e23b74db20eb..a8de6a199ced 100644 --- a/pyuno/source/module/pyuno_struct.cxx +++ b/pyuno/source/module/pyuno_struct.cxx @@ -299,7 +299,11 @@ static PyTypeObject PyUNOStructType = sizeof (PyUNO), 0, PyUNOStruct_del, - nullptr, +#if PY_VERSION_HEX >= 0x03080000 + 0, // Py_ssize_t tp_vectorcall_offset +#else + nullptr, // printfunc tp_print +#endif PyUNOStruct_getattr, PyUNOStruct_setattr, /* this type does not exist in Python 3: (cmpfunc) */ nullptr, @@ -345,6 +349,9 @@ static PyTypeObject PyUNOStructType = #endif #if PY_VERSION_HEX >= 0x03040000 , nullptr +#if PY_VERSION_HEX >= 0x03080000 + , nullptr // vectorcallfunc tp_vectorcall +#endif #endif }; commit af6c90ddbbe951adce3f72b2fb352a4e24c0905c Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Tue Jul 14 23:35:57 2020 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 23:05:53 2023 +0100 python3: update to 3.8.4 With all the prerequisites in place, LO can be updated to the current Python release. Interestingly I found that Cygwin always seems to use LC_COLLATE=C, probably because the default collation rules are missing. Then there are the changes introduced in "PEP 587 -- Python Initialization Configuration", which appearingly have modified the DLL search path behaviour on Windows, so the OpenSLL DLLs aren't found anymore in the program directory. As a workaround, the OpenSLL and libffi DLLs are now (also) installed into the Python lib dir on Windows. Change-Id: Ib82f7b77213da9c525f8c79a13d128d9eec9ca64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98437 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 4213f426ce0f..a71184143eaf 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3092,7 +3092,7 @@ $(call gb_LinkTarget_add_libs,$(1),\ else $(call gb_LinkTarget_add_libs,$(1),\ -L$(call gb_UnpackedTarball_get_dir,python3) \ - -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \ + -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ ) endif diff --git a/configure.ac b/configure.ac index 15ba47641c38..970cf3ae13b1 100644 --- a/configure.ac +++ b/configure.ac @@ -8292,8 +8292,8 @@ int main(int argc, char **argv) { internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 - PYTHON_VERSION_MINOR=7 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.7 + PYTHON_VERSION_MINOR=8 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.4 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 9fd48ed70077..4c4cb872bc21 100644 --- a/download.lst +++ b/download.lst @@ -197,8 +197,8 @@ export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb3 export POPPLER_TARBALL := poppler-22.09.0.tar.xz export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2 export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 -export PYTHON_SHA256SUM := 06a0a9f1bf0d8cd1e4121194d666c4e28ddae4dd54346de6c343206599f02136 -export PYTHON_TARBALL := Python-3.7.7.tar.xz +export PYTHON_SHA256SUM := 5f41968a95afe9bc12192d7e6861aab31e80a46c46fa59d3d837def6a4cd4d37 +export PYTHON_TARBALL := Python-3.8.4.tar.xz export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c diff --git a/external/libffi/ExternalPackage_libffi.mk b/external/libffi/ExternalPackage_libffi.mk new file mode 100644 index 000000000000..61b0a1ca460c --- /dev/null +++ b/external/libffi/ExternalPackage_libffi.mk @@ -0,0 +1,20 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,libffi,libffi)) + +$(eval $(call gb_ExternalPackage_use_external_project,libffi,libffi)) + +ifeq ($(COM),MSC) +$(eval $(call gb_ExternalPackage_add_files,libffi,$(LIBO_LIB_FOLDER)/python-core-$(PYTHON_VERSION)/lib, \ + $(HOST_PLATFORM)/.libs/libffi-7.dll \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/openssl/ExternalPackage_openssl.mk b/external/openssl/ExternalPackage_openssl.mk index de77f53f33b9..d0c0dbaab975 100644 --- a/external/openssl/ExternalPackage_openssl.mk +++ b/external/openssl/ExternalPackage_openssl.mk @@ -16,6 +16,14 @@ $(eval $(call gb_ExternalPackage_add_files,openssl,$(LIBO_LIB_FOLDER),\ libcrypto-1_1.dll \ libssl-1_1.dll \ )) +ifneq ($(DISABLE_PYTHON),TRUE) +ifneq ($(SYSTEM_PYTHON),TRUE) +$(eval $(call gb_ExternalPackage_add_files,openssl,$(LIBO_LIB_FOLDER)/python-core-$(PYTHON_VERSION)/lib, \ + libcrypto-1_1.dll \ + libssl-1_1.dll \ +)) +endif +endif endif # vim: set noet sw=4 ts=4: diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk index 58a609ea6f1d..d7dffe2793b6 100644 --- a/external/python3/ExternalPackage_python3.mk +++ b/external/python3/ExternalPackage_python3.mk @@ -24,15 +24,14 @@ $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYT endif $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\ PCbuild/$(python_arch_subdir)_ctypes$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ - PCbuild/$(python_arch_subdir)_ctypes_test$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)_decimal$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)_elementtree$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)_msi$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)_multiprocessing$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ + PCbuild/$(python_arch_subdir)_overlapped$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ + PCbuild/$(python_arch_subdir)_queue$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)_socket$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)_ssl$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ - PCbuild/$(python_arch_subdir)_testbuffer$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ - PCbuild/$(python_arch_subdir)_testcapi$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)pyexpat$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)select$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ PCbuild/$(python_arch_subdir)unicodedata$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \ @@ -41,8 +40,8 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor else $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python)) $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so)) -$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so)) -$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so.1.0-gdb.py,Tools/gdb/libpython.py)) +$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so)) +$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-gdb.py,Tools/gdb/libpython.py)) # Unfortunately the python build system does not allow to explicitly enable or # disable these, it just tries to build them and then prints which did not @@ -53,70 +52,68 @@ $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$( ifneq ($(OS),AIX) $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\ - LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_asyncio.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/binascii.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_bisect.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_blake2.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/cmath.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_codecs_cn.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_codecs_hk.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_codecs_iso2022.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_codecs_jp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_codecs_kr.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_codecs_tw.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_contextvars.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_crypt.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_csv.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_ctypes.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_ctypes_test.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_datetime.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_decimal.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_elementtree.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/fcntl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/grp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ + LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_asyncio.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/binascii.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_bisect.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_blake2.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/cmath.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_codecs_cn.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_codecs_hk.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_codecs_iso2022.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_codecs_jp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_codecs_kr.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_codecs_tw.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_contextvars.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_crypt.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_csv.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_ctypes.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_datetime.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_decimal.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_elementtree.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/fcntl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/grp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ $(if $(DISABLE_OPENSSL),, \ - LO_lib/_hashlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ + LO_lib/_hashlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ ) \ - LO_lib/_heapq.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_json.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_lsprof.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/math.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_md5.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/mmap.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_multibytecodec.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_multiprocessing.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_opcode.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/ossaudiodev.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/parser.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_pickle.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_posixsubprocess.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/pyexpat.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_queue.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_random.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/resource.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/select.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_sha1.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_sha256.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_sha3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_sha512.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_socket.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/spwd.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ + LO_lib/_heapq.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_json.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_lsprof.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/math.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_md5.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/mmap.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_multibytecodec.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_multiprocessing.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_opcode.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/ossaudiodev.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/parser.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_pickle.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_posixshmem.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_posixsubprocess.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/pyexpat.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_queue.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_random.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/resource.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/select.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_sha1.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_sha256.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_sha3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_sha512.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_socket.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/spwd.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ $(if $(DISABLE_OPENSSL),, \ - LO_lib/_ssl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ + LO_lib/_ssl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ ) \ - LO_lib/_struct.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/syslog.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/termios.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_testbuffer.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_testcapi.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_testimportmultiple.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_testmultiphase.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/_xxtestfuzz.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ - LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \ + LO_lib/_statistics.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_struct.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/syslog.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/termios.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_xxsubinterpreters.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/_xxtestfuzz.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ + LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \ )) endif endif @@ -146,6 +143,10 @@ endif # idlelib, tkinter, turtledemo - need Tk to build the C module # test - probably unnecessary? was explicitly removed #i116738# # venv - why would we need virtual environments +# +# These lists are now sorted with "LC_COLLATE=C sort", by using +# find Lib/ -name "*.py" | sort | sed -e 's/^/\t/' -e 's/$/ \\/' +# $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\ LICENSE \ @@ -158,6 +159,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/_dummy_thread.py \ Lib/_markupbase.py \ Lib/_osx_support.py \ + Lib/_py_abc.py \ Lib/_pydecimal.py \ Lib/_pyio.py \ Lib/_sitebuiltins.py \ @@ -176,6 +178,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/binhex.py \ Lib/bisect.py \ Lib/bz2.py \ + Lib/cProfile.py \ Lib/calendar.py \ Lib/cgi.py \ Lib/cgitb.py \ @@ -191,7 +194,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/contextvars.py \ Lib/copy.py \ Lib/copyreg.py \ - Lib/cProfile.py \ Lib/crypt.py \ Lib/csv.py \ Lib/dataclasses.py \ @@ -228,7 +230,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/linecache.py \ Lib/locale.py \ Lib/lzma.py \ - Lib/macpath.py \ Lib/mailbox.py \ Lib/mailcap.py \ Lib/mimetypes.py \ @@ -256,21 +257,20 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/profile.py \ Lib/pstats.py \ Lib/pty.py \ - Lib/pyclbr.py \ - Lib/_py_abc.py \ Lib/py_compile.py \ + Lib/pyclbr.py \ Lib/pydoc.py \ Lib/queue.py \ Lib/quopri.py \ Lib/random.py \ - Lib/reprlib.py \ Lib/re.py \ + Lib/reprlib.py \ Lib/rlcompleter.py \ Lib/runpy.py \ Lib/sched.py \ Lib/secrets.py \ - Lib/shelve.py \ Lib/selectors.py \ + Lib/shelve.py \ Lib/shlex.py \ Lib/shutil.py \ Lib/signal.py \ @@ -284,10 +284,10 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/sre_constants.py \ Lib/sre_parse.py \ Lib/ssl.py \ - Lib/statistics.py \ Lib/stat.py \ - Lib/stringprep.py \ + Lib/statistics.py \ Lib/string.py \ + Lib/stringprep.py \ Lib/struct.py \ Lib/subprocess.py \ Lib/sunau.py \ @@ -302,10 +302,11 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/this.py \ Lib/threading.py \ Lib/timeit.py \ - Lib/tokenize.py \ Lib/token.py \ - Lib/traceback.py \ + Lib/tokenize.py \ Lib/trace.py \ + Lib/traceback.py \ + Lib/tracemalloc.py \ Lib/tty.py \ Lib/turtle.py \ Lib/types.py \ @@ -317,14 +318,41 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/weakref.py \ Lib/webbrowser.py \ Lib/xdrlib.py \ + Lib/zipapp.py \ Lib/zipfile.py \ + Lib/zipimport.py \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/asyncio,\ + Lib/asyncio/__init__.py \ + Lib/asyncio/__main__.py \ + Lib/asyncio/base_events.py \ Lib/asyncio/base_futures.py \ + Lib/asyncio/base_subprocess.py \ Lib/asyncio/base_tasks.py \ + Lib/asyncio/constants.py \ + Lib/asyncio/coroutines.py \ + Lib/asyncio/events.py \ + Lib/asyncio/exceptions.py \ Lib/asyncio/format_helpers.py \ + Lib/asyncio/futures.py \ + Lib/asyncio/locks.py \ + Lib/asyncio/log.py \ + Lib/asyncio/proactor_events.py \ + Lib/asyncio/protocols.py \ + Lib/asyncio/queues.py \ Lib/asyncio/runners.py \ + Lib/asyncio/selector_events.py \ + Lib/asyncio/sslproto.py \ + Lib/asyncio/staggered.py \ + Lib/asyncio/streams.py \ + Lib/asyncio/subprocess.py \ + Lib/asyncio/tasks.py \ + Lib/asyncio/transports.py \ + Lib/asyncio/trsock.py \ + Lib/asyncio/unix_events.py \ + Lib/asyncio/windows_events.py \ + Lib/asyncio/windows_utils.py \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/collections,\ @@ -379,8 +407,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/distutils/errors.py \ Lib/distutils/extension.py \ Lib/distutils/fancy_getopt.py \ - Lib/distutils/filelist.py \ Lib/distutils/file_util.py \ + Lib/distutils/filelist.py \ Lib/distutils/log.py \ Lib/distutils/msvc9compiler.py \ Lib/distutils/msvccompiler.py \ @@ -389,44 +417,44 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/distutils/text_file.py \ Lib/distutils/unixccompiler.py \ Lib/distutils/util.py \ - Lib/distutils/versionpredicate.py \ Lib/distutils/version.py \ + Lib/distutils/versionpredicate.py \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/distutils/command,\ Lib/distutils/command/__init__.py \ + Lib/distutils/command/bdist.py \ Lib/distutils/command/bdist_dumb.py \ Lib/distutils/command/bdist_msi.py \ - Lib/distutils/command/bdist.py \ Lib/distutils/command/bdist_rpm.py \ Lib/distutils/command/bdist_wininst.py \ + Lib/distutils/command/build.py \ Lib/distutils/command/build_clib.py \ Lib/distutils/command/build_ext.py \ - Lib/distutils/command/build.py \ Lib/distutils/command/build_py.py \ Lib/distutils/command/build_scripts.py \ Lib/distutils/command/check.py \ Lib/distutils/command/clean.py \ Lib/distutils/command/command_template \ Lib/distutils/command/config.py \ + Lib/distutils/command/install.py \ Lib/distutils/command/install_data.py \ Lib/distutils/command/install_egg_info.py \ Lib/distutils/command/install_headers.py \ Lib/distutils/command/install_lib.py \ - Lib/distutils/command/install.py \ Lib/distutils/command/install_scripts.py \ Lib/distutils/command/register.py \ Lib/distutils/command/sdist.py \ Lib/distutils/command/upload.py \ - Lib/distutils/command/wininst-10.0-amd64.exe \ Lib/distutils/command/wininst-10.0.exe \ - Lib/distutils/command/wininst-14.0-amd64.exe \ + Lib/distutils/command/wininst-10.0-amd64.exe \ Lib/distutils/command/wininst-14.0.exe \ + Lib/distutils/command/wininst-14.0-amd64.exe \ Lib/distutils/command/wininst-6.0.exe \ Lib/distutils/command/wininst-7.1.exe \ Lib/distutils/command/wininst-8.0.exe \ - Lib/distutils/command/wininst-9.0-amd64.exe \ Lib/distutils/command/wininst-9.0.exe \ + Lib/distutils/command/wininst-9.0-amd64.exe \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/email,\ @@ -470,8 +498,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/encodings/aliases.py \ Lib/encodings/ascii.py \ Lib/encodings/base64_codec.py \ - Lib/encodings/big5hkscs.py \ Lib/encodings/big5.py \ + Lib/encodings/big5hkscs.py \ Lib/encodings/bz2_codec.py \ Lib/encodings/charmap.py \ Lib/encodings/cp037.py \ @@ -488,10 +516,10 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/encodings/cp1256.py \ Lib/encodings/cp1257.py \ Lib/encodings/cp1258.py \ + Lib/encodings/cp273.py \ Lib/encodings/cp424.py \ Lib/encodings/cp437.py \ Lib/encodings/cp500.py \ - Lib/encodings/cp65001.py \ Lib/encodings/cp720.py \ Lib/encodings/cp737.py \ Lib/encodings/cp775.py \ @@ -525,20 +553,20 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/encodings/hp_roman8.py \ Lib/encodings/hz.py \ Lib/encodings/idna.py \ + Lib/encodings/iso2022_jp.py \ Lib/encodings/iso2022_jp_1.py \ - Lib/encodings/iso2022_jp_2004.py \ Lib/encodings/iso2022_jp_2.py \ + Lib/encodings/iso2022_jp_2004.py \ Lib/encodings/iso2022_jp_3.py \ Lib/encodings/iso2022_jp_ext.py \ - Lib/encodings/iso2022_jp.py \ Lib/encodings/iso2022_kr.py \ + Lib/encodings/iso8859_1.py \ Lib/encodings/iso8859_10.py \ Lib/encodings/iso8859_11.py \ Lib/encodings/iso8859_13.py \ Lib/encodings/iso8859_14.py \ Lib/encodings/iso8859_15.py \ Lib/encodings/iso8859_16.py \ - Lib/encodings/iso8859_1.py \ Lib/encodings/iso8859_2.py \ Lib/encodings/iso8859_3.py \ Lib/encodings/iso8859_4.py \ @@ -561,8 +589,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/encodings/mac_greek.py \ Lib/encodings/mac_iceland.py \ Lib/encodings/mac_latin2.py \ - Lib/encodings/mac_romanian.py \ Lib/encodings/mac_roman.py \ + Lib/encodings/mac_romanian.py \ Lib/encodings/mac_turkish.py \ Lib/encodings/mbcs.py \ Lib/encodings/oem.py \ @@ -572,19 +600,18 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/encodings/quopri_codec.py \ Lib/encodings/raw_unicode_escape.py \ Lib/encodings/rot_13.py \ - Lib/encodings/shift_jis_2004.py \ Lib/encodings/shift_jis.py \ + Lib/encodings/shift_jis_2004.py \ Lib/encodings/shift_jisx0213.py \ Lib/encodings/tis_620.py \ Lib/encodings/undefined.py \ Lib/encodings/unicode_escape.py \ - Lib/encodings/unicode_internal.py \ + Lib/encodings/utf_16.py \ Lib/encodings/utf_16_be.py \ Lib/encodings/utf_16_le.py \ - Lib/encodings/utf_16.py \ + Lib/encodings/utf_32.py \ Lib/encodings/utf_32_be.py \ Lib/encodings/utf_32_le.py \ - Lib/encodings/utf_32.py \ Lib/encodings/utf_7.py \ Lib/encodings/utf_8.py \ Lib/encodings/utf_8_sig.py \ @@ -612,6 +639,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/importlib/_bootstrap_external.py \ Lib/importlib/abc.py \ Lib/importlib/machinery.py \ + Lib/importlib/metadata.py \ Lib/importlib/resources.py \ Lib/importlib/util.py \ )) @@ -648,8 +676,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/lib2to3/fixes/fix_buffer.py \ Lib/lib2to3/fixes/fix_dict.py \ Lib/lib2to3/fixes/fix_except.py \ - Lib/lib2to3/fixes/fix_execfile.py \ Lib/lib2to3/fixes/fix_exec.py \ + Lib/lib2to3/fixes/fix_execfile.py \ Lib/lib2to3/fixes/fix_exitfunc.py \ Lib/lib2to3/fixes/fix_filter.py \ Lib/lib2to3/fixes/fix_funcattrs.py \ @@ -658,13 +686,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/lib2to3/fixes/fix_has_key.py \ Lib/lib2to3/fixes/fix_idioms.py \ Lib/lib2to3/fixes/fix_import.py \ - Lib/lib2to3/fixes/fix_imports2.py \ Lib/lib2to3/fixes/fix_imports.py \ + Lib/lib2to3/fixes/fix_imports2.py \ Lib/lib2to3/fixes/fix_input.py \ Lib/lib2to3/fixes/fix_intern.py \ Lib/lib2to3/fixes/fix_isinstance.py \ - Lib/lib2to3/fixes/fix_itertools_imports.py \ Lib/lib2to3/fixes/fix_itertools.py \ + Lib/lib2to3/fixes/fix_itertools_imports.py \ Lib/lib2to3/fixes/fix_long.py \ Lib/lib2to3/fixes/fix_map.py \ Lib/lib2to3/fixes/fix_metaclass.py \ @@ -704,8 +732,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/lib2to3/pgen2/literals.py \ Lib/lib2to3/pgen2/parse.py \ Lib/lib2to3/pgen2/pgen.py \ - Lib/lib2to3/pgen2/tokenize.py \ Lib/lib2to3/pgen2/token.py \ + Lib/lib2to3/pgen2/tokenize.py \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/logging,\ @@ -714,13 +742,25 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/logging/handlers.py \ )) +ifeq (WNT,$(OS)) +$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/msilib,\ + Lib/msilib/__init__.py \ + Lib/msilib/schema.py \ + Lib/msilib/sequence.py \ + Lib/msilib/text.py \ +)) +endif + $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/multiprocessing,\ Lib/multiprocessing/__init__.py \ Lib/multiprocessing/connection.py \ Lib/multiprocessing/context.py \ + Lib/multiprocessing/dummy/__init__.py \ + Lib/multiprocessing/dummy/connection.py \ Lib/multiprocessing/forkserver.py \ Lib/multiprocessing/heap.py \ Lib/multiprocessing/managers.py \ + Lib/multiprocessing/pool.py \ Lib/multiprocessing/popen_fork.py \ Lib/multiprocessing/popen_forkserver.py \ Lib/multiprocessing/popen_spawn_posix.py \ @@ -729,7 +769,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/multiprocessing/queues.py \ Lib/multiprocessing/reduction.py \ Lib/multiprocessing/resource_sharer.py \ - Lib/multiprocessing/semaphore_tracker.py \ + Lib/multiprocessing/resource_tracker.py \ + Lib/multiprocessing/shared_memory.py \ Lib/multiprocessing/sharedctypes.py \ Lib/multiprocessing/spawn.py \ Lib/multiprocessing/synchronize.py \ @@ -750,6 +791,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest,\ Lib/unittest/__init__.py \ Lib/unittest/__main__.py \ + Lib/unittest/async_case.py \ Lib/unittest/case.py \ Lib/unittest/loader.py \ Lib/unittest/main.py \ @@ -761,40 +803,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p Lib/unittest/util.py \ )) -$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest/test,\ - Lib/unittest/test/__init__.py \ - Lib/unittest/test/__main__.py \ - Lib/unittest/test/_test_warnings.py \ - Lib/unittest/test/dummy.py \ - Lib/unittest/test/support.py \ - Lib/unittest/test/test_assertions.py \ - Lib/unittest/test/test_break.py \ - Lib/unittest/test/test_case.py \ - Lib/unittest/test/test_discovery.py \ - Lib/unittest/test/test_functiontestcase.py \ - Lib/unittest/test/test_loader.py \ - Lib/unittest/test/test_program.py \ - Lib/unittest/test/test_result.py \ - Lib/unittest/test/test_runner.py \ - Lib/unittest/test/test_setups.py \ - Lib/unittest/test/test_skipping.py \ - Lib/unittest/test/test_suite.py \ -)) - -$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest/test/testmock,\ - Lib/unittest/test/testmock/__init__.py \ - Lib/unittest/test/testmock/__main__.py \ - Lib/unittest/test/testmock/support.py \ - Lib/unittest/test/testmock/testcallable.py \ - Lib/unittest/test/testmock/testhelpers.py \ - Lib/unittest/test/testmock/testmagicmethods.py \ - Lib/unittest/test/testmock/testmock.py \ - Lib/unittest/test/testmock/testpatch.py \ - Lib/unittest/test/testmock/testsealable.py \ - Lib/unittest/test/testmock/testsentinel.py \ - Lib/unittest/test/testmock/testwith.py \ -)) - $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/urllib,\ Lib/urllib/__init__.py \ Lib/urllib/error.py \ @@ -819,21 +827,21 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/dom,\ Lib/xml/dom/__init__.py \ - Lib/xml/dom/NodeFilter.py \ Lib/xml/dom/domreg.py \ Lib/xml/dom/expatbuilder.py \ Lib/xml/dom/minicompat.py \ Lib/xml/dom/minidom.py \ + Lib/xml/dom/NodeFilter.py \ Lib/xml/dom/pulldom.py \ Lib/xml/dom/xmlbuilder.py \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/etree,\ Lib/xml/etree/__init__.py \ + Lib/xml/etree/cElementTree.py \ Lib/xml/etree/ElementInclude.py \ Lib/xml/etree/ElementPath.py \ Lib/xml/etree/ElementTree.py \ - Lib/xml/etree/cElementTree.py \ )) $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/parsers,\ diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index 59dc9e8cd2b5..a70457f7dd27 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -29,18 +29,24 @@ ifeq ($(OS),WNT) # TODO: using Debug configuration and related mangling of pyconfig.h +python3_WIN_PLATFORM_MSBUILD := $(strip \ + $(if $(filter INTEL,$(CPUNAME)),Win32) \ + $(if $(filter X86_64,$(CPUNAME)),x64) \ + $(if $(filter ARM64,$(CPUNAME)),arm64) \ + ) + # at least for MSVC 2008 it is necessary to clear MAKEFLAGS because # nmake is invoked $(call gb_ExternalProject_get_state_target,python3,build) : $(call gb_ExternalProject_run,build,\ MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \ /p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \ - /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \ - $(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 /p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \ - $(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \ + /p:Platform=$(python3_WIN_PLATFORM_MSBUILD) \ /p:opensslIncludeDir=$(call gb_UnpackedTarball_get_dir,openssl)/include \ /p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl)/out32dll \ /p:zlibDir=$(call gb_UnpackedTarball_get_dir,zlib) \ + /p:libffiOutDir=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/.libs \ + /p:libffiIncludeDir=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/include \ /maxcpucount \ $(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \ $(if $(filter 150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \ @@ -128,14 +134,14 @@ python3_fw_prefix=$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@______ $(call gb_ExternalProject_get_state_target,python3,fixscripts) : $(call gb_ExternalProject_get_state_target,python3,build) $(call gb_Output_announce,python3 - remove reference to installroot from scripts,build,CUS,5) $(COMMAND_ECHO)for file in \ - $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3 \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/easy_install-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/idle$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pip$(PYTHON_VERSION_MAJOR) \ + $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pip$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pydoc$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)-config \ - $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m-config \ - $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pyvenv-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \ - { rm "$$file" && $(gb_AWK) '\ + ; do { rm "$$file" && $(gb_AWK) '\ BEGIN {print "#!/bin/bash\n\ origpath=$$(pwd)\n\ bindir=$$(cd $$(dirname \"$$0\") ; pwd)\n\ @@ -157,16 +163,18 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_ @loader_path/../../../LibreOfficePython $$file ; done touch $@ -# also delete binaries that are symlinked in scp2 $(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_ExternalProject_get_state_target,python3,build) cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \ - for file in python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \ - python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m ; do \ $(INSTALL_NAME_TOOL) -change \ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \ - @executable_path/../LibreOfficePython $$file ; done + @executable_path/../LibreOfficePython python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) touch $@ +# also delete binaries that are symlinked in scp2 +$(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : $(call gb_ExternalProject_get_state_target,python3,build) + $(call gb_Output_announce,python3 - remove the stuff we don't need to ship,build,CUS,5) + rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test + endif # vim: set noet sw=4 ts=4: diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk index 563ff3a304de..f08b4e13537b 100644 --- a/external/python3/UnpackedTarball_python3.mk +++ b/external/python3/UnpackedTarball_python3.mk @@ -20,7 +20,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\ external/python3/python-3.3.0-darwin.patch.1 \ external/python3/python-3.7.6-msvc-ssl.patch.1 \ external/python3/python-3.5.4-msvc-disable.patch.1 \ - external/python3/python-3.3.0-clang.patch.1 \ external/python3/ubsan.patch.0 \ external/python3/python-3.5.tweak.strip.soabi.patch \ )) diff --git a/external/python3/internal-zlib.patch.0 b/external/python3/internal-zlib.patch.0 index abe2630bd2e7..de68d9e7dec8 100644 --- a/external/python3/internal-zlib.patch.0 +++ b/external/python3/internal-zlib.patch.0 @@ -23,7 +23,7 @@ # # You can upgrade zlib to version 1.1.4 yourself by going to # http://www.gzip.org/zlib/ -- zlib_inc = find_file('zlib.h', [], inc_dirs) +- zlib_inc = find_file('zlib.h', [], self.inc_dirs) + zlib_inc = [os.environ.get('ZLIB_INCDIR')] have_zlib = False if zlib_inc is not None: @@ -32,16 +32,16 @@ version = line.split()[2] break if version >= version_req: -- if (self.compiler.find_library_file(lib_dirs, 'z')): -+ if (self.compiler.find_library_file(lib_dirs, 'zlib')): - if host_platform == "darwin": +- if (self.compiler.find_library_file(self.lib_dirs, 'z')): ++ if (self.compiler.find_library_file(self.lib_dirs, 'zlib')): + if MACOS: zlib_extra_link_args = ('-Wl,-search_paths_first',) else: zlib_extra_link_args = () - exts.append( Extension('zlib', ['zlibmodule.c'], -- libraries = ['z'], -+ libraries = ['zlib'], - extra_link_args = zlib_extra_link_args)) + self.add(Extension('zlib', ['zlibmodule.c'], +- libraries=['z'], ++ libraries=['zlib'], + extra_link_args=zlib_extra_link_args)) have_zlib = True else: @@ -1399,7 +1399,7 @@ diff --git a/external/python3/python-3.3.0-clang.patch.1 b/external/python3/python-3.3.0-clang.patch.1 deleted file mode 100644 index 9001110fbed4..000000000000 --- a/external/python3/python-3.3.0-clang.patch.1 +++ /dev/null @@ -1,13 +0,0 @@ --*- Mode: diff -*- - ---- python3/setup.py -+++ python3/setup.py -@@ -436,7 +436,7 @@ - if ret >> 8 == 0: - with open(tmpfile) as fp: - for line in fp.readlines(): -- if line.startswith("gcc version"): -+ if line.startswith("gcc version") or line.startswith("clang -cc1 version"): - is_gcc = True - elif line.startswith("#include <...>"): - in_incdirs = True diff --git a/external/python3/python-3.3.0-darwin.patch.1 b/external/python3/python-3.3.0-darwin.patch.1 index d5cb17e339a2..27a355e2ad21 100644 --- a/external/python3/python-3.3.0-darwin.patch.1 +++ b/external/python3/python-3.3.0-darwin.patch.1 @@ -49,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-2016 Python Software Foundation.</string> + <string>%version%, (c) 2001-2020 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 @@ -63,19 +63,3 @@ diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resource <key>CFBundleGetInfoString</key> <string>Python Runtime and Library</string> <key>CFBundleIdentifier</key> -diff -ru python3.orig/setup.py python3/setup.py ---- python3.orig/setup.py 2015-07-26 17:36:11.804497783 +0200 -+++ python3/setup.py 2015-07-26 17:39:48.599512337 +0200 -@@ -468,11 +468,11 @@ - # Ensure that /usr/local is always used, but the local build - # directories (i.e. '.' and 'Include') must be first. See issue - # 10520. -- if not cross_compiling: -+ if not cross_compiling and host_platform != 'darwin': - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - # only change this for cross builds for 3.3, issues on Mageia -- if cross_compiling: -+ if cross_compiling or host_platform == 'darwin': - self.add_gcc_paths() - self.add_multiarch_paths() diff --git a/external/python3/python-3.3.3-elf-rpath.patch.1 b/external/python3/python-3.3.3-elf-rpath.patch.1 index 0dfa16c8c247..55546afd9844 100644 --- a/external/python3/python-3.3.3-elf-rpath.patch.1 +++ b/external/python3/python-3.3.3-elf-rpath.patch.1 @@ -5,18 +5,16 @@ set RPATH (only to be used on ELF platforms) diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in --- python3.orig/Makefile.pre.in 2015-07-26 20:29:07.126194320 +0200 +++ python3/Makefile.pre.in 2015-07-26 20:37:21.814227530 +0200 -@@ -550,7 +550,7 @@ +@@ -563,7 +563,7 @@ # Build the interpreter $(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) -- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN +- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) ++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -Wl,-rpath,\$$ORIGIN platform: $(BUILDPYTHON) pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform ---- python3.orig/Makefile.pre.in 2015-07-05 18:50:07.000000000 +0200 -+++ python3/Makefile.pre.in 2015-07-26 17:34:00.386488960 +0200 -@@ -607,7 +607,7 @@ +@@ -625,7 +625,7 @@ fi libpython3.so: libpython$(LDVERSION).so @@ -24,4 +22,4 @@ diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in + $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ -Wl,-rpath,\$$ORIGIN libpython$(LDVERSION).dylib: $(LIBRARY_OBJS) - $(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ + $(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \ diff --git a/external/python3/python-3.5.4-msvc-disable.patch.1 b/external/python3/python-3.5.4-msvc-disable.patch.1 index 416ab2c7b15b..52c007d7d5b6 100644 --- a/external/python3/python-3.5.4-msvc-disable.patch.1 +++ b/external/python3/python-3.5.4-msvc-disable.patch.1 @@ -12,7 +12,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}" -@@ -28,32 +26,18 @@ +@@ -28,34 +26,20 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}" EndProject @@ -22,6 +22,8 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}" EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testinternalcapi", "_testinternalcapi.vcxproj", "{900342D7-516A-4469-B1AD-59A66E49A25F}" + EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testimportmultiple", "_testimportmultiple.vcxproj", "{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}" commit ea89dde04a9f46ec8c57ff7c40711bb7bc506fd8 Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Sun Feb 7 15:15:58 2021 +0100 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 22:23:36 2023 +0100 tdf#140236 WIN install libffi with Python Regression from commit b4dfba947768834ffecc09056992019878711c8b ("python3: update to 3.8.4"). Previous Python versions included the source for libffi on all platforms, but now just for MacOS. So now LO must build that DLL on Windows, which was done in commit 883068462fe5bcbb01a8e14736fc06d0c3695c62 ("libffi: build DLL on Windows"). Since OpenSSL is installed in the program directory and the LO Python directory, this currently works "accidentially". Not sure the Python OpenSSL DLLs should be handled via some extra gbuild package to separate both, but that can be done in an additional change. Change-Id: I4a42e39cc2f4434a9944aad32836f66ec2819931 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110537 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index ffbc69423fb5..4213f426ce0f 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3059,6 +3059,7 @@ else # !SYSTEM_PYTHON $(eval $(call gb_Helper_register_packages_for_install,python,\ python3 \ + $(if $(filter WNT,$(OS)),libffi) \ )) define gb_LinkTarget__use_python_headers commit 64b16887cc59ae7dfca4c9b6a268346e206ece45 Author: Jan-Marek Glogowski <glo...@fbihome.de> AuthorDate: Tue Jul 14 23:20:06 2020 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 22:23:14 2023 +0100 libffi: build DLL on Windows The build setup is rather horrible, with some minimal gcc MSVC wrapper. But the DLL is a prerequisite for the Python 3.8 build, which dropped the internal libffi. It's also possible to build it statically, but then you have to patch the Python 3 _ctypes msbuild properties. This also defaults to explicit --build and --host settings, even without a cross build, because the predicted name would otherwise differ (*-unknown-* instead of *-pc-*). Additionally a "make install" also fails... Change-Id: Ifb7dac840e23efffb9a5e342560aef9e11e0db79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98436 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/configure.ac b/configure.ac index 46a6d77ff4dc..15ba47641c38 100644 --- a/configure.ac +++ b/configure.ac @@ -8299,7 +8299,7 @@ internal) fi AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"]) BUILD_TYPE="$BUILD_TYPE PYTHON" - if test "$OS" = LINUX; then + if test "$OS" = LINUX -o "$OS" = WNT ; then BUILD_TYPE="$BUILD_TYPE LIBFFI" fi # Embedded Python dies without Home set diff --git a/external/libffi/ExternalProject_libffi.mk b/external/libffi/ExternalProject_libffi.mk index bdf8fe61eb76..0ff625ea3e20 100644 --- a/external/libffi/ExternalProject_libffi.mk +++ b/external/libffi/ExternalProject_libffi.mk @@ -14,17 +14,34 @@ $(eval $(call gb_ExternalProject_register_targets,libffi,\ )) # set prefix so that it ends up in libffi.pc so that pkg-config in python3 works +# For a static Windows build, change CPPFLAGS to include -D_LIB and --disable-static +# Also remove the ExternalPackage in that case + +libffi_WIN_PLATFORM := $(strip \ + $(if $(filter INTEL,$(CPUNAME)),32) \ + $(if $(filter X86_64,$(CPUNAME)),64) \ + $(if $(filter ARM64,$(CPUNAME)),arm64) \ + ) $(call gb_ExternalProject_get_state_target,libffi,build): $(call gb_ExternalProject_run,build,\ + export LIB="$(ILIB)" && \ ./configure \ --enable-option-checking=fatal \ - $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ - --enable-static \ - --disable-shared \ - --with-pic \ - --enable-portable-binary \ - CC="$(CC) $(if $(filter LINUX,$(OS)),-fvisibility=hidden)" \ + --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \ + $(if $(filter LINUX,$(OS)), \ + --disable-shared \ + CC="$(CC) -fvisibility=hidden" \ + --with-pic \ + --enable-portable-binary) \ + $(if $(filter WNT,$(OS)), \ + --disable-static \ + CC="$(call gb_UnpackedTarball_get_dir,libffi)/msvcc.sh -m$(libffi_WIN_PLATFORM)" \ + CXX="$(call gb_UnpackedTarball_get_dir,libffi)/msvcc.sh -m$(libffi_WIN_PLATFORM)" \ + LD='link' \ + CPP='cl -nologo -EP' \ + CXXCPP='cl -nologo -EP' \ + CPPFLAGS="-DFFI_BUILDING_DLL $(SOLARINC)") \ --prefix=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM) \ --disable-docs \ && $(MAKE) \ diff --git a/external/libffi/Module_libffi.mk b/external/libffi/Module_libffi.mk index 739fd4197000..ace75480abe3 100644 --- a/external/libffi/Module_libffi.mk +++ b/external/libffi/Module_libffi.mk @@ -12,6 +12,7 @@ $(eval $(call gb_Module_Module,libffi)) $(eval $(call gb_Module_add_targets,libffi,\ UnpackedTarball_libffi \ ExternalProject_libffi \ + ExternalPackage_libffi \ )) # vim: set noet sw=4 ts=4: diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk index 8e3fe2320971..59dc9e8cd2b5 100644 --- a/external/python3/ExternalProject_python3.mk +++ b/external/python3/ExternalProject_python3.mk @@ -11,7 +11,7 @@ $(eval $(call gb_ExternalProject_ExternalProject,python3)) $(eval $(call gb_ExternalProject_use_externals,python3,\ expat \ - $(if $(filter LINUX,$(OS)),libffi) \ + $(if $(filter WNT LINUX,$(OS)),libffi) \ openssl \ zlib \ )) commit ee8cdf63f0819960f47a8b8dc65f18c4eb91697c Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Thu Jan 9 15:06:07 2020 +0100 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Thu Nov 9 21:46:48 2023 +0100 python3: bundle libffi for GNU/Linux builds CPython commit f40d4ddff3c800b3c956a5e8820aabe3aa87cddd "Closes #27979: Remove bundled copy of libffi" causes a bit of a problem because it turns out that libffi isn't all that stable; there's libffi.so.5 on CentOS 6, libffi.so.6 on CentOS 7 and libffi.so.7 on lo_daily_update_gandalf tinderbox. So we have to bundle it in LO; it's only used on GNU/Linux currently. CPython commit 32119e10b792ad7ee4e5f951a2d89ddbaf111cc5 "bpo-35947: Update Windows to the current version of libffi (GH-11797)" also removes the libffi for MSVC, so in a future python upgrade we will have to build libffi for MSVC too. The libffi fork for MacOSX is still in CPython git master. (regression from b10be5d48433076f0b7238d818020f708553e114) Change-Id: Ibc20cf8cd3614cf9941b6970662bd930496776b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86493 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/Makefile.fetch b/Makefile.fetch index 1529f1109f2f..fc1d3726befc 100644 --- a/Makefile.fetch +++ b/Makefile.fetch @@ -153,6 +153,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR) $(call fetch_Optional,LIBASSUAN,LIBASSUAN_TARBALL) \ $(call fetch_Optional,LIBEOT,LIBEOT_TARBALL) \ $(call fetch_Optional,LIBEXTTEXTCAT,LIBEXTTEXTCAT_TARBALL) \ + $(call fetch_Optional,LIBFFI,LIBFFI_TARBALL) \ $(call fetch_Optional,LIBGPGERROR,LIBGPGERROR_TARBALL) \ $(call fetch_Optional,LIBLANGTAG,LANGTAGREG_TARBALL) \ $(call fetch_Optional,LIBLANGTAG,LIBLANGTAG_TARBALL) \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index d185b9679081..ffbc69423fb5 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3097,6 +3097,12 @@ endif endef +# this is only used by python currently +define gb_ExternalProject__use_libffi +$(call gb_ExternalProject_use_external_project,$(1),libffi) + +endef + endif # SYSTEM_PYTHON # ORCUS diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects index 475c471d449b..8c58382c0d97 100755 --- a/bin/check-elf-dynamic-objects +++ b/bin/check-elf-dynamic-objects @@ -84,9 +84,6 @@ local file="$1" # skip the majority of files, no ELF binaries here skip=1 ;; - */_ctypes.cpython-*.so) - whitelist="${whitelist} libffi.so.6" # TODO dubious? - ;; */_uuid.cpython-*.so) whitelist="${whitelist} libuuid.so.1" ;; diff --git a/configure.ac b/configure.ac index 84eab4140a01..46a6d77ff4dc 100644 --- a/configure.ac +++ b/configure.ac @@ -8299,6 +8299,9 @@ internal) fi AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"]) BUILD_TYPE="$BUILD_TYPE PYTHON" + if test "$OS" = LINUX; then + BUILD_TYPE="$BUILD_TYPE LIBFFI" + fi # Embedded Python dies without Home set if test "$HOME" = ""; then export HOME="" diff --git a/download.lst b/download.lst index 0a36a7babd1a..9fd48ed70077 100644 --- a/download.lst +++ b/download.lst @@ -129,6 +129,8 @@ export LIBEOT_SHA256SUM := cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9 export LIBEOT_TARBALL := libeot-0.01.tar.bz2 export LIBEXTTEXTCAT_SHA256SUM := 9595601c41051356d03d0a7d5dcad334fe1b420d221f6885d143c14bb8d62163 export LIBEXTTEXTCAT_TARBALL := 10d61fbaa6a06348823651b1bd7940fe-libexttextcat-3.4.4.tar.bz2 +export LIBFFI_SHA256SUM := 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056 +export LIBFFI_TARBALL := libffi-3.3.tar.gz export LIBGLTF_SHA256SUM := 119e730fbf002dd0eaafa4930167267d7d910aa17f29979ca9ca8b66625fd2da export LIBGLTF_TARBALL := libgltf-0.1.0.tar.gz export LIBGPGERROR_SHA256SUM := 4c4bcbc90116932e3acd37b37812d8653b1b189c1904985898e860af818aee69 diff --git a/external/Module_external.mk b/external/Module_external.mk index 2f5373535f78..251fde2ef5ae 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -58,6 +58,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,LIBEOT,libeot) \ $(call gb_Helper_optional,LIBEXTTEXTCAT,libexttextcat) \ $(call gb_Helper_optional,LIBGLTF,libgltf) \ + $(call gb_Helper_optional,LIBFFI,libffi) \ $(call gb_Helper_optional,LIBGPGERROR,libgpg-error) \ $(call gb_Helper_optional,LIBLANGTAG,liblangtag) \ $(call gb_Helper_optional,LIBPNG,libpng) \ diff --git a/external/libffi/ExternalProject_libffi.mk b/external/libffi/ExternalProject_libffi.mk new file mode 100644 index 000000000000..bdf8fe61eb76 --- /dev/null +++ b/external/libffi/ExternalProject_libffi.mk @@ -0,0 +1,33 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,libffi)) + +$(eval $(call gb_ExternalProject_register_targets,libffi,\ + build \ +)) + +# set prefix so that it ends up in libffi.pc so that pkg-config in python3 works + +$(call gb_ExternalProject_get_state_target,libffi,build): + $(call gb_ExternalProject_run,build,\ + ./configure \ + --enable-option-checking=fatal \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + --enable-static \ + --disable-shared \ + --with-pic \ + --enable-portable-binary \ + CC="$(CC) $(if $(filter LINUX,$(OS)),-fvisibility=hidden)" \ + --prefix=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM) \ + --disable-docs \ + && $(MAKE) \ + ) + +# vim: set noet sw=4 ts=4: diff --git a/external/libffi/Makefile b/external/libffi/Makefile new file mode 100644 index 000000000000..e4968cf85fb6 --- /dev/null +++ b/external/libffi/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/libffi/Module_libffi.mk b/external/libffi/Module_libffi.mk new file mode 100644 index 000000000000..739fd4197000 --- /dev/null +++ b/external/libffi/Module_libffi.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this ... etc. - the rest is truncated