瀏覽代碼

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.
Ryan Ernst 7 年之前
父節點
當前提交
7abc55f905
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      distribution/packages/build.gradle

+ 4 - 2
distribution/packages/build.gradle

@@ -253,10 +253,12 @@ Closure commonDebConfig(boolean oss) {
   return {
     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) {
-      license 'ASL-2.0'
+      customFields['License'] = 'ASL-2.0'
     } else {
-      license 'Elastic-License'
+      customFields['License'] = 'Elastic-License'
     }
 
     version = project.version