This is an automated email from the ASF dual-hosted git repository.
snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 75e269828 Reproducible builds: ensure unix permissions are
reproducible (#2819)
75e269828 is described below
commit 75e269828b9095a3ac6a7c440611ed68027768fe
Author: Robert Stupp <[email protected]>
AuthorDate: Thu Oct 16 17:42:58 2025 +0200
Reproducible builds: ensure unix permissions are reproducible (#2819)
Zip and tar files contain the unix file/directory permissions for the
included zip/tar entries. The "default" values for those can differ depending
on the platform those are built on. This change ensures `755` for directories
and owner/group/other=read+write for files. The "executable" bit isn't
forcefully set in case the archived file _is_ an executable.
---
build-logic/src/main/kotlin/polaris-reproducible.gradle.kts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/build-logic/src/main/kotlin/polaris-reproducible.gradle.kts
b/build-logic/src/main/kotlin/polaris-reproducible.gradle.kts
index 3b087f780..036c482f4 100644
--- a/build-logic/src/main/kotlin/polaris-reproducible.gradle.kts
+++ b/build-logic/src/main/kotlin/polaris-reproducible.gradle.kts
@@ -22,4 +22,15 @@
tasks.withType<AbstractArchiveTask>().configureEach {
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
+
+ dirPermissions { unix("755") }
+ filePermissions {
+ // do not force the "execute" bit in case the file _is_ executable
+ user.read = true
+ user.write = true
+ group.read = true
+ group.write = false
+ other.read = true
+ other.write = false
+ }
}