[Dovecot] Building Dovecot RHEL RPMs with custom LDAP packages

2012-03-19 Thread Nikolaos Milas

Hi,

We are (still) mainly using CentOS 5 (5.8 x86_64). As CentOS / RHEL 5 
standard OpenLDAP packages are rather old (2.3.x), we've been using LTB 
OpenLDAP packages (http://ltb-project.org/wiki/download#openldap), which 
get installed in non-standard file system locations.


So, I would like to re-build Dovecot packages based on these OpenLDAP 
libraries, esp. because I see that dovecot RPM packages are built using 
OpenLDAP v2.3 libraries.


I am not much experienced in building RPMs and preparing spec files.

In http://dl.atrpms.net/all/dovecot.spec I see:


BuildRequires: openldap-devel, cyrus-sasl-devel

...

Obsoletes: %{name}-pgsql  %{epoch}:%{version}-%{release}, %{name}-mysql 
 %{epoch}:%{version}-%{release}, %{name}-sqlite  
%{epoch}:%{version}-%{release}, %{name}-ldap  
%{epoch}:%{version}-%{release}, $
Conflicts: %{name}-pgsql  %{epoch}:%{version}-%{release}, %{name}-mysql 
 %{epoch}:%{version}-%{release}, %{name}-sqlite  
%{epoch}:%{version}-%{release}, %{name}-ldap  
%{epoch}:%{version}-%{release}, $



So, I can change the former reference (openldap-devel) to:

   openldap-ltb-debuginfo, cyrus-sasl-devel

Question 1: What other changes should we make in order to specify that 
we will be using LDAP libraries from: /usr/local/openldap/lib64 and 
include files from: /usr/local/openldap/include (rather than from 
/usr/lib64 and /usr/include, respectively, which are the standard file 
paths used in openldap-devel)


Question 2: How the Obsoletes and Conflicts lines should be changed?

Question 3: It seems to me (by reading the spec file) that the final 
Dovecot RPM (and the included executables) does not need any LDAP 
dynamic library in order to run with LDAP support (because I don't see 
any dependencies on openldap package). Can somebody please confirm?


Any other associated info would be appreciated.

Thanks,
Nick


Re: [Dovecot] Building Dovecot RHEL RPMs with custom LDAP packages

2012-03-19 Thread /dev/rob0
On Mon, Mar 19, 2012 at 01:20:22PM +0200, Nikolaos Milas wrote:
 We are (still) mainly using CentOS 5 (5.8 x86_64). As CentOS /
 RHEL 5 standard OpenLDAP packages are rather old (2.3.x), we've
 been using LTB OpenLDAP packages 
 (http://ltb-project.org/wiki/download#openldap), which get 
 installed in non-standard file system locations.

ISTM that herein lies the whole problem. Why did you not rpmbuild 
your OpenLDAP? That would have avoided all further fuss.

Another observation I can offer, unwelcome as it may be: your OS 
choice was not a good one when you want the features of recent 
software. Perhaps you should rethink that choice. You have invested 
much effort in this task.

 So, I would like to re-build Dovecot packages based on these 
 OpenLDAP libraries, esp. because I see that dovecot RPM packages 
 are built using OpenLDAP v2.3 libraries.
 
 I am not much experienced in building RPMs and preparing spec 
 files.

And that is really more a question for a CentOS forum than here.

 In http://dl.atrpms.net/all/dovecot.spec I see:
 
 
 BuildRequires: openldap-devel, cyrus-sasl-devel

The latter requirement seems curious to me. In what way does Dovecot 
use Cyrus SASL?
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if /dev/rob0 is in the Subject:


Re: [Dovecot] Building Dovecot RHEL RPMs with custom LDAP packages

2012-03-19 Thread Nikolaos Milas

On 19/3/2012 2:32 μμ, /dev/rob0 wrote:


ISTM that herein lies the whole problem. Why did you not rpmbuild
your OpenLDAP? That would have avoided all further fuss.


Thanks for the reply.

First, how would I rpmbuild my openldap v2.4.x as a standard CentOS 5 
package (i.e. replacing native openldap-2.3.43-25)? If I were more 
experienced, I could have tried to engineer 
openldap-2.3.43-25.el5.src.rpm to upgrade the system to use 2.4.x... But 
still, I haven't seen any OpenLDAP packages attempting to do so, 
probably because of the tight integration of CentOS with some openldap 
v2.3 libraries.


I think it's good that third-party packages (even of the same software) 
give the ability to not mess with standard system. The same is true for 
reputable Symas OpenLDAP packages.


So, I simply use LTB OpenLDAP, even though it's installed at 
non-standard locations.


(This has an added benefit of easy migration. You can setup any/all of 
those on the same system and decide which one to enable at any time.)



Another observation I can offer, unwelcome as it may be: your OS
choice was not a good one when you want the features of recent
software. Perhaps you should rethink that choice. You have invested
much effort in this task.


I like CentOS from many aspects as an enterprise server OS. I wouldn't 
change it.


Yet, it's important to me to be able to build/combine non-standard 
packages. Even with CentOS 6, I would still continue to use LTB OpenLDAP 
for a number of reasons.


It's true that I've invested much effort in this task, but mostly 
because my knowledge on this subject is very basic.


Note that Dovecot RPM works fine as is (compiled with OpenLDAP 2.3), 
i.e. there is no real need in re-building it using OpenLDAP 2.4 libs. We 
just try to make things better (and make our life a bit more difficult) :-)




And that is really more a question for a CentOS forum than here.



True, but I am hoping that there might be some Dovecot RHEL/CentOS 
packagers in this list, and that would help resolve issues more 
effectively, as it is a Dovecot-specific (even if for a package thereof) 
question.


So, any help will be appreciated!

The latter requirement seems curious to me. In what way does Dovecot 
use Cyrus SASL? 


Hmm, I can't tell. I hope atrpm packager(s), if present on this list, 
can provide some feedback.


Thanks again,
Nick


Re: [Dovecot] Building Dovecot RHEL RPMs with custom LDAP packages

2012-03-19 Thread /dev/rob0
On Mon, Mar 19, 2012 at 03:47:24PM +0200, Nikolaos Milas wrote:
 On 19/3/2012 2:32 μμ, /dev/rob0 wrote:
 
 ISTM that herein lies the whole problem. Why did you not rpmbuild
 your OpenLDAP? That would have avoided all further fuss.
 
 Thanks for the reply.
 
 First, how would I rpmbuild my openldap v2.4.x as a standard CentOS 
 5 package (i.e. replacing native openldap-2.3.43-25)? If I were 
 more experienced, I could have tried to engineer 
 openldap-2.3.43-25.el5.src.rpm to upgrade the system to use 

That's what I would have tried.

 2.4.x... But still, I haven't seen any OpenLDAP packages attempting 
 to do so, probably because of the tight integration of CentOS with 
 some openldap v2.3 libraries.

I don't have anything to tell you there, and I note that we are now 
fully off-topic. :)

 I think it's good that third-party packages (even of the same
 software) give the ability to not mess with standard system. The same
 is true for reputable Symas OpenLDAP packages.
 
 So, I simply use LTB OpenLDAP, even though it's installed at
 non-standard locations.

Failing the SRPM translation, why not just install into the CentOS 
standard locations? ... oops, I typed too fast ...

 (This has an added benefit of easy migration. You can setup any/all
 of those on the same system and decide which one to enable at any
 time.)

So you are in fact using both the CentOS OpenLDAP and your own 
version? This does not sound good at all. :(

 Another observation I can offer, unwelcome as it may be: your
 OS choice was not a good one when you want the features of
 recent software. Perhaps you should rethink that choice. You
 have invested much effort in this task.
 
 I like CentOS from many aspects as an enterprise server OS. I
 wouldn't change it.

I don't doubt that CentOS/RHEL offers many benefits, but my point 
here is that in this endeavor you are seeing the drawbacks.

 Yet, it's important to me to be able to build/combine non-standard
 packages. Even with CentOS 6, I would still continue to use LTB
 OpenLDAP for a number of reasons.
 
 It's true that I've invested much effort in this task, but mostly
 because my knowledge on this subject is very basic.

And there too, the better forum, with more of the skills you need, 
would be the CentOS one. :)

 Note that Dovecot RPM works fine as is (compiled with OpenLDAP 2.3),
 i.e. there is no real need in re-building it using OpenLDAP 2.4 libs.
 We just try to make things better (and make our life a bit more
 difficult) :-)
 
 
 And that is really more a question for a CentOS forum than here.
 
 
 True, but I am hoping that there might be some Dovecot RHEL/CentOS
 packagers in this list, and that would help resolve issues more
 effectively, as it is a Dovecot-specific (even if for a package
 thereof) question.
 
 So, any help will be appreciated!
 
 The latter requirement seems curious to me. In what way does
 Dovecot use Cyrus SASL?
 
 Hmm, I can't tell. I hope atrpm packager(s), if present on this 
 list, can provide some feedback.

I was thinking maybe Timo would know. As far as I can tell it 
doesn't. I do see in configure.in's check for LDAP, a search for 
sasl.h or sasl/sasl.h, so it appears that Cyrus SASL might be 
required to build Dovecot's LDAP support.
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if /dev/rob0 is in the Subject:


Re: [Dovecot] Building Dovecot RHEL RPMs with custom LDAP packages

2012-03-19 Thread Nikolaos Milas

On 19/3/2012 5:28 μμ, /dev/rob0 wrote:

So you are in fact using both the CentOS OpenLDAP and your own 
version? This does not sound good at all. :( 


I talked about migration, didn't I? (Helps in test environments too!)


And there too, the better forum, with more of the skills you need,
would be the CentOS one. :)

...

And that is really more a question for a CentOS forum than here.



I guess I might have to subscribe to CentOS forum/mailing list... (I 
haven't needed to yet.)


Thanks anyway,
Nick