diff --git a/0001-add-setup.py.patch b/0001-add-setup.py.patch new file mode 100644 index 0000000000000000000000000000000000000000..c30c9329433cc6b4345839544536c8c23fb34dc9 --- /dev/null +++ b/0001-add-setup.py.patch @@ -0,0 +1,25 @@ +From 343f2b3e776fe7742727f806fb3424a7c9a7851d Mon Sep 17 00:00:00 2001 +From: jxy_git +Date: Mon, 7 Nov 2022 15:23:19 +0800 +Subject: [PATCH] add setup.py + +--- + setup.py | 6 ++++++ + 1 file changed, 6 insertions(+) + create mode 100644 setup.py + +diff --git a/setup.py b/setup.py +new file mode 100644 +index 0000000..30c1b7b +--- /dev/null ++++ b/setup.py +@@ -0,0 +1,6 @@ ++#!/usr/bin/env python ++ ++from setuptools import setup ++ ++if __name__ == "__main__": ++ setup() +-- +2.37.1 + diff --git a/django-debreach-2.0.1.tar.gz b/django-debreach-2.0.1.tar.gz deleted file mode 100644 index 691958143afc4cb0c75b0242f0252e2dc3d8944a..0000000000000000000000000000000000000000 Binary files a/django-debreach-2.0.1.tar.gz and /dev/null differ diff --git a/django-debreach-2.1.0.tar.gz b/django-debreach-2.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4de36c9a4f7b44efa3179d266b542fce76ff0561 Binary files /dev/null and b/django-debreach-2.1.0.tar.gz differ diff --git a/python-django-debreach.spec b/python-django-debreach.spec index 425205af8ff5778e0026c24f9acccf4d6b0830fc..da6e10831f476c717dac513955d8b000a6224574 100644 --- a/python-django-debreach.spec +++ b/python-django-debreach.spec @@ -1,19 +1,23 @@ +%global _empty_manifest_terminate_build 0 %global pypi_name django-debreach Name: python-%{pypi_name} -Version: 2.0.1 -Release: 2 +Version: 2.1.0 +Release: 1 Summary: Basic/extra mitigation against the BREACH attack for Django projects License: BSD-2-Clause URL: http://github.com/lpomfrey/django-debreach -Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/1f/1a/2bc5970d6b848c7ff4ab2932493a8e25bbed47f7668e4c3338152defc01a/django-debreach-2.1.0.tar.gz +Patch0: 0001-add-setup.py.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-Django BuildRequires: python3-setuptools BuildRequires: python3-sphinx +BuildRequires: python3-pip +BuildRequires: python3-wheel %description Basic/extra mitigation against the BREACH attack for Django projects. @@ -35,25 +39,54 @@ protection against the BREACH attack. %prep %autosetup -n %{pypi_name}-%{version} +%patch0 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py3_build + %install %py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + %check PYTHONPATH=. %{__python3} setup.py test -%files -n python3-%{pypi_name} -%license LICENSE -%doc README.rst -%{python3_sitelib}/debreach -%{python3_sitelib}/django_debreach-%{version}-py%{python3_version}.egg-info +%files -n python3-%{pypi_name} -f filelist.lst +%dir %{python3_sitelib}/* +%{_docdir}/python-%{pypi_name}/docs/* %changelog +* Mon Nov 07 2022 jiangxinyu - 2.1.0-1 +- Upgrade package to version 2.1.0 + * Wed May 11 2022 yangping - 2.0.1-2 - License compliance rectification -* Wed Jan 29 2021 liusheng - 2.0.1-1 +* Fri Jan 29 2021 liusheng - 2.0.1-1 - Init package for python-django-debreach