Skip to content

Commit

Permalink
test: update the MD5 checksums of the reproducible build tests
Browse files Browse the repository at this point in the history
As the content of the RPM file changes, due to switching the default
for file digests from MD5 to SHA-256, also the MD5 checksum of the
generated file will be different.

The reason we still use MD5 for this test is that we are not interested
in the actual checksum or algorithm, but want to ensure that the RPM
gets created in a reproducible way.

In theory it should be possible to set the file digest algorithm to MD5
and get the exact same (reproducible) file as with version 1.9. However,
we don't make any promises that the build stays reproducible between
minor version changes, and so there is no real reason to test this. The
tool version is considered part of the factors that influence the output
of the build.
  • Loading branch information
ctron committed Jan 11, 2023
1 parent 6934e28 commit 66c1559
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/it/test17-reproducible-date/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def verify() {
def result = verify()
println "Verify: " + result

def expectedMd5Sum = "129cf561ac335e8ddc80da20b27dbb5b";
def expectedMd5Sum = "93ebadf3ba02fe04ed2365cbc13c489f";
def md5sum = generateMD5(new File(basedir, "target/test17-1.0.0-0.200901011100.noarch.rpm"))
if (md5sum != expectedMd5Sum) {
System.out.format("RPM MD5 doesn't match - actual: %s, expected: %s%n", md5sum, expectedMd5Sum);
Expand Down
2 changes: 1 addition & 1 deletion src/it/test17-reproducible-epoch/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def verify() {
def result = verify()
println "Verify: " + result

def expectedMd5Sum = "03a9d0fcb6021866dd631615235846a4";
def expectedMd5Sum = "11162ad70ef55851a3e1375222cd1a4a";
def md5sum = generateMD5(new File(basedir, "target/test17-1.0.0-0.197001010000.noarch.rpm"))
if (md5sum != expectedMd5Sum) {
System.out.format("RPM MD5 doesn't match - actual: %s, expected: %s%n", md5sum, expectedMd5Sum);
Expand Down

0 comments on commit 66c1559

Please sign in to comment.