From 08cc04f4d396b1ab49657e63498104baac971115595fdfa4607ba60dd10182c7 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 5 Aug 2021 15:36:07 +0000 Subject: [PATCH] Accepting request 910321 from home:bnavigator:branches:devel:languages:python - Remove exec bits from demos: fix boo#1189066 - Add python-tornado6-rpmlintrc for empty JS resource in demo OBS-URL: https://build.opensuse.org/request/show/910321 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tornado6?expand=0&rev=19 --- python-tornado6-rpmlintrc | 2 ++ python-tornado6.changes | 6 ++++++ python-tornado6.spec | 11 +++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 python-tornado6-rpmlintrc 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