diff --git a/python-tornado6-rpmlintrc b/python-tornado6-rpmlintrc new file mode 100644 index 0000000..836a7af --- /dev/null +++ b/python-tornado6-rpmlintrc @@ -0,0 +1,2 @@ +# keep the empty javascript resource for the demo +addFilter("zero-length .*demos/facebook/static/facebook.js") diff --git a/python-tornado6.changes b/python-tornado6.changes index cd0a1b5..e87a3f7 100644 --- a/python-tornado6.changes +++ b/python-tornado6.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 5 12:51:05 UTC 2021 - Ben Greiner + +- Remove exec bits from demos: fix boo#1189066 +- Add python-tornado6-rpmlintrc for empty JS resource in demo + ------------------------------------------------------------------- Mon Feb 8 20:46:57 UTC 2021 - Ben Greiner diff --git a/python-tornado6.spec b/python-tornado6.spec index 34c410b..fa24f32 100644 --- a/python-tornado6.spec +++ b/python-tornado6.spec @@ -25,6 +25,7 @@ Summary: Open source version of scalable, non-blocking web server that po License: Apache-2.0 URL: https://www.tornadoweb.org Source: https://files.pythonhosted.org/packages/source/t/tornado/tornado-%{version}.tar.gz +Source99: python-tornado6-rpmlintrc # PATCH-FIX-OPENSUSE ignore-resourcewarning-doctests.patch -- ignore resource warnings on OBS Patch0: ignore-resourcewarning-doctests.patch BuildRequires: %{python_module base >= 3.5} @@ -84,10 +85,12 @@ rm -r %{buildroot}%{$python_sitearch}/tornado/test # deduplicate files in python platlibdir %fdupes %{buildroot}%{$python_sitearch} # install demos into docdir and deduplicate -mkdir -p %{buildroot}%{_docdir}/$python-tornado6/ -cp -r demos %{buildroot}%{_docdir}/$python-tornado6/ -find %{buildroot}%{_docdir}/$python-tornado6 -name "*.py" -exec sed -i "1{s|^#!.*$|%{_bindir}/$python|}" {} \; -%fdupes %{buildroot}%{_docdir}/$python-tornado6 +pdocdir=%{buildroot}%{_docdir}/$python-tornado6 +mkdir -p ${pdocdir} +cp -r demos ${pdocdir}/ +find ${pdocdir} -name "*.py" -exec sed -i "1{s|^#!.*$|%{_bindir}/$python|}" {} \; +find ${pdocdir} -type f -exec chmod a-x {} \; +%fdupes ${pdocdir} } %check