You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Michael Scheidell <sc...@secnap.net> on 2007/06/13 04:47:05 UTC

Freebsd Port of SA 3.2.1

If anyone wants a 'pre release' of the Freebsd sa 3.2.1 portfile, you
can download it here:

http://www.secnap.com/downloads/sa321.tgz

Instructions: rm everything in /usr/ports/mail/p5-Mail-SpamAssassin,
untar above there, make or portupgrade it.

Some dependencies that have not been committed to freebsd ports are also
needed.

One I just stumbled upon, for anyone using Mail::SPF:  in SA INSTALL
doc:

    If using Mail::SPF note that NetAddr::IP (required by Mail::SPF)
    versions up to and including version 4.006 include a bug that will
    slow down the entire perl interpreter.  NetAddr::IP version 4.007 or
    later fixes this.

(freebsd ports still has 4.004, but here are patches against
../ports/net-mgmt/p5-NetAddr-IP)
You need these patches in /usr/ports/net-mgmt/p5-NetAddr-IP
http://www.secnap.com/downloads/netaddrip.patch
See http://www.freebsd.org/cgi/query-pr.cgi?pr=113638

Also, you need patches for re2c >=.12.0 (ports has .11.1), Razor >
2.8.2_1 (ports has 2.8.2)
http://www.secnap.com/downloads/re2c.tgz (ports package, clean out
../ports/devel/re2c and untar this)
See: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/112501


If you use Razor, you should update it:
http://www.secnap.com/downloads/razor.patch (patches against
../ports/mail/razor-agents)
see http://www.freebsd.org/cgi/query-pr.cgi?pr=112522

