You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2007/09/15 14:50:40 UTC

Re: trunk broken

We need an (SVN-only) .t test case that tests mass-check; it's pretty
vital during dev time.

Mark -- a trivial test for mass-check:

$ cd masses
$ ./mass-check -n -o ham:dir:.
Undefined subroutine &Mail::SpamAssassin::Conf::Parser::untaint_var called at /home/jm/ftp/sa/trunk/masses/../blib/lib/Mail/SpamAssassin/Conf/Parser.pm line 617.


--j.

Daryl C. W. O'Shea writes:
> Mark Martinec wrote:
> > On Saturday September 15 2007 11:12:42 Daryl C. W. O'Shea wrote:
> >> Crap, I was looking forward to having this week's --net results for
> >> scoring.
> >>
> >> Undefined subroutine &Mail::SpamAssassin::Conf::Parser::untaint_var
> >> called at
> >> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/C
> >> onf/Parser.pm line 617.
> > 
> > Looking into the matter. I wonder why it doesn't fail here
> > during 'make test' and during regular use...
> 
> I don't know (try running mass-check, even as a client, with enough 
> arguments to get it to load and it'll probably happen for you).  One of 
> the mass-check clients also complained about some more (probably due to 
> the same bug):
> 
> 
> plugin: failed to parse plugin (from @INC): "untaint_var" is not 
> exported by the Mail::SpamAssassin::Util module
> Can't continue after import errors at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/Hashcash.pm 
> line 93
> BEGIN failed--compilation aborted at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/Hashcash.pm 
> line 93.
> Compilation failed in require at (eval 64) line 1.
> 
> plugin: failed to parse plugin (from @INC): "untaint_var" is not 
> exported by the Mail::SpamAssassin::Util module
> Can't continue after import errors at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/AutoWhitelist.pm 
> line 51
> BEGIN failed--compilation aborted at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/AutoWhitelist.pm 
> line 51.
> Compilation failed in require at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/AWL.pm 
> line 66.
> BEGIN failed--compilation aborted at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/AWL.pm 
> line 66.
> Compilation failed in require at (eval 73) line 1.
> 
> plugin: failed to parse plugin (from @INC): "untaint_var" is not 
> exported by the Mail::SpamAssassin::Util module
> Can't continue after import errors at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/MIMEHeader.pm 
> line 68
> BEGIN failed--compilation aborted at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/MIMEHeader.pm 
> line 68.
> Compilation failed in require at (eval 78) line 1.
> 
> plugin: failed to parse plugin (from @INC): "untaint_var" is not 
> exported by the Mail::SpamAssassin::Util module
> Can't continue after import errors at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/HTMLEval.pm 
> line 27
> BEGIN failed--compilation aborted at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/HTMLEval.pm 
> line 27.
> Compilation failed in require at (eval 93) line 1.
> 
> plugin: failed to parse plugin (from @INC): "untaint_var" is not 
> exported by the Mail::SpamAssassin::Util module
> Can't continue after import errors at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/MIMEEval.pm 
> line 28
> BEGIN failed--compilation aborted at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/MIMEEval.pm 
> line 28.
> Compilation failed in require at (eval 96) line 1.
> 
> 
> plugin: eval failed: Undefined subroutine 
> &Mail::SpamAssassin::Plugin::Check::untaint_var called at 
> /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin/Plugin/Check.pm 
> line 905.

Re: trunk broken

Posted by Mark Martinec <Ma...@ijs.si>.
> I can see the underlying problem now:
>
> the @ISA = qw(Exporter); and @EXPORT = ...
> are not enclosed in BEGIN {...}, so exporting can't work at all...

$ svn -m 'Exporter never really worked in SA, was not enclosed in BEGIN{};
          revert quick-fixes r575915 and r575772, they were not solving
          the right problem' ci
Sending        lib/Mail/SpamAssassin/Conf/Parser.pm
Sending        lib/Mail/SpamAssassin/Conf.pm
Sending        lib/Mail/SpamAssassin/Constants.pm
Sending        lib/Mail/SpamAssassin/HTML.pm
Sending        lib/Mail/SpamAssassin/Logger.pm
Sending        lib/Mail/SpamAssassin/Util/MemoryDump.pm
Sending        lib/Mail/SpamAssassin/Util.pm
Transmitting file data .......
Committed revision 575968.

I believe this finally solves the right problem.
The r575915 and r575772 were just desperate kicks
in a wrong direction.

  Mark

Re: trunk broken

Posted by Mark Martinec <Ma...@ijs.si>.
> I can now reproduce this one, will prepare a fix...

I can see the underlying problem now:

the @ISA = qw(Exporter); and @EXPORT = ...
are not enclosed in BEGIN {...}, so exporting can't work at all...

Re: trunk broken

Posted by Mark Martinec <Ma...@ijs.si>.
> > > /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssass
> > >in /Plugin/MIMEHeader.pm line 68
>
> Hmm.
> I wonder if it is now fixed by r575915.

I can now reproduce this one, will prepare a fix...

  Mark

Re: trunk broken

Posted by Mark Martinec <Ma...@ijs.si>.
On Saturday September 15 2007 14:50:40 Justin Mason wrote:
> We need an (SVN-only) .t test case that tests mass-check; it's pretty
> vital during dev time.

Yes, would be very much welcome.

> Mark -- a trivial test for mass-check:
>
> $ cd masses
> $ ./mass-check -n -o ham:dir:.
> Undefined subroutine &Mail::SpamAssassin::Conf::Parser::untaint_var called
> at
> /home/jm/ftp/sa/trunk/masses/../blib/lib/Mail/SpamAssassin/Conf/Parser.pm
> line 617.

Thanks, I just learned it.

Ok, this now passes make test and mass-checks:

svn ci
Conf::Parser.pm: explicitly specify module name when calling
sub untaint_var from anonymous subroutines which may be invoked
in a context of modules;  Util.pm: do not export subs local_tz,
base64_decode and untaint_var by default, but use @EXPORT_OK
and leave the decision to the importing module.
Transmitting file data ....
Committed revision 575915.

> Daryl C. W. O'Shea writes:
> > plugin: failed to parse plugin (from @INC): "untaint_var" is not
> > exported by the Mail::SpamAssassin::Util module
> > Can't continue after import errors at
> > /home/dos/sa-mass-check/weekly_mass_check/masses/../lib/Mail/SpamAssassin
> >/Plugin/MIMEHeader.pm line 68

Hmm.
I wonder if it is now fixed by r575915.

Sorry for the mess.

  Mark