Upgrading Sendmail's DB

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Sep 25 02:48:59 PDT 2004


On Fri, Sep 24, 2004 at 09:35:48PM -0500, antenneX wrote:
> Running FBSD-4.10p2/Sendmail-8.12.11
> 
> I want to upgrade the Sendmail's Berkley DB to 4.2x, but since Sendmail
> is part of my base OS, what is best way to recompile Sendmail with the
> new DB?
> 
> BTW, I use sources if not evident.
> 
> Do I need to recompile the whole OS which includes Sendmail or is there
> an easier way to just update the Sendmail?
> 
> The Sendmail site is not very clear on this. It does say if the new DB
> 4.2x is installed and the new libraries  are there, it will find it and
> use it instead of the old DB2 & that NEWDB takes care of it if it can
> find the library named libdba.a or libdb.so.
> 
> Advice needed and appreciated.....

There is no simple way to do this with the sendmail that is part of
the base system.  The system is set up to use the bdb-1.65 stuff which
is a standard part of the base system, and it will take hacking on the
Makefiles in /usr/src/usr.sbin/sendmail/ or /usr/src/contrib/sendmail/

There isn't a separate libdb.so.X in the base system -- all of the BDB
functions are integrated into the central libc.so.{4,5}.

If you install one of the databases/dbXX ports, you'll end up a
library called, eg:

    /usr/local/lib/libdb-4.2.so.2

which comes from the db42-4.2.52_3 package.  (The package version
number is included in the shlib name so that you can install several
different BDB versions simultaneously). 

Similarly there's a /usr/local/include/db42 directory with all of the
headers from that package.

So to make your customised sendmail link against the latest BDB, you
need to modify the list of C-include flags by adding
-I/usr/local/include/db42 and you need to add -ldb-4.2 to the list of
libraries to link against.

Hmmm... you might find it more convenient to modify the mail/sendmail
port to support the 'WITH_DBXX' flags like the databases/ruby-bdb and
submit the diffs back to the project.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040925/aa33350f/attachment.bin


More information about the freebsd-questions mailing list