- Fix building of documentation and the universal configuration of the

%primary_interpreter.
- Switch primary_interpreter from python38 to python310 for
  Factory (only)

- (bsc#1196784, CVE-2022-25236) Rename patch:
  support-expat-245.patch to support-expat-CVE-2022-25236-patched.patch
  and update the patch to detect expat >= 2.4.4 instead of >= 2.4.5
  as it was fully patched against CVE-2022-25236.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python310?expand=0&rev=41
This commit is contained in:
2022-06-10 17:46:36 +00:00
committed by Git OBS Bridge
parent 83bcadedd7
commit 140fcc45f7
3 changed files with 75 additions and 8 deletions

View File

@@ -62,7 +62,11 @@ Obsoletes: python39%{?1:-%{1}}
%define python_pkg_name python310
# Will provide the python3-* provides
# Will do the /usr/bin/python3 and all the core links
%define primary_interpreter 1
%if 0%{?sle_version} || 0%{?suse_version} >= 1550
%define primary_interpreter 0
%else
%define primary_interpreter 1
%endif
# We don't process beta signs well
%define folderversion 3.10.5
%define tarname Python-%{tarversion}
@@ -160,9 +164,12 @@ Patch34: skip-test_pyobject_freed_is_freed.patch
# PATCH-FIX-SLE fix_configure_rst.patch bpo#43774 mcepl@suse.com
# remove duplicate link targets and make documentation with old Sphinx in SLE
Patch35: fix_configure_rst.patch
# PATCH-FIX-UPSTREAM bpo-46811 gh#python/cpython#7da97f61816f mcepl@suse.com
# NOTE: SUSE version of expat 2.4.4 is patched in SUSE for CVE-2022-25236
Patch36: support-expat-CVE-2022-25236-patched.patch
# PATCH-FIX-UPSTREAM CVE-2015-20107-mailcap-unsafe-filenames.patch bsc#1198511 mcepl@suse.com
# avoid the command injection in the mailcap module.
Patch36: CVE-2015-20107-mailcap-unsafe-filenames.patch
Patch37: CVE-2015-20107-mailcap-unsafe-filenames.patch
BuildRequires: autoconf-archive
BuildRequires: automake
BuildRequires: fdupes
@@ -190,7 +197,11 @@ BuildRequires: pkgconfig(libtirpc)
BuildRequires: mpdecimal-devel
%endif
%if %{with doc}
%if 0%{?sle_version} && 0%{?sle_version} <= 150300
BuildRequires: python3-Sphinx
%else
BuildRequires: python3-Sphinx >= 3.2.0
%endif
%if 0%{?suse_version} >= 1500
BuildRequires: python3-python-docs-theme >= 2022.1
%endif
@@ -421,14 +432,13 @@ other applications.
%patch09 -p1
%patch15 -p1
%patch29 -p1
%if 0%{?suse_version} <= 1500
%patch33 -p1
%endif
%if 0%{?sle_version} && 0%{?sle_version} <= 150300
%patch33 -p1
%patch34 -p1
%endif
%patch35 -p1
%patch36 -p1
%patch37 -p1
# drop Autoconf version requirement
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac