ansible/lib/ansible/galaxy
Sloane Hertel e84240db84
Fix installing roles containing symlinks (#82911)
* Fix installing roles containing symlinks

Fix sanitizing tarfile symlinks relative to the link directory instead of the archive

For example:

role
├── handlers
│   └── utils.yml -> ../tasks/utils/suite.yml

The link ../tasks/utils/suite.yml will resolve to a path outside of the link's directory, but within the role

role/handlers/../tasks/utils/suite.yml

the resolved path relative to the role is tasks/utils/suite.yml, but if the symlink is set to that value, tarfile would extract it from role/handlers/tasks/utils/suite.yml

* Replace overly forgiving test case with tests for a symlink in a subdirectory of the archive and a symlink in the archive dir when these are not equivalent.

* Build test case from role files to make it easier to add test cases

Fixes #82702
Fixes #81965
Fixes #82051
2024-04-24 11:07:29 -04:00
..
collection Use of constant for 644 permission variable (#82762) 2024-03-05 16:09:58 +01:00
data Follow up to #82933 - remove platforms from templates (#82961) 2024-04-02 17:06:39 -04:00
dependency_resolution Fix typos in builtin modules (#81969) 2023-10-13 20:37:58 -07:00
__init__.py Require `from __future__ import annotations` (#81902) 2023-10-04 22:11:17 +00:00
api.py Deprecate support for the v2 galaxy API (#82543) 2024-02-13 09:31:33 -06:00
role.py Fix installing roles containing symlinks (#82911) 2024-04-24 11:07:29 -04:00
token.py Require `from __future__ import annotations` (#81902) 2023-10-04 22:11:17 +00:00
user_agent.py Require `from __future__ import annotations` (#81902) 2023-10-04 22:11:17 +00:00