PaulHowarth/Blog/2009-09-02

Wednesday 2nd September 2009

Local Packages

  • Updated grepmail to 5.3034

  • Updated perl-BerkeleyDB to improve the requires/provides filtering

After building my perl-Mail-Mbox-MessageParser package yesterday, I tested it by building grepmail. I couldn't get the latest version (5.3034) to build, firstly because it fails to build unless Module::AutoInstall is present:

$ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor --default
Can't locate Module/AutoInstall.pm in @INC (@INC contains: inc lib
/usr/local/lib64/perl5/site_perl/5.10.0/x86_64-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.10.0
/usr/lib64/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl .) at inc/Module/Install/CheckOptional.pm line 8.
BEGIN failed--compilation aborted at inc/Module/Install/CheckOptional.pm line 8.
Compilation failed in require at inc/Module/Install.pm line 283.
Warning: prerequisite Benchmark::Timer 0 not found.
Warning: prerequisite Benchmark::Timer is required for speed tests
  0 not found.
Warning: prerequisite Date::Manip allows you to use complex date patterns for the -d option
  0 not found.
Warning: prerequisite Digest::MD5 reduces memory consumption for the -u (unique) option
  0 not found.
Checking if your kit is complete...
Looks good
Undefined subroutine &Module::AutoInstall::postamble called at Makefile.PL line 29.

I got past this by adding AutoInstall.pm from the Module::Install 0.91 distribution into inc/Module/; the Makefile.PL then ran OK:

$ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor --default
***************************************************************************
NOTE: The optional module Benchmark::Timer (version 0) is not installed.
Benchmark::Timer is required for speed tests
Checking if your kit is complete...
Looks good
Writing Makefile for grepmail
+ /usr/bin/make -j3
cp grepmail blib/script/grepmail
/usr/bin/perl "-Iinc" "-MExtUtils::MY" -e "MY->fixin(shift)"
blib/script/grepmail
Manifying blib/man1/grepmail.1

So I raised upstream issue 1 about this issue, which clearly affected lots of CPAN testers too.

The next problem was the test suite; two of the tests failed:

$ /usr/bin/make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/append_header.t ........... ok
t/auto_search.t ............. ok
t/body.t .................... ok
t/cache.t ................... ok
t/complex_expression.t ...... ok
t/count.t ................... ok
t/date.t .................... ok
t/date_manip.t .............. ok
t/header.t .................. ok
t/help.t .................... ok
t/ignore_signatures.t ....... ok
t/invalid_date.t ............ ok
t/invalid_mailbox.t ......... ok
t/line_number.t ............. ok
t/list.t .................... ok
t/match_compressed.t ........ ok
t/match_headers.t ........... ok
t/match_words.t ............. ok
#   Failed test 'Did not encounter an error executing the test when one was
expected.
#
# '
#   at t/nonexistent_mailbox.t line 102.
#   Failed test 'Did not encounter an error executing the test when one was
expected.
#
# '
#   at t/nonexistent_mailbox.t line 102.
# Looks like you planned 8 tests but ran 6.
# Looks like you failed 2 tests of 6 run.
t/nonexistent_mailbox.t .....
Dubious, test returned 2 (wstat 512, 0x200)
Failed 4/8 subtests
t/not_match_compressed.t .... ok
t/not_match_uncompressed.t .. ok
t/pattern_file.t ............ ok
t/pipe_compressed.t ......... ok
t/pipe_uncompressed.t ....... ok
t/received_date.t ........... ok
#   Failed test 't/temp/recursive_recursive2.stdout compared to
t/results/recursive2'
#   at t/recursive.t line 120.
#     Structures begin differing at:
#          $got->[103] = Does not exist
#     $expected->[103] = 'From dakott@alpha.delta.edu  Thu Jan  1 05:56:53 1998
#     '
# Looks like you failed 1 test of 8.
t/recursive.t ...............
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests
t/size.t .................... ok
t/status.t .................. ok
t/unique.t .................. ok
Test Summary Report
-------------------
t/nonexistent_mailbox.t   (Wstat: 512 Tests: 6 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 8 tests but ran 6.
t/recursive.t             (Wstat: 256 Tests: 8 Failed: 1)
  Failed test:  7
  Non-zero exit status: 1
Files=29, Tests=255, 27 wallclock secs ( 0.25 usr  0.12 sys + 21.24 cusr 
5.36 csys = 26.97 CPU)
Result: FAIL
Failed 2/29 test programs. 3/255 subtests failed.

Now I believe that the nonexistent_mailbox.t failures are due to a change in Mail::Mbox::MessageParser's handling of empty mailboxes and can hence be expected (reverting Mail::Mbox::MessageParser back to version 1.5000 made that problem go away). So I added this patch to skip the affected tests if we're using Mail::Mbox::MessageParser >= 1.5002:

--- grepmail-5.3034/t/nonexistent_mailbox.t     2009-09-02 11:51:28.000000000 +0100
+++ grepmail-5.3034/t/nonexistent_mailbox.t     2009-09-02 13:37:09.000000000 +0100
@@ -149,6 +149,15 @@
 
   my %skip;
 
+  $skip{"$^X -MExtUtils::Command -e cat no_such_file 2>" . devnull() .
+        " | grepmail pattern"} = 'inappropriate for Mail::Mbox::MessageParser >= 1.5002'
+        if $Mail::Mbox::MessageParser::VERSION >= 1.5002;
+
+  $skip{"$^X -MExtUtils::Command -e cat no_such_file 2>" . devnull() .
+        " | grepmail -E $single_quote\$email =~ /pattern/$single_quote"} =
+        'inappropriate for Mail::Mbox::MessageParser >= 1.5002'
+        if $Mail::Mbox::MessageParser::VERSION >= 1.5002;
+
   return %skip;
 }

The recursive.t failure was even stranger because the failure here appears to be due to a change in this test from version 5.3033 that was supposed to fix a test failure, and reverting that change with the patch below made the test pass:

--- grepmail-5.3034/t/recursive.t       2009-08-16 21:25:17.000000000 +0100
+++ grepmail-5.3034/t/recursive.t       2009-09-02 11:24:03.000000000 +0100
@@ -17,7 +17,7 @@
 'grepmail -Lq Handy t/temp/directory_with_links'
   => ['recursive2','none'],
 'grepmail -Rq Handy t/temp/directory_with_links'
-  => ['recursive2','none'],
+  => ['recursive','none'],
 );
 
 my %expected_errors = (

Fedora Project

  • Updated grepmail to 5.3034 in Rawhide, though instead of bundling AutoInstall.pm as per my local package, I added a buildreq of perl(Module::AutoInstall)

  • Updated perl-Mail-Mbox-MessageParser to 1.5002 in Rawhide

  • Updated proftpd to add mod_exec (Bug #520214)


Recent