You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/06/23 09:07:13 UTC

[Bug 5535] New: SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535

           Summary: SA 3.2.1 Does not pass tests on windows due to getpwuid
                    in SATest.pm
           Product: Spamassassin
           Version: 3.2.1
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Building & Packaging
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: peter@sumnerp.demon.co.uk


SA 3.2.1 fails to make test on windows as SATest.pm calls getpwuid which is 
not defined in ActiveState Perl for windows. The getpwuid function is 
unimplemented at t/SATest.pm line 150.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535





------- Additional Comments From sidney@sidney.com  2007-06-23 07:20 -------
Created an attachment (id=4019)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4019&action=view)
Patch against 3.2 branch. Simpler fix that does not break the build in machine
without SA already installed

I just realised that we don't have a CLA for Peter Sumner. Even though his
patch is probably trivial enough to accept without a signed CLA on file, I've
written up this alternative which is a few lines of code smaller and simpler
and avoids any question of CLA.

Peter's intuition about avoiding the dependency on what is being tested was
correct. I had relied on the fact that there already was a use
Mail::SpamAssassin in SATest.pm. But as implied by a comment there, the tests
that call that sub all have to first set up INC to include the right blib
subdirectories, and not all tests do that.

This is now checked in to trunk. Please vote on this patch for 3.2 branch.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535





------- Additional Comments From sidney@sidney.com  2007-06-23 07:23 -------
I left out the revision number in my last comment.
Committed to trunk as revision 550045.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535


felicity@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 1 vote                |go




------- Additional Comments From felicity@apache.org  2007-07-04 12:12 -------
sure, +1



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535


sidney@sidney.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
  Status Whiteboard|go                          |




------- Additional Comments From sidney@sidney.com  2007-07-04 13:08 -------
Committed to branch 3.2 revision 553318.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|SA 3.2.1 Does not pass tests|[review] SA 3.2.1 Does not
                   |on windows due to getpwuid  |pass tests on windows due to
                   |in SATest.pm                |getpwuid in SATest.pm
  Status Whiteboard|                            |needs 1 vote
   Target Milestone|Undefined                   |3.2.2




------- Additional Comments From jm@jmason.org  2007-06-23 03:19 -------
I think I prefer Sidney's: +1

thanks for spotting this btw...



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 2 votes               |needs 1 vote






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535





------- Additional Comments From peter@sumnerp.demon.co.uk  2007-06-23 02:28 -------
(In reply to comment #2)

> Alternative patch which fixes the problem by calling portable_getpwuid
> I like this approach better, replacing the call to getpwuid with a call to
> Mail::SpamAssassin::Util::portable_getpwuid
> I would like to hear people's opinions between these two ways of fixing it.

I considered that approach and would have used if anything other than the user 
name was required. Prefered the simple approach to avoid the test harness 
depending on the code its about to test. That aside no strong feelings either 
way



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535


sidney@sidney.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4018 is|0                           |1
           obsolete|                            |




------- Additional Comments From sidney@sidney.com  2007-06-23 06:57 -------
(From update of attachment 4018)
Whoops, that broke the build in an environment where SpamAssassin has not been
installed, as caught by buildbot t-sol10-561

reverted the patch and commited the first patch to trunk as revision 550043.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535





------- Additional Comments From sidney@sidney.com  2007-06-23 04:01 -------
Committed to trunk revision 550029.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] [review] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535


sidney@sidney.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 1 vote                |needs 2 votes






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535


sidney@sidney.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #4017 is|0                           |1
           obsolete|                            |




------- Additional Comments From sidney@sidney.com  2007-06-23 00:59 -------
Created an attachment (id=4018)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4018&action=view)
Alternative patch which fixes the problem by calling portable_getpwuid

I like this approach better, replacing the call to getpwuid with a call to
Mail::SpamAssassin::Util::portable_getpwuid

I would like to hear people's opinions between these two ways of fixing it.
Both should work, so it is a matter of aesthetics. Devs, please speak up. I'll
go along with a majority vote for either of the two.

I haven't tested this under Windows yet. I'll do that shortly. If this bug
breaks make test under Windows, we should fix this ASAP for 3.2.2.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5535] SA 3.2.1 Does not pass tests on windows due to getpwuid in SATest.pm

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5535





------- Additional Comments From peter@sumnerp.demon.co.uk  2007-06-23 00:09 -------
Created an attachment (id=4017)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=4017&action=view)
Patch to allow tests to run and SA 3,2,1 to install on Windows

A similar problem exists in the version of SATest.pm in the svn trunk



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.