Add definition for the license file#367
Conversation
| same "printed page" as the copyright notice for easier | ||
| identification within third-party archives. | ||
|
|
||
| Copyright [yyyy] [name of copyright owner] |
There was a problem hiding this comment.
Hm... shouldn't it be populated?
There was a problem hiding this comment.
Umm, this is the template for the boilerplate that should be added to licensed files.
This makes me think that it may be more complicated to apply the license than just adding the text file, if we manage this, we should also ensure that all files have their expected headers.
Maybe a better approach for all this could be:
- Make it part of
elastic-package formatinstead ofelastic-package build(but to be practical this may require Introduce new package spec version #345). elastic-package formatwould add the license file according to the definition in the manifest, and the license headers.- We would only support a limited set of licenses (as we are doing by now).
There was a problem hiding this comment.
It looks to me more like a part of the building procedure:
- you could use data from the manifest to populate the license
- it's more advanced than just formatting.
- user can define their own custom license, store it in
_dev/buildlike docs templates.
There was a problem hiding this comment.
But take into account that it is not only about populating these fields, in principle the Apache License requires headers in licensed files, this may be difficult to support here.
Also we don't have enough information in packages now, at least we are missing the copyright owner now, we only have a github handle, for example for the "Apache" package the github handle is now elastic/obs-service-integrations, but the copyright owner should be "Elasticsearch B.V.".
Another option I see is:
- The
source.licensefield is only an indication for package consumers, it is responsibility of package developers to properly apply the licenses. - Developers may use tools like
go-licenserto properly apply the licenses to their work, or do it manually, as they prefer.elastic-package formatcould be this tool ifsource.licenseis set and we add a field in the manifest for the copyright owner. License text could be still included in build time.
user can define their own custom license, store it in
_dev/buildlike docs templates.
In principle we were considering allowing only a limited set of licenses, see the mentions to an enum here and preference over arbitrary text files here.
Or do you mean to include here the template for the headers of the files?
There was a problem hiding this comment.
Also we don't have enough information in packages now, at least we are missing the copyright owner now, we only have a github handle, for example for the "Apache" package the github handle is now elastic/obs-service-integrations, but the copyright owner should be "Elasticsearch B.V.".
For such cases, we can assume default field values (for example "Elasticsearch B.V.") to populate the license template.
Or do you mean to include here the template for the headers of the files?
Could you please provide a sample header that needs customization? If we want to support a limited set of licenses, those can be for sure embedded in elastic-package. I'm still wondering if this is something we can render out of embedded templates. Even if we have to add more properties to the manifest.
There was a problem hiding this comment.
Also we don't have enough information in packages now, at least we are missing the copyright owner now, we only have a github handle, for example for the "Apache" package the github handle is now elastic/obs-service-integrations, but the copyright owner should be "Elasticsearch B.V.".
For such cases, we can assume default field values (for example "Elasticsearch B.V.") to populate the license template.
How would we support external developers (community, partners...). Or we delay this by now?
Or do you mean to include here the template for the headers of the files?
Could you please provide a sample header that needs customization? If we want to support a limited set of licenses, those can be for sure embedded in elastic-package. I'm still wondering if this is something we can render out of embedded templates. Even if we have to add more properties to the manifest.
With customizations I mean here for example filling the placeholders in the header for the Apache license.
There was a problem hiding this comment.
How would we support external developers (community, partners...). Or we delay this by now?
Yes, as we want to start with a predefined set of licenses, I meant postponing the community area.
mtojek
left a comment
There was a problem hiding this comment.
You can consider improvement in semantic validation, to make sure that the license is aligned with subscriptions mentioned in the manifest.
What does this PR do?
Add definition for the license file, as being included in elastic/elastic-package#882.
Why is it important?
To specify the file where the license text of a package should be.
Checklist
test/packagesthat prove my change is effective.versions/N/changelog.yml.Related issues