Bug 1220213

Summary: Perl packages on obs fail very often fail building with "Broken Pipe" error at the very end
Product: [openSUSE] openSUSE Tumbleweed Reporter: Dominik Heidler <dheidler>
Component: OtherAssignee: E-mail List <screening-team-bugs>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: bwiedemann, lars.vogdt, mls, opensuse, tina.mueller
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://progress.opensuse.org/issues/155458
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: rpmbuild log from obs

Description Dominik Heidler 2024-02-22 14:15:36 UTC
Created attachment 872937 [details]
rpmbuild log from obs

The build seems to fail often (but not in every case) on Tumbleweed or Factory if the Test suite is not commented out.
Simplified spec with less test modules:
https://build.opensuse.org/package/show/home:dheidler:branches:devel:languages:perl/perl-Mojo-IOLoop-ReadWriteProcess

See the log in the attachment.
It also contains some debug output (e.g. process list).


This seems to happen as well in other perl packages:
https://build.opensuse.org/package/live_build_log/devel:languages:perl/perl-PDF-Builder/openSUSE_Tumbleweed/x86_64
Comment 1 Dominik Heidler 2024-02-29 16:25:13 UTC
CCing devel:languages:perl bugowner.
Comment 2 Dominik Heidler 2024-02-29 16:27:12 UTC
CCing bugowner of perl.
Comment 3 Bernhard Wiedemann 2024-03-06 12:44:36 UTC
I can also reproduce it locally
osc co openSUSE:Factory/perl-Date-Manip && cd $_
osc build --vm-type=kvm -j1 --clean --noservice --nochecks standard
echo $?


ended in
[   19s] + cp -pr /home/abuild/rpmbuild/BUILD/Date-Manip-6.94/LICENSE /home/abuild/rpmbuild/BUILDROOT/perl-Date-Manip-6.940.0-0.x86_64/usr/share/licenses/perl-Date-Manip
[   19s] + RPM_EC=0
[   19s] ++ jobs -p
[   19s] + exit 0
[   20s] Broken pipe
[   21s] [   17.354601][    T1] sysrq: Power Off
[   21s] [   17.355233][  T177] reboot: Power down
[   21s] 
[   21s] node54 failed "build perl-Date-Manip.spec" at Wed Mar  6 12:13:51 UTC 2024.
[   21s] 

Build failed with exit code 1
The buildroot was: /var/tmp/build-root-root/standard-x86_64/.mount

Cleaning the build root may fix the problem or allow you to start debugging from a well-defined state:
  - add '--clean' option to your 'osc build' command
  - run 'osc wipe [--vm-type=...]' prior running your 'osc build' command again
1
Comment 4 Michael Schröder 2024-03-06 13:16:20 UTC
This is most likely caused by a bad dependency generator script.
Comment 5 Michael Schröder 2024-03-06 13:42:37 UTC
Argh, are you kidding me? Why does the spec file contain

%define         __perllib_provides /bin/true

That's not how it works. The provide generator needs to read the file list from stdin, it must not simply exit.

%undefine the generator if you really must do something like that.

Anyway, not a bug in perl, not a bug in rpm, just a bug with your package. Closing.
Comment 7 Dirk Stoecker 2024-03-06 14:32:02 UTC
%define         __perllib_provides /bin/true

That's because the current perllib-provides generates old-incompatible versions. And as there was no way to fix the rpm package to allow the new style, this is the workaround we're using since approx one year to handle that.

Yesterday we got progress in the rpm updating (Tinita and I are now responsible for the perl provides script as a RPM subpackage in RPM Upstream), so we can go on with getting rpm package to support new conflict free version method and afterwards drop the old-style and workaround stuff.

I'm pretty sure Tinita tried all possible variants and the above was the only working solution to disable the perl-provides.

Anyway if that statement is the reason then it will vanish when the workaround vanishs. Thought we're building hundreds of packages with that statement for approx a year now and have no real issues.
Comment 8 Tina Müller 2024-03-06 15:02:03 UTC
Sorry, that was my fault. We are currently generating the spec files with a cpanspec version in a branch (related to https://github.com/openSUSE/cpanspec/issues/47 ), where we generate the normalized perl versions, and add our own Provides lines because we still have to update the perl.prov script and then wait until it has landed in Factory.

I will fix all packages in d:l:p. The %undefine seems to work, thanks!