Blame SPECS/python-pygments.spec

12cfb0
%{?scl:%scl_package python-pygments}
12cfb0
%{!?scl:%global pkg_name %{name}}
12cfb0
12cfb0
%global upstream_name Pygments
12cfb0
12cfb0
Name:           %{?scl_prefix}python-pygments
12cfb0
Version:        1.5
c55277
Release:        5%{?dist}
12cfb0
Summary:        Syntax highlighting engine written in Python
12cfb0
12cfb0
Group:          Development/Libraries
12cfb0
License:        BSD
12cfb0
URL:            http://pygments.org/
12cfb0
Source0:        http://pypi.python.org/packages/source/P/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
12cfb0
BuildRoot:      %{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)
12cfb0
12cfb0
BuildArch:      noarch
12cfb0
BuildRequires:  %{?scl_prefix}python2-devel >= 2.4, %{?scl_prefix}python-setuptools, %{?scl_prefix}python-nose
12cfb0
Requires:       %{?scl_prefix}python-setuptools
12cfb0
c55277
# Fix CVE-2021-20270: infinite loop in SML lexer which may lead to DoS
c55277
# Resolved upstream: https://github.com/pygments/pygments/commit/f91804ff4772e3ab41f46e28d370f57898700333
c55277
Patch1:         CVE-2021-20270-infinite-loop-in-SML-lexer.patch
c55277
c55277
# CVE-2021-27291: ReDos via crafted malicious input
c55277
# Tracking bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2021-27291
c55277
# Upstream fix: https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14
c55277
Patch2:         CVE-2021-27291.patch
c55277
12cfb0
%description
12cfb0
Pygments is a generic syntax highlighter for general use in all kinds
12cfb0
of software such as forum systems, wikis or other applications that
12cfb0
need to prettify source code. Highlights are:
12cfb0
12cfb0
  * a wide range of common languages and markup formats is supported
12cfb0
  * special attention is paid to details that increase highlighting
12cfb0
    quality
12cfb0
  * support for new languages and formats are added easily; most
12cfb0
    languages use a simple regex-based lexing mechanism
12cfb0
  * a number of output formats is available, among them HTML, RTF,
12cfb0
    LaTeX and ANSI sequences
12cfb0
  * it is usable as a command-line tool and as a library
12cfb0
  * ... and it highlights even Brainf*ck!
12cfb0
12cfb0
12cfb0
%prep
12cfb0
%setup -q -n Pygments-%{version}
c55277
%patch1 -p1
c55277
%patch2 -p1
12cfb0
12cfb0
%build
12cfb0
%{?scl:scl enable %{scl} "}
c55277
%{__python2} setup.py build
12cfb0
%{?scl:"}
12cfb0
%{__sed} -i 's/\r//' LICENSE
12cfb0
12cfb0
%install
12cfb0
rm -rf $RPM_BUILD_ROOT
12cfb0
12cfb0
%{?scl:scl enable %{scl} "}
c55277
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
12cfb0
%{?scl:"}
12cfb0
12cfb0
pushd docs
12cfb0
install -d %{buildroot}%{_mandir}/man1
12cfb0
mv pygmentize.1 $RPM_BUILD_ROOT%{_mandir}/man1/pygmentize.1
12cfb0
mv build html
12cfb0
mv src reST
12cfb0
popd
12cfb0
12cfb0
%clean
12cfb0
rm -rf $RPM_BUILD_ROOT
12cfb0
12cfb0
%check
12cfb0
%{?scl:scl enable %{scl} "}
12cfb0
make test
12cfb0
%{?scl:"}
12cfb0
12cfb0
%files
12cfb0
%defattr(-,root,root,-)
12cfb0
%doc AUTHORS CHANGES docs/html docs/reST LICENSE TODO
c55277
%{python2_sitelib}/*
12cfb0
%{_bindir}/pygmentize
12cfb0
%lang(en) %{_mandir}/man1/pygmentize.1.gz
12cfb0
12cfb0
%changelog
c55277
* Tue Jul 20 2021 Charalampos Stratakis <cstratak@redhat.com> - 1.5-5
c55277
- Fix CVE-2021-27291: ReDos via crafted malicious input
c55277
Resolves: rhbz#1940603
c55277
c55277
* Wed Mar 03 2021 Charalampos Stratakis <cstratak@redhat.com> - 1.5-4
c55277
- Fix CVE-2021-20270: infinite loop in SML lexer which may lead to DoS
c55277
Resolves: rhbz#1922136
c55277
61fb56
* Thu May 24 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.5-3
61fb56
- Rebuild for multi-arch bootstrap
61fb56
12cfb0
* Tue May 07 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.5-2
12cfb0
- Rebuild to generate bytecode properly after fixing rhbz#956289
12cfb0
12cfb0
* Thu Jan 31 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.5-1
12cfb0
- Updated to version 1.5.
12cfb0
12cfb0
* Wed Sep 19 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.4-8
12cfb0
- Rebuilt for SCL.
12cfb0
- python-imaging is only a soft dependency, removing it for now.
12cfb0
12cfb0
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.4-7
12cfb0
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
12cfb0
12cfb0
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 1.4-6
12cfb0
- remove rhel logic from with_python3 conditional
12cfb0
12cfb0
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-5
12cfb0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
12cfb0
12cfb0
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-4
12cfb0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
12cfb0
12cfb0
* Tue Sep 13 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-3
12cfb0
- Really enable the python3 unittests.
12cfb0
- Fix python26 byte compilation (thanks to Jeffrey Ness)
12cfb0
12cfb0
* Sat Sep 10 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 1.4-2
12cfb0
- Fix python main package having dependencies for the python2.6 subpackage
12cfb0
- Fix places that used the default python instead of python26
12cfb0
- Attempt to make byte compilation more robust in case we add python3 to EPEL5
12cfb0
- Run unittests on python3 in F15+
12cfb0
12cfb0
* Fri Jun 24 2011 Steve Milner <smilner@fedoraproject.org> - 1.4-1
12cfb0
- update for upstream release
12cfb0
- Add python2.6 support done by Steve Traylen <steve.traylen@cern.ch>. BZ#662755.
12cfb0
12cfb0
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-8
12cfb0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
12cfb0
12cfb0
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 1.3.1-7
12cfb0
- update to most recent python guidelines
12cfb0
- rebuild with python3.2
12cfb0
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
12cfb0
12cfb0
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-6
12cfb0
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
12cfb0
12cfb0
* Thu May  6 2010 Gareth Armstrong <gareth.armstrong@hp.com> - 1.3.1-5
12cfb0
- Enforce that Pygments requires Python 2.4 or later via an explicit BR
12cfb0
- Minor tweaks to spec file
12cfb0
- Deliver html and reST doc files to specifically named directories
12cfb0
- Align description with that of http://pygments.org/
12cfb0
- Add %%check section for Python2 and add BR on python-nose
12cfb0
12cfb0
* Fri Apr 23 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-4
12cfb0
- switched with_python3 back to 1
12cfb0
12cfb0
* Fri Apr 23 2010 David Malcolm <dmalcolm@redhat.com> - 1.3.1-3
12cfb0
- add python3 subpackage (BZ#537244), ignoring soft-dep on imaging for now
12cfb0
12cfb0
* Sat Apr 13 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-2
12cfb0
- added python-imaging as a dependency per BZ#581663.
12cfb0
12cfb0
* Sat Mar  6 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.3.1-1
12cfb0
- Updated for release.
12cfb0
12cfb0
* Tue Sep 29 2009 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.1.1-1
12cfb0
- Updated for release.
12cfb0
12cfb0
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-5
12cfb0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
12cfb0
12cfb0
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
12cfb0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
12cfb0
12cfb0
* Sun Dec 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-3
12cfb0
- Updated for release.
12cfb0
12cfb0
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0-2
12cfb0
- Rebuild for Python 2.6
12cfb0
12cfb0
* Fri Nov 27 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 1.0-1
12cfb0
- Updated for upstream 1.0.
12cfb0
12cfb0
* Sun Sep 14 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.11.1-1
12cfb0
- Updated for upstream 0.11.
12cfb0
12cfb0
* Mon Jul 21 2008 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.10-1
12cfb0
- Updated for upstream 0.10.
12cfb0
12cfb0
* Thu Nov 29 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-2
12cfb0
- Added python-setuptools as a Requires per bz#403601.
12cfb0
12cfb0
* Mon Nov 12 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.9-1
12cfb0
- Updated for upstream 0.9.
12cfb0
12cfb0
* Thu Aug 17 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-2
12cfb0
- Removed the dos2unix build dependency.
12cfb0
12cfb0
* Thu Jun 28 2007 Steve 'Ashcrow' Milner <me@stevemilner.org> - 0.8.1-1
12cfb0
- Initial packaging for Fedora.