@@ -123,16 +123,27 @@ Closure commonPackageConfig(String type, boolean oss) {
123
123
from(rootProject. projectDir) {
124
124
include ' README.textile'
125
125
}
126
+ into(' lib' ) {
127
+ with copySpec {
128
+ with libFiles
129
+ // we need to specify every intermediate directory so we iterate through the parents; duplicate calls with the same part are fine
130
+ eachFile { FileCopyDetails fcp ->
131
+ String [] segments = fcp. relativePath. segments
132
+ for (int i = segments. length - 2 ; i > 0 && segments[i] != ' lib' ; -- i) {
133
+ System . out. println (segments[0 .. i])
134
+ directory(' /' + segments[0 .. i]. join(' /' ), 0755 )
135
+ }
136
+ }
137
+ }
138
+ }
126
139
into(' modules' ) {
127
140
with copySpec {
128
141
with modulesFiles(oss)
129
- // we need to specify every intermediate directory, but modules could have sub directories
130
- // and there might not be any files as direct children of intermediates (eg platform)
131
- // so we must iterate through the parents, but duplicate calls with the same path
132
- // are ok (they don't show up in the built packages)
142
+ // we need to specify every intermediate directory so we iterate through the parents; duplicate calls with the same part are fine
133
143
eachFile { FileCopyDetails fcp ->
134
144
String [] segments = fcp. relativePath. segments
135
145
for (int i = segments. length - 2 ; i > 0 && segments[i] != ' modules' ; -- i) {
146
+ System . out. println (segments[0 .. i])
136
147
directory(' /' + segments[0 .. i]. join(' /' ), 0755 )
137
148
}
138
149
}
@@ -241,8 +252,8 @@ ospackage {
241
252
signingKeyId = project. hasProperty(' signing.keyId' ) ? project. property(' signing.keyId' ) : ' D88E42B4'
242
253
signingKeyPassphrase = project. property(' signing.password' )
243
254
signingKeyRingFile = project. hasProperty(' signing.secretKeyRingFile' ) ?
244
- project. file(project. property(' signing.secretKeyRingFile' )) :
245
- new File (new File (System . getProperty(' user.home' ), ' .gnupg' ), ' secring.gpg' )
255
+ project. file(project. property(' signing.secretKeyRingFile' )) :
256
+ new File (new File (System . getProperty(' user.home' ), ' .gnupg' ), ' secring.gpg' )
246
257
}
247
258
248
259
requires(' coreutils' )
@@ -253,7 +264,6 @@ ospackage {
253
264
permissionGroup ' root'
254
265
255
266
into ' /usr/share/elasticsearch'
256
- with libFiles
257
267
with noticeFile
258
268
}
259
269
0 commit comments