From cf99d71eddf08777b9089912bc2851f252aced59 Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Fri, 17 Dec 2021 06:32:15 +0000 Subject: [PATCH 1/2] Rebrand for Anolis OS --- add-anolis-platform.patch | 12 ++++++++++++ python38.spec | 10 +++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 add-anolis-platform.patch diff --git a/add-anolis-platform.patch b/add-anolis-platform.patch new file mode 100644 index 0000000..66d78d2 --- /dev/null +++ b/add-anolis-platform.patch @@ -0,0 +1,12 @@ +diff -Nur Python-3.8.6_old/Doc/library/gettext.rst Python-3.8.6/Doc/library/gettext.rst +--- Python-3.8.6_old/Doc/library/gettext.rst 2020-09-23 20:36:32.000000000 +0800 ++++ Python-3.8.6/Doc/library/gettext.rst 2021-06-21 13:56:22.000000000 +0800 +@@ -721,7 +721,7 @@ + + .. 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.base_prefix}/share/locale` (see diff --git a/python38.spec b/python38.spec index f91e05e..8c72da9 100644 --- a/python38.spec +++ b/python38.spec @@ -3,6 +3,7 @@ # ================== %global pybasever 3.8 +%define anolis_release .0.1 # pybasever without the dot: %global pyshortver 38 @@ -17,7 +18,7 @@ URL: https://www.python.org/ #global prerel ... %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} License: Python # Exclude i686 arch. Due to a modularity issue it's being added to the @@ -370,6 +371,8 @@ Patch359: 00359-CVE-2021-23336.patch # # https://github.com/fedora-python/cpython +# Rebrand for Anolis OS +Patch1000: add-anolis-platform.patch # ========================================== # Descriptions, and metadata for subpackages @@ -714,6 +717,8 @@ rm Lib/ensurepip/_bundled/*.whl %patch353 -p1 %patch359 -p1 +%patch1000 -p1 + # Remove files that should be generated by the build # (This is after patching, so that we can use patches directly from upstream) rm configure pyconfig.h.in @@ -1801,6 +1806,9 @@ fi # ====================================================== %changelog +* Tue Apr 19 2022 Liwei Ge - 3.8.12-1.0.1 +- Rebrand for Anolis OS + * Wed Sep 15 2021 Charalampos Stratakis - 3.8.12-1 - Update to 3.8.12 Resolves: rhbz#2004587 -- Gitee From df15fd561680f254208150f595770620cbdbcf5b Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Tue, 9 Nov 2021 17:55:09 +0800 Subject: [PATCH 2/2] build: support loongarch64 platform Signed-off-by: Liwei Ge --- ...-platform.patch => 1000-add-anolis-platform.patch | 0 1001-anolis-python-support-loongarch64.patch | 12 ++++++++++++ python38.spec | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) rename add-anolis-platform.patch => 1000-add-anolis-platform.patch (100%) create mode 100644 1001-anolis-python-support-loongarch64.patch diff --git a/add-anolis-platform.patch b/1000-add-anolis-platform.patch similarity index 100% rename from add-anolis-platform.patch rename to 1000-add-anolis-platform.patch diff --git a/1001-anolis-python-support-loongarch64.patch b/1001-anolis-python-support-loongarch64.patch new file mode 100644 index 0000000..7528294 --- /dev/null +++ b/1001-anolis-python-support-loongarch64.patch @@ -0,0 +1,12 @@ +diff -Nurp Python-3.8.3.orig/configure.ac Python-3.8.3/configure.ac +--- Python-3.8.3.orig/configure.ac 2021-01-20 01:59:43.644531250 +0000 ++++ Python-3.8.3/configure.ac 2021-01-20 02:49:57.824218750 +0000 +@@ -830,6 +830,8 @@ cat >> conftest.c < - 3.8.12-1.0.1 - Rebrand for Anolis OS +- Support loongarch64 platform * Wed Sep 15 2021 Charalampos Stratakis - 3.8.12-1 - Update to 3.8.12 -- Gitee