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 2017/04/23 15:16:48 UTC

[Bug 7413] New: sa_compile.t fails to run as non-privileged user under make disttest

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7413

            Bug ID: 7413
           Summary: sa_compile.t fails to run as non-privileged user under
                    make disttest
           Product: Spamassassin
           Version: 3.4 SVN branch
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Regression Tests
          Assignee: dev@spamassassin.apache.org
          Reporter: kmcgrail@apache.org
  Target Milestone: Undefined

t/sa_compile.t fails on make disttest when you run make disttest as a
non-privileged user.

Error output looks like:

t/sa_compile.t .................... 'cd
/home/kmcgrail/relbuild/Mail-SpamAssassin-3.4.2/t/log/d.sa_compile/build/x &&
make install 2>&1' failed: exit 2 at t/SATest.pm line 991.
t/sa_compile.t .................... Dubious, test returned 2 (wstat 512, 0x200)
Failed 5/5 subtests 
...
t/sa_compile.t                  (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 5 tests but ran 0.
Files=166, Tests=3026, 409 wallclock secs ( 1.39 usr  0.28 sys + 148.09 cusr
20.40 csys = 170.16 CPU)
Result: FAIL

running just prove -v t/sa-compile.t worked. 

Also, running make disttest does not fail as root but the sa_compile.t test is
skipped.  Not sure why it's skipped...  This is the first release that I have
had re2c on the box doing the builds so I don't think this is new or a 3.4.2
blocker.

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

[Bug 7413] sa_compile.t fails to run as non-privileged user under make disttest

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7413

Bill Cole <sa...@billmail.scconsult.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |All
                 CC|                            |sa-bugz-20080315@billmail.s
                   |                            |cconsult.com
                 OS|Windows NT                  |All

--- Comment #1 from Bill Cole <sa...@billmail.scconsult.com> ---
I have replicated this on MacOS 10.11.6 and by running 'make disttest
TEST_VERBOSE=1 TEST_FILES=t/sa_compile.t ' got more details from the failure
that imply it to be a universal issue:

Manifying 8 pod documents
Manifying 73 pod documents
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/opt/local/lib/perl5/site_perl/5.24'
Do not have write permissions on '/opt/local/lib/perl5/site_perl/5.24'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1.
make[2]: *** [pure_site_install] Error 13
'cd
/Users/dad/spamassassin-342/Mail-SpamAssassin-3.4.2/t/log/d.sa_compile/build/x
&& make install 2>&1' failed: exit 2 at t/SATest.pm line 991.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 5/5 subtests 


IOW: 'make disttest' is trying to install SA "for real" rather than in some
test directory. Seems unwise...

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

[Bug 7413] sa_compile.t fails to run as non-privileged user under make disttest

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7413

--- Comment #4 from Bill Cole <sa...@billmail.scconsult.com> ---
(In reply to Bill Cole from comment #3)
> (In reply to Kevin A. McGrail from comment #2)
> > Thanks, Bill.  Do you see it as a blocker?
> 
> Absolutely not. I'm not even sure it's a bug, since I suspect that 'make
> disttest' makes no sense without explicitly setting PREFIX and DESTDIR.

Well, it does. Also, this may really be a blocker because 'make disttest'
either fails or puts bogus compiled rules files under the unmodified PREFIX. 

I have also determined that this is NOT dependent on PREFIX, but rather on the
permissions of PREFIX. It was masked on my systems by the fact that I was using
a non-root account with write access to /usr/local but not /opt/local. 

The root cause is that sa-compile builds a Makefile.PL of its own from which it
calles MakeMaker to build a Makefile that it then uses to build and install the
compiled rules and associated files.

With both 'make test' and 'make disttest' sa-compile handles relocation of the
install points of body_0.bundle, body_0.pm, and bases_body_0.pl correctly,
however 'make test' drops a man page
(Mail::SpamAssassin::CompiledRegexps::body_0.3pm) and a perllocal.pod file in
paths under a temp directory ($TMPDIR/<mktemp directory>/ignored/) and leaves
them there while 'make disttest' tries to put them under the "real" PREFIX.

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

[Bug 7413] sa_compile.t fails to run as non-privileged user under make disttest

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7413

Kevin A. McGrail <km...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kmcgrail@apache.org

--- Comment #2 from Kevin A. McGrail <km...@apache.org> ---
Thanks, Bill.  Do you see it as a blocker?

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

[Bug 7413] sa_compile.t fails to run as non-privileged user under make disttest

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7413

Sidney Markowitz <si...@sidney.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sidney@sidney.com
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #6 from Sidney Markowitz <si...@sidney.com> ---
This appears to be fixed as a side-effect of the fix to bug #7294

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

[Bug 7413] sa_compile.t fails to run as non-privileged user under make disttest

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7413

--- Comment #3 from Bill Cole <sa...@billmail.scconsult.com> ---
(In reply to Kevin A. McGrail from comment #2)
> Thanks, Bill.  Do you see it as a blocker?

Absolutely not. I'm not even sure it's a bug, since I suspect that 'make
disttest' makes no sense without explicitly setting PREFIX and DESTDIR.

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

[Bug 7413] sa_compile.t fails to run as non-privileged user under make disttest

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7413

--- Comment #5 from Bill Cole <sa...@billmail.scconsult.com> ---
Created attachment 5569
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5569&action=edit
Add explicit paths to 'make' invocations in sa-compile so that make disttest
passes.

This patch works but should not be needed. I am not satisfied with it.

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