From 468cc80e71a0f810bbd812b6d6a9bc0cf4545c67 Mon Sep 17 00:00:00 2001 From: sean-lau Date: Mon, 17 May 2021 10:43:11 +0800 Subject: [PATCH 1/2] Add support for OpenStack R version --- python-markupsafe.spec | 126 +++++++++++++++++++++++------------------ 1 file changed, 71 insertions(+), 55 deletions(-) diff --git a/python-markupsafe.spec b/python-markupsafe.spec index 79cc667..30e475b 100644 --- a/python-markupsafe.spec +++ b/python-markupsafe.spec @@ -1,67 +1,83 @@ -%global _description\ -MarkupSafe implements a text object that escapes characters so it is safe to use in HTML and XML.\ -Characters that have special meanings are replaced so that they display as the actual characters.\ -This mitigates injection attacks, meaning untrusted user input can safely be displayed on a page. - -Name: python-markupsafe -Version: 1.1.1 -Release: 7 -Summary: Safely add untrusted strings to HTML/XML markup. -License: BSD -URL: https://pypi.org/project/MarkupSafe/ -Source0: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz - -%description %_description - -%package -n python3-markupsafe -Summary: %{summary} -BuildRequires: python3-devel python3-setuptools -%{?python_provide:%python_provide python3-markupsafe} - -%description -n python3-markupsafe %_description - -%package_help +%global _empty_manifest_terminate_build 0 +Name: python-markupsafe +Version: 1.1.1 +Release: 1 +Summary: Safely add untrusted strings to HTML/XML markup. +License: BSD +URL: https://palletsprojects.com/p/markupsafe/ +Source0: https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz +%description +MarkupSafe implements a text object that escapes characters so it is safe to use +in HTML and XML. Characters that have special meanings are replaced so that they +display as the actual characters. This mitigates injection attacks, meaningi +untrusted user input can safely be displayed on a page. + +%package -n python2-markupsafe +Summary: Safely add untrusted strings to HTML/XML markup. +Provides: python2-markupsafe +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python2-markupsafe +MarkupSafe implements a text object that escapes characters so it is safe to use +in HTML and XML. Characters that have special meanings are replaced so that they +display as the actual characters. This mitigates injection attacks, meaningi +untrusted user input can safely be displayed on a page. + +%package help +Summary: Development documents and examples for MarkupSafe +Provides: python2-markupsafe-doc +%description help +MarkupSafe implements a text object that escapes characters so it is safe to use +in HTML and XML. Characters that have special meanings are replaced so that they +display as the actual characters. This mitigates injection attacks, meaningi +untrusted user input can safely be displayed on a page. %prep -%autosetup -n MarkupSafe-%{version} +%autosetup -n MarkupSafe-1.1.1 %build -%py3_build - +%py2_build %install -%py3_install +%py2_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . %check -%{__python3} setup.py test - +%{__python2} setup.py test -%files -n python3-markupsafe -%{python3_sitearch}/*.egg-info/ -%exclude %{python3_sitearch}/markupsafe/_speedups.c -%{python3_sitearch}/markupsafe/ +%files -n python2-markupsafe -f filelist.lst +%dir %{python2_sitearch}/* -%files help -%doc README.rst +%files help -f doclist.lst +%{_docdir}/* %changelog -* Fri Oct 30 2020 wuchaochao - 1.1.1-7 -- Type:bufix -- CVE:NA -- SUG:NA -- DESC:remove python2 - -* Sat Jul 25 2020 tianwei - 1.1.1-6 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC:update to release 1.1.1 - -* Fri Oct 11 2019 yefei - 1.0-3 -- Type:enhancement -- ID:NA -- SUG:NA -- DESC:move author from doc to license - -* Mon Sep 16 2019 openEuler Buildteam - 1.0-2 -- Package init +* Mon May 17 2021 OpenStack_SIG +- Package Spec generated -- Gitee From b4b88d32816bf3d15888a56785fe565d43425e9d Mon Sep 17 00:00:00 2001 From: huangtianhua Date: Thu, 16 Sep 2021 01:30:33 +0000 Subject: [PATCH 2/2] sync sp2 to next and add version info in changelog --- python-markupsafe.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-markupsafe.spec b/python-markupsafe.spec index 30e475b..e3529c4 100644 --- a/python-markupsafe.spec +++ b/python-markupsafe.spec @@ -79,5 +79,5 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog -* Mon May 17 2021 OpenStack_SIG +* Mon May 17 2021 OpenStack_SIG - 1.1.1-1 - Package Spec generated -- Gitee