[opensuse-packaging] python related rpmlint complaint
All, I had a package (python-dfVFS) that rpmlint is complaining about. I can get the error to go away via these 2 lines in the %files section of the specfile. %defattr(755,root,root) %{python_sitelib}/dfvfs I'm told 755 is likely wrong for anything in python_sitelib. My rpmlint errors without the 755 statement are similar to: [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/vfs/tar_file_system_test.py 0644L /usr/bin/python [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/file_io/fake_file_io_test.py 0644L /usr/bin/python [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/helpers/source_scanner_test.py 0644L /usr/bin/python The files seem to start with: #!/usr/bin/python # -*- coding: utf-8 -*- . . . There are hundreds of the files. Should I run a sed script to trash "#!/usr/bin/python" in all the files. There are over 150 of them. Thanks Greg -- Greg Freemyer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Quoting Greg Freemyer
All,
I had a package (python-dfVFS) that rpmlint is complaining about. I can get the error to go away via these 2 lines in the %files section of the specfile.
%defattr(755,root,root) %{python_sitelib}/dfvfs
I'm told 755 is likely wrong for anything in python_sitelib.
My rpmlint errors without the 755 statement are similar to:
[ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/vfs/tar_file_system_test.py 0644L /usr/bin/python [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/file_io/fake_file_io_test.py 0644L /usr/bin/python [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/helpers/source_scanner_test.py 0644L /usr/bin/python
The files seem to start with:
#!/usr/bin/python # -*- coding: utf-8 -*- . . .
There are hundreds of the files. Should I run a sed script to trash "#!/usr/bin/python" in all the files. There are over 150 of them.
I would try to contact upstream, pointing out that this there is no need for a shebang in those files... Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, 20 Aug 2014 17:35:56 +0000
"Dominique Leuenberger a.k.a. Dimstar"
Quoting Greg Freemyer
: All,
I had a package (python-dfVFS) that rpmlint is complaining about. I can get the error to go away via these 2 lines in the %files section of the specfile.
%defattr(755,root,root) %{python_sitelib}/dfvfs
I'm told 755 is likely wrong for anything in python_sitelib.
My rpmlint errors without the 755 statement are similar to:
[ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/vfs/tar_file_system_test.py 0644L /usr/bin/python [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/file_io/fake_file_io_test.py 0644L /usr/bin/python [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/helpers/source_scanner_test.py 0644L /usr/bin/python
The files seem to start with:
#!/usr/bin/python # -*- coding: utf-8 -*- . . .
There are hundreds of the files. Should I run a sed script to trash "#!/usr/bin/python" in all the files. There are over 150 of them.
I would try to contact upstream, pointing out that this there is no need for a shebang in those files...
Dominique
Well, this files according to its names are tests, for which it is nice if they are self-executable, so you can easily run it, so I think upstream do not want to remove it. Josef -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, Aug 20, 2014 at 1:43 PM, Josef Reidinger
On Wed, 20 Aug 2014 17:35:56 +0000 "Dominique Leuenberger a.k.a. Dimstar"
wrote: Quoting Greg Freemyer
: All,
I had a package (python-dfVFS) that rpmlint is complaining about. I can get the error to go away via these 2 lines in the %files section of the specfile.
%defattr(755,root,root) %{python_sitelib}/dfvfs
I'm told 755 is likely wrong for anything in python_sitelib.
My rpmlint errors without the 755 statement are similar to:
[ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/vfs/tar_file_system_test.py 0644L /usr/bin/python [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/file_io/fake_file_io_test.py 0644L /usr/bin/python [ 29s] python-dfVFS.noarch: W: non-executable-script /usr/lib/python2.7/site-packages/dfvfs/helpers/source_scanner_test.py 0644L /usr/bin/python
The files seem to start with:
#!/usr/bin/python # -*- coding: utf-8 -*- . . .
There are hundreds of the files. Should I run a sed script to trash "#!/usr/bin/python" in all the files. There are over 150 of them.
I would try to contact upstream, pointing out that this there is no need for a shebang in those files...
Dominique
Well, this files according to its names are tests, for which it is nice if they are self-executable, so you can easily run it, so I think upstream do not want to remove it.
Josef
Interesting thought, but there are 189 *.py files in the upstream tarball. 188 of them have /usr/biin/python in them. It seems they have gone overboard. I have notified upstream of the issue. In the meantime I'm going to do some basic testing with the #!/usr/bin/python line removed. Thanks Greg -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wednesday 2014-08-20 19:43, Josef Reidinger wrote:
#!/usr/bin/python # -*- coding: utf-8 -*-
I would try to contact upstream, pointing out that this there is no need for a shebang in those files...
Dominique
Well, this files according to its names are tests, for which it is nice if they are self-executable, so you can easily run it, so I think upstream do not want to remove it.
There may also be editors around which are configured to look for patterns just like "#!/usr/bin/python" as an indicator to pick a particular syntax highlighting ruleset (in case other measures fail, like .py extension, # -*- python -*-, etc.) IMO the rpmlint check adds too much noise. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
Dominique Leuenberger a.k.a. Dimstar
-
Greg Freemyer
-
Jan Engelhardt
-
Josef Reidinger