From db48f6b69bdea860a8fa687e95bcb370a86f9984 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 11 Nov 2019 13:30:52 +0200 Subject: Resurrect our reproducable build test We used to test against explicit digest values until commit e20527ae07e0a72eb8133d3ab5c2ddef2b5d6b39 changed the rpmkeys output to drop the actual values and breaking the reproducability test - it was now only testing whether the package we just built has intact digests. Doh. And because of that, commit fa303d5ba6bef5b4a44b884c6dadadc27b594caa was able to silently break setting buildtime from changelog (#932) and why commit 4b15a9e48bd3d4bef96e8a8865044346be20d6dc didn't require adjustment of the test-suite, and why addition of the alternative payload digest in commit 83a26ae9e19fa3526b7331e824e273521c27b0a9 didn't require changing this test. Maybe something else too. Doh. Backported from commit 7cb8ebdf92f7f3d42a12afb9720e142284e71810, 4.15.x doesn't have PAYLOADDIGESTALT so the original test will fail and the digests are different too. --- tests/rpmsigdig.at | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/rpmsigdig.at b/tests/rpmsigdig.at index 99030803c..3c15221e0 100644 --- a/tests/rpmsigdig.at +++ b/tests/rpmsigdig.at @@ -136,13 +136,21 @@ runroot rpmbuild -bb --quiet \ --define "%_target_platform noarch-linux" \ --define "%_binary_payload w.ufdio" \ --define "%_buildhost localhost" \ + --define "%use_source_date_epoch_as_buildtime 1" \ --define "%source_date_epoch_from_changelog 1" \ --define "%clamp_mtime_to_source_date_epoch 1" \ /data/SPECS/attrtest.spec +for v in SHA256HEADER SHA1HEADER SIGMD5 PAYLOADDIGEST; do + runroot rpm -q --qf "${v}: %{${v}}\n" /build/RPMS/noarch/attrtest-1.0-1.noarch.rpm +done runroot rpmkeys -Kv /build/RPMS/noarch/attrtest-1.0-1.noarch.rpm ], [0], -[/build/RPMS/noarch/attrtest-1.0-1.noarch.rpm: +[SHA256HEADER: 8d150309b6988914994ad609ff8267718f23e8034affe260e6d4361a83a45a62 +SHA1HEADER: 78606c9281c44f34470d26df2caebba117b9d183 +SIGMD5: 3269c96a8e88bf4514647c570c66723b +PAYLOADDIGEST: 749d8980cc5889419da8cdbe9a5b3292742af8a227db3635f84966481b7612a8 +/build/RPMS/noarch/attrtest-1.0-1.noarch.rpm: Header SHA256 digest: OK Header SHA1 digest: OK Payload SHA256 digest: OK -- cgit v1.2.1