Hello,
On Sun, Jan 14, 2018 at 08:02:41PM +0100, Helmut Grohne wrote:
> Package: ansible
[...]
> /usr/lib/python2.7/dist-packages/ansible/module_utils/basic.py contains
> chattr and lsattr. According to file it is a Python script, ASCII text
> executable
Calls to chattr and lsattr are guarded by first checking for their
existance. (No strong dependency needed here.)
Examples:
attrcmd = self.get_bin_path('chattr')
if attrcmd:
attrcmd = self.get_bin_path('lsattr', False)
if attrcmd:
And the get_bin_path returns None if the command can not be found in
either PATH or any of /sbin, /usr/sbin, /usr/local/sbin.
> /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/hardware/aix.py
> contains lsattr. According to file it is a C++ source, ASCII text
Occurances of lsattr are all hardcoded to /usr/sbin/lsattr (just like all
other command executions in this file). Dependency most likely needed.
(This could potentially be improved via upstream to use a similar method
to the previous basic.py to look up the path and check for existance if
avoiding a hard dependency on e2fsprogs and hardcoding the lsattr path
is desirable.)
> /usr/lib/python2.7/dist-packages/ansible/module_utils/facts/network/aix.py
> contains lsattr. According to file it is a C++ source, ASCII text
Execution of lsattr is guarded by first checking for its existance.
(No dependency needed based on this occurance.)
> /usr/lib/python2.7/dist-packages/ansible/modules/files/stat.py contains
> lsattr. According to file it is a Python script, ASCII text executable
False positive. The one lsattr occurance is in a documentation part.
> /usr/lib/python2.7/dist-packages/ansible/modules/system/filesystem.py
> contains mkfs.ext2, mkfs.ext3, mkfs.ext4, resize2fs and tune2fs. According to
> file it is a Python script, ASCII text executable
Commands are wrapped in module.get_bin_path with the required argument set
to True which returns a json error. While the code may not crash without
the commands, functionality will likely be lost. How severe the functionaly
loss is hard for me to tell, but I'll assume this warrants a dependency on
e2fsprogs.
> /usr/lib/python2.7/dist-packages/ansible/utils/module_docs_fragments/files.py
> contains chattr and lsattr. According to file it is a C++ source, ASCII text
[...]
False positive. Documentation.
In summary there are mainly two cases to consider here. Would be great
to hear from maintainer(s) what their thought is on how to best see
this through. Without further input I'd say a Depends on e2fsprogs
is likely the best solution.
Regards,
Andreas Henriksson