Bug#710520: apt: New /usr/lib/apt/methods/bzip2 (gzip) now incompatible with pbzip2

2013-06-09 Thread David Kalnischkies
Control: reassign -1 bzip2
Control: forcemerge 688303 -1
Control: affects -1 apt

On Fri, May 31, 2013 at 4:45 PM, Mike Ashton m...@moo.com wrote:
 In squeeze /usr/lib/apt/methods/bzip2 was an independent binary, but

In lenny, we had a gzip binary and a link from bzip2 to gzip – all the
binary did was calling an external program (gzip, bzip2, xz, …).
With squeeze we introduced zlib-support, so the old gzip binary was renamed
to bzip2 and the gzip binary used our FileFd (party hiding zlib).
With wheezy FileFd got libbz2-support (required by dpkg while the binary
 isn't available always, but needed for e.g. Translation-* files) and our
FileFd hides the crazyiness of compressed or uncompressed files and if we
use a library or call out to an external (de)compressor completely.


Current implementation stands and falls with (as the name might already
suggests) on file-level operations. zlib supports it (of course), bz2
has kinda support for it (which is good enough for dpkg, so it should be
good enough for us™) and xz (which is the obvious next step) seems to have
no support (but I will worry about that later I guess).


 The binary must read *all* the data, not just the first stream.

Then, that must should be enforced for the benefit of everyone [0] by
implementing it in the library for the file-level API rather than asking
each and every binary to use a handbaked stream-level to file-level layer.

[0] http://codesearch.debian.net/search?q=BZ2_bzread

Hence, reassigning and merging with the previous report.


Best regards

David Kalnischkies


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#710520: apt: New /usr/lib/apt/methods/bzip2 (gzip) now incompatible with pbzip2

2013-05-31 Thread Mike Ashton
Package: apt
Version: 0.9.7.8
Severity: normal

Hi there,

In squeeze /usr/lib/apt/methods/bzip2 was an independent binary, but
in wheezy it has become a symlink to the gzip method binary which now
appears to attempt to cope with various compression methods.
Unfortunately, this implementation is incompatible with the output of
pbzip2 (a valid .bz2 file), whereas the old one wasn't.  This
generally happens because the decompressor assumes that all the data
is in a single stream.  The format of bz2 files means that a
concatination of output files should be equal to the output of the
concatination of input file (i.e. cat *.bz2|bzcat === bzcat *.bz2).
The binary must read *all* the data, not just the first stream.

As .gz also has the same semantics and based on how I reckon pigz
will work, I suspect (I haven't tested, sorry) that the gzip module
may also be incompatible with pigz if the gzip reading logic is the
same.

Thanks for all your hard work, as ever.

-- Package-specific info:

-- apt-config dump --

APT ;
APT::Architecture amd64;
APT::Build-Essential ;
APT::Build-Essential:: build-essential;
APT::Install-Recommends 1;
APT::Install-Suggests 0;
APT::Authentication ;
APT::Authentication::TrustCDROM true;
APT::NeverAutoRemove ;
APT::NeverAutoRemove:: ^firmware-linux.*;
APT::NeverAutoRemove:: ^linux-firmware$;
APT::NeverAutoRemove:: ^linux-image.*;
APT::NeverAutoRemove:: ^kfreebsd-image.*;
APT::NeverAutoRemove:: ^linux-restricted-modules.*;
APT::NeverAutoRemove:: ^linux-ubuntu-modules-.*;
APT::NeverAutoRemove:: ^gnumach$;
APT::NeverAutoRemove:: ^gnumach-image.*;
APT::Never-MarkAuto-Sections ;
APT::Never-MarkAuto-Sections:: metapackages;
APT::Never-MarkAuto-Sections:: restricted/metapackages;
APT::Never-MarkAuto-Sections:: universe/metapackages;
APT::Never-MarkAuto-Sections:: multiverse/metapackages;
APT::Never-MarkAuto-Sections:: oldlibs;
APT::Never-MarkAuto-Sections:: restricted/oldlibs;
APT::Never-MarkAuto-Sections:: universe/oldlibs;
APT::Never-MarkAuto-Sections:: multiverse/oldlibs;
APT::Architectures ;
APT::Architectures:: amd64;
APT::Compressor ;
APT::Compressor::. ;
APT::Compressor::.::Name .;
APT::Compressor::.::Extension ;
APT::Compressor::.::Binary ;
APT::Compressor::.::Cost 1;
APT::Compressor::gzip ;
APT::Compressor::gzip::Name gzip;
APT::Compressor::gzip::Extension .gz;
APT::Compressor::gzip::Binary gzip;
APT::Compressor::gzip::Cost 2;
APT::Compressor::gzip::CompressArg ;
APT::Compressor::gzip::CompressArg:: -9n;
APT::Compressor::gzip::UncompressArg ;
APT::Compressor::gzip::UncompressArg:: -d;
APT::Compressor::bzip2 ;
APT::Compressor::bzip2::Name bzip2;
APT::Compressor::bzip2::Extension .bz2;
APT::Compressor::bzip2::Binary bzip2;
APT::Compressor::bzip2::Cost 3;
APT::Compressor::bzip2::CompressArg ;
APT::Compressor::bzip2::CompressArg:: -9;
APT::Compressor::bzip2::UncompressArg ;
APT::Compressor::bzip2::UncompressArg:: -d;
APT::Compressor::xz ;
APT::Compressor::xz::Name xz;
APT::Compressor::xz::Extension .xz;
APT::Compressor::xz::Binary xz;
APT::Compressor::xz::Cost 4;
APT::Compressor::xz::CompressArg ;
APT::Compressor::xz::CompressArg:: -6;
APT::Compressor::xz::UncompressArg ;
APT::Compressor::xz::UncompressArg:: -d;
APT::Compressor::lzma ;
APT::Compressor::lzma::Name lzma;
APT::Compressor::lzma::Extension .lzma;
APT::Compressor::lzma::Binary xz;
APT::Compressor::lzma::Cost 5;
APT::Compressor::lzma::CompressArg ;
APT::Compressor::lzma::CompressArg:: --format=lzma;
APT::Compressor::lzma::CompressArg:: -9;
APT::Compressor::lzma::UncompressArg ;
APT::Compressor::lzma::UncompressArg:: --format=lzma;
APT::Compressor::lzma::UncompressArg:: -d;
APT::CompressorName ;
APT::CompressorExtension .;
APT::CompressorBinary ;
APT::CompressorCost 100;
APT::CompressorCompressArg ;
APT::CompressorCompressArg:: -9;
APT::CompressorUncompressArg ;
APT::CompressorUncompressArg:: -d;
Dir /;
Dir::State var/lib/apt/;
Dir::State::lists lists/;
Dir::State::cdroms cdroms.list;
Dir::State::mirrors mirrors/;
Dir::State::extended_states extended_states;
Dir::State::status /var/lib/dpkg/status;
Dir::Cache var/cache/apt/;
Dir::Cache::archives archives/;
Dir::Cache::srcpkgcache srcpkgcache.bin;
Dir::Cache::pkgcache pkgcache.bin;
Dir::Etc etc/apt/;
Dir::Etc::sourcelist sources.list;
Dir::Etc::sourceparts sources.list.d;
Dir::Etc::vendorlist vendors.list;
Dir::Etc::vendorparts vendors.list.d;
Dir::Etc::main apt.conf;
Dir::Etc::netrc auth.conf;
Dir::Etc::parts apt.conf.d;
Dir::Etc::preferences preferences;
Dir::Etc::preferencesparts preferences.d;
Dir::Etc::trusted trusted.gpg;
Dir::Etc::trustedparts trusted.gpg.d;
Dir::Bin ;
Dir::Bin::methods /usr/lib/apt/methods;
Dir::Bin::solvers ;
Dir::Bin::solvers:: /usr/lib/apt/solvers;
Dir::Bin::dpkg /usr/bin/dpkg;
Dir::Bin::bzip2 /bin/bzip2;
Dir::Bin::xz /usr/bin/xz;
Dir::Media ;
Dir::Media::MountPath /media/cdrom;
Dir::Log var/log/apt;
Dir::Log::Terminal term.log;
Dir::Log::History history.log;
Dir::Ignore-Files-Silently ;
Dir::Ignore-Files-Silently:: ~$;