On Mon, Nov 18, 2019 at 02:11:33PM -0500, Cole Robinson wrote:
On 11/11/19 9:38 AM, Daniel P. Berrangé wrote:
> As part of an goal to eliminate Perl from libvirt build tools,
> rewrite the check-file-access.pl tool in Python.
>
> This was a straight conversion, manually going line-by-line to
> change the syntax from Perl to Python. Thus the overall structure
> of the file and approach is the same.
>
> Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
> ---
> Makefile.am | 1 +
> scripts/check-file-access.py | 123 +++++++++++++++++++++++++++++++
> tests/Makefile.am | 3 +-
> tests/check-file-access.pl | 126 --------------------------------
> tests/file_access_whitelist.txt | 2 +-
> 5 files changed, 126 insertions(+), 129 deletions(-)
> create mode 100755 scripts/check-file-access.py
> delete mode 100755 tests/check-file-access.pl
>
`make -C builddir check-access` fails like:
LC_ALL= LANG=C LC_CTYPE=en_US.UTF-8 /usr/bin/python3
/home/crobinso/src/libvirt/scripts/check-file-access.py | sort -u
Traceback (most recent call last):
File "/home/crobinso/src/libvirt/scripts/check-file-access.py", line
53, in <module>
with open(whitelist_file, "r") as fh:
FileNotFoundError: [Errno 2] No such file or directory:
'file_access_whitelist.txt'
make[1]: Leaving directory '/home/crobinso/src/libvirt/builddir/tests'
make: Leaving directory '/home/crobinso/src/libvirt/builddir'
Looks like this is unrelated to this patch - the original script
has the same flaw wrt VPATH builds, and indeed even the Makefile.am
is currently broken.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|