diff --git a/Pygments-2.5.2.tar.gz b/Pygments-2.5.2.tar.gz deleted file mode 100644 index 497e9a7b90669bd532c352c703838c6457de899d..0000000000000000000000000000000000000000 Binary files a/Pygments-2.5.2.tar.gz and /dev/null differ diff --git a/Pygments-2.6.1.tar.gz b/Pygments-2.6.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2a76de8592774e6e7a1e1719dcc502f3f184d584 Binary files /dev/null and b/Pygments-2.6.1.tar.gz differ diff --git a/backport-CVE-2021-20270.patch b/backport-CVE-2021-20270.patch index 33df61eb45c68cd8b0ae0dc9be1c3c03261c1940..00b21417e9aee8d4b972d2a2b5c6736627bdab3d 100644 --- a/backport-CVE-2021-20270.patch +++ b/backport-CVE-2021-20270.patch @@ -44,10 +44,9 @@ index 461af88..b8d78f5 100644 ], 'datcon': [ -@@ -446,6 +445,7 @@ class OcamlLexer(RegexLexer): +@@ -446,5 +445,6 @@ class OcamlLexer(RegexLexer): } - + class OpaLexer(RegexLexer): """ diff --git a/python-pygments.spec b/python-pygments.spec index 24dcd724967c41a9eece3ade767440f80d276a34..507032c5d07170ff11c881f071b06f8e8c246af3 100644 --- a/python-pygments.spec +++ b/python-pygments.spec @@ -1,25 +1,11 @@ -%global _description \ -Pygments is a generic syntax highlighter suitable for use \ -in code hosting, forums, wikis or other applications that \ -need to prettify source code. Highlights are: \ - * a wide range of over 500 languages and other text \ - formats is supported \ - * special attention is paid to details that increase \ - highlighting quality \ - * support for new languages and formats are added easily; \ - most languages use a simple regex-based lexing mechanism \ - * a number of output formats is available, among them HTML, \ - RTF, LaTeX and ANSI sequences \ - * it is usable as a command-line tool and as a library \ - * … and it highlights even Perl 6! - -Name: python-pygments -Summary: Syntax highlighting engine written in Python -Version: 2.5.2 -Release: 4 +%global _empty_manifest_terminate_build 0 +Name: python-Pygments +Version: 2.6.1 +Release: 1 +Summary: Pygments is a syntax highlighting package written in Python. License: BSD -URL: http://pygments.org/ -Source0: https://pypi.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz +URL: https://pygments.org/ +Source0: https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz BuildArch: noarch Patch6000: backport-CVE-2021-20270.patch @@ -27,64 +13,99 @@ Patch6001: backport-CVE-2021-27291.patch Patch6002: backport-weed-out-more-backtracking-string-regexes.patch %description -%{_description} - -%package -n python2-pygments -BuildRequires: python2-devel >= 2.4, python2-setuptools -BuildRequires: python2-nose, python2-sphinx python2-pytest -Summary: Syntax highlighting engine written in Python -%{?python_provide:%python_provide python2-pygments} - -%description -n python2-pygments -%{_description} +Pygments is a syntax highlighting package written in Python.It is a generic +syntax highlighter suitable for use in code hosting, forums, wikis or other +applications that need to prettify source code. Highlights a wide range of over +500 languages and other text formats is supported special attention is paid to +details, increasing quality by a fair amount support for new languages and +formats are added easily a number of output formats, presently HTML, LaTeX, RTF, +SVG, all image formats that PIL supports and ANSI sequences it is usable as a +command-line tool and as a library:copyright: Copyright 2006-2019 by the +Pygments team, see AUTHORS. %package -n python3-pygments -BuildRequires: python3-devel, python3-setuptools, python3-nose python3-pytest -Summary: Syntax highlighting engine written in Python -%{?python_provide:%python_provide python3-pygments} - +Summary: Pygments is a syntax highlighting package written in Python. +Provides: python-pygments +# Base build requires +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-pytest %description -n python3-pygments -%{_description} - -%package_help +Pygments is a syntax highlighting package written in Python.It is a generic +syntax highlighter suitable for use in code hosting, forums, wikis or other +applications that need to prettify source code. Highlights a wide range of over +500 languages and other text formats is supported special attention is paid to +details, increasing quality by a fair amount support for new languages and +formats are added easily a number of output formats, presently HTML, LaTeX, RTF, +SVG, all image formats that PIL supports and ANSI sequences it is usable as a +command-line tool and as a library:copyright: Copyright 2006-2019 by the +Pygments team, see AUTHORS. + +%package help +Summary: Pygments is a syntax highlighting package written in Python. +Provides: python3-pygments-doc +%description help +Pygments is a syntax highlighting package written in Python.It is a generic +syntax highlighter suitable for use in code hosting, forums, wikis or other +applications that need to prettify source code. Highlights a wide range of over +500 languages and other text formats is supported special attention is paid to +details, increasing quality by a fair amount support for new languages and +formats are added easily a number of output formats, presently HTML, LaTeX, RTF, +SVG, all image formats that PIL supports and ANSI sequences it is usable as a +command-line tool and as a library:copyright: Copyright 2006-2019 by the +Pygments team, see AUTHORS. %prep %autosetup -p1 -n Pygments-%{version} %build -%{__sed} -i 's/\r//' LICENSE -%py2_build %py3_build %install -%py2_install -%{__python2} setup.py build_sphinx -pushd doc -install -d %{buildroot}%{_mandir}/man1 -mv pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1 -popd -cp -r doc/docs doc/reST - %py3_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 -%{__python2} -m pytest %{__python3} -m pytest -%files -n python2-pygments -%license LICENSE -%{python2_sitelib}/* +%files -n python3-pygments -f filelist.lst +%dir %{python3_sitelib}/* -%files -n python3-pygments -%license LICENSE -%{python3_sitelib}/* -%{_bindir}/pygmentize - -%files help -%doc AUTHORS CHANGES build/sphinx/html doc/reST -%lang(en) %{_mandir}/man1/pygmentize.1* +%files help -f doclist.lst +%{_docdir}/* %changelog +* Mon Feb 07 2022 OpenStack_SIG - 2.6.1-1 +- upgrade version of python3-pygments to 2.6.1 + * Sun Sep 26 2021 huangduirong - 2.5.2-4 - Infinite loop in get_tokens_unprocessed