Anyone with freebsd and want to see something (universal!, not site
specific), send me an explaination of what it is, what it does, and if
you include that and patches against the current 3.2.0, it will likely
be included in freebsd 3.2.1 port since I am the official ports
maintainer.
(note: thanks jimmy  I have included the libspamc* support as you
requested in 
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/106441


-- 
Michael Scheidell, CTO
SECNAP Network Security Corporation
Keep up to date with latest information on IT security: Real time
security alerts:
http://www.secnap.com/news
 
_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(tm). 
For Information please see http://www.spammertrap.com
_________________________________________________________________________

Re: [AMaViS-user] Freebsd Port of SA 3.2.1

Posted by Thomas Vogt <th...@bsdunix.ch>.
Hi

It works fine on several Freebsd 5.x i386 machines. sa-compile works
too. No problem so far after a few million scans. Thank you. I will try
  your updated version for amd64 at the end of this week.

Regards,
Thomas

Michael Scheidell wrote:
> If anyone wants a 'pre release' of the Freebsd sa 3.2.1 portfile, you
> can download it here:
> 
> http://www.secnap.com/downloads/sa321.tgz
> 
> Instructions: rm everything in /usr/ports/mail/p5-Mail-SpamAssassin,
> untar above there, make or portupgrade it.
> 
> Some dependencies that have not been committed to freebsd ports are also
> needed.
> 
> One I just stumbled upon, for anyone using Mail::SPF:  in SA INSTALL
> doc:
> 
>     If using Mail::SPF note that NetAddr::IP (required by Mail::SPF)
>     versions up to and including version 4.006 include a bug that will
>     slow down the entire perl interpreter.  NetAddr::IP version 4.007 or
>     later fixes this.
> 
> (freebsd ports still has 4.004, but here are patches against
> ../ports/net-mgmt/p5-NetAddr-IP)
> You need these patches in /usr/ports/net-mgmt/p5-NetAddr-IP
> http://www.secnap.com/downloads/netaddrip.patch
> See http://www.freebsd.org/cgi/query-pr.cgi?pr=113638
> 
> Also, you need patches for re2c >=.12.0 (ports has .11.1), Razor >
> 2.8.2_1 (ports has 2.8.2)
> http://www.secnap.com/downloads/re2c.tgz (ports package, clean out
> ../ports/devel/re2c and untar this)
> See: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/112501
> 
> 
> If you use Razor, you should update it:
> http://www.secnap.com/downloads/razor.patch (patches against
> ../ports/mail/razor-agents)
> see http://www.freebsd.org/cgi/query-pr.cgi?pr=112522
> 
> Anyone with freebsd and want to see something (universal!, not site
> specific), send me an explaination of what it is, what it does, and if
> you include that and patches against the current 3.2.0, it will likely
> be included in freebsd 3.2.1 port since I am the official ports
> maintainer.
> (note: thanks jimmy  I have included the libspamc* support as you
> requested in 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/106441
> 
> 

-- 
"UNIX is basically a simple operating system, but you have to be a
genius to understand the simplicity." Dennis Ritchie

RE: Freebsd Port of SA 3.2.1

Posted by Michael Scheidell <sc...@secnap.net>.
 

> -----Original Message-----
> From: Jack L. Stone [mailto:jacks@sage-american.com] 
> Sent: Wednesday, June 13, 2007 9:29 AM
> To: Michael Scheidell; amavis-user@lists.sourceforge.net
> Cc: users@spamassassin.apache.org; jimmy@loopia.se
> Subject: Re: Freebsd Port of SA 3.2.1
> 
> At 10:47 PM 6.12.2007 -0400, Michael Scheidell wrote:
> >If anyone wants a 'pre release' of the Freebsd sa 3.2.1 
> portfile, you 
> >can download it here:
> >
> >http://www.secnap.com/downloads/sa321.tgz
> 
> I am using FBSD-6.2 amd64 and ran into this problem when running make:
> .... bunch of other stuff all okay
> stopped here:
> Manifying blib/man3/Mail::SpamAssassin::Plugin::RelayCountry.3
> make -f spamc/Makefile spamc/libspamc.so gcc 
> -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE spamc/libspamc.c 
> spamc/utils.c  -o spamc/libspamc.so -shared  -L/usr/local/lib -lz
> /usr/bin/ld: /var/tmp//cchaPM1S.o: relocation R_X86_64_32 can 
> not be used when making a shared object; recompile with -fPIC
> /var/tmp//cchaPM1S.o: could not read symbols: Bad value
> *** Error code 1

Give this a shot:

http://www.secnap.com/downloads/sa321.tgz

I added this to post-build: (mind the wrap)

 post-build:
+       @(cd ${BUILD_WRKSRC}/spamc; ${SED} -e '/^CCDLFLAGS/s/-Wl/-DPIC
-fPIC -Wl/' Makefile > Makefile.lib)

This based on other makefile with both -DPIC and -fPIC in it, and darn
if I know why spamc/Makefile doesn't have it there.


_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(tm). 
For Information please see http://www.spammertrap.com
_________________________________________________________________________

Re: Freebsd Port of SA 3.2.1

Posted by Mark Martinec <Ma...@ijs.si>.
> > > +.if ${ARCH} == "i386"
> > > +.endif
> > Please don't do that!
>
> Both of the following cc commands need option -fPIC in order
> to be able to build a shareable library:
>
> gcc -fPIC -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE spamc/libspamc.c
>   spamc/utils.c  -o spamc/libspamc.so -shared  -L/usr/local/lib -lz
> gcc -fPIC -DSPAMC_SSL -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE
>   spamc/libspamc.c spamc/utils.c  -o spamc/libsslspamc.so
>   -shared  -L/usr/local/lib -lssl -lcrypto -lz
> This way it will build on any architecture, not just on Intel in 32-bit
> mode.

> This seem to be a SpamAssassin issue, and is not specific to FreeBSD ports.

Now on:
  http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5515

Mark

Re: Freebsd Port of SA 3.2.1

Posted by Mark Martinec <Ma...@ijs.si>.
> > > I am using FBSD-6.2 amd64 and ran into this problem when running make:
> > > .... bunch of other stuff all okay
> > > stopped here:
> > > Manifying blib/man3/Mail::SpamAssassin::Plugin::RelayCountry.3
> > > make -f spamc/Makefile spamc/libspamc.so
> > > gcc -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE spamc/libspamc.c
> > > spamc/utils.c  -o spamc/libspamc.so -shared  -L/usr/local/lib -lz
> > > /usr/bin/ld: /var/tmp//cchaPM1S.o: relocation R_X86_64_32 can not be
> > > used when making a shared object; recompile with -fPIC
> > > /var/tmp//cchaPM1S.o: could not read symbols: Bad value
> >
> > looks like a 64bit compile error.
>
> It is not a compile error. Somebody forgot to put a -fPIC option
> when compiling code for a shareable library.
> It happens to work on i386, but is wrong anyway.
>
> > +.if ${ARCH} == "i386"
> > +.endif
> Please don't do that!

Both of the following cc commands need option -fPIC in order
to be able to build a shareable library:

gcc -fPIC -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE spamc/libspamc.c
  spamc/utils.c  -o spamc/libspamc.so -shared  -L/usr/local/lib -lz

gcc -fPIC -DSPAMC_SSL -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE
  spamc/libspamc.c spamc/utils.c  -o spamc/libsslspamc.so
  -shared  -L/usr/local/lib -lssl -lcrypto -lz

This way it will build on any architecture, not just on Intel in 32-bit mode.

This seem to be a SpamAssassin issue, and is not specific to FreeBSD ports.

  Mark

Re: Freebsd Port of SA 3.2.1

Posted by Mark Martinec <Ma...@ijs.si>.
Michael,

> > I am using FBSD-6.2 amd64 and ran into this problem when running make:
> > .... bunch of other stuff all okay
> > stopped here:
> > Manifying blib/man3/Mail::SpamAssassin::Plugin::RelayCountry.3
> > make -f spamc/Makefile spamc/libspamc.so
> > gcc -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE spamc/libspamc.c
> > spamc/utils.c  -o spamc/libspamc.so -shared  -L/usr/local/lib -lz
> > /usr/bin/ld: /var/tmp//cchaPM1S.o: relocation R_X86_64_32 can not be used
> > when making a shared object; recompile with -fPIC
> > /var/tmp//cchaPM1S.o: could not read symbols: Bad value

> looks like a 64bit compile error.

It is not a compile error. Somebody forgot to put a -fPIC option
when compiling code for a shareable library.
It happens to work on i386, but is wrong anyway.

> +.if ${ARCH} == "i386"
...
> +.endif

Please don't do that!

  Mark

Re: Freebsd Port of SA 3.2.1

Posted by Michael Scheidell <sc...@secnap.net>.
Jack L. Stone wrote:
> At 10:47 PM 6.12.2007 -0400, Michael Scheidell wrote:
>   
>> If anyone wants a 'pre release' of the Freebsd sa 3.2.1 portfile, you
>> can download it here:
>>
>> http://www.secnap.com/downloads/sa321.tgz
>>
>> Instructions: rm everything in /usr/ports/mail/p5-Mail-SpamAssassin,
>> untar above there, make or portupgrade it.
>>
>> Some dependencies that have not been committed to freebsd ports are also
>> needed.
>>
>> One I just stumbled upon, for anyone using Mail::SPF:  in SA INSTALL
>> doc:
>>
>>    If using Mail::SPF note that NetAddr::IP (required by Mail::SPF)
>>    versions up to and including version 4.006 include a bug that will
>>    slow down the entire perl interpreter.  NetAddr::IP version 4.007 or
>>    later fixes this.
>>
>> (freebsd ports still has 4.004, but here are patches against
>> ../ports/net-mgmt/p5-NetAddr-IP)
>> You need these patches in /usr/ports/net-mgmt/p5-NetAddr-IP
>> http://www.secnap.com/downloads/netaddrip.patch
>> See http://www.freebsd.org/cgi/query-pr.cgi?pr=113638
>>
>> Also, you need patches for re2c >=.12.0 (ports has .11.1), Razor >
>> 2.8.2_1 (ports has 2.8.2)
>> http://www.secnap.com/downloads/re2c.tgz (ports package, clean out
>> ../ports/devel/re2c and untar this)
>> See: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/112501
>>
>>
>> If you use Razor, you should update it:
>> http://www.secnap.com/downloads/razor.patch (patches against
>> ../ports/mail/razor-agents)
>> see http://www.freebsd.org/cgi/query-pr.cgi?pr=112522
>>
>> Anyone with freebsd and want to see something (universal!, not site
>> specific), send me an explaination of what it is, what it does, and if
>> you include that and patches against the current 3.2.0, it will likely
>> be included in freebsd 3.2.1 port since I am the official ports
>> maintainer.
>> (note: thanks jimmy  I have included the libspamc* support as you
>> requested in 
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/106441
>>
>>
>> -- 
>> Michael Scheidell, CTO
>> SECNAP Network Security Corporation
>> Keep up to date with latest information on IT security: Real time
>> security alerts:
>> http://www.secnap.com/news
>>
>>     
>
> Michael: Many thanks for your upgrade to the port.
>
> I am using FBSD-6.2 amd64 and ran into this problem when running make:
> .... bunch of other stuff all okay
> stopped here:
> Manifying blib/man3/Mail::SpamAssassin::Plugin::RelayCountry.3
> make -f spamc/Makefile spamc/libspamc.so
> gcc -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE spamc/libspamc.c
> spamc/utils.c  -o spamc/libspamc.so -shared  -L/usr/local/lib -lz
> /usr/bin/ld: /var/tmp//cchaPM1S.o: relocation R_X86_64_32 can not be used
> when making a shared object; recompile with -fPIC
> /var/tmp//cchaPM1S.o: could not read symbols: Bad value
> *** Error code 1
>   

looks like a 64bit compile error.

what does uname -p show?

Try this patch to Makefile (if you want to mess with compile options, be 
my guest).

--- Makefile.orig       Tue Jun 12 22:43:19 2007
+++ Makefile    Wed Jun 13 09:56:03 2007
@@ -230,18 +230,23 @@
 .endif
 
 post-build:
+.if ${ARCH} == "i386"
        @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} 
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} spamc/libspamc.so)
 .if !defined(WITHOUT_SSL)
        @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} 
${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} spamc/libsslspamc.so)
 .endif
+.endif
 
 pre-install:
        @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+.if ${ARCH} == "i386"
        ${INSTALL_DATA} ${WRKSRC}/spamc/libspamc.so ${PREFIX}/lib
        ${INSTALL_DATA} ${WRKSRC}/spamc/libspamc.h ${PREFIX}/include
 .if !defined(WITHOUT_SSL)
        ${INSTALL_DATA} ${WRKSRC}/spamc/libsslspamc.so ${PREFIX}/lib
 .endif
+.endif
+
 .if ${OSVERSION} < 500000
        @${SED} -i "" "s| /etc/rc.subr| ${PREFIX}/etc/rc.subr|" 
work/sa-spamd.sh
 .endif

> (^_^)
> Happy trails,
> Jack L. Stone
>
> System Admin
> Sage-american
>
>   


_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(tm). 
For Information please see http://www.spammertrap.com
_________________________________________________________________________

Re: Freebsd Port of SA 3.2.1

Posted by "Jack L. Stone" <ja...@sage-american.com>.
At 10:47 PM 6.12.2007 -0400, Michael Scheidell wrote:
>If anyone wants a 'pre release' of the Freebsd sa 3.2.1 portfile, you
>can download it here:
>
>http://www.secnap.com/downloads/sa321.tgz
>
>Instructions: rm everything in /usr/ports/mail/p5-Mail-SpamAssassin,
>untar above there, make or portupgrade it.
>
>Some dependencies that have not been committed to freebsd ports are also
>needed.
>
>One I just stumbled upon, for anyone using Mail::SPF:  in SA INSTALL
>doc:
>
>    If using Mail::SPF note that NetAddr::IP (required by Mail::SPF)
>    versions up to and including version 4.006 include a bug that will
>    slow down the entire perl interpreter.  NetAddr::IP version 4.007 or
>    later fixes this.
>
>(freebsd ports still has 4.004, but here are patches against
>../ports/net-mgmt/p5-NetAddr-IP)
>You need these patches in /usr/ports/net-mgmt/p5-NetAddr-IP
>http://www.secnap.com/downloads/netaddrip.patch
>See http://www.freebsd.org/cgi/query-pr.cgi?pr=113638
>
>Also, you need patches for re2c >=.12.0 (ports has .11.1), Razor >
>2.8.2_1 (ports has 2.8.2)
>http://www.secnap.com/downloads/re2c.tgz (ports package, clean out
>../ports/devel/re2c and untar this)
>See: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/112501
>
>
>If you use Razor, you should update it:
>http://www.secnap.com/downloads/razor.patch (patches against
>../ports/mail/razor-agents)
>see http://www.freebsd.org/cgi/query-pr.cgi?pr=112522
>
>Anyone with freebsd and want to see something (universal!, not site
>specific), send me an explaination of what it is, what it does, and if
>you include that and patches against the current 3.2.0, it will likely
>be included in freebsd 3.2.1 port since I am the official ports
>maintainer.
>(note: thanks jimmy  I have included the libspamc* support as you
>requested in 
>http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/106441
>
>
>-- 
>Michael Scheidell, CTO
>SECNAP Network Security Corporation
>Keep up to date with latest information on IT security: Real time
>security alerts:
>http://www.secnap.com/news
> 

Michael: Many thanks for your upgrade to the port.

I am using FBSD-6.2 amd64 and ran into this problem when running make:
.... bunch of other stuff all okay
stopped here:
Manifying blib/man3/Mail::SpamAssassin::Plugin::RelayCountry.3
make -f spamc/Makefile spamc/libspamc.so
gcc -Wl,-R/usr/local/lib/perl5/5.8.8/mach/CORE spamc/libspamc.c
spamc/utils.c  -o spamc/libspamc.so -shared  -L/usr/local/lib -lz
/usr/bin/ld: /var/tmp//cchaPM1S.o: relocation R_X86_64_32 can not be used
when making a shared object; recompile with -fPIC
/var/tmp//cchaPM1S.o: could not read symbols: Bad value
*** Error code 1

(^_^)
Happy trails,
Jack L. Stone

System Admin
Sage-american