-
Notifications
You must be signed in to change notification settings - Fork 73
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... shouldn't it be populated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 format
instead ofelastic-package build
(but to be practical this may require Introduce new package spec version #345). elastic-package format
would 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/build
like docs templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.license
field is only an indication for package consumers, it is responsibility of package developers to properly apply the licenses. - Developers may use tools like
go-licenser
to properly apply the licenses to their work, or do it manually, as they prefer.elastic-package format
could be this tool ifsource.license
is 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/build
like 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/packages
that prove my change is effective.versions/N/changelog.yml
.Related issues