Re: Building cyrus imapd fails

2007-11-06 Thread Christoph Schug
On Tue, Nov 06, 2007, Gunnar Wrobel wrote:

 Hi!
 
 Currently I fail to build the imapd package on rm0. It fails with
 
 checking for db.h... yes
 configure: error: Berkeley DB 3.x or later was not found.  You may need to
 supply the --with-bdb-libdir or --with-bdb-incdir configure options.
 error: Bad exit status from /ltmp/kk/openpkg/rpm-tmp.18065 (%build)

At first sight at config.log I don't see an obvious reason but the problem
might be related to the upgrade latest upgrade of db. Maybe the detection
of db needs in configure needs some fixing, will have a look at it later.

 I tried installing db45 but that didn't seem to help. What could I
 do to fix that?

You'll need some patching in imapd.spec as well in order to pick up
the libs which are installed under a different path to avoid namespace
conflicts with db. With following diff a was able to build imapd, but I
have no idea whether it breaks under runtime or not since I don't use
Cyrus IMAPd (had a look at it several times and I never liked it ;)

diff -u -d -u -d -u -d -r1.182 imapd.spec
--- imapd.spec  27 Oct 2007 11:59:30 -  1.182
+++ imapd.spec  6 Nov 2007 18:01:59 -
@@ -80,8 +80,8 @@
 BuildRoot:%{l_buildroot}
 BuildPreReq:  OpenPKG, openpkg = 20060823, perl, perl-openpkg, make, config
 PreReq:   OpenPKG, openpkg = 20060823, perl, MTA
-BuildPreReq:  sasl, db = 4.4, openssl
-PreReq:   sasl, db = 4.4, openssl
+BuildPreReq:  sasl, db45, openssl
+PreReq:   sasl, db45, openssl
 %if %{with_fsl} == yes
 BuildPreReq:  fsl
 PreReq:   fsl
@@ -166,8 +166,8 @@
 %{l_shtool} subst\
 -e 's;-L/usr/local/lib;;g' \
 -e 's;-I/usr/local/include;;g' \
--e 's;db-4\.[0-9];db;g' \
--e 's;-l\$dbname;%{l_prefix}/lib/lib$dbname.a;g' \
+-e 's;db-4\.[0-9];db45;g' \
+-e 's;-l\$dbname;%{l_prefix}/lib/db45/lib$dbname.a;g' \
 configure
 
 #   ensure correct linking of Berkeley-DB in perl bindings

 The thing I wanted to change on the imapd package was actually
 trivial:
 
 diff -u -d -u -d -r1.14 fsl.imapd
 --- fsl.imapd 17 Dec 2006 12:35:57 -1.14
 +++ fsl.imapd 6 Nov 2007 15:05:45 -
 @@ -38,7 +38,7 @@
  }
  };
  
 -ident (lmtpd)/.+ q{
 +ident (lmtpd|lmtp)/.+ q{
  prefix(
  prefix=%b %d %H:%M:%S %N %L $1[%P]: 
  )

Do you know whether the lmtpd identifier is still used or can we fully
replace lmtpd by lmtp?

-cs
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Building cyrus imapd fails

2007-11-06 Thread Ralf S. Engelschall
On Tue, Nov 06, 2007, Gunnar Wrobel wrote:

 Currently I fail to build the imapd package on rm0. It fails with

 checking for db.h... yes
 configure: error: Berkeley DB 3.x or later was not found.  You may need to
 supply the --with-bdb-libdir or --with-bdb-incdir configure options.
 error: Bad exit status from /ltmp/kk/openpkg/rpm-tmp.18065 (%build)

 I tried installing db45 but that didn't seem to help. What could I
 do to fix that?

The problem is that the installed db package was built by me with
with_pthreads=yes a few days ago for testing purposes together with
OpenLDAP. I just forgot to reinstall a regular db package. Now
fixed.

 The thing I wanted to change on the imapd package was actually
 trivial:

 diff -u -d -u -d -r1.14 fsl.imapd
 --- fsl.imapd 17 Dec 2006 12:35:57 -1.14
 +++ fsl.imapd 6 Nov 2007 15:05:45 -
 @@ -38,7 +38,7 @@
  }
  };

 -ident (lmtpd)/.+ q{
 +ident (lmtpd|lmtp)/.+ q{
  prefix(
  prefix=%b %d %H:%M:%S %N %L $1[%P]: 
  )

 Currently the lmtpd does not write a log file since the log lines
 start with lmtp rather than lmtpd

You should be now able to again build imapd and especially commit this
change...

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com

__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Building cyrus imapd fails

2007-11-06 Thread Christoph Schug
On Tue, Nov 06, 2007, Ralf S. Engelschall wrote:

 On Tue, Nov 06, 2007, Gunnar Wrobel wrote:
 
  Currently I fail to build the imapd package on rm0. It fails with
 
  checking for db.h... yes
  configure: error: Berkeley DB 3.x or later was not found.  You may need to
  supply the --with-bdb-libdir or --with-bdb-incdir configure options.
  error: Bad exit status from /ltmp/kk/openpkg/rpm-tmp.18065 (%build)
 
  I tried installing db45 but that didn't seem to help. What could I
  do to fix that?
 
 The problem is that the installed db package was built by me with
 with_pthreads=yes a few days ago for testing purposes together with
 OpenLDAP. I just forgot to reinstall a regular db package. Now
 fixed.

Ah, nice hint. In the case we should add a conflict to the list of
dependencies. OTOH, if don't want to clutter all packages using db, why
not change the db package by building one version of db without thread
support and build a second version of db with thread support under a
different path. So we can handle it nicely in the db package itself.

Furhtermore I just had a look at the imapd configure script. From my
point of view we can clean up several things in the imapd.spec file. The
shtool subst operations are obsolete. The '-L' and '-I' lines are not
longer existent and the rest seems to be handled correctly when invoking
configure with the '--with-bdb' option. Furthermore, '--with-bdb-incdir=
und '--with-bdb-libdir' don't make any sense as long the '--with-bdb'
option is given.

diff -u -d -u -d -u -d -r1.182 imapd.spec
--- imapd.spec  27 Oct 2007 11:59:30 -  1.182
+++ imapd.spec  6 Nov 2007 18:47:53 -
@@ -162,14 +162,6 @@
 #   make sure config2header rebuilds imapopts based on imapoptions
 rm -f lib/imapopts.h lib/imapopts.c /dev/null 21 || true
 
-#   fix Berkeley-DB detection
-%{l_shtool} subst\
--e 's;-L/usr/local/lib;;g' \
--e 's;-I/usr/local/include;;g' \
--e 's;db-4\.[0-9];db;g' \
--e 's;-l\$dbname;%{l_prefix}/lib/lib$dbname.a;g' \
-configure
-
 #   ensure correct linking of Berkeley-DB in perl bindings
 loclibs=
 case %{l_platform -t} in
@@ -257,8 +249,6 @@
 --with-lib-subdir=%{l_prefix}/lib \
 --with-openssl=%{l_prefix} \
 --with-bdb=%{l_prefix} \
---with-bdb-incdir=%{l_prefix}/include \
---with-bdb-libdir=%{l_prefix}/lib \
 --with-sasl=%{l_prefix} \
 --with-staticsasl=%{l_prefix} \
 --with-com_err \

But maybe someone should test it under runtime before commiting it.

-cs
__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Building cyrus imapd fails

2007-11-06 Thread Ralf S. Engelschall
On Tue, Nov 06, 2007, Christoph Schug wrote:

 On Tue, Nov 06, 2007, Ralf S. Engelschall wrote:
  On Tue, Nov 06, 2007, Gunnar Wrobel wrote:
 
   Currently I fail to build the imapd package on rm0. It fails with
  
   checking for db.h... yes
   configure: error: Berkeley DB 3.x or later was not found.  You may need to
   supply the --with-bdb-libdir or --with-bdb-incdir configure options.
   error: Bad exit status from /ltmp/kk/openpkg/rpm-tmp.18065 (%build)
  
   I tried installing db45 but that didn't seem to help. What could I
   do to fix that?
 
  The problem is that the installed db package was built by me with
  with_pthreads=yes a few days ago for testing purposes together with
  OpenLDAP. I just forgot to reinstall a regular db package. Now
  fixed.

 Ah, nice hint. In the case we should add a conflict to the list of
 dependencies. OTOH, if don't want to clutter all packages using db, why
 not change the db package by building one version of db without thread
 support and build a second version of db with thread support under a
 different path. So we can handle it nicely in the db package itself.

In general: yes. But the with_pthread=yes option in db is really just
experimental. I even added a %{warn: ...} to it. I currently just need
it to allow one to drive a Pthread-based OpenLDAP and actually I would
like to get rid of db's with_pthread option at all again soon, too.
So, I don't think we should put any real efforts into this. Best is to
never build db with with_pthread=yes at all... Perhaps the %{warn}
in db.spec should be even a %{error}...

 Furhtermore I just had a look at the imapd configure script. From my
 point of view we can clean up several things in the imapd.spec file. The
 shtool subst operations are obsolete. The '-L' and '-I' lines are not
 longer existent and the rest seems to be handled correctly when invoking
 configure with the '--with-bdb' option. Furthermore, '--with-bdb-incdir=
 und '--with-bdb-libdir' don't make any sense as long the '--with-bdb'
 option is given.
 [...]

I build once with and without your patch and the result looks just fine.
I see no problem. Please commit these cleanup changes, Christoph.

   Ralf S. Engelschall
   [EMAIL PROTECTED]
   www.engelschall.com

__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org


Re: Building cyrus imapd fails

2007-11-06 Thread Gunnar Wrobel
Christoph Schug [EMAIL PROTECTED] writes:

 On Tue, Nov 06, 2007, Gunnar Wrobel wrote:

 Hi!
 
 Currently I fail to build the imapd package on rm0. It fails with
 
 checking for db.h... yes
 configure: error: Berkeley DB 3.x or later was not found.  You may need to
 supply the --with-bdb-libdir or --with-bdb-incdir configure options.
 error: Bad exit status from /ltmp/kk/openpkg/rpm-tmp.18065 (%build)

 At first sight at config.log I don't see an obvious reason but the problem
 might be related to the upgrade latest upgrade of db. Maybe the detection
 of db needs in configure needs some fixing, will have a look at it later.

 I tried installing db45 but that didn't seem to help. What could I
 do to fix that?

 You'll need some patching in imapd.spec as well in order to pick up
 the libs which are installed under a different path to avoid namespace
 conflicts with db. With following diff a was able to build imapd, but I
 have no idea whether it breaks under runtime or not since I don't use
 Cyrus IMAPd (had a look at it several times and I never liked it ;)

 diff -u -d -u -d -u -d -r1.182 imapd.spec
 --- imapd.spec  27 Oct 2007 11:59:30 -  1.182
 +++ imapd.spec  6 Nov 2007 18:01:59 -
 @@ -80,8 +80,8 @@
  BuildRoot:%{l_buildroot}
  BuildPreReq:  OpenPKG, openpkg = 20060823, perl, perl-openpkg, make, config
  PreReq:   OpenPKG, openpkg = 20060823, perl, MTA
 -BuildPreReq:  sasl, db = 4.4, openssl
 -PreReq:   sasl, db = 4.4, openssl
 +BuildPreReq:  sasl, db45, openssl
 +PreReq:   sasl, db45, openssl
  %if %{with_fsl} == yes
  BuildPreReq:  fsl
  PreReq:   fsl
 @@ -166,8 +166,8 @@
  %{l_shtool} subst\
  -e 's;-L/usr/local/lib;;g' \
  -e 's;-I/usr/local/include;;g' \
 --e 's;db-4\.[0-9];db;g' \
 --e 's;-l\$dbname;%{l_prefix}/lib/lib$dbname.a;g' \
 +-e 's;db-4\.[0-9];db45;g' \
 +-e 's;-l\$dbname;%{l_prefix}/lib/db45/lib$dbname.a;g' \
  configure
  
  #   ensure correct linking of Berkeley-DB in perl bindings

 The thing I wanted to change on the imapd package was actually
 trivial:
 
 diff -u -d -u -d -r1.14 fsl.imapd
 --- fsl.imapd 17 Dec 2006 12:35:57 -1.14
 +++ fsl.imapd 6 Nov 2007 15:05:45 -
 @@ -38,7 +38,7 @@
  }
  };
  
 -ident (lmtpd)/.+ q{
 +ident (lmtpd|lmtp)/.+ q{
  prefix(
  prefix=%b %d %H:%M:%S %N %L $1[%P]: 
  )

 Do you know whether the lmtpd identifier is still used or can we fully
 replace lmtpd by lmtp?

Hm, actually I'm not certain if lmtpd has ever been used. I checked
the source code and the prefix always seems to be the service name
defined in cyrus.conf. And that has always been lmtp.

I'll also write a mail to kolab-devel to see if anybody actually has
the lmtp log in the older server versions.

Thanks for fixing the db issue!

Cheers,

Gunnar


 -cs
 __
 OpenPKG http://openpkg.org
 Developer Communication List   openpkg-dev@openpkg.org

-- 
__ http://kdab.com ___ http://kolab-konsortium.com _

[EMAIL PROTECTED] Kolab work is funded in part by KDAB and the Kolab Konsortium

 http://www.pardus.de _ http://gunnarwrobel.de _
E-mail : [EMAIL PROTECTED] Dr. Gunnar Wrobel
Tel.   : +49 40 432 72335   Bundesstrasse 29
Fax: +49 40 432 70855D-20146 Hamburg

Mail at ease - Rent a kolab groupware server at [EMAIL PROTECTED]   
   

__
OpenPKG http://openpkg.org
Developer Communication List   openpkg-dev@openpkg.org