|
Igor Gnatenko |
23f1fef |
%global modname bleach
|
|
Igor Gnatenko |
23f1fef |
|
|
Igor Gnatenko |
23f1fef |
Name: python-%{modname}
|
|
|
b2502bf |
Version: 6.1.0
|
|
|
b2502bf |
Release: 1%{?dist}
|
|
|
2324349 |
Summary: An easy whitelist-based HTML-sanitizing tool
|
|
|
2324349 |
|
|
|
b2502bf |
License: Apache-2.0
|
|
|
c70c013 |
URL: https://github.com/mozilla/bleach
|
|
|
4c064ad |
Source0: https://files.pythonhosted.org/packages/source/b/%{modname}/%{modname}-%{version}.tar.gz
|
|
Igor Gnatenko |
23f1fef |
|
|
|
7910547 |
# As a result of fixed CVE-2023-24329, urllib.parse.urlsplit() now strips
|
|
|
7910547 |
# the leading C0 control and space characters.
|
|
|
7910547 |
# This breaks tests which expect those leading whitespace characters.
|
|
|
7910547 |
# Upstream vendors an ancient parse.py from Python 3.6.14 and doesn't
|
|
|
7910547 |
# experience this issue.
|
|
|
7910547 |
# Discussed upstream: https://github.com/mozilla/bleach/issues/707
|
|
|
7910547 |
Patch: Strip-leading-whitespaces-from-expected-values.patch
|
|
|
7910547 |
|
|
|
2324349 |
BuildArch: noarch
|
|
|
2324349 |
|
|
Igor Gnatenko |
23f1fef |
%global _description \
|
|
Igor Gnatenko |
23f1fef |
Bleach is an HTML sanitizing library that escapes or strips markup and\
|
|
Igor Gnatenko |
23f1fef |
attributes based on a white list.
|
|
|
2324349 |
|
|
Igor Gnatenko |
23f1fef |
%description %{_description}
|
|
|
2324349 |
|
|
|
ebc7d52 |
|
|
Igor Gnatenko |
23f1fef |
%package -n python3-%{modname}
|
|
Igor Gnatenko |
23f1fef |
Summary: An easy whitelist-based HTML-sanitizing tool
|
|
|
2324349 |
BuildRequires: python3-devel
|
|
|
ef6b25b |
BuildRequires: python3-pytest
|
|
Igor Gnatenko |
23f1fef |
BuildRequires: python3-html5lib
|
|
Igor Gnatenko |
23f1fef |
Requires: python3-html5lib
|
|
|
2324349 |
|
|
|
ebc7d52 |
%description -n python3-%{modname}
|
|
|
ebc7d52 |
%{_description}
|
|
|
2324349 |
|
|
Igor Gnatenko |
23f1fef |
Python 3 version.
|
|
|
2324349 |
|
|
|
ebc7d52 |
|
|
|
2324349 |
%prep
|
|
|
ebc7d52 |
%autosetup -n %{modname}-%{version} -p1
|
|
|
2324349 |
|
|
|
ebc7d52 |
# Remove pregenerated egg-info
|
|
|
ebc7d52 |
rm -rf bleach.egg-info
|
|
|
2835693 |
|
|
|
c6eb016 |
# Remove vendored libraries which were added for https://github.com/mozilla/bleach/issues/386
|
|
|
c6eb016 |
rm -r bleach/_vendor/
|
|
|
ebc7d52 |
# Bleach has a shim layer that references the vendored html5lib and urllib.parse we just deleted.
|
|
|
ebc7d52 |
# Let's patch up the imports to use the real html5lib and urllib.parse.
|
|
|
ebc7d52 |
sed -i "s/bleach._vendor.html5lib/html5lib/g" bleach/html5lib_shim.py tests/test_clean.py
|
|
|
ebc7d52 |
sed -i "s/bleach._vendor.parse/urllib.parse/g" bleach/parse_shim.py
|
|
|
ebc7d52 |
|
|
|
ebc7d52 |
|
|
|
ebc7d52 |
%generate_buildrequires
|
|
|
ebc7d52 |
%pyproject_buildrequires
|
|
|
c6eb016 |
|
|
|
c6eb016 |
|
|
|
2324349 |
%build
|
|
|
ebc7d52 |
%pyproject_wheel
|
|
|
ebc7d52 |
|
|
|
2324349 |
|
|
|
2324349 |
%install
|
|
|
ebc7d52 |
%pyproject_install
|
|
|
ebc7d52 |
%pyproject_save_files %{modname}
|
|
|
2324349 |
|
|
|
2324349 |
%check
|
|
|
c6eb016 |
! find %{buildroot}%{python3_sitelib}/bleach/ -type d | grep vendor
|
|
|
c6eb016 |
|
|
|
c6eb016 |
if [ $? -ne 0 ]; then
|
|
|
c6eb016 |
echo "Detected vendored libraries; please remove them."
|
|
|
c6eb016 |
/usr/bin/false
|
|
|
c6eb016 |
fi;
|
|
|
c6eb016 |
|
|
|
ebc7d52 |
%pytest -k 'not test_uri_value_allowed_protocols and not test_css_parsing_gauntlet_regex_backtracking'
|
|
|
ebc7d52 |
|
|
|
2324349 |
|
|
|
ebc7d52 |
%files -n python3-%{modname} -f %{pyproject_files}
|
|
|
2324349 |
%license LICENSE
|
|
Igor Gnatenko |
23f1fef |
%doc README.rst
|
|
|
ebc7d52 |
|
|
|
2324349 |
|
|
|
2324349 |
%changelog
|
|
|
b2502bf |
* Sun Feb 04 2024 Michel Lind <salimma@fedoraproject.org> - 6.1.0-1
|
|
|
b2502bf |
- Update to 6.1.0
|
|
|
b2502bf |
- Use SPDX license identifier
|
|
|
b2502bf |
|
|
|
e8b7e15 |
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-6
|
|
|
e8b7e15 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
e8b7e15 |
|
|
|
08b09ea |
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-5
|
|
|
08b09ea |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
08b09ea |
|
|
|
0d975e1 |
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-4
|
|
|
0d975e1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
0d975e1 |
|
|
|
7910547 |
* Mon Jul 03 2023 Karolina Surma <ksurma@redhat.com> - 6.0.0-3
|
|
|
7910547 |
- Adjust the tests to work with the new urllib.parse.urlsplit() behavior
|
|
|
7910547 |
|
|
|
e3913e1 |
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 6.0.0-2
|
|
|
e3913e1 |
- Rebuilt for Python 3.12
|
|
|
e3913e1 |
|
|
|
ebc7d52 |
* Wed Feb 08 2023 Sandro Mani <manisandro@gmail.com> - 6.0.0-1
|
|
|
ebc7d52 |
- Update to 6.0.0
|
|
|
ebc7d52 |
|
|
|
bdfb0a2 |
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-5
|
|
|
bdfb0a2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
bdfb0a2 |
|
|
|
bd1fcab |
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-4
|
|
|
bd1fcab |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
bd1fcab |
|
|
|
211be21 |
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.0.0-3
|
|
|
211be21 |
- Rebuilt for Python 3.11
|
|
|
211be21 |
|
|
|
e8faa19 |
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-2
|
|
|
e8faa19 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
e8faa19 |
|
|
|
17debe9 |
* Mon Aug 09 2021 Matthias Runge <mrunge@redhat.com> - 4.0.0-1
|
|
|
17debe9 |
- update to 4.0.0 (rhbz#1923781)
|
|
|
17debe9 |
|
|
|
735690b |
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.3-3
|
|
|
735690b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
735690b |
|
|
|
b69b6a5 |
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 3.2.3-2
|
|
|
b69b6a5 |
- Rebuilt for Python 3.10
|
|
|
b69b6a5 |
|
|
|
cec8407 |
* Wed Jan 27 2021 Matthias Runge <mrunge@redhat.com> - 3.2.3-1
|
|
|
cec8407 |
- rebase to 3.2.3 (rhbz#1918556)
|
|
|
cec8407 |
|
|
|
eea58fd |
* Mon Oct 05 2020 Matthias Runge <mrunge@redhat.com> - 3.2.1-1
|
|
|
eea58fd |
- update to 3.2.1 (rhbz#1829635)
|
|
|
eea58fd |
- fix ftbfs (1863709)
|
|
|
eea58fd |
- fix CVE-2020-6816 (rhbz#1827493)
|
|
|
eea58fd |
|
|
|
e9e40bb |
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.4-5
|
|
|
e9e40bb |
- Second attempt - Rebuilt for
|
|
|
e9e40bb |
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
e9e40bb |
|
|
|
e0ba329 |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.4-4
|
|
|
e0ba329 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
e0ba329 |
|
|
|
f7eb91c |
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 3.1.4-3
|
|
|
f7eb91c |
- Rebuilt for Python 3.9
|
|
|
f7eb91c |
|
|
|
7fe8964 |
* Wed Apr 22 2020 Nils Philippsen <nils@redhat.com> - 3.1.4-2
|
|
|
7fe8964 |
- skip failing tests regardless of Python version
|
|
|
7fe8964 |
|
|
|
a88efce |
* Wed Apr 22 2020 Nils Philippsen <nils@redhat.com> - 3.1.4-1
|
|
|
a88efce |
- version 3.1.4
|
|
|
4c064ad |
- use pythonhosted.org source URL as the tarballs match published hashes
|
|
|
7fe8964 |
- only skip failing tests and only on Python 3.9
|
|
|
d289f89 |
- cope with html5lib prerelease on EL8
|
|
|
a88efce |
|
|
|
06dc083 |
* Wed Feb 19 2020 Matthias Runge <mrunge@redhat.com> - 3.1.0-5
|
|
|
d09d44d |
- skip tests for python 3.9
|
|
|
a88efce |
|
|
|
21a3027 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-5
|
|
|
21a3027 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
21a3027 |
|
|
|
be6bfe6 |
* Tue Sep 03 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 3.1.0-4
|
|
|
be6bfe6 |
- Drop python2-bleach (#1746757).
|
|
|
be6bfe6 |
|
|
|
7819d22 |
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 3.1.0-3
|
|
|
7819d22 |
- Rebuilt for Python 3.8
|
|
|
7819d22 |
|
|
|
487954c |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
|
|
|
487954c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
487954c |
|
|
|
7319ee1 |
* Wed Mar 06 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 3.1.0-1
|
|
|
7319ee1 |
- Update to 3.1.0.
|
|
|
7319ee1 |
- https://github.com/mozilla/bleach/blob/v3.1.0/CHANGES
|
|
|
7319ee1 |
|
|
|
17656d5 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
|
|
|
17656d5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
17656d5 |
|
|
|
c6eb016 |
* Fri Dec 14 2018 Randy Barlow <bowlofeggs@fedoraproject.org> - 3.0.2-1
|
|
|
c6eb016 |
- Update to 3.0.2 (#1641626).
|
|
|
c6eb016 |
- https://github.com/mozilla/bleach/blob/v3.0.2/CHANGES
|
|
|
c6eb016 |
|
|
|
87a5b54 |
* Wed Dec 05 2018 Randy Barlow <bowlofeggs@fedoraproject.org> - 2.1.4-1
|
|
|
87a5b54 |
- Update to 2.1.4.
|
|
|
87a5b54 |
- https://github.com/mozilla/bleach/blob/v2.1.4/CHANGES
|
|
|
87a5b54 |
|
|
|
67c0195 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-3
|
|
|
67c0195 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
67c0195 |
|
|
|
f322e39 |
* Sun Jun 17 2018 Miro Hrončok <mhroncok@redhat.com> - 2.1.3-2
|
|
|
f322e39 |
- Rebuilt for Python 3.7
|
|
|
f322e39 |
|
|
|
f98a222 |
* Tue Mar 06 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.1.3-1
|
|
|
f98a222 |
- Update to 2.1.3
|
|
|
f98a222 |
|
|
|
417f3c2 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-2
|
|
|
417f3c2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|