From a048a9d48ac802a88b686edba62954c18d8a930a Mon Sep 17 00:00:00 2001 From: Rabi Panda Date: Mon, 15 Feb 2021 10:58:03 -0800 Subject: [PATCH] Temporary fix for license check path for debian packaging. (#97) This currently unblocks the gradle check and subsequently will be removed by the meta issue https://github.com/opendistro-for-elasticsearch/search/issues/50 Signed-off-by: Peter Nied --- distribution/build.gradle | 2 +- distribution/packages/build.gradle | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/distribution/build.gradle b/distribution/build.gradle index 2bcff235eee..3f3f924e16e 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -615,7 +615,7 @@ subprojects { ], 'license.name': [ - 'deb': oss ? 'ASL-2.0' : 'Elastic-License' + 'deb': 'ASL-2.0' ], 'license.text': [ diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index f0385f19127..f599792cd08 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -494,7 +494,14 @@ subprojects { Path copyrightPath String expectedLicense String licenseFilename - copyrightPath = packageExtractionDir.toPath().resolve("usr/share/doc/elasticsearch-oss/copyright") + if (project.name.contains('oss-')) { + copyrightPath = packageExtractionDir.toPath().resolve("usr/share/doc/elasticsearch-oss/copyright") + } + // TODO - remove this block and only check for the OSS distribution + // https://github.com/opendistro-for-elasticsearch/search/issues/50 + else { + copyrightPath = packageExtractionDir.toPath().resolve("usr/share/doc/elasticsearch/copyright") + } expectedLicense = "ASL-2.0" licenseFilename = "APACHE-LICENSE-2.0.txt" final List header = Arrays.asList("Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/",