-
Notifications
You must be signed in to change notification settings - Fork 9
Add SPDX-License-Identifier, and use LICENSES/ directory layout in collections and ansible-core? #112
Comments
Thank you @felixfontein for starting this discussion. I think having consistent, machine-readable license information would make it easier to ensure that collections included in
+1.
I think it's better and less confusing to use one type of license notation, but at least REUSE doesn't forbid keeping existing license headers.
I would recommend the former, but I don't have a strong opinion here. It doesn't necessarily need to be one or the other. Note that Github will not detect the license of the repository if there's no
I think both the README and galaxy.yml should include all licenses that apply to the codebase. Even though the collections and |
CC @sivel / @nitzmahone. We are wondering what a) you think about this, b) whether you remember why the current license header / |
I think that there's no downside to adding a machine-readable header for discovering license information, so we should probably encourage or at least allow it. I'd be fine with combining it with the more human-friendly one as well. Generally, I like the idea of moving licenses to a dedicated directory, but the GitHub support relying on a file in the root can't be overlooked, so I don't think I'd want to do anything that stops that from working.
Agree. |
Oh and as a practical matter I wanted to call out the relatively new availability of git-blame-ignore-revs support on GitHub: Change the headers in nearly every file in a repository is probably a good use case for this. |
How about having all licenses in |
|
I put together a draft PR against community.docker to show folks what this looks like. For reference, I've also included the commands I used to automate the process. |
I would keep the |
Yeah, I know that part was still in the air. Unfortunately, |
The sanity check looks for Also the developer documenation specifies how the license header should look: https://docs.ansible.com/ansible-core/devel/dev_guide/developing_modules_documenting.html#copyright |
Ok, maybe it's easier to discuss a very concrete proposal. So let me propose the following:
Reasoning:
|
@ansible-community/steering-committee what do you think of the above proposal? |
Reuse's automated tooling ( Besides this, I obviously support this proposal :). |
FTR, reuse-tool is not the only tool that can detect |
I hacked a little script together (https://gist.github.com/felixfontein/3d9502e22d1461dc3baadddeeb9d9cd9) that does this. It definitely does need someone to look over the results; I've tested it with community.general, community.crypto, community.docker, and ansible-core, and so far there was one file in community.docker and two files in ansible-core that needed manual changes. (This was mainly dual-licensed vendored content, or files that had content covered by multiple licenses.) (It also updates the paths to the license files if the comment follows the 'standard' one closely enough.) |
Sounds good to me. But I'm not sure if you want this to be a recommendation or a requirement for collections. Personally, I would start with making this a recommendation first and a requirement later. Additionally, we should have a way to test this. This would mean core would be involved and has to implement this in the sanity(?) tests. That is, if we don't want to implement our own tests for the community package. And I think we should try to avoid this. |
I think this would be a recommendation for at least some time. I think the main goal is to first get ansible-core and the steering committee (and hopefully larger parts of the community) to agree on such a recommendation, and then to see who else would adopt this. The steering committee has several members who are involved with some of the Ansible dev tooling (ansible-lint, ansible-navigator, ...), so I would expect that if the SC agrees on such a recommendations, these projects would also adopt this, at least over time. That's why I'd really like to see some more @ansible-community/steering-committee feedback on this. |
I might be be wrong, but I think this discussion hasn't been announced via Bullhorn yet. Maybe this would help to get more feedback from ansible-core, the steering committee and the community. |
We never announced new discussions on The Bullhorn except if we were looking for community feedback. Right now we are looking for feedback from the SC and from the core team, and both have already been pinged. |
My question is if we're going to standardize this way of organizing work with license info (i.e. it'll be a part of the Collection requirements if SC is OK)? Regarding the questions:
+1
+1
+1 |
Should we keep referring to
I think it would be more consistent if the copyright always refers a file in
I think we should make this a recommendation first, but would love to see it as a requirement later. |
The Core team has discussed this, and have decided that ansible-core will not be adopting this proposal. We may adopt the change to rename the license files to their SPDX equivalent, but we would need to determine how the license file for GPL3.0+ would be named, since the license file itself does not dictate "only" vs "or later". |
@sivel would you mind adding a bit more details on a) why you don't want to include |
A few of the items I remember from our discussion...
We actually discussed a preference over removing all per file license headers where the file matched the project license, over adding more information per file. (This has not been discussed with Red Hat legal) |
@sivel thanks a lot for writing this up! |
@felixfontein Just because the Core team doesn't want to follow this proposal doesn't mean we can't make this a recommendation for collections, does it? I think it's a good proposal that might help a lot, no matter if Core will adopt this or not. |
@mariolenz that is definitely true. I'm still curious for feedback on this from some more SC members. If we do some recommendations regarding this topic, I tihnk we should have a large majority of SC behind it. |
Okay, SGTM, thanks for clarifying |
I created a PR which implements my proposal (#112 (comment)) for community.docker: ansible-collections/community.docker#430 |
Prepare adding SPDX-License-Identifier SUMMARY Prepare adding SPDX-License-Identifier ISSUE TYPE Docs Pull Request COMPONENT NAME ADDITIONAL INFORMATION ansible-community/community-topics#112
I added a tool which adds a 'default' license header to all files which don't have one to my gist: https://gist.github.com/felixfontein/3d9502e22d1461dc3baadddeeb9d9cd9#file-add-default-license-py Finally I noticed that galaxy-importer does not support the |
…missing license file (#1398) Use SPDX-License-Identifier, mention all licenses in galaxy.yml, add missing license file SUMMARY Implements ansible-community/community-topics#112 (comment). Also adds a missing license file for the BSD-2-Clause licensed vmware_spbm and vmware_rest_client module utils. ISSUE TYPE Docs Pull Request Feature Pull Request COMPONENT NAME collection ADDITIONAL INFORMATION I've also tried to unify the format. For example, sometimes there was an empty comment before the copyright (# ) and sometimes there was an empty line without a comment. cc @felixfontein Reviewed-by: Felix Fontein <[email protected]>
…missing license file (#1398) Use SPDX-License-Identifier, mention all licenses in galaxy.yml, add missing license file SUMMARY Implements ansible-community/community-topics#112 (comment). Also adds a missing license file for the BSD-2-Clause licensed vmware_spbm and vmware_rest_client module utils. ISSUE TYPE Docs Pull Request Feature Pull Request COMPONENT NAME collection ADDITIONAL INFORMATION I've also tried to unify the format. For example, sometimes there was an empty comment before the copyright (# ) and sometimes there was an empty line without a comment. cc @felixfontein Reviewed-by: Felix Fontein <[email protected]> This commit was initially merged in https://github.com/ansible-collections/community.vmware See: ansible-collections/community.vmware@19b8ffe
@felixfontein 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 |
I think this is kind of done for now. There never has been consensus to use this everywhere. Some collections do use it, some others do not, Core does not use it, no idea about other parts of the ecosystem. |
Summary
ansible-core (and quite a few collections) use simplified license headers like
and ansible-core has their main license file (GPLv3+) in COPYING, and all other licenses moved into a directory called
licenses/
.While working on similar unifications (ansible-collections/community.crypto#478, ansible-collections/community.general#4847, ansible-collections/community.docker#386), @gotmax23 suggested in ansible-collections/community.crypto#478 (comment) to instead use the more standard
SPDX-License-Identifier
identifier for specifying licenses in files, and use aLICENSES/
directory with license files named after the SPDX identifiers in there - these are parts of the REUSE standard (https://reuse.software/). The license headers would look like this:I personally prefer the more human-friendly simplified license headers that ansible-core and a lot of collections already use, but I think the
SPDX-License-Identifier
is also really helpful to allow automatic extraction of this licensing information with existing tools. So what do you think about combining these as follows:or
?
About
LICENSES/
: how about renaminglicenses/
toLICENSES/
(resp. creating it in the first place, most collections have all their license files in the collection root) and switching to SPDX identifiers as filenames? I don't have a personal preference for the ansible-core or the REUSE style, but since the latter is standardized I think it's better to use it.Two questions with regard to that are: a) should the main license file (often
COPYING
) be moved toLICENSES/GPL-3.0-or-later.txt
as well, or stay asCOPYING
in the main directory? b) Should galaxy.yml list all license files, or just refer to the main license (GPLv3+)?So what do you think, both about
SPDX-License-Identifier
and theLICENSES/
directory?(For historical notes: ansible-core has been using
licenses/
and the short BSD header since 2.5.0: ansible/ansible#31913 The very first use of the short license header I found in ansible/ansible#26812, which ended up in 2.4.0.0.)The text was updated successfully, but these errors were encountered: