[Dovecot] Building Dovecot RHEL RPMs with custom LDAP packages

Nikolaos Milas nmilas at noa.gr
Mon Mar 19 13:20:22 EET 2012


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


More information about the dovecot mailing list