This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new ce4b84ea9f0 HDDS-17275. Make binary tarball archive metadata
reproducible (#11672)
ce4b84ea9f0 is described below
commit ce4b84ea9f069619ddd1c62eab88600311c4f630
Author: Siyao Meng <[email protected]>
AuthorDate: Thu Oct 22 09:22:51 2026 -0700
HDDS-17275. Make binary tarball archive metadata reproducible (#11672)
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
hadoop-ozone/dist/dev-support/bin/dist-tar-stitching | 13 +++++++++++--
hadoop-ozone/dist/pom.xml | 1 +
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/hadoop-ozone/dist/dev-support/bin/dist-tar-stitching
b/hadoop-ozone/dist/dev-support/bin/dist-tar-stitching
index c94e7d0eb6e..1b813eb59fe 100755
--- a/hadoop-ozone/dist/dev-support/bin/dist-tar-stitching
+++ b/hadoop-ozone/dist/dev-support/bin/dist-tar-stitching
@@ -21,6 +21,9 @@ VERSION=$1
# project.build.directory
BASEDIR=$2
+# project.build.outputTimestamp
+TIMESTAMP=$3
+
## @audience private
## @stability evolving
function run()
@@ -38,8 +41,14 @@ function run()
fi
}
-run tar -c -f "ozone-${VERSION}.tar" "ozone-${VERSION}"
-run gzip -f "ozone-${VERSION}.tar"
+# Reproducible archive metadata requires GNU tar (used for releases); other
tar implementations get a plain archive.
+if tar --version 2>/dev/null | grep -q 'GNU tar'; then
+ run tar --format=gnu --sort=name --mtime="${TIMESTAMP}" --owner=0 --group=0
--numeric-owner --mode=go+u,go-w \
+ -c -f "ozone-${VERSION}.tar" "ozone-${VERSION}"
+else
+ run tar -c -f "ozone-${VERSION}.tar" "ozone-${VERSION}"
+fi
+run gzip -n -f "ozone-${VERSION}.tar"
echo
echo "Ozone dist tar available at: ${BASEDIR}/ozone-${VERSION}.tar.gz"
echo
diff --git a/hadoop-ozone/dist/pom.xml b/hadoop-ozone/dist/pom.xml
index 9a0d3119f60..6aad4509573 100644
--- a/hadoop-ozone/dist/pom.xml
+++ b/hadoop-ozone/dist/pom.xml
@@ -406,6 +406,7 @@
<argument>${basedir}/dev-support/bin/dist-tar-stitching</argument>
<argument>${hdds.version}</argument>
<argument>${project.build.directory}</argument>
+ <argument>${project.build.outputTimestamp}</argument>
</arguments>
</configuration>
</execution>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]