From 9cd3adc4fdd172282b7eb4e9863eaf20b459535f Mon Sep 17 00:00:00 2001 From: layne yang Date: Tue, 16 Jul 2024 17:33:40 +0800 Subject: [PATCH] rebrand to anolis Signed-off-by: layne yang --- 10000-python-anolis-rebrand.patch | 63 +++++++++++++++++++++++++++++++ python.spec | 13 ++++++- 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 10000-python-anolis-rebrand.patch diff --git a/10000-python-anolis-rebrand.patch b/10000-python-anolis-rebrand.patch new file mode 100644 index 0000000..64005e4 --- /dev/null +++ b/10000-python-anolis-rebrand.patch @@ -0,0 +1,63 @@ +From c0e46e3d4c1ca4cf0ba537d9cdfc213fc8cde1ba Mon Sep 17 00:00:00 2001 +From: yangxianzhao +Date: Mon, 12 Jun 2023 11:10:07 +0800 +Subject: [PATCH] rebrand to anolis + +--- + 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 9b4eb0c..b0c1585 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 26f587e..a18aecc 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 c0016a8..031f662 100755 +--- a/Lib/platform.py ++++ b/Lib/platform.py +@@ -258,7 +258,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): +-- +1.8.3.1 + + diff --git a/python.spec b/python.spec index c44f12f..8fa034a 100644 --- 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: 94%{?dist} +Release: 94%{anolis_release}%{?dist} License: Python Group: Development/Languages Requires: %{python}-libs%{?_isa} = %{version}-%{release} @@ -1438,6 +1438,9 @@ Patch404: 00404-cve-2023-40217.patch # above: Patch5000: 05000-autotool-intermediates.patch + +Patch10000: 10000-python-anolis-rebrand.patch + # ====================================================== # Additional metadata, and subpackages # ====================================================== @@ -1881,6 +1884,8 @@ find -name "*~" |xargs rm -f %patch5000 -p0 -b .autotool-intermediates %endif +%patch10000 -p1 + # ====================================================== # Configuring and building the code: @@ -2743,6 +2748,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Tue Nov 28 2023 yangxianzhao - 2.7.5-94.0.1 +- rebrand to anolis + * Wed Sep 27 2023 Charalampos Stratakis - 2.7.5-94 - Security fix for CVE-2023-40217 Resolves: RHEL-9615 @@ -4461,3 +4469,4 @@ directories (bug 531901) - Make the package relocatable. Thanks to Suchandra Thapa. - Exclude Tkinter from main RPM. If it is in a separate RPM, it is easier to track Tk releases. + -- Gitee