[Reproducible-commits] [dpkg] 50/90: libdpkg: Use CRC64 for xz integrity checks

Jérémy Bobbio lunar at moszumanska.debian.org
Sat Aug 29 18:26:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit 777915108d9d36d022dc4fc4151a615fc95e5032
Author: Guillem Jover <guillem at debian.org>
Date:   Tue Jun 16 01:31:10 2015 +0200

    libdpkg: Use CRC64 for xz integrity checks
    
    This is the default CRC used by the xz command-line tool, align with
    it and switch from CRC32 to CRC64. It should provide slightly better
    detection against damaged data, at a negligible speed difference.
---
 debian/changelog    | 3 +++
 lib/dpkg/compress.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index b611fd2..46b3e8e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,9 @@ dpkg (1.18.2) UNRELEASED; urgency=low
   * Use string_to_security_class() instead of a literal SECCLASS value in
     the setexecfilecon() libcompat function, as <selinux/flask.h> is now
     deprecated.
+  * Switch libdpkg xz compressor to use CRC64 for integrity checks, to match
+    the default on the command-line tool, which should provide slightly better
+    detection against damaged data, at a negligible speed difference.
   * Perl modules:
     - Remove non-functional timezone name support from
       Dpkg::Changelog::Entry::Debian.
diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c
index 22c8abb..3d8de4a 100644
--- a/lib/dpkg/compress.c
+++ b/lib/dpkg/compress.c
@@ -534,7 +534,7 @@ filter_xz_init(struct io_lzma *io, lzma_stream *s)
 	preset = io->params->level;
 	if (io->params->strategy == COMPRESSOR_STRATEGY_EXTREME)
 		preset |= LZMA_PRESET_EXTREME;
-	ret = lzma_easy_encoder(s, preset, LZMA_CHECK_CRC32);
+	ret = lzma_easy_encoder(s, preset, LZMA_CHECK_CRC64);
 	if (ret != LZMA_OK)
 		filter_lzma_error(io, ret);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list