Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11408 - default maildrop installation won't work with default courier installation
Summary: default maildrop installation won't work with default courier installation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-30 11:27 UTC by Jukka Salmi
Modified: 2003-01-02 05:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jukka Salmi 2002-11-30 11:27:48 UTC
if both berkley db (berkdb) and GNU database libraries (gdbm) are available,
i.e. installed an in USE, courier uses berkdb, but maildrop uses gdbm. the
consequence: the userdb-tools (userdb, userdbpw, makeuserdb, etc.) built with
courier are incompatible with those built with maildrop. if you create a userdb,
you'll end up with either courier OR maildrop being unable to read from it.

it's possible to compile maildrop without gdbm and use berkdb instead. add
'--with-db=db' to the args for configure. a patch for maildrop-1.4.0-r1.ebuild
(other maildrop ebuilds can probably be patched in the same way):


--- maildrop-1.4.0-r1.ebuild    2002-11-30 17:37:53.000000000 +0100
+++ maildrop-1.4.0-r1.ebuild.dbpatch    2002-11-30 18:09:12.000000000 +0100
@@ -7,7 +7,8 @@
 SRC_URI="mirror://sourceforge/courier/${P}.tar.gz"
 HOMEPAGE="http://www.flounder.net/~mrsam/maildrop/index.html"
 
-DEPEND=">=sys-libs/gdbm-1.8.0
+DEPEND=">=sys-libs/db-3.2
+       gdbm? ( >=sys-libs/gdbm-1.8.0 )
        sys-devel/perl
        virtual/mta"
 PROVIDE="virtual/mda"
@@ -21,6 +22,10 @@
        # CFLAGS or CXXFLAGS maildrop will not compile :-( <lamer@gentoo.org>
        export CFLAGS="${CFLAGS/-funroll-loops/}"
        export CXXFLAGS="${CXXFLAGS/-funroll-loops/}"
+
+       local myconf
+       use berkdb && myconf="--with-db=db" || myconf=""
+
        ./configure \
                --prefix=/usr \
                --with-devel \
@@ -34,7 +39,7 @@
                --with-etcdir=/etc \
                --with-default-maildrop=./.maildir/ \
                --enable-sendmail=/usr/sbin/sendmail \
-               --host=${CHOST} || die "bad ./configure"
+               --host=${CHOST} $myconf || die "bad ./configure"
 
        emake || die "compile problem"
 }
Comment 1 Nick Hadaway 2002-12-12 23:13:05 UTC
I have updated maildrop-1.5.0-r1 with berkdb related fixes.  Please test and 
let me know if things work well for you.
Comment 2 Jukka Salmi 2002-12-13 10:45:51 UTC
hi,

still the same error. maildrop can't read a userdb built with 'makeuserdb' from
a (gentoo-)default courier-imap installation (which uses berkdb, not gdbm).
'--with-db=db' as a parameter to configure is needed to make maildrop able to
read such a userdb.
Comment 3 Jukka Salmi 2002-12-31 01:51:52 UTC
sorry, my last comment was nonsense. maildrop-1.5.0-r1 works of course.

btw: on my profile-1.0-box i had to set CXX='g++' (by default CXX is set to
'gcc' when using "old" profiles...), otherwise gcc failed during compilation
(undefined references to iostream objects). with newer profiles this problem
doesn't exist, because CXX is already set to 'g++' there.
Comment 4 Nick Hadaway 2003-01-01 15:27:15 UTC
maildrop-1.5.1 has been added to portage with db logic which should be corrent 
now.  Please mark VERIFIED if things work properly for you or REOPEN if you 
experience further problems with maildrop.
Comment 5 Jukka Salmi 2003-01-02 01:10:30 UTC
db logic works now, so the userdb issue is solved.

when using gcc 3 (tested with gcc 3.2.1), your ebuild works perfectly. but for
gcc 2 (2.95.3) i had to change the make command. here is the patch:

-----patch start-----
--- maildrop-1.5.1.ebuild       2003-01-02 07:47:10.000000000 +0100
+++ maildrop-1.5.1-r1.ebuild       2003-01-02 07:57:55.000000000 +0100
@@ -54,7 +54,7 @@
                --enable-sendmail=/usr/sbin/sendmail \
                ${myconf} || die "bad ./configure"
 
-       emake || die "compile problem"
+       emake CXX='g++' || die "compile problem"
 }
 
 src_install() {
-----patch end-----

without this patch, gcc wasn't able to compile some C++ files. i got linker
error messages like "undefined reference to `cerr'" and so... this cause the
build to fail of course.
Comment 6 Nick Hadaway 2003-01-02 05:15:34 UTC
I have updated the ebuild accordingly.  Thanks for the quick response.