public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-lxml] rawhide: Make get-lxml-source.sh reproducible and non-interactive
Date: Thu, 19 Nov 2026 13:02:47 GMT	[thread overview]
Message-ID: <179509336700.1.11559124375713336618.rpms-python-lxml-a7933c489f2c@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-lxml
            Branch : rawhide
            Commit : a7933c489f2cc02c6fc09e3e367cd5e18e09fa3f
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2026-11-16T12:29:27+01:00
            Stats  : +29/-84 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-lxml/c/a7933c489f2cc02c6fc09e3e367cd5e18e09fa3f?branch=rawhide

            Log:
            Make get-lxml-source.sh reproducible and non-interactive

gzip was embedding a compression timestamp, so re-running the script
produced a different tarball every time. Add -n to strip it.

Decompress the downloaded tarball to a separate file instead of in
place, so a rerun reuses the download and a leftover file from a
prior run doesn't trigger an interactive prompt. Remove the
intermediate tar afterwards.

Update sources to match, replace the per-version .gitignore entries
with globs, and add a tmt plan that checks the script reproduces the
hash recorded in sources.

[skip changelog]

Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
Assisted-By: Claude Sonnet 5

---
diff --git a/.gitignore b/.gitignore
index 9d65821..c6c65fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,80 +1,2 @@
-lxml-2.2.7.tar.gz
-lxml-2.2.7.tar.gz.asc
-/lxml-2.2.8.tar.gz
-/lxml-2.2.8.tar.gz.asc
-/lxml-2.3.tar.gz
-/lxml-2.3.tar.gz.asc
-/lxml-2.3.1.tar.gz
-/lxml-2.3.1.tar.gz.asc
-/lxml-2.3.2.tar.gz
-/lxml-2.3.2.tar.gz.asc
-/lxml-2.3.3.tar.gz
-/lxml-2.3.3.tar.gz.asc
-/lxml-2.3.5.tar.gz
-/lxml-2.3.5.tar.gz.asc
-/lxml-3.0.tar.gz
-/lxml-3.0.tar.gz.asc
-/lxml-3.0.tgz
-/lxml-3.0.tgz.asc
-/lxml-3.0.1.tgz
-/lxml-3.0.1.tgz.asc
-/lxml-3.1.0.tgz
-/lxml-3.1.0.tgz.asc
-/lxml-3.2.0.tgz
-/lxml-3.2.0.tgz.asc
-/lxml-3.2.1.tgz
-/lxml-3.2.1.tgz.asc
-/lxml-3.2.3.tgz
-/lxml-3.2.3.tgz.asc
-/lxml-3.2.4.tgz
-/lxml-3.2.4.tgz.asc
-/lxml-3.3.0.tgz
-/lxml-3.3.0.tgz.asc
-/lxml-3.3.2.tgz
-/lxml-3.3.2.tgz.asc
-/lxml-3.3.3.tgz
-/lxml-3.3.3.tgz.asc
-/lxml-3.3.5.tgz
-/lxml-3.3.5.tgz.asc
-/lxml-3.3.6.tgz
-/lxml-3.3.6.tgz.asc
-/lxml-3.4.4.tgz
-/lxml-3.4.4.tgz.asc
-/lxml-3.6.4.tar.gz
-/lxml-3.7.0.tar.gz
-/lxml-3.7.1.tgz
-/lxml-3.7.2.tgz
-/lxml-3.8.0.tgz
-/lxml-4.0.0.tgz
-/lxml-4.1.1.tgz
-/lxml-4.2.1.tgz
-/lxml-4.2.3.tgz
-/lxml-4.2.4.tgz
-/lxml-4.2.5.tgz
-/lxml-4.4.0.tgz
-/lxml-4.4.1.tgz
-/lxml-4.5.1.tgz
-/lxml-4.6.2.tar.gz
-/lxml-4.6.3.tar.gz
-/lxml-4.7.1.tar.gz
-/lxml-4.9.1.tar.gz
-/lxml-4.9.2.tar.gz
-/lxml-4.9.2-no-isoschematron.tar.gz
-/lxml-4.9.2-no-isoschematron-rng.tar.gz
-/lxml-4.9.3-no-isoschematron-rng.tar.gz
-/lxml-4.9.4-no-isoschematron-rng.tar.gz
-/lxml-5.1.0-no-isoschematron-rng.tar.gz
-/lxml-5.2.0-no-isoschematron-rng.tar.gz
-/lxml-5.2.1-no-isoschematron-rng.tar.gz
-/lxml-5.3.0-no-isoschematron-rng.tar.gz
-/lxml-5.3.1-no-isoschematron-rng.tar.gz
-/lxml-5.3.2-no-isoschematron-rng.tar.gz
-/lxml-5.4.0-no-isoschematron-rng.tar.gz
-/lxml-6.0.0-no-isoschematron-rng.tar.gz
-/lxml-6.0.1-no-isoschematron-rng.tar.gz
-/lxml-6.0.2-no-isoschematron-rng.tar.gz
-/lxml-6.0.3-no-isoschematron-rng.tar.gz
-/lxml-6.0.4-no-isoschematron-rng.tar.gz
-/lxml-6.1.0-no-isoschematron-rng.tar.gz
-/lxml-6.1.1-no-isoschematron-rng.tar.gz
-/lxml-6.1.2-no-isoschematron-rng.tar.gz
+/lxml-*.tar
+/lxml-*.tar.gz

diff --git a/get-lxml-source.sh b/get-lxml-source.sh
index ae069f1..d0bfd3a 100755
--- a/get-lxml-source.sh
+++ b/get-lxml-source.sh
@@ -23,6 +23,7 @@ deleted_directory=lxml-${version}/src/lxml/isoschematron/resources/rng
 
 # tar --delete does not operate on compressed archives, so do
 # gz decompression explicitly
-gzip --decompress ${orig_archive}
-tar -v --delete -f ${orig_archive//.gz} ${deleted_directory}
-gzip -cf ${orig_archive//.gz} > ${new_archive}
+gzip --decompress --stdout ${orig_archive} > ${orig_archive%.gz}
+tar -v --delete -f ${orig_archive%.gz} ${deleted_directory}
+gzip -nc ${orig_archive%.gz} > ${new_archive}
+rm ${orig_archive%.gz}

diff --git a/plans/reproducible-source.fmf b/plans/reproducible-source.fmf
new file mode 100644
index 0000000..62c6bea
--- /dev/null
+++ b/plans/reproducible-source.fmf
@@ -0,0 +1,22 @@
+summary: Verify get-lxml-source.sh is reproducible
+discover:
+  how: shell
+  tests:
+    - name: /reproducible-source
+      test: |
+        set -eux
+        version=$(sed -nE 's/^SHA512 \(lxml-(.*)-no-isoschematron-rng\.tar\.gz\) = .*/\1/p' sources)
+        ./get-lxml-source.sh "$version"
+        sha512sum -c sources
+execute:
+  how: tmt
+prepare:
+  - name: Install dependencies
+    how: install
+    package:
+    - bash
+    - coreutils
+    - gzip
+    - sed
+    - tar
+    - wget

diff --git a/sources b/sources
index bb24e2e..97b20c3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (lxml-6.1.2-no-isoschematron-rng.tar.gz) = 9df081e95250a11a8251b2231ab645d528d508c0ceb441a9ad9fa01c4a5f99f7ec6cf2dbcacc7bde6d7def6d31e98f63f5e043a6f8276b7a7dc7f3ea14a3b721
+SHA512 (lxml-6.1.2-no-isoschematron-rng.tar.gz) = cb2b2841c60425b7cf34b09309d38ef9e8eb5c11a358c11e3017bcd0d27cad2ba261c9091cb0e8a9c4fb6d7f6569fd34b9eb10d6e29db042be27491b28b5a7f4

                 reply	other threads:[~2026-11-19 13:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179509336700.1.11559124375713336618.rpms-python-lxml-a7933c489f2c@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox