-
Notifications
You must be signed in to change notification settings - Fork 9
Discuss removing unnecessary files from collections #126
Comments
I don't understand why the collection tarball should be both the source and the installable artifact. It's only the artifact, the source is somewhere on Github or Gitlab or (does this still exist?) Sourceforge... or wherever. As far as I know, GPL isn't violated as long as you provide the source code somehow. You don't have to provide it in the same package. Otherwise, all Linux distributions would violate the GPL because they typically have the compiled kernel and C libraries under GPL in packages without including the source code in the same package.
Yep, you have to provide the sources. A URI to them is sufficient. |
Explanation for RH LegalAnsible collections contain modules and other types of Ansible plugins. These plugins are usually written in either Python or Powershell. These collections are built using The question we have is whether we can exclude the tests and other development files from the built collection artifact and fulfill our GPL obligations by linking to the actual source code on Github (or to whatever Git forge the project is hosted on). Note that collections already link to their respective source repository, and the community collection guidelines require that all collection releases are tagged in said repositories. |
This might be linked with legal questions regarding the If the tarballs on Galaxy would not be the sources, we might have to actively engage in collecting the sources of the collections (next to the collections themselves) to be able to provide the sources of the (At least I'm not remembering that this was part of the discussion as well. There might have been more points which I do not remember right now.) |
Yet you are not providing the sources to build 'ansible' itself (aka anstibull). In any case, I think this is your choice as packager, other people are free to repackage in other ways (no docs, no tests). It would not be the first time, ansible has had an 'ansible-doc' package (with the html docs from site) in many distros for a long time. Another option is to have ansible-galaxy install w/o tests/docs (not extract them from package), but that would be a core feature instead. |
@bcoca the ansible tarball contains a script that will re-build the tarball using antsibull (templated from https://github.com/ansible-community/antsibull/blob/main/src/antsibull/data/build-ansible.sh.j2). |
yet you still don't distribute anstibull in it, my point was not to force you to do so, but to show you you don't need to distribute everything in it. |
@bcoca I would be really glad if RH legal would agree with that. That would make our life a lot easier. But for some reason they didn't wanted to do that so far (I don't even know what exactly they were asked, or if they actually read the question(s), so 🤷). |
wasn't that posted above? In any case I would keep the current distribution 'as is' and if someone wants an 'ansible-lean' that moves out docs/tests ... DIY? |
Thanks for bringing up the
Would it be practical to just rebuild the collections in the Either way, it shouldn't be too hard to provide a separate source tarball that includes all of the tests and development files and then remove them from the sdist. So many upstreams do already do this that we have a specific guideline about handling it in the Fedora Python Packaging Guidelines. Currently,
This is basically what I said above. Even if RH Legal says we don't have to, I still think we should try to gather the full sources including the tests so upstream and downstreams can run the tests for the whole package. Currently, Fedora does not run the tests in the Footnotes
|
One thing about spiting the tests/docs/etc into their own package, this does not work well for collection nor pip formats as both tend to assume that each package owns it's directory and are not friendly to 'sharing' and those files are expected to be within the collection to be functional. |
Not directly related, by related and potentially of interest: #65 and ansible/ansible#78422 |
If the plans are to extend the ignores in the The default manifest directives would already exclude what is in the |
Thanks for the update, @sivel. That's definitely an improvement! I do wish we could figure out the tests issue, but I'm happy to see progress. |
@gotmax23 Please close this issue if done, or open a new forum topic and then close the issue with a pointer to the new discussion: Community-topics: Archiving the repo |
as @gotmax23 is notified, closing, thanks everyone! |
Summary
Many collections install a bunch of unnecessary files. Just look at the number of files the Fedora ansible-collection-kubernetes-core has to remove:
(The package also remove docs and licenses from the built collection, as we install them under /usr/share/doc and /usr/share/licenses, but that's not relevant here).
@dmsimard and I submitted PRs 1 2 to community.general to remove unnecessary files from that collection, but @felixfontein claimed there were some legal issues with doing so.
I really don't think there are legal issues here. The collection is a built artifact and doesn't (and already isn't given e.g. the missing
galaxy.yml
) need to be a full representation of the source code. As long as the collection includes a link to the source, it fulfills the GPL obligations.I propose that the steering committee allow and encourage collections to drop unnecessary files from the built collection artifacts (i.e. include them in
build_ignore
).The text was updated successfully, but these errors were encountered: