aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-06-26 12:11:21 +0200
committerDanilo M. <danix@danix.xyz>2026-06-26 12:11:21 +0200
commit33f1ef5cfbfc0e99c1a824f27548c4328273713d (patch)
tree89708dbf8eddf779df3f601a1f739bce9aef2a82
parentabdf0ca54a5cda0b1a8731fb009968e1213349ec (diff)
downloadmkwheels-33f1ef5cfbfc0e99c1a824f27548c4328273713d.tar.gz
mkwheels-33f1ef5cfbfc0e99c1a824f27548c4328273713d.zip
mkwheels: pack reproducible tarball and print md5
-rwxr-xr-xmkwheels21
1 files changed, 21 insertions, 0 deletions
diff --git a/mkwheels b/mkwheels
index 6e14e84..bc14696 100755
--- a/mkwheels
+++ b/mkwheels
@@ -105,3 +105,24 @@ for f in "$wheels"/*; do
printf '%s==%s --hash=sha256:%s\n' "$name" "$version" "$hash" >> "$req"
done
sort -o "$req" "$req"
+
+mkdir -p "$OUTPUT"
+tarball="$OUTPUT/$pkg-wheels-$ver.tar.gz"
+
+# Reproducible archive: sorted entries, normalized ownership/mtime, gzip -n.
+# Run from $work so the archive holds a top-level 'wheels/' dir.
+( cd "$work" \
+ && find wheels -print0 | LC_ALL=C sort -z \
+ | tar --no-recursion --null --files-from=- \
+ --mtime="@$SOURCE_DATE_EPOCH" \
+ --owner=0 --group=0 --numeric-owner \
+ -cf - \
+ | gzip -n > "$tarball" )
+
+cp "$work/requirements.txt" "$OUTPUT/requirements.txt"
+
+md5=$(md5sum "$tarball" | cut -d' ' -f1)
+echo "wheels tarball: $tarball"
+echo "requirements: $OUTPUT/requirements.txt"
+echo "epoch: $SOURCE_DATE_EPOCH"
+echo "md5sum: $md5"