diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-26 12:11:21 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-26 12:11:21 +0200 |
| commit | 33f1ef5cfbfc0e99c1a824f27548c4328273713d (patch) | |
| tree | 89708dbf8eddf779df3f601a1f739bce9aef2a82 | |
| parent | abdf0ca54a5cda0b1a8731fb009968e1213349ec (diff) | |
| download | mkwheels-33f1ef5cfbfc0e99c1a824f27548c4328273713d.tar.gz mkwheels-33f1ef5cfbfc0e99c1a824f27548c4328273713d.zip | |
mkwheels: pack reproducible tarball and print md5
| -rwxr-xr-x | mkwheels | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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" |
