From 33f1ef5cfbfc0e99c1a824f27548c4328273713d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 26 Jun 2026 12:11:21 +0200 Subject: mkwheels: pack reproducible tarball and print md5 --- mkwheels | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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" -- cgit v1.2.3