File tree Expand file tree Collapse file tree 3 files changed +34
-19
lines changed Expand file tree Collapse file tree 3 files changed +34
-19
lines changed Original file line number Diff line number Diff line change @@ -362,6 +362,15 @@ subprojects {
362
362
final String packagingPathLogs = " path.logs: ${ pathLogs} "
363
363
final String packagingLoggc = " ${ pathLogs} /gc.log"
364
364
365
+ String licenseText
366
+ if (oss) {
367
+ licenseText = rootProject. file(' LICENSE.txt' ). getText(' UTF-8' )
368
+ } else {
369
+ licenseText = rootProject. file(' x-pack/LICENSE.txt' ). getText(' UTF-8' )
370
+ }
371
+ // license text needs to be indented with a single space
372
+ licenseText = ' ' + licenseText. replace(' \n ' , ' \n ' )
373
+
365
374
String footer = " # Built for ${ project.name} -${ project.version} " +
366
375
" (${ distributionType} )"
367
376
Map<String , Object > expansions = [
@@ -429,7 +438,15 @@ subprojects {
429
438
430
439
' es.distribution.flavor' : [
431
440
' def' : oss ? ' oss' : ' default'
432
- ]
441
+ ],
442
+
443
+ ' license.name' : [
444
+ ' deb' : oss ? ' ASL-2.0' : ' Elastic-License'
445
+ ],
446
+
447
+ ' license.text' : [
448
+ ' deb' : licenseText,
449
+ ],
433
450
]
434
451
Map<String , String > result = [:]
435
452
expansions = expansions. each { key , value ->
Original file line number Diff line number Diff line change @@ -244,6 +244,12 @@ Closure commonDebConfig(boolean oss) {
244
244
return {
245
245
configure(commonPackageConfig(' deb' , oss))
246
246
247
+ if (oss) {
248
+ license ' ASL 2.0'
249
+ } else {
250
+ license ' Elastic License'
251
+ }
252
+
247
253
version = project. version
248
254
packageGroup ' web'
249
255
requires ' bash'
@@ -272,6 +278,12 @@ Closure commonRpmConfig(boolean oss) {
272
278
return {
273
279
configure(commonPackageConfig(' rpm' , oss))
274
280
281
+ if (oss) {
282
+ license ' ASL-2.0'
283
+ } else {
284
+ license ' Elastic-License'
285
+ }
286
+
275
287
packageGroup ' Application/Internet'
276
288
requires ' /bin/bash'
277
289
@@ -281,7 +293,6 @@ Closure commonRpmConfig(boolean oss) {
281
293
release = ' 1'
282
294
arch ' NOARCH'
283
295
os ' LINUX'
284
- license ' 2009'
285
296
distribution ' Elasticsearch'
286
297
vendor ' Elasticsearch'
287
298
// TODO ospackage doesn't support icon but we used to have one
Original file line number Diff line number Diff line change 1
- Copyright 2013-2018 Elasticsearch <
[email protected] >
2
-
3
- License: Apache-2.0
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
- .
8
- http://www.apache.org/licenses/LICENSE-2.0
9
- .
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- .
16
- On Debian systems, the complete text of the Apache version 2.0 license
17
- can be found in "/usr/share/common-licenses/Apache-2.0".
1
+ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
+ Copyright: Elasticsearch B.V. <
[email protected] >
3
+ License: ${license.name}
4
+ ${license.text}
You can’t perform that action at this time.
0 commit comments