[Git][reproducible-builds/strip-nondeterminism][master] Ignore encrypted .zip files as we can never normalise them. (Closes: #852207)

Chris Lamb gitlab at salsa.debian.org
Sun Nov 25 18:13:56 CET 2018


Chris Lamb pushed to branch master at Reproducible Builds / strip-nondeterminism


Commits:
43d93c71 by Chris Lamb at 2018-11-25T17:13:36Z
Ignore encrypted .zip files as we can never normalise them. (Closes: #852207)

- - - - -


3 changed files:

- lib/File/StripNondeterminism/handlers/zip.pm
- + t/fixtures/zip/encrypted.zip.in
- + t/fixtures/zip/encrypted.zip.out


Changes:

=====================================
lib/File/StripNondeterminism/handlers/zip.pm
=====================================
@@ -197,6 +197,10 @@ sub normalize {
 	my @filenames = sort $filename_cmp $zip->memberNames();
 	for my $filename (@filenames) {
 		my $member = $zip->removeMember($filename);
+		if ($member->isEncrypted()) {
+			warn "strip-nondeterminism: $zip_filename: ignoring encrypted zip file\n";
+			return 0;
+		}
 		$zip->addMember($member);
 		# member_normalizer returns the timestamp to use.
 		my $timestamp = exists $options{member_normalizer}


=====================================
t/fixtures/zip/encrypted.zip.in
=====================================
Binary files /dev/null and b/t/fixtures/zip/encrypted.zip.in differ


=====================================
t/fixtures/zip/encrypted.zip.out
=====================================
@@ -0,0 +1 @@
+encrypted.zip.in
\ No newline at end of file



View it on GitLab: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/commit/43d93c718f205310c647f03ab3b89e768e03977e

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/strip-nondeterminism/commit/43d93c718f205310c647f03ab3b89e768e03977e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20181125/b88f6654/attachment.html>


More information about the rb-commits mailing list