@@ -124,13 +124,23 @@ Closure commonPackageConfig(String type, boolean oss) {
124124 include ' README.textile'
125125 fileMode 0644
126126 }
127+ into(' lib' ) {
128+ with copySpec {
129+ with libFiles
130+ // we need to specify every intermediate directory so we iterate through the parents; duplicate calls with the same part are fine
131+ eachFile { FileCopyDetails fcp ->
132+ String [] segments = fcp. relativePath. segments
133+ for (int i = segments. length - 2 ; i > 0 && segments[i] != ' lib' ; -- i) {
134+ directory(' /' + segments[0 .. i]. join(' /' ), 0755 )
135+ }
136+ fcp. mode = 0644
137+ }
138+ }
139+ }
127140 into(' modules' ) {
128141 with copySpec {
129142 with modulesFiles(oss)
130- // we need to specify every intermediate directory, but modules could have sub directories
131- // and there might not be any files as direct children of intermediates (eg platform)
132- // so we must iterate through the parents, but duplicate calls with the same path
133- // are ok (they don't show up in the built packages)
143+ // we need to specify every intermediate directory so we iterate through the parents; duplicate calls with the same part are fine
134144 eachFile { FileCopyDetails fcp ->
135145 String [] segments = fcp. relativePath. segments
136146 for (int i = segments. length - 2 ; i > 0 && segments[i] != ' modules' ; -- i) {
@@ -251,8 +261,8 @@ ospackage {
251261 signingKeyId = project. hasProperty(' signing.keyId' ) ? project. property(' signing.keyId' ) : ' D88E42B4'
252262 signingKeyPassphrase = project. property(' signing.password' )
253263 signingKeyRingFile = project. hasProperty(' signing.secretKeyRingFile' ) ?
254- project. file(project. property(' signing.secretKeyRingFile' )) :
255- new File (new File (System . getProperty(' user.home' ), ' .gnupg' ), ' secring.gpg' )
264+ project. file(project. property(' signing.secretKeyRingFile' )) :
265+ new File (new File (System . getProperty(' user.home' ), ' .gnupg' ), ' secring.gpg' )
256266 }
257267
258268 requires(' coreutils' )
@@ -263,7 +273,6 @@ ospackage {
263273 permissionGroup ' root'
264274
265275 into ' /usr/share/elasticsearch'
266- with libFiles
267276 with noticeFile
268277}
269278
0 commit comments