Build: Fix License attribute to be written in deb control data

This commit uses the customFields setting of the Deb task in ospackage
to work around the fact it does not know anything about the License
attribute natively.
This commit is contained in:
Ryan Ernst 2018-04-23 17:24:23 -07:00
parent ea2a29530c
commit 7abc55f905
1 changed files with 4 additions and 2 deletions

View File

@ -253,10 +253,12 @@ Closure commonDebConfig(boolean oss) {
return { return {
configure(commonPackageConfig('deb', oss)) configure(commonPackageConfig('deb', oss))
// jdeb does not provide a way to set the License control attribute, and ospackage
// silently ignores setting it. Instead, we set the license as "custom field"
if (oss) { if (oss) {
license 'ASL-2.0' customFields['License'] = 'ASL-2.0'
} else { } else {
license 'Elastic-License' customFields['License'] = 'Elastic-License'
} }
version = project.version version = project.version