From b95681f0ad831c2bacb25bd25ee220fb58f78466 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 26 Sep 2017 03:32:42 +0200 Subject: dpkg-deb: Make --uniform-compression the new default behavior Add support for negating the option via --no-uniform-compression. --- debian/changelog | 2 ++ dpkg-deb/main.c | 5 +++-- man/dpkg-deb.man | 5 ++++- t-func/deb-split.at | 13 +++++++------ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index f562a8d89..e5c715660 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,8 @@ dpkg (1.19.0) UNRELEASED; urgency=medium * Add new buildtools.mk make fragment to support build tools variable setup, for both TOOL and TOOL_FOR_BUILD variables. Not included by default from default.mk. + * Make --uniform-compression the new default dpkg-deb behavior. Add support + for negating the option via --no-uniform-compression. * Perl modules: - Switch from Dpkg::Util to List::Util, now that the module in the new required Perl contains the needed functions. diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c index 1f2143b4e..52e9ce67d 100644 --- a/dpkg-deb/main.c +++ b/dpkg-deb/main.c @@ -105,7 +105,7 @@ usage(const struct cmdinfo *cip, const char *value) " --nocheck Suppress control file check (build bad\n" " packages).\n" " --root-owner-group Forces the owner and groups to root.\n" -" --uniform-compression Use the compression params on all members.\n" +" --[no-]uniform-compression Use the compression params on all members.\n" " -z# Set the compression level when building.\n" " -Z Set the compression type used when building.\n" " Allowed types: gzip, xz, none.\n" @@ -142,7 +142,7 @@ int debugflag = 0; int nocheckflag = 0; int opt_verbose = 0; int opt_root_owner_group = 0; -int opt_uniform_compression = 0; +int opt_uniform_compression = 1; struct deb_version deb_format = DEB_VERSION(2, 0); @@ -219,6 +219,7 @@ static const struct cmdinfo cmdinfos[]= { { "nocheck", 0, 0, &nocheckflag, NULL, NULL, 1 }, { "root-owner-group", 0, 0, &opt_root_owner_group, NULL, NULL, 1 }, { "uniform-compression", 0, 0, &opt_uniform_compression, NULL, NULL, 1 }, + { "no-uniform-compression", 0, 0, &opt_uniform_compression, NULL, NULL, 0 }, { NULL, 'z', 1, NULL, NULL, set_compress_level }, { NULL, 'Z', 1, NULL, NULL, set_compress_type }, { NULL, 'S', 1, NULL, NULL, set_compress_strategy }, diff --git a/man/dpkg-deb.man b/man/dpkg-deb.man index 8471ccc33..769869b9e 100644 --- a/man/dpkg-deb.man +++ b/man/dpkg-deb.man @@ -246,13 +246,16 @@ Specify which compression type to use when building a package. Allowed values are \fBgzip\fP, \fBxz\fP (since dpkg 1.15.6), and \fBnone\fP (default is \fBxz\fP). .TP -.B \-\-uniform\-compression +.B \-\-[no\-]uniform\-compression Specify that the same compression parameters should be used for all archive members (i.e. \fBcontrol.tar\fP and \fBdata.tar\fP; since dpkg 1.17.6). Otherwise only the \fBdata.tar\fP member will use those parameters. The only supported compression types allowed to be uniformly used are \fBnone\fP, \fBgzip\fP and \fBxz\fP. +The \fB\-\-no\-uniform\-compression\fP option disables uniform compression +(since dpkg 1.19.0). +Uniform compression is the default (since dpkg 1.19.0). .TP .B \-\-root\-owner\-group Set the owner and group for each entry in the filesystem tree data to diff --git a/t-func/deb-split.at b/t-func/deb-split.at index 8ca6e2791..fe8f676a7 100644 --- a/t-func/deb-split.at +++ b/t-func/deb-split.at @@ -30,7 +30,8 @@ test -f pkg-split-part.3of3.deb ], [], [Splitting package pkg-split into 3 parts: 1 2 3 done ]) -DEB_SPLIT_MD5SUM=a4042d88f6da3da8ab2ab191a290ab66 +DEB_SPLIT_MD5SUM=c669258de88761bf90ad6621bdffd6f1 +DEB_SPLIT_LENGTH=1065152 AT_CHECK_UNQUOTED([ # Test getting information about the split parts (parsing verification) @@ -43,7 +44,7 @@ dpkg-split -I pkg-split-part.3of3.deb ... version: 0.0-1 ... architecture: all ... MD5 checksum: $DEB_SPLIT_MD5SUM - ... length: 1055178 bytes + ... length: $DEB_SPLIT_LENGTH bytes ... split every: 408576 bytes Part number: 1/3 Part length: 408576 bytes @@ -56,7 +57,7 @@ pkg-split-part.2of3.deb: ... version: 0.0-1 ... architecture: all ... MD5 checksum: $DEB_SPLIT_MD5SUM - ... length: 1055178 bytes + ... length: $DEB_SPLIT_LENGTH bytes ... split every: 408576 bytes Part number: 2/3 Part length: 408576 bytes @@ -69,12 +70,12 @@ pkg-split-part.3of3.deb: ... version: 0.0-1 ... architecture: all ... MD5 checksum: $DEB_SPLIT_MD5SUM - ... length: 1055178 bytes + ... length: $DEB_SPLIT_LENGTH bytes ... split every: 408576 bytes Part number: 3/3 - Part length: 238026 bytes + Part length: 248000 bytes Part offset: 817152 bytes - Part file size (used portion): 238230 bytes + Part file size (used portion): 248204 bytes ]) -- cgit v1.2.3