Bug 90202 - [PATCH] Build directory appears in program files
[PATCH] Build directory appears in program files
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: spamassassin (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chip Turner
:
: 106757 113428 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-05 07:56 EDT by Miloslav Trmac
Modified: 2007-11-30 17:10 EST (History)
6 users (show)

See Also:
Fixed In Version: spamassassin-2.62-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-21 10:24:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed fix (1.03 KB, patch)
2003-05-14 03:54 EDT, Radu Greab
no flags Details | Diff
Use DESTDIR (1.50 KB, patch)
2003-10-07 09:57 EDT, Miloslav Trmac
no flags Details | Diff

  None (edit)
Description Miloslav Trmac 2003-05-05 07:56:44 EDT
Version-Release number of selected component (if applicable):
e.g. spamassassin-2.53-5

Steps to Reproduce:
1.grep for /usr/src/build in /usr/share/spamasasssin/*
Comment 1 Radu Greab 2003-05-14 03:53:47 EDT
The patch below against spamassassin.spec from spamassassin-2.53-6 is a fix:

- the first hunk fixes the paths from scripts (grep /usr/src/build in
/usr/bin/spamassassin)
- the second hunk fixes the paths from .cf files
Comment 2 Radu Greab 2003-05-14 03:54:35 EDT
Created attachment 91664 [details]
proposed fix
Comment 3 Miloslav Trmac 2003-07-29 22:44:43 EDT
The same in Severn (spamassassin-2.55-3)
Comment 4 Milan Kerslager 2003-08-09 16:30:09 EDT
At least this is wrong. Increasing severity to normal. Will check if this 
affect functionality.
Comment 5 Milan Kerslager 2003-08-12 11:53:14 EDT
As the proper path is already in @INC, there is no need to run BEGIN procedure.
If the path is incorrecly set (and it is now) the procedure is trying to locate
modules in various directories. This cause an unneded overhead especially when
perl script is run on every mail arrive.

Anyway - the user is missinformed by wrong path in config files.

So please accept the patch and fix this bug in your CVS.
Comment 6 Milan Kerslager 2003-10-05 08:32:42 EDT
Seems to be fixed in 2.60-2 version from Raw Hide.
Comment 7 Miloslav Trmac 2003-10-05 11:47:27 EDT
Huh? I still see /usr/src in /usr/bin/{sa-learn,spamassassin,spamd},
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin.pm and
/usr/share/spamassassin/*.cf in 2.60-2.
Comment 8 Milan Kerslager 2003-10-05 12:06:06 EDT
Ehm. I have different buildroot and I mised it when doing grep. Sorry.

%makeinstall is fixed but %{__perl} Makefile.PL can't be modified by provided
patch because this error message (RH9 build environment):

You attempted to use one of the following unsupported variables:
  INST_PREFIX
  INST_SITELIB
  INST_SYSCONFDIR
  DEF_RULES_DIR
  LOCAL_RULES_DIR
Please read INSTALL and PACKAGING for new usage instructions.

So we need another better fix.
Comment 9 Miloslav Trmac 2003-10-07 09:57:34 EDT
Created attachment 94986 [details]
Use DESTDIR

This is the "right" fix, also recommended by the PACKAGING file.

It requires ExtUtils::MakeMaker >= 6.11, newer than what is shipped
in RHL <=9. But the likelihood of backporting spamassassin 1.60 to
older RHL releases is low enough that this should not be a problem.
Comment 10 Miloslav Trmac 2004-01-08 11:31:36 EST
spamassassin-2.61-2 fixes the files in /usr/share/, but not
/usr/lib/perl5/vendor_perl/5.8.2/Mail/SpamAssassin.pm nor
/usr/bin/{sa-learn,spamassassin,spamd}.
Comment 11 Chuck Mead 2004-01-14 20:58:05 EST
So what is the status on this now?

It's broken in FC1 and needs to fixed there and for the upcoming FC2.

[root@stealth root]# service spamassassin start
Starting spamd: Can't locate HTML/Parser.pm in @INC (@INC contains:
../lib
/usr/src/build/311522-x86_64/install//usr/lib/perl5/vendor_perl/5.8.1
/usr/lib64/perl5/5.8.1/x86_64-linux-thread-multi /usr/lib/perl5/5.8.1
/usr/lib64/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.1
/usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl) at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin/HTML.pm line 7.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin/HTML.pm line 7.
Compilation failed in require at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin/PerMsgStatus.pm
line 42.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin/PerMsgStatus.pm
line 42.
Compilation failed in require at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin.pm line 62.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin.pm line 62.
Compilation failed in require at /usr/bin/spamd line 33.
BEGIN failed--compilation aborted at /usr/bin/spamd line 33.
                                                           [FAILED]
Comment 12 Mike A. Harris 2004-01-15 05:05:51 EST
*** Bug 113428 has been marked as a duplicate of this bug. ***
Comment 13 Mike A. Harris 2004-01-15 05:06:42 EST
Closed my dupe, updated bug status to indicate this problem is present
in Fedora Core 1 and also current development builds of spamassassin.
Comment 14 Radu Greab 2004-01-15 06:45:00 EST
Apply Miloslav Trmac's patch, with one small correction, and the bug
should be fixed on FC and probably RHEL 3. The small correction is to
use "DESTDIR=$RPM_BUILD_ROOT/" instead of "DESTDIR=$RPM_BUILD_ROOT"
because ExtUtils::MakeMaker documentation says:

<<NOTE: Due to the nature of make, it is important that you put the
  trailing slash on your DESTDIR.  "/tmp/" not "/tmp".>>
Comment 15 Chuck Mead 2004-01-16 19:25:26 EST
So I applied the lines from the patch to spamassassin-2.61-2 and it
builds but this is what I get when I try to run it:

[root@stealth root]# service spamassassin start
Starting spamd: Can't locate HTML/Parser.pm in @INC (@INC contains:
../lib /usr/lib/perl5/vendor_perl/5.8.1
/usr/lib64/perl5/5.8.1/x86_64-linux-thread-multi /usr/lib/perl5/5.8.1
/usr/lib64/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.1
/usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl) at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin/HTML.pm line 7.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin/HTML.pm line
7.Compilation failed in require at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin/PerMsgStatus.pm
line 42.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin/PerMsgStatus.pm
line 42.
Compilation failed in require at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin.pm line 62.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.1/Mail/SpamAssassin.pm line 62.
Compilation failed in require at /usr/bin/spamd line 33.
BEGIN failed--compilation aborted at /usr/bin/spamd line 33.
                                                           [FAILED]

So this bug is not fixed by the patches!

Comment 16 Chuck Mead 2004-01-16 20:05:41 EST
Alright so now I have updated to the following:

[root@stealth root]# rpm -q perl
perl-5.8.2-7

With this version of perl my @INC contains the following:
[csm@stealth SPECS]$ perl -e 'print @INC'
/usr/lib64/perl5/5.8.2/x86_64-linux-thread-multi/usr/lib/perl5/5.8.2/usr/lib64/perl5/site_perl/5.8.2/usr/lib/perl5/site_perl/5.8.2/usr/lib/perl5/site_perl/5.8.1/x86_64-linux-thread-multi/usr/lib/perl5/site_perl/5.8.1/usr/lib/perl5/site_perl/5.8.0/x86_64-linux-thread-multi/usr/lib/perl5/site_perl/5.8.0/usr/lib/perl5/site_perl/usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi/usr/lib/perl5/vendor_perl/5.8.2/usr/lib/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi/usr/lib/perl5/vendor_perl/5.8.1/usr/lib/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi/usr/lib/perl5/vendor_perl/5.8.0/usr/lib/perl5/vendor_perl/usr/lib/perl5/5.8.1/5.8.2/x86_64-linux-thread-multi/usr/lib/perl5/5.8.1/5.8.2/usr/lib/perl5/5.8.1/x86_64-linux-thread-multi/usr/lib/perl5/5.8.1/usr/lib/perl5/5.8.0/5.8.2/x86_64-linux-thread-multi/usr/lib/perl5/5.8.0/5.8.2/usr/lib/perl5/5.8.0/x86_64-linux-thread-multi/usr/lib/perl5/5.8.0.

I also have:

[csm@stealth SPECS]$ rpm -q spamassassin
spamassassin-2.61-2

Now when I execute "service spamassassin start" I get the following:

[root@stealth root]# service spamassassin start
Starting spamd: Can't locate HTML/Parser.pm in @INC (@INC contains:
../lib /var/tmp/spamassassin-root//usr/lib/perl5/vendor_perl/5.8.2
/usr/lib64/perl5/5.8.2/x86_64-linux-thread-multi /usr/lib/perl5/5.8.2
/usr/lib64/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.1/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.1
/usr/lib/perl5/site_perl/5.8.0/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.2
/usr/lib/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.1
/usr/lib/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.1/5.8.2/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.1/5.8.2
/usr/lib/perl5/5.8.1/x86_64-linux-thread-multi /usr/lib/perl5/5.8.1
/usr/lib/perl5/5.8.0/5.8.2/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.0/5.8.2
/usr/lib/perl5/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/5.8.0)
at /usr/lib/perl5/vendor_perl/5.8.2/Mail/SpamAssassin/HTML.pm line 7.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.2/Mail/SpamAssassin/HTML.pm line
7.Compilation failed in require at
/usr/lib/perl5/vendor_perl/5.8.2/Mail/SpamAssassin/PerMsgStatus.pm
line 42.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.2/Mail/SpamAssassin/PerMsgStatus.pm
line 42.
Compilation failed in require at
/usr/lib/perl5/vendor_perl/5.8.2/Mail/SpamAssassin.pm line 62.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.2/Mail/SpamAssassin.pm line 62.
Compilation failed in require at /usr/bin/spamd line 33.
BEGIN failed--compilation aborted at /usr/bin/spamd line 33.
                                                           [FAILED]

I am starting to think this is more a problem with perl itself rather
than a spamassassin bug!
Comment 17 Chuck Mead 2004-01-16 20:10:44 EST
It does the same thing if I build spamassassin as an i686.

Is this thing working 32bit for others?
Comment 18 Chuck Mead 2004-01-16 21:15:43 EST
After hashing this out with Radu it looks like this is *NOT* a
spamassasin bug. But it *IS* an issue with perl-HTML-Parser or perl
itself. I searched bugzilla and found bug 112600 and after rebuilding
perl-HTML-Parser my problem is fixed!
Comment 19 Miloslav Trmac 2004-07-14 21:43:10 EDT
*** Bug 106757 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.