13 Commits

Author SHA1 Message Date
Miro Hrončok
4a1aee23ae Simplify and modernize packaging
- Use SPDX identifier for License

    $ askalono identify defusedxml-0.7.1/LICENSE
    License: PSF-2.0 (original text)
    Score: 0.982
2024-10-23 23:35:12 +02:00
Miroslav Suchý
b0685fe9df convert license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-09-04 19:39:27 +02:00
Fedora Release Engineering
a7a1453bbc Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 10:55:23 +00:00
Python Maint
3ae5dfd9c0 Rebuilt for Python 3.13 2024-06-07 10:32:15 +02:00
Miro Hrončok
a61ccbfba8 Convert to %autorelease and %autochangelog
[skip changelog]
2024-01-29 15:36:08 +01:00
Fedora Release Engineering
ddabfa7d05 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 03:15:45 +00:00
Fedora Release Engineering
20d5027035 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 00:39:51 +00:00
Miro Hrončok
58bc1fca8e Run lxml tests during build, avoid deprecated unittest.makeSuite() 2023-10-24 13:32:26 +02:00
Fedora Release Engineering
4ec55d2b7e Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 08:53:24 +00:00
Python Maint
8c0e2273ce Rebuilt for Python 3.12 2023-06-13 20:35:19 +02:00
Fedora Release Engineering
e08196ae7d Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 12:34:52 +00:00
Fedora Release Engineering
54c5881c0d Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 17:49:52 +00:00
Python Maint
b4bad83596 Rebuilt for Python 3.11 2022-06-13 15:01:01 +02:00
3 changed files with 209 additions and 141 deletions

136
changelog Normal file
View File

@@ -0,0 +1,136 @@
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Oct 24 2023 Miro Hrončok <mhroncok@redhat.com> - 0.7.1-10
- Run lxml tests during build, avoid deprecated unittest.makeSuite()
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.7.1-8
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.7.1-5
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.7.1-2
- Rebuilt for Python 3.10
* Mon May 03 2021 Tomas Hrnciar <thrnciar@redhat.com> - 0.7.1-1
- Update to 0.7.1
- Fixes: rhbz#1935032
* Wed Jan 27 2021 Miro Hrončok <mhroncok@redhat.com> - 0.7.0~rc2-1
- Update to 0.7.0rc2
- Fixes: rhbz#1915522
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0~rc1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0~rc1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.0~rc1-2
- Rebuilt for Python 3.9
* Mon May 04 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.0~rc1-1
- Update to 0.7.0rc1
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu May 09 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-1
- Update to 0.6.0 (#1699639)
- Remove Python 2 subpackage
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.0-5
- Rebuilt for Python 3.7
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.0-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Adam Williamson <awilliam@redhat.com> - 0.5.0-1
- Update to 0.5.0, drop merged/superseded patches
- Enable Python 3 build for EPEL 7, per https://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL
- Drop format-string patch as Python 2.6 is no longer supported anyway
- Update URL to github
- Update source URL for pypi changes
* Thu Dec 22 2016 Adam Williamson <awilliam@redhat.com> - 0.4.1-9
- Fix incompatibility with Python 3.6 (gh#3 / gh#4)
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com>
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Nov 15 2015 Ralph Bean <rbean@redhat.com> - 0.4.1-6
- Added explicit python2 subpackage with modern provides statement.
- Only apply the entity_loop patch on enterprisey builds.
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Wed Aug 05 2015 Miro Hrončok <mhroncok@redhat.com> - 0.4.1-4
- Add patches by Avram Lubkin
- https://bugzilla.redhat.com/show_bug.cgi?id=927883#c14
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon May 26 2014 Miro Hrončok <mhroncok@redhat.com> - 0.4.1-1
- Updated to 0.4.1 (#1100730)
* Tue May 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Mar 26 2013 Miro Hrončok <mhroncok@redhat.com> - 0.4-1
- Initial package.

42
drop-makeSuite.patch Normal file
View File

@@ -0,0 +1,42 @@
From 4e6cea5f5bb44bf06dd30a723cf13334693c3150 Mon Sep 17 00:00:00 2001
From: Christian Heimes <christian@python.org>
Date: Fri, 22 Sep 2023 14:01:50 +0200
Subject: [PATCH] Improve tests (partial)
- `makeSuite` is deprecated
diff --git a/tests.py b/tests.py
index ab52aab..c60335e 100644
--- a/tests.py
+++ b/tests.py
@@ -542,17 +559,19 @@ def test_defused_gzip_response(self):
def test_main():
suite = unittest.TestSuite()
- suite.addTests(unittest.makeSuite(TestDefusedcElementTree))
- suite.addTests(unittest.makeSuite(TestDefusedElementTree))
- suite.addTests(unittest.makeSuite(TestDefusedMinidom))
- suite.addTests(unittest.makeSuite(TestDefusedMinidomWithParser))
- suite.addTests(unittest.makeSuite(TestDefusedPulldom))
- suite.addTests(unittest.makeSuite(TestDefusedSax))
- suite.addTests(unittest.makeSuite(TestXmlRpc))
- if lxml is not None:
- suite.addTests(unittest.makeSuite(TestDefusedLxml))
- if gzip is not None:
- suite.addTests(unittest.makeSuite(TestDefusedGzip))
+ cls = [
+ TestDefusedElementTree,
+ TestDefusedcElementTree,
+ TestDefusedMinidom,
+ TestDefusedMinidomWithParser,
+ TestDefusedPulldom,
+ TestDefusedSax,
+ TestDefusedLxml,
+ TestXmlRpc,
+ TestDefusedGzip,
+ ]
+ for c in cls:
+ suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(c))
return suite

View File

@@ -1,170 +1,60 @@
%global pypi_name defusedxml
%global base_version 0.7.1
#global prerel ...
%global upstream_version %{base_version}%{?prerel}
Name: python-%{pypi_name}
Version: %{base_version}%{?prerel:~%{prerel}}
Release: 4%{?dist}
Name: python-defusedxml
Version: 0.7.1
Release: %autorelease
Summary: XML bomb protection for Python stdlib modules
License: Python
License: PSF-2.0
URL: https://github.com/tiran/defusedxml
Source0: %{pypi_source %{pypi_name} %{upstream_version}}
Source: %{pypi_source defusedxml}
# Drop deprecated unittest.makeSuite()
# From https://github.com/tiran/defusedxml/commit/4e6cea5f5b
# (This no longer skips lxml tests when lxml is not installed.)
Patch: drop-makeSuite.patch
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python3-devel
BuildRequires: python3-lxml
%description
%global _description %{expand:
The defusedxml package contains several Python-only workarounds and fixes for
denial of service and other vulnerabilities in Python's XML libraries. In order
to benefit from the protection you just have to import and use the listed
functions / classes from the right defusedxml module instead of the original
module.
module.}
%description %_description
%package -n python%{python3_pkgversion}-%{pypi_name}
%package -n python3-defusedxml
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
%description -n python%{python3_pkgversion}-%{pypi_name}
The defusedxml package contains several Python-only workarounds and fixes for
denial of service and other vulnerabilities in Python's XML libraries. In order
to benefit from the protection you just have to import and use the listed
functions / classes from the right defusedxml module instead of the original
module. This is the python%{python3_pkgversion} build.
%description -n python3-defusedxml %_description
%prep
%autosetup -p1 -n %{pypi_name}-%{upstream_version}
%autosetup -p1 -n defusedxml-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%py3_build
%pyproject_wheel
%install
%py3_install
%pyproject_install
%pyproject_save_files -l defusedxml
%check
%{python3} tests.py
%{py3_test_envvars} %{python3} tests.py
%files -n python%{python3_pkgversion}-%{pypi_name}
%files -n python3-defusedxml -f %{pyproject_files}
%doc README.txt README.html CHANGES.txt
%license LICENSE
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{upstream_version}-py%{python3_version}.egg-info/
%changelog
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Jul 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.7.1-2
- Rebuilt for Python 3.10
* Mon May 03 2021 Tomas Hrnciar <thrnciar@redhat.com> - 0.7.1-1
- Update to 0.7.1
- Fixes: rhbz#1935032
* Wed Jan 27 2021 Miro Hrončok <mhroncok@redhat.com> - 0.7.0~rc2-1
- Update to 0.7.0rc2
- Fixes: rhbz#1915522
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0~rc1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0~rc1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.0~rc1-2
- Rebuilt for Python 3.9
* Mon May 04 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.0~rc1-1
- Update to 0.7.0rc1
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Sun Aug 18 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu May 09 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-1
- Update to 0.6.0 (#1699639)
- Remove Python 2 subpackage
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 0.5.0-5
- Rebuilt for Python 3.7
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.5.0-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Adam Williamson <awilliam@redhat.com> - 0.5.0-1
- Update to 0.5.0, drop merged/superseded patches
- Enable Python 3 build for EPEL 7, per https://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL
- Drop format-string patch as Python 2.6 is no longer supported anyway
- Update URL to github
- Update source URL for pypi changes
* Thu Dec 22 2016 Adam Williamson <awilliam@redhat.com> - 0.4.1-9
- Fix incompatibility with Python 3.6 (gh#3 / gh#4)
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com>
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-8
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Nov 15 2015 Ralph Bean <rbean@redhat.com> - 0.4.1-6
- Added explicit python2 subpackage with modern provides statement.
- Only apply the entity_loop patch on enterprisey builds.
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Wed Aug 05 2015 Miro Hrončok <mhroncok@redhat.com> - 0.4.1-4
- Add patches by Avram Lubkin
- https://bugzilla.redhat.com/show_bug.cgi?id=927883#c14
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Mon May 26 2014 Miro Hrončok <mhroncok@redhat.com> - 0.4.1-1
- Updated to 0.4.1 (#1100730)
* Tue May 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Mar 26 2013 Miro Hrončok <mhroncok@redhat.com> - 0.4-1
- Initial package.
%autochangelog