Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892093 - app-admin/ansible-lint-6.11.0 is missing numerous configuration files
Summary: app-admin/ansible-lint-6.11.0 is missing numerous configuration files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrice Clement
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-26 15:49 UTC by Justin Rittenhouse
Modified: 2023-01-27 23:47 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Rittenhouse 2023-01-26 15:49:11 UTC
When comparing the source package from GitHub, it appears that a number of JSON and YAML files weren't copied into the installation directory.  This is causing ansible-lint to fail.

Traceback (most recent call last):                                                                                                            
  File "/usr/lib/python-exec/python3.10/ansible-lint", line 5, in <module>                                                                    
    from ansiblelint.__main__ import _run_cli_entrypoint                                                                                      
  File "/usr/lib/python3.10/site-packages/ansiblelint/__main__.py", line 40, in <module>                                                      
    from ansiblelint import cli                                                                                                               
  File "/usr/lib/python3.10/site-packages/ansiblelint/cli.py", line 12, in <module>         
    from ansiblelint.config import DEFAULT_KINDS, DEFAULT_WARN_LIST, PROFILES                                                                 
  File "/usr/lib/python3.10/site-packages/ansiblelint/config.py", line 100, in <module>                                                       
    PROFILES = yaml_from_file(Path(__file__).parent / "data" / "profiles.yml")                                                                
  File "/usr/lib/python3.10/site-packages/ansiblelint/loaders.py", line 23, in yaml_from_file                                                 
    with open(str(filepath), encoding="utf-8") as content:             
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml'

Adding data/profiles.yml just leads to another missing file:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.10/ansible-lint", line 5, in <module>
    from ansiblelint.__main__ import _run_cli_entrypoint
  File "/usr/lib/python3.10/site-packages/ansiblelint/__main__.py", line 40, in <module>
    from ansiblelint import cli
  File "/usr/lib/python3.10/site-packages/ansiblelint/cli.py", line 25, in <module>
    from ansiblelint.schemas.main import validate_file_schema
  File "/usr/lib/python3.10/site-packages/ansiblelint/schemas/__init__.py", line 2, in <module>
    from ansiblelint.schemas.main import JSON_SCHEMAS, refresh_schemas, validate_file_schema
  File "/usr/lib/python3.10/site-packages/ansiblelint/schemas/main.py", line 42, in <module>
    with open(store_file, encoding="utf-8") as json_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json'

Adding that file and the rest of the schemas/*.json files allows ansible-lint to run.  There may be additional files missing, I have not investigated further.
Comment 1 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2023-01-26 16:04:23 UTC
How are you generating these tracebacks?
Comment 2 Justin Rittenhouse 2023-01-26 16:06:52 UTC
Those are dumped when running the command.  I specifically ran it as follows:

ansible-lint --offline --nocolor -f codeclimate "<file_path_here>"
Comment 3 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2023-01-26 16:15:37 UTC
I can't reproduce. In fact, I do have these those files installed by ansible-lint:

$ qfile /usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json /usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml
app-admin/ansible-lint: /usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json
app-admin/ansible-lint: /usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml

How did you install ansible-lint?
Comment 4 Marek Szuba archtester gentoo-dev 2023-01-27 21:55:17 UTC
Sadly, something IS borked in the GitHub tarball of 6.11.0 - the relevant files are indeed not installed in spite of being present. Will just switch to the PyPI tarballs, now that upstream considers Internet access mandatory for running tests the original rational for using GitHub ones - that they contained additional files required by the test suite - no longer holds.
Comment 5 Larry the Git Cow gentoo-dev 2023-01-27 22:14:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cd82a8771e803de1b647399d8ea717c18d8da14

commit 9cd82a8771e803de1b647399d8ea717c18d8da14
Author:     Marek Szuba <marecki@gentoo.org>
AuthorDate: 2023-01-27 22:11:00 +0000
Commit:     Marek Szuba <marecki@gentoo.org>
CommitDate: 2023-01-27 22:13:58 +0000

    app-admin/ansible-lint: switch back to PyPI tarballs
    
    GitHub ones no longer offer any advantages over PyPI ones now that
    upstream officially requires the test suite to have Internet access, and
    at least for 6.11.0 they do not even install correctly.
    
    Closes: https://bugs.gentoo.org/892093
    Signed-off-by: Marek Szuba <marecki@gentoo.org>

 app-admin/ansible-lint/Manifest                                    | 2 +-
 .../{ansible-lint-6.11.0.ebuild => ansible-lint-6.11.0-r1.ebuild}  | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
Comment 6 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2023-01-27 23:08:28 UTC
Well, the files in question *are* indeed installed by 6.11.0, so I still have no idea what's causing the issue for the reporter.

$ qfile -v /usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json /usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml
app-admin/ansible-lint-6.11.0: /usr/lib/python3.10/site-packages/ansiblelint/schemas/__store__.json
app-admin/ansible-lint-6.11.0: /usr/lib/python3.10/site-packages/ansiblelint/data/profiles.yml
Comment 7 Marek Szuba archtester gentoo-dev 2023-01-27 23:47:55 UTC
(In reply to John Helmert III from comment #6)

> Well, the files in question *are* indeed installed by 6.11.0, so I still
> have no idea what's causing the issue for the reporter.

They weren't for me when I tried it today.