|
@@ -51,16 +51,8 @@ import java.util.regex.Pattern
|
|
|
* dpkg -c path/to/elasticsearch.deb
|
|
|
*/
|
|
|
|
|
|
-buildscript {
|
|
|
- repositories {
|
|
|
- maven {
|
|
|
- name "gradle-plugins"
|
|
|
- url "https://plugins.gradle.org/m2/"
|
|
|
- }
|
|
|
- }
|
|
|
- dependencies {
|
|
|
- classpath 'com.netflix.nebula:gradle-ospackage-plugin:4.7.1'
|
|
|
- }
|
|
|
+plugins {
|
|
|
+ id "nebula.ospackage-base" version "8.0.3"
|
|
|
}
|
|
|
|
|
|
void addProcessFilesTask(String type, boolean oss, boolean jdk) {
|
|
@@ -115,10 +107,12 @@ Closure commonPackageConfig(String type, boolean oss, boolean jdk) {
|
|
|
arch(type == 'deb' ? 'amd64' : 'X86_64')
|
|
|
// Follow elasticsearch's file naming convention
|
|
|
String jdkString = jdk ? "" : "no-jdk-"
|
|
|
- archiveName "${packageName}-${project.version}-${jdkString}${archString}.${type}"
|
|
|
-
|
|
|
String prefix = "${oss ? 'oss-' : ''}${jdk ? '' : 'no-jdk-'}${type}"
|
|
|
destinationDir = file("${prefix}/build/distributions")
|
|
|
+
|
|
|
+ // SystemPackagingTask overrides default archive task convention mappings, but doesn't provide a setter so we have to override the convention mapping itself
|
|
|
+ conventionMapping.archiveFile = { objects.fileProperty().fileValue(file("${destinationDir}/${packageName}-${project.version}-${jdkString}${archString}.${type}")) }
|
|
|
+
|
|
|
String packagingFiles = "build/packaging/${oss ? 'oss-' : ''}${jdk ? '' : 'no-jdk-'}${type}"
|
|
|
|
|
|
String scripts = "${packagingFiles}/scripts"
|
|
@@ -157,7 +151,9 @@ Closure commonPackageConfig(String type, boolean oss, boolean jdk) {
|
|
|
eachFile { FileCopyDetails fcp ->
|
|
|
String[] segments = fcp.relativePath.segments
|
|
|
for (int i = segments.length - 2; i > 2; --i) {
|
|
|
- directory('/' + segments[0..i].join('/'), 0755)
|
|
|
+ if (type == 'rpm') {
|
|
|
+ directory('/' + segments[0..i].join('/'), 0755)
|
|
|
+ }
|
|
|
if (segments[-2] == 'bin' || segments[-1] == 'jspawnhelper') {
|
|
|
fcp.mode = 0755
|
|
|
} else {
|