Blame SPECS/python-jinja2.spec

6a93f2
%{?scl:%scl_package python-jinja2}
6a93f2
%{!?scl:%global pkg_name %{name}}
6a93f2
6a93f2
# Enable building without docs to avoid a circular dependency between this
6a93f2
# and python-sphinx:
6a93f2
%global with_docs 1
6a93f2
6a93f2
Name:		%{?scl_prefix}python-jinja2
6a93f2
Version:	2.9.6
02ff0a
Release:	3%{?dist}
6a93f2
Summary:	General purpose template engine
6a93f2
Group:		Development/Languages
6a93f2
License:	BSD
6a93f2
URL:		http://jinja.pocoo.org/
6a93f2
Source0:	https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz
02ff0a
02ff0a
# Fix for CVE-2019-10906 python-jinja2: str.format_map allows sandbox escape
02ff0a
# Bugzilla: rhbz#1701304
02ff0a
# More information: https://palletsprojects.com/blog/jinja-2-10-1-released/
02ff0a
# Upstream commit: https://github.com/pallets/jinja/commit/a2a6c930bcca591a25d2b316fcfd2d6793897b26
02ff0a
Patch1:		jinja2-fix-cve-2019-10906.patch
02ff0a
6a93f2
BuildRoot:	%{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)
6a93f2
BuildArch:	noarch
6a93f2
BuildRequires:	%{?scl_prefix}python-devel
6a93f2
BuildRequires:	%{?scl_prefix}python-setuptools
6a93f2
BuildRequires:	%{?scl_prefix}python-markupsafe
6a93f2
%if 0%{?with_docs}
6a93f2
BuildRequires:	%{?scl_prefix}python-sphinx
6a93f2
%endif # with_docs
6a93f2
Requires:	%{?scl_prefix}python-markupsafe
6a93f2
6a93f2
%description
6a93f2
Jinja2 is a template engine written in pure Python.  It provides a
6a93f2
Django inspired non-XML syntax but supports inline expressions and an
6a93f2
optional sandboxed environment.
6a93f2
6a93f2
If you have any exposure to other text-based template languages, such
6a93f2
as Smarty or Django, you should feel right at home with Jinja2. It's
6a93f2
both designer and developer friendly by sticking to Python's
6a93f2
principles and adding functionality useful for templating
6a93f2
environments.
6a93f2
6a93f2
%prep
6a93f2
%setup -q -n Jinja2-%{version}
6a93f2
02ff0a
%patch1 -p1
02ff0a
6a93f2
# cleanup
6a93f2
find . -name '*.pyo' -o -name '*.pyc' -delete
6a93f2
6a93f2
# fix EOL
6a93f2
sed -i 's|\r$||g' LICENSE
6a93f2
6a93f2
%build
6a93f2
%{?scl:scl enable %{scl} "}
6a93f2
%{__python3} setup.py build
6a93f2
%{?scl:"}
6a93f2
6a93f2
# for now, we build docs using Python 2.x and use that for both
6a93f2
# packages.
6a93f2
%if 0%{?with_docs}
6a93f2
%{?scl:scl enable %{scl} "}
6a93f2
make -C docs html
6a93f2
%{?scl:"}
6a93f2
%endif # with_docs
6a93f2
6a93f2
%install
6a93f2
rm -rf %{buildroot}
6a93f2
%{?scl:scl enable %{scl} "}
6a93f2
%{__python3} setup.py install -O1 --skip-build \
6a93f2
	    --root %{buildroot}
6a93f2
%{?scl:"}
6a93f2
6a93f2
# remove hidden file
6a93f2
rm -rf docs/_build/html/.buildinfo
6a93f2
6a93f2
%clean
6a93f2
rm -rf %{buildroot}
6a93f2
6a93f2
%check
6a93f2
%{?scl:scl enable %{scl} "}
6a93f2
%{__python3} setup.py test
6a93f2
%{?scl:"}
6a93f2
6a93f2
%files
6a93f2
%defattr(-,root,root,-)
6a93f2
%doc AUTHORS CHANGES LICENSE
6a93f2
%if 0%{?with_docs}
6a93f2
%doc docs/_build/html
6a93f2
%endif # with_docs
6a93f2
%doc ext
6a93f2
%doc examples
6a93f2
%{python3_sitelib}/*
6a93f2
%exclude %{python3_sitelib}/jinja2/_debugsupport.c
6a93f2
6a93f2
%changelog
02ff0a
* Tue May 14 2019 Tomas Orsava <torsava@redhat.com> - 2.9.6-3
02ff0a
- Fix for CVE-2019-10906 python-jinja2: str.format_map allows sandbox escape
02ff0a
Resolves: rhbz#1701304
02ff0a
6a93f2
* Mon Jun 19 2017 Charalampos Stratakis <cstratak@redhat.com> - 2.9.6-2
6a93f2
- Rebuild with docs
6a93f2
6a93f2
* Fri Jun 16 2017 Charalampos Stratakis <cstratak@redhat.com> - 2.9.6-1
6a93f2
- Update to 2.9.6 for rh-python36
6a93f2
6a93f2
* Sat Feb 13 2016 Robert Kuska <rkuska@redhat.com> - 2.8-2
6a93f2
- Build with docs
6a93f2
6a93f2
* Sat Feb 13 2016 Robert Kuska <rkuska@redhat.com> - 2.8-1
6a93f2
- Update to 2.8
6a93f2
6a93f2
* Wed Jan 21 2015 Matej Stuchlik <mstuchli@redhat.com> - 2.7.3-2
6a93f2
- Rebuild with docs
6a93f2
6a93f2
* Fri Dec 12 2014 Robert Kuska <rkuska@redhat.com> - 2.7.3-1
6a93f2
- Update to 2.7.3
6a93f2
6a93f2
* Tue Jun 24 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-13
6a93f2
- Rebuild to fix 1102894
6a93f2
6a93f2
* Tue Jun 24 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-12
6a93f2
- Rebuilt to fix 1102893
6a93f2
Resolves: rhbz#1102893
6a93f2
6a93f2
* Fri May 30 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-11
6a93f2
- Fix CVE-2014-1402
6a93f2
Resolves: rhbz#1102893
6a93f2
6a93f2
* Mon Nov 18 2013 Robert Kuska <rkuska@redhat.com> - 2.6-11
6a93f2
- Build with docs
6a93f2
6a93f2
* Thu May 09 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-10
6a93f2
- Remove the extraneous dependency on babel.
6a93f2
6a93f2
* Thu May 09 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-9
6a93f2
- Rebuild to generate bytecode properly after fixing rhbz#956289
6a93f2
6a93f2
* Wed Jan 23 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-8
6a93f2
- Rebuilt with docs (now really).
6a93f2
6a93f2
* Wed Oct 17 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-7
6a93f2
- Rebuilt with docs.
6a93f2
6a93f2
* Wed Sep 19 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 2.6-6
6a93f2
- Rebuilt for SCL.
6a93f2
6a93f2
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-5
6a93f2
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
6a93f2
6a93f2
* Fri Aug  3 2012 David Malcolm <dmalcolm@redhat.com> - 2.6-4
6a93f2
- remove rhel logic from with_python3 conditional
6a93f2
6a93f2
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-3
6a93f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
6a93f2
6a93f2
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6-2
6a93f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
6a93f2
6a93f2
* Mon Jul 25 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.6-1
6a93f2
- Update to 2.6.
6a93f2
6a93f2
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.5-4
6a93f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
6a93f2
6a93f2
* Tue Jan 18 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-3
6a93f2
- Re-enable html doc generation.
6a93f2
- Remove conditional for F-12 and below.
6a93f2
- Do not silently fail the testsuite for with py3k.
6a93f2
6a93f2
* Mon Nov  1 2010 Michel Salim <salimma@fedoraproject.org> - 2.5.5-2
6a93f2
- Move python3 runtime requirements to python3 subpackage
6a93f2
6a93f2
* Wed Oct 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.5-1
6a93f2
- Update to 2.5.5.
6a93f2
6a93f2
* Wed Aug 25 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-4
6a93f2
- Revert to previous behavior: fail the build on failed test.
6a93f2
- Rebuild for Python 3.2.
6a93f2
6a93f2
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-3
6a93f2
- %%ifnarch doesn't work on noarch package so don't fail the build on failed tests
6a93f2
6a93f2
* Wed Aug 25 2010 Dan Horák <dan[at]danny.cz> - 2.5.2-2
6a93f2
- disable the testsuite on s390(x)
6a93f2
6a93f2
* Thu Aug 19 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-1
6a93f2
- Update to upstream version 2.5.2.
6a93f2
- Package depends on python-markupsafe and is noarch now.
6a93f2
6a93f2
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-4
6a93f2
- add explicit build-requirement on python-setuptools
6a93f2
- fix doc disablement for python3 subpackage
6a93f2
6a93f2
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-3
6a93f2
- support disabling documentation in the build to break a circular build-time
6a93f2
dependency with python-sphinx; disable docs for now
6a93f2
6a93f2
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.5-2
6a93f2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
6a93f2
6a93f2
* Tue Jul 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.5-1
6a93f2
- Update to upstream version 2.5.
6a93f2
- Create python3 subpackage. 
6a93f2
- Minor specfile fixes.
6a93f2
- Add examples directory.
6a93f2
- Thanks to Gareth Armstrong for additional hints.
6a93f2
6a93f2
* Wed Apr 21 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.1-1
6a93f2
- Update to 2.4.1.
6a93f2
6a93f2
* Tue Apr 13 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.4-1
6a93f2
- Update to 2.4.
6a93f2
6a93f2
* Tue Feb 23 2010 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.1-1
6a93f2
- Update to 2.3.1.
6a93f2
- Docs are built using Sphinx now.
6a93f2
- Run the testsuite.
6a93f2
6a93f2
* Sat Sep 19 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-1
6a93f2
- Update to 2.2.1, mainly a bugfix release.
6a93f2
- Remove patch no longer needed.
6a93f2
- Remove conditional for FC-8.
6a93f2
- Compilation of speedup module has to be explicitly requested now.
6a93f2
6a93f2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-3
6a93f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6a93f2
6a93f2
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
6a93f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
6a93f2
6a93f2
* Sat Jan 10 2009 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-1
6a93f2
- Update to 2.1.1 (bugfix release).
6a93f2
6a93f2
* Thu Dec 18 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.1-1
6a93f2
- Update to 2.1, which fixes a number of bugs.
6a93f2
  See http://jinja.pocoo.org/2/documentation/changelog#version-2-1.
6a93f2
6a93f2
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.0-3
6a93f2
- Rebuild for Python 2.6
6a93f2
6a93f2
* Tue Jul 22 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-2
6a93f2
- Use rpm buildroot macro instead of RPM_BUILD_ROOT.
6a93f2
6a93f2
* Sun Jul 20 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-1
6a93f2
- Upstream released 2.0.
6a93f2
6a93f2
* Sun Jun 29 2008 Thomas Moschny <thomas.moschny@gmx.de> - 2.0-0.1.rc1
6a93f2
- Modified specfile from the existing python-jinja package.