Package: devscripts Version: 2.20.3 Tags: patch X-Debbugs-Cc: Simon McVittie <s...@debian.org>
The 'debc' program reproducibly hangs when run on a .changes file of a binary build of texlive-extra. I've traced this down to an issue with IPC::Run, whose pipe function will block for data > 64 kilobytes [1]. The control file of the texlive-latex-extra binary package in sid is 75k or so, hitting this. https://github.com/toddr/IPC-Run/issues/126 I'm attaching a lightly tested patch which removes IPC::Run from the equation. However, I'm not sure if there was some reason for its use in the first place. It was introduced in #915668 with https://salsa.debian.org/debian/devscripts/-/merge_requests/93 by Simon Mcvittie. I'm copying Simon: please let me know if I'm missing something? -- Niko Tyni nt...@debian.org
>From 194ef16dc324cde02a50a9a3ecea7189bf86dd3d Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Sat, 23 May 2020 19:21:46 +0300 Subject: [PATCH] debc: Don't use IPC::Run for piping from dpkg-deb IPC::Run pipes hang for >64k of data, and a regular open is simpler anyway. See https://github.com/toddr/IPC-Run/issues/126 --- scripts/debi.pl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/debi.pl b/scripts/debi.pl index c833b1fc..d8eb824b 100755 --- a/scripts/debi.pl +++ b/scripts/debi.pl @@ -32,8 +32,6 @@ use filetest 'access'; use Cwd; use Dpkg::Control; use Dpkg::Changelog::Parse qw(changelog_parse); -use IPC::Run qw(run); -use IO::Handle; use Dpkg::IPC; my $progname = basename($0, '.pl'); # the '.pl' is for when we're debugging @@ -373,8 +371,7 @@ for (split(/\n/, $ctrl->{Files})) { if ( (($progname eq 'debi') && (/ (\S*\.deb)$/)) || (($progname eq 'debc') && (/ (\S*\.u?deb)$/))) { my $deb = $1; - my $stdout = IO::Handle->new(); - run(['dpkg-deb', '-f', $deb], '>pipe', \*$stdout); + open(my $stdout, '-|', 'dpkg-deb', '-f', $deb); my $fields = Dpkg::Control->new(name => $deb, type => CTRL_PKG_DEB); $fields->parse($stdout, $deb); my $pkg = $fields->{Package}; -- 2.26.1