From c90b11752e4ba2648ce988e5eda01318ddff8616 Mon Sep 17 00:00:00 2001 From: rdobuilder Date: Mar 12 2024 15:58:03 +0000 Subject: Import python-jinja2-3.1.3-3.fc40 To match u-c Related-to: https://review.rdoproject.org/r/q/I3ddb270fa1a54e2ea40bfae43f8b1fc57e1f4e19 --- diff --git a/.python-jinja2.metadata b/.python-jinja2.metadata index 23ab527..6b8d089 100644 --- a/.python-jinja2.metadata +++ b/.python-jinja2.metadata @@ -1 +1 @@ -896a71a32336487edf1216d5d73dd3b26c4d7431 SOURCES/Jinja2-2.10.1.tar.gz +a9db54d91b53f76f546afa1414dd015c0574ebeb SOURCES/Jinja2-3.1.3.tar.gz diff --git a/SOURCES/.gitignore b/SOURCES/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitignore diff --git a/SPECS/python-jinja2.spec b/SPECS/python-jinja2.spec index e1cb83c..7bb9b5b 100644 --- a/SPECS/python-jinja2.spec +++ b/SPECS/python-jinja2.spec @@ -1,72 +1,25 @@ -%if 0%{?rhel} > 7 -# Disable python2 build by default -%bcond_with python2 -%else -%bcond_without python2 -%endif +%global srcname Jinja2 -%if 0%{?fedora} || 0%{?rhel} > 7 -%bcond_without python3 -%else -%bcond_with python3 -%endif +Name: python-jinja2 +Version: 3.1.3 +Release: 3%{?dist} +Summary: General purpose template engine +License: BSD-3-Clause +URL: https://palletsprojects.com/p/jinja/ +Source0: %{pypi_source %srcname} # Enable building without docs to avoid a circular dependency between this # and python-sphinx: -%if %{with python3} -%bcond_without docs -%else +%if 0%{?rhel} || 0%{?flatpak} %bcond_with docs -%endif - -%if 0%{?fedora} > 25 || 0%{?rhel} > 7 -%bcond_without async %else -%bcond_with async +%bcond_without docs %endif -Name: python-jinja2 -Version: 2.10.1 -Release: 3%{?dist} -Summary: General purpose template engine -Group: Development/Languages -License: BSD -URL: http://jinja.pocoo.org/ -Source0: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{version}.tar.gz - -# CVE-2020-28493: ReDOS vulnerability due to the sub-pattern -# The patch is rebased to the old project structure. -# Upstream commit: https://github.com/pallets/jinja/pull/1343/commits/ef658dc3b6389b091d608e710a810ce8b87995b3 -# Tracking bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1928707 -Patch0: CVE-2020-28493.patch - BuildArch: noarch -%description -Jinja2 is a template engine written in pure Python. It provides a -Django inspired non-XML syntax but supports inline expressions and an -optional sandboxed environment. - -If you have any exposure to other text-based template languages, such -as Smarty or Django, you should feel right at home with Jinja2. It's -both designer and developer friendly by sticking to Python's -principles and adding functionality useful for templating -environments. - - -%if %{with python2} -%package -n python2-jinja2 -Summary: General purpose template engine for python2 -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-markupsafe -BuildRequires: python2-pytest -Requires: python2-markupsafe -Requires: python2-setuptools -%{?python_provide:%python_provide python2-jinja2} - -%description -n python2-jinja2 -Jinja2 is a template engine written in pure Python. It provides a +%global _description %{expand: +Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. @@ -74,183 +27,215 @@ If you have any exposure to other text-based template languages, such as Smarty or Django, you should feel right at home with Jinja2. It's both designer and developer friendly by sticking to Python's principles and adding functionality useful for templating -environments. -%endif # with python2 +environments.} +%description %_description -%if %{with python3} %package -n python3-jinja2 -Summary: General purpose template engine for python3 -Group: Development/Languages +Summary: %{summary} BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-babel >= 0.8 -BuildRequires: python3-markupsafe +BuildRequires: pyproject-rpm-macros BuildRequires: python3-pytest %if %{with docs} BuildRequires: %{_bindir}/sphinx-build-3 +BuildRequires: make +BuildRequires: python3-Pallets-Sphinx-Themes >= 2 +BuildRequires: python3-sphinxcontrib-log-cabinet +BuildRequires: python3-sphinx-issues %endif -Requires: python3-babel >= 0.8 -Requires: python3-markupsafe -%if 0%{?rhel} && 0%{?rhel} >= 8 -Requires: platform-python-setuptools -%else -Requires: python3-setuptools -%endif -%{?python_provide:%python_provide python3-jinja2} -%description -n python3-jinja2 -Jinja2 is a template engine written in pure Python. It provides a -Django inspired non-XML syntax but supports inline expressions and an -optional sandboxed environment. +%description -n python3-jinja2 %_description -If you have any exposure to other text-based template languages, such -as Smarty or Django, you should feel right at home with Jinja2. It's -both designer and developer friendly by sticking to Python's -principles and adding functionality useful for templating -environments. -%endif # with python3 +%pyproject_extras_subpkg -n python3-jinja2 i18n %prep -%setup -qc -n Jinja2-%{version} - -%patch0 -p1 +%autosetup -p1 -n %{srcname}-%{version} -# cleanup -find Jinja2-%{version} -name '*.pyo' -o -name '*.pyc' -delete +# Fix for https://github.com/pallets/jinja/issues/1758 +sed -i "s/def teardown/def teardown_method/" tests/test_loader.py -# fix EOL -sed -i 's|\r$||g' Jinja2-%{version}/LICENSE - -mv Jinja2-%{version} python2 -cp -av python2 python3 +%generate_buildrequires +%pyproject_buildrequires -x i18n %build -%if %{with python2} -pushd python2 -%py2_build -popd -%endif # with python2 - -%if %{with python3} -pushd python3 -%py3_build +%pyproject_wheel %if %{with docs} -make -C docs html PYTHONPATH=$(pwd) SPHINXBUILD=sphinx-build-3 -%endif # with docs -popd -%endif # with python3 +make -C docs html PYTHONPATH=$(pwd)/src SPHINXBUILD=sphinx-build-3 +# remove hidden file +rm -rvf docs/_build/html/.buildinfo +%endif %install -%if %{with python2} -pushd python2 -%py2_install +%pyproject_install +%pyproject_save_files jinja2 + -# these files are valid only on Python 3.6+ -rm %{buildroot}%{python2_sitelib}/jinja2/asyncsupport.py -rm %{buildroot}%{python2_sitelib}/jinja2/asyncfilters.py -popd -%endif # with python2 +%check +%pytest tests -%if %{with python3} -pushd python3 -%py3_install +%files -n python3-jinja2 -f %{pyproject_files} +%doc CHANGES.rst +%doc examples +%license LICENSE.rst %if %{with docs} -# remove hidden file -rm -rf docs/_build/html/.buildinfo +%doc docs/_build/html %endif -%if ! %{with async} -# these files are valid only on Python 3.6+ -rm %{buildroot}%{python3_sitelib}/jinja2/asyncsupport.py -rm %{buildroot}%{python3_sitelib}/jinja2/asyncfilters.py -%endif # ! with async -popd -%endif # with python3 +%changelog +* Fri Jan 26 2024 Fedora Release Engineering - 3.1.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild -%check -%if %{with python2} -pushd python2 -# there are currently no tests in the jinja2 tarball -# make test -popd -%endif # with python2 - -%if %{with python3} -pushd python3 -# there are currently no tests in the jinja2 tarball -# make test -popd -%endif # with python3 - - -%if %{with python2} -%files -n python2-jinja2 -%doc python2/AUTHORS -%doc python2/CHANGES.rst -%doc python2/ext -%doc python2/examples -%license python2/LICENSE -%{python2_sitelib}/jinja2 -%{python2_sitelib}/Jinja2-%{version}-py?.?.egg-info -%endif # with python2 - - -%if %{with python3} -%files -n python3-jinja2 -%doc python3/AUTHORS -%doc python3/CHANGES.rst -%doc python3/ext -%doc python3/examples -%license python3/LICENSE -%if %{with docs} -%doc python3/docs/_build/html -%endif -%{python3_sitelib}/jinja2 -%{python3_sitelib}/Jinja2-%{version}-py?.?.egg-info -%endif # with python3 +* Mon Jan 22 2024 Fedora Release Engineering - 3.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild +* Thu Jan 11 2024 Michel Lind - 3.1.3-1 +- Update to 3.1.3 to fix CVE-2024-22195 -%changelog -* Fri Mar 12 2021 Lumír Balhar - 2.10.1-3 -- Fix CVE-2020-28493: ReDOS vulnerability due to the sub-pattern -Resolves: rhbz#1928707 +* Tue Aug 08 2023 Karolina Surma - 3.1.2-6 +- Declare the license as an SPDX expression + +* Fri Jul 21 2023 Fedora Release Engineering - 3.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jun 16 2023 Python Maint - 3.1.2-4 +- Rebuilt for Python 3.12 + +* Tue Jun 13 2023 Python Maint - 3.1.2-3 +- Bootstrap for Python 3.12 + +* Fri May 19 2023 Yaakov Selkowitz - 3.1.2-2 +- Disable docs by default in RHEL builds + +* Mon May 01 2023 Sandro Mani - 3.1.2-1 +- Update to 3.1.2 + +* Fri Jan 20 2023 Fedora Release Engineering - 3.0.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Nov 14 2022 Lumír Balhar - 3.0.3-6 +- Fix compatibility with pytest 7.2 + +* Fri Jul 22 2022 Fedora Release Engineering - 3.0.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 3.0.3-4 +- Rebuilt for Python 3.11 + +* Mon Jun 13 2022 Python Maint - 3.0.3-3 +- Bootstrap for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 3.0.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Mon Nov 15 2021 Thomas Moschny - 3.0.3-1 +- Update to 3.0.3. + +* Mon Nov 15 2021 Thomas Moschny - 3.0.1-4 +- Use new Python packaging guidelines. +- Jinja2 version 3 does not support Python 2 anymore. + +* Wed Nov 10 2021 Karolina Surma - 3.0.1-3 +- Don't explicitly declare runtime dependencies when building for Python 3 +- Declare jinja2+i18n extra to map the upstream package structure + +* Fri Jul 23 2021 Fedora Release Engineering - 3.0.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 22 2021 Lumír Balhar - 3.0.1-1 +- Update to 3.0.1 +- Resolves: rhbz#1961862 + +* Fri Jun 04 2021 Python Maint - 2.11.3-3 +- Rebuilt for Python 3.10 + +* Wed Jun 02 2021 Python Maint - 2.11.3-2 +- Bootstrap for Python 3.10 + +* Sat Feb 6 2021 Thomas Moschny - 2.11.3-1 +- Update to 2.11.3. +- Add patches to build with Python 3.10 (#1907442). + +* Wed Jan 27 2021 Fedora Release Engineering - 2.11.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Dec 21 2020 Miro Hrončok - 2.11.2-7 +- Drop python2-jinja2 on Fedora 34+ + +* Wed Jul 29 2020 Fedora Release Engineering - 2.11.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun May 24 2020 Miro Hrončok - 2.11.2-5 +- Rebuilt for Python 3.9 + +* Fri May 22 2020 Miro Hrončok - 2.11.2-4 +- Bootstrap for Python 3.9 + +* Fri May 22 2020 Thomas Moschny - 2.11.2-3 +- Re-add python2 subpackage (#1832057). + +* Wed May 6 2020 Thomas Moschny - 2.11.2-2 +- Drop python2 subpackage from F33 on (#1832057). + +* Wed Apr 15 2020 Thomas Moschny - 2.11.2-1 +- Re-add dependency on python-setuptools. + +* Wed Apr 15 2020 Dan Horák - 2.11.2-1 +- Update to 2.11.2 + +* Mon Apr 06 2020 Igor Raits - 2.11.1-2 +- Drop unneeded R: pythonX-setuptools + +* Sat Feb 8 2020 Thomas Moschny - 2.11.1-1 +- Update to 2.11.1. + +* Thu Jan 30 2020 Fedora Release Engineering - 2.10.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Nov 20 2019 Thomas Moschny - 2.10.3-2 +- Add missing BR on make. + +* Mon Nov 11 2019 Lumír Balhar - 2.10.3-1 +- New upstream version (2.10.3) + +* Thu Oct 03 2019 Miro Hrončok - 2.10.1-5 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Sat Aug 17 2019 Miro Hrončok - 2.10.1-4 +- Rebuilt for Python 3.8 -* Tue Apr 30 2019 Lumír Balhar - 2.10.1-2 -- Rebuild of package to go through gating -- Resolves: rhbz#1701301 +* Thu Aug 15 2019 Miro Hrončok - 2.10.1-3 +- Bootstrap for Python 3.8 -* Thu Apr 25 2019 Lumír Balhar - 2.10.1-1 -- Rebase to 2.10.1 (security update) to fix CVE-2019-10906 -- Resolves: rhbz#1701301 +* Fri Jul 26 2019 Fedora Release Engineering - 2.10.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild -* Fri Nov 16 2018 Lumír Balhar - 2.10-9 -- Require platform-python-setuptools instead of python3-setuptools -- Resolves: rhbz#1650536 +* Wed Apr 10 2019 Thomas Moschny - 2.10.1-1 +- Update to 2.10.1. +- Update specfile. -* Mon Aug 06 2018 Lumír Balhar - 2.10-8 -- Revert changes commited to wrong branch +* Wed Feb 27 2019 Phil Wyett - 2.10-8 +- Fix FTBS due to bad conditional +- Add version requirement for markupsafe -* Sat Aug 04 2018 Lumír Balhar - 2.10-7 -- Fix conditions +* Sat Feb 02 2019 Fedora Release Engineering - 2.10-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild -* Sat Aug 04 2018 Lumír Balhar - 2.10-6 -- Specfile cleanup and fixes +* Sat Jul 14 2018 Fedora Release Engineering - 2.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild -* Mon Jun 25 2018 Lumír Balhar - 2.10-5 -- Disable Python 2 build by default +* Mon Jun 18 2018 Miro Hrončok - 2.10-5 +- Rebuilt for Python 3.7 -* Mon Jun 25 2018 Lumír Balhar - 2.10-4 -- Allow build with Python 2 +* Thu Jun 14 2018 Miro Hrončok - 2.10-4 +- Bootstrap for Python 3.7 -* Mon May 28 2018 Petr Viktorin - 2.10-3 -- Remove docs from Python 2 package -- Remove dependency on python2-babel and python2-sphinx +* Mon Apr 16 2018 Charalampos Stratakis - 2.10-3 +- Don't build the Python 2 subpackage on EL > 7 * Fri Feb 09 2018 Fedora Release Engineering - 2.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild