Skip to content

Conversation

@snazy
Copy link
Member

@snazy snazy commented Oct 15, 2025

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.

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.
@snazy
Copy link
Member Author

snazy commented Oct 15, 2025

Noticed that the binary jar files of 1.2.0-incubating-rc1 in the staging repo are different (md5sum for example) from those built locally from the same Git commit.

The reason was the "group write" POSIX permission bit as reported by zipinfo for example for the polaris-version jar artifact:

Zip file size: 21060 bytes, number of entries: 26
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/
-rw-r--r--  2.0 unx      495 b- defN 80-Feb-01 00:00 META-INF/MANIFEST.MF
drwxrwxr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 org/
drwxrwxr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 org/apache/
drwxrwxr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 org/apache/polaris/
drwxrwxr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 org/apache/polaris/version/
-rw-rw-r--  2.0 unx     5085 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersion$PolarisVersionJarInfo.class
-rw-rw-r--  2.0 unx     1735 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersion$PolarisVersionNumber.class
-rw-rw-r--  2.0 unx      993 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersion$PolarisVersionResource.class
-rw-rw-r--  2.0 unx     4256 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersion.class
-rw-rw-r--  2.0 unx      693 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersionProvider.class
-rw-rw-r--  2.0 unx    11358 b- defN 80-Feb-01 00:00 META-INF/LICENSE
-rw-rw-r--  2.0 unx      305 b- defN 80-Feb-01 00:00 META-INF/NOTICE
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/maven/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/maven/org.apache.polaris/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/maven/org.apache.polaris/polaris-version/
-rw-rw-r--  2.0 unx      119 b- defN 80-Feb-01 00:00 META-INF/maven/org.apache.polaris/polaris-version/pom.properties
-rw-rw-r--  2.0 unx     2462 b- defN 80-Feb-01 00:00 META-INF/maven/org.apache.polaris/polaris-version/pom.xml
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/resources/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/resources/apache-polaris/
-rw-rw-r--  2.0 unx    18848 b- defN 80-Feb-01 00:00 META-INF/resources/apache-polaris/LICENSE.txt
-rw-rw-r--  2.0 unx      544 b- defN 80-Feb-01 00:00 META-INF/resources/apache-polaris/NOTICE.txt
-rw-rw-r--  2.0 unx       17 b- defN 80-Feb-01 00:00 META-INF/resources/apache-polaris/version.txt
-rw-rw-r--  2.0 unx      823 b- defN 80-Feb-01 00:00 org/apache/polaris/version/polaris-version.properties
drwxrwxr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 gradle/
drwxrwxr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 gradle/jar-licenses/
26 files, 47733 bytes uncompressed, 17228 bytes compressed:  63.9%

vs

Zip file size: 21060 bytes, number of entries: 26
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/
-rw-r--r--  2.0 unx      495 b- defN 80-Feb-01 00:00 META-INF/MANIFEST.MF
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 org/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 org/apache/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 org/apache/polaris/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 org/apache/polaris/version/
-rw-r--r--  2.0 unx     5085 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersion$PolarisVersionJarInfo.class
-rw-r--r--  2.0 unx     1735 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersion$PolarisVersionNumber.class
-rw-r--r--  2.0 unx      993 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersion$PolarisVersionResource.class
-rw-r--r--  2.0 unx     4256 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersion.class
-rw-r--r--  2.0 unx      693 b- defN 80-Feb-01 00:00 org/apache/polaris/version/PolarisVersionProvider.class
-rw-r--r--  2.0 unx    11358 b- defN 80-Feb-01 00:00 META-INF/LICENSE
-rw-r--r--  2.0 unx      305 b- defN 80-Feb-01 00:00 META-INF/NOTICE
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/maven/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/maven/org.apache.polaris/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/maven/org.apache.polaris/polaris-version/
-rw-r--r--  2.0 unx      119 b- defN 80-Feb-01 00:00 META-INF/maven/org.apache.polaris/polaris-version/pom.properties
-rw-r--r--  2.0 unx     2462 b- defN 80-Feb-01 00:00 META-INF/maven/org.apache.polaris/polaris-version/pom.xml
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/resources/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 META-INF/resources/apache-polaris/
-rw-r--r--  2.0 unx    18848 b- defN 80-Feb-01 00:00 META-INF/resources/apache-polaris/LICENSE.txt
-rw-r--r--  2.0 unx      544 b- defN 80-Feb-01 00:00 META-INF/resources/apache-polaris/NOTICE.txt
-rw-r--r--  2.0 unx       17 b- defN 80-Feb-01 00:00 META-INF/resources/apache-polaris/version.txt
-rw-r--r--  2.0 unx      823 b- defN 80-Feb-01 00:00 org/apache/polaris/version/polaris-version.properties
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 gradle/
drwxr-xr-x  2.0 unx        0 b- defN 80-Feb-01 00:00 gradle/jar-licenses/
26 files, 47733 bytes uncompressed, 17228 bytes compressed:  63.9%

The actual content (via zipcmp) however is exactly the same.

@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Oct 15, 2025
@snazy snazy merged commit 75e2698 into apache:main Oct 16, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Oct 16, 2025
@snazy snazy deleted the repro-arch-unix-perm branch October 16, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants