Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible tarball duplicates symlinked modules #218

Closed
felixfontein opened this issue Nov 24, 2020 · 7 comments
Closed

Ansible tarball duplicates symlinked modules #218

felixfontein opened this issue Nov 24, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@felixfontein
Copy link
Collaborator

All modules in c.g and c.n are in subdirectories, with symlinks in plugins/modules/ to the correct copy. The collection artefact on galaxy contains these symlinks, but the Ansible tarball replaced the symlinks with copies.

@gundalow gundalow added bug Something isn't working Priority Priority to implement this labels Nov 24, 2020
@felixfontein
Copy link
Collaborator Author

The duplication seems to be done by the setup.py sdist call made by antsibull to build the tarball. This seems to be a known problem (ansible/ansible#27105, pypa/setuptools#415). It happens internally to setuptool's sdist implementation; before creating the tarball (which would keep symlinks), it copies all files into a new directory, and duplicates links at that step.

Maybe the best way around this would be to extract the resulting tarball, de-duplicate, and then re-tar.

@abadger
Copy link
Contributor

abadger commented Nov 30, 2020

We could do that. Of course, by then we've lost the symlink information. We could hash all of the files to decide what files are the same. Or we could override the setuptools sdist implementation with our own (which is what is done inside of ansible).

@felixfontein
Copy link
Collaborator Author

We still have the symlink information since we have the original version that was tared :) But yeah, replacing the sdist implementation sounds better, especially if ansible-core already does that.

@gundalow
Copy link
Contributor

There maybe some about building on Python 3.9 and symlinks changing (at least using the process that builds ansible-core)

@felixfontein
Copy link
Collaborator Author

The main impact of this will go away with Ansible 6 since then community.general and community.network will drop the symlinks and use meta/runtime.yml for redirects (since they drop Ansible 2.9 support).

@felixfontein felixfontein removed the Priority Priority to implement this label Dec 16, 2021
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Mar 3, 2022
Due to [1] the same file exists in two places, so fix the second file too.

[1] ansible-community/antsibull-build#218


git-svn-id: file:///srv/repos/svn-community/svn@1140361 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Mar 3, 2022
Due to [1] the same file exists in two places, so fix the second file too.

[1] ansible-community/antsibull-build#218

git-svn-id: file:///srv/repos/svn-community/svn@1140361 9fca08f4-af9d-4005-b8df-a31f2cc04f65
@webknjaz
Copy link
Member

@felixfontein Is this still relevant? I thought people switched to the routing/redirect mechanism by now...

@felixfontein
Copy link
Collaborator Author

Some did, but not all. The bulk of it did though (which was community.network and community.general).

Since we don't really want to create (and maintain) our own package biulder which doesn't do this, I think we can close it though. Thanks for the reminder :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants