[Reproducible-commits] [dpkg] 27/40: dpkg-deb: Set correct default compression value for control.tar.gz member
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat May 30 09:52:50 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 2ae3e07e436175b8424534539c63565bb70f67f2
Author: Guillem Jover <guillem at debian.org>
Date: Mon May 25 06:00:54 2015 +0200
dpkg-deb: Set correct default compression value for control.tar.gz member
Regression introduced in commit f1f9887b8f96965d6046857d12fda24c053c6d4b.
The compressor independent way to denote the default value has been to
use -1, but that needs to be fixed up to the actual default value per
compressor, before the compressor specific setup.
When using the gzip command-line tool this is a fatal error as it does
not recognize the argument «-c-1». When using the zlib shared library
this makes the code always default to the compression level 1, as ‘-’
is ignored by gzdopen().
The current minimal fix is to call compressor_check_params() when
setting up the default control.tar compressor paramaters, although
that makes the API hard to use correctly. This will be improved in
the future.
Closes: #786654
---
debian/changelog | 4 ++++
dpkg-deb/build.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index ab13eae..2ef15d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,10 @@ dpkg (1.18.1) UNRELEASED; urgency=low
Thanks to Maximilian Schwerin <maximilian.schwerin at tigris.de>.
* Sort dpkg-scansources output by package name and version.
Thanks to Maximilian Schwerin <maximilian.schwerin at tigris.de>.
+ * Set the correct default compression value in dpkg-deb for control.tar.gz
+ member. This meant using compression level 1 when using the zlib shared
+ library to compress the control.tar member, and always failing when using
+ the gzip command. Regression introduced in dpkg 1.17.6. Closes: #786654
* Perl modules:
- Add missing strict and warnings pragmas for submodules.
- Use non-destructive substitutions inside map.
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 3a68cad..94d75ff 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -527,6 +527,8 @@ do_build(const char *const *argv)
control_compress_params.type = COMPRESSOR_TYPE_GZIP;
control_compress_params.strategy = COMPRESSOR_STRATEGY_NONE;
control_compress_params.level = -1;
+ if (!compressor_check_params(&control_compress_params, &err))
+ internerr("invalid control member compressor params: %s", err.str);
}
c2 = subproc_fork();
--
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