jasonish / py-idstools

idstools: Snort and Suricata Rule and Event Utilities in Python (Including a Rule Update Tool)
Other
276 stars 85 forks source link

rpmlint reports scripts are packaged under python modules directories #33

Closed marcindulak closed 7 years ago

marcindulak commented 7 years ago

rpmlint (a tool for checking RPM packaging style) uses shebang to decide whether a python file is a script.

https://github.com/jasonish/py-idstools/tree/1dccb619555097cbbddb60095fd8f7da385c722a/idstools/scripts packages the following files as non-executable scripts under the python modules directory:

idstools/scripts/u2fast.py idstools/scripts/u2spewfoo.py idstools/scripts/u2eve.py idstools/scripts/u2json.py idstools/scripts/eve2pcap.py idstools/scripts/rulecat.py idstools/scripts/gensidmsgmap.py

The recommended handling, as reported by rpmlint is to remove the shebang "#! /usr/bin/env python" from those files, like in the case of idstools/scripts/dumpdynamicrules.py

jasonish commented 7 years ago

Thanks, yeah those aren't meant to be executed directly.

marcindulak commented 7 years ago

I see another new case: https://github.com/jasonish/py-idstools/blob/cde2ff921f12474ad3432cf8db1ef4754e85a0fb/idstools/rulecat/loghandler.py#L1

jasonish commented 7 years ago

Fixed. See 314a44985a511e4e210299477508a9d8b7fa00a2