can't be rebuild in mock it seems during the %check it use perl-Time-HiRes which is not br-ed. Can't locate Time/HiRes.pm in @INC (@INC contains: /builddir/build/BUILD/Sys-Virt-0.2.4/blib/lib /builddir/build/BUILD/Sys-Virt-0.2.4/blib/arch /usr/local/li b64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at t/800-events.t line 18. BEGIN failed--compilation aborted at t/800-events.t line 18. # Looks like you planned 23 tests but ran 1. # Looks like your test exited with 2 just after 1. t/800-events.t ......... Dubious, test returned 2 (wstat 512, 0x200) Failed 22/23 subtests Test Summary Report ------------------- t/800-events.t (Wstat: 512 Tests: 1 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 23 tests but ran 1. Files=10, Tests=191, 1 wallclock secs ( 0.05 usr 0.02 sys + 0.56 cusr 0.08 csys = 0.71 CPU) Result: FAIL Failed 1/10 test programs. 0/191 subtests failed. make: *** [test_dynamic] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.smMFy5 (%check) RPM build errors: Macro % has illegal name (%define) Macro % has illegal name (%define) Bad exit status from /var/tmp/rpm-tmp.smMFy5 (%check) error: Macro % has illegal name (%define)
I can confirm this. As noted by Levente, the spec is missing the following BuilRequires: BuildRequires: perl(Time::HiRes) Once the above line is added, rpmbuild completes without an error.
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as exception or blocker. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
Reproduce it with Sys-Virt-0.2.4.el6 Verify it with perl-Sys-Virt-0.9.9-1.el6 and it passed. The steps are as follows: 1 install perl-Sys-Virt-0.9.9-1.el6.src.rpm # rpm -ivh perl-Sys-Virt-0.9.9-1.el6.src.rpm 2 check spec file: # grep Time::HiRes /${username}/rpmbuild/SPECS/perl-Sys-Virt.spec BuildRequires: perl(Time::HiRes)
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No technical notes required
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0754.html