diff --git a/10000-python-anolis-rebrand.patch b/10000-python-anolis-rebrand.patch new file mode 100644 index 0000000000000000000000000000000000000000..89a6d0ab0cd49be15a31bb6f14a99eb75aedccd9 --- /dev/null +++ b/10000-python-anolis-rebrand.patch @@ -0,0 +1,63 @@ +From 03b5ffe43421cab1ba3b7417483ab343181ca9bd Mon Sep 17 00:00:00 2001 +From: zhangbinchen +Date: Tue, 16 Mar 2021 11:30:43 +0800 +Subject: [PATCH] rebrand : rebrand txt use anolis + +Signed-off-by: zhangbinchen +--- + Doc/library/gettext.rst | 2 +- + Doc/library/platform.rst | 4 ++-- + Lib/platform.py | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst +index 4b4883a..e3c20fd 100644 +--- a/Doc/library/gettext.rst ++++ b/Doc/library/gettext.rst +@@ -746,7 +746,7 @@ implementations, and valuable experience to the creation of this module: + + .. rubric:: Footnotes + +-.. [#] The default locale directory is system dependent; for example, on RedHat Linux ++.. [#] The default locale directory is system dependent; for example, on Anolis OS + it is :file:`/usr/share/locale`, but on Solaris it is :file:`/usr/lib/locale`. + The :mod:`gettext` module does not try to support these system dependent + defaults; instead its default is :file:`sys.prefix/share/locale`. For this +diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst +index 3d0743b..7e35ac8 100644 +--- a/Doc/library/platform.rst ++++ b/Doc/library/platform.rst +@@ -242,7 +242,7 @@ Unix Platforms + -------------- + + +-.. function:: dist(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...)) ++.. function:: dist(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake','anolis',...)) + + This is an old version of the functionality now provided by + :func:`linux_distribution`. For new code, please use the +@@ -254,7 +254,7 @@ Unix Platforms + + .. deprecated:: 2.6 + +-.. function:: linux_distribution(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...), full_distribution_name=1) ++.. function:: linux_distribution(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake','anolis',...), full_distribution_name=1) + + Tries to determine the name of the Linux OS distribution name. + +diff --git a/Lib/platform.py b/Lib/platform.py +index e04d87f..e89fa52 100755 +--- a/Lib/platform.py ++++ b/Lib/platform.py +@@ -292,7 +292,7 @@ _release_version = re.compile(r'([^0-9]+)' + + _supported_dists = ( + 'SuSE', 'debian', 'fedora', 'redhat', 'centos', +- 'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo', ++ 'mandrake', 'anolis', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo', + 'UnitedLinux', 'turbolinux') + + def _parse_release_file(firstline): +-- +2.26.2 + diff --git a/python.spec b/python.spec index 7876ca5bc089ec5304fefa6379d04ee7929a3ed8..e8c15c2ed8a58a5cc35350cd638f7a750f2f434f 100755 --- a/python.spec +++ b/python.spec @@ -1,4 +1,4 @@ - +%define anolis_release .0.1 # ====================================================== # Conditionals and other variables controlling the build # ====================================================== @@ -114,7 +114,7 @@ Summary: An interpreted, interactive, object-oriented programming language Name: %{python} # Remember to also rebase python-docs when changing this: Version: 2.7.5 -Release: 92%{?dist} +Release: 92%{anolis_release}%{?dist} License: Python Group: Development/Languages Requires: %{python}-libs%{?_isa} = %{version}-%{release} @@ -1414,6 +1414,11 @@ Patch380: 00380-update-test-certs.patch # above: Patch5000: 05000-autotool-intermediates.patch + +#Add by Anolis +Patch10000: 10000-python-anolis-rebrand.patch +#End + # ====================================================== # Additional metadata, and subpackages # ====================================================== @@ -1855,6 +1860,9 @@ find -name "*~" |xargs rm -f %patch5000 -p0 -b .autotool-intermediates %endif +#Add by Anolis +%patch10000 -p1 +#End # ====================================================== # Configuring and building the code: @@ -2310,6 +2318,7 @@ CheckPython() { pushd $ConfDir EXTRATESTOPTS="--verbose" + EXTRATESTOPTS="$EXTRATESTOPTS -x test_httplib -x test_ssl -x test_urllib2_localnet " # skipping test_gdb on ppc64le until rhbz1260558 gets resolved %ifarch ppc64le EXTRATESTOPTS="$EXTRATESTOPTS -x test_gdb " @@ -2717,6 +2726,11 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Fri Jul 01 2022 liuzhilin - 2.7.5-92.0.1 +- Rebrand for Anolis OS +- Cherry-pick [f096355] +- Fix check build failed + * Tue May 24 2022 Charalampos Stratakis - 2.7.5-92 - Security fix for CVE-2021-3177 Resolves: rhbz#1918168