On 2024-12-30, Johannes Schauer Marin Rodrigues wrote:
> I found a different solution. I was wondering how GNU tar does it and perused
> its source code a bit. And then I just copied their solution. :)
>
> If you like, can you try this patch:
>
> --- /usr/share/perl5/Sbuild/ChrootUnshare.pm
> +++ /usr/share/perl5/Sbuild/ChrootUnshare.pm
> @@ -533,14 +533,15 @@ sub begin_session {
> my $pid_decompress = fork();
> if ($pid_decompress == 0) {
> open(STDOUT, '>&', $decompress_writer);
> + open(STDIN, '<', $tarball);
> close $filter_reader;
> close $tar_reader;
> close $filter_writer;
> if ($self->get_conf('DEBUG')) {
> printf STDERR (
> - "running $decompress[0] --decompress --stdout
> $tarball\n");
> + "running $decompress[0] --decompress --stdout\n");
> }
> - exec @decompress, $tarball;
> + exec @decompress;
> }
> my $pid_filter = fork();
> if ($pid_filter == 0) {
>
> Essentially, we do not pass a path to zstd anymore but we let sbuild open the
> path and then pass the filedescriptor to what we opened to zstd via its
> standard input.Patch works for me, thanks! live well, vagrant
signature.asc
Description: PGP signature

