Skip to content

Commit 116d083

Browse files
stable filemode for zip distributions (#30854)
Applies default file and directory permissions to zip distributions similar to how they're set for the tar distributions. Previously zip distributions would retain permissions they had on the build host's working tree, which could vary depending on its umask For #30799
1 parent eb2e43b commit 116d083

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

distribution/archives/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,23 @@ tasks.withType(AbstractArchiveTask) {
106106
baseName = "elasticsearch${ subdir.contains('oss') ? '-oss' : ''}"
107107
}
108108

109+
Closure commonZipConfig = {
110+
dirMode 0755
111+
fileMode 0644
112+
}
113+
109114
task buildIntegTestZip(type: Zip) {
115+
configure(commonZipConfig)
110116
with archiveFiles(transportModulesFiles, 'zip', false)
111117
}
112118

113119
task buildZip(type: Zip) {
120+
configure(commonZipConfig)
114121
with archiveFiles(modulesFiles(false), 'zip', false)
115122
}
116123

117124
task buildOssZip(type: Zip) {
125+
configure(commonZipConfig)
118126
with archiveFiles(modulesFiles(true), 'zip', true)
119127
}
120128

0 commit comments

Comments
 (0)