[CentOS] Building Dovecot CentOS 5 RPMs with custom LDAP packages

Fri Apr 20 20:10:47 UTC 2012
fakessh <fakessh at fakessh.eu>

Le 2012-04-20 21:45, Nikolaos Milas a écrit :
> Hi,
>
> We are (still) mainly using CentOS 5 (5.8 x86_64). As CentOS / EL 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.
>
> I am not much experienced in building RPMs and preparing spec files. 
> We
> are currently using dovecot RPM packages from the atrpms repo
> (http://packages.atrpms.net/dist/el5/dovecot/).
>
> I would like to re-build Dovecot packages based on the LTB OpenLDAP 
> RPM
> packages (OpenLDAP v2.4.x), esp. because I see that ATRPMs Dovecot 
> RPM
> packages are built using OpenLDAP v2.3 devel code (i.e. standard 
> CentOS
> OpenLDAP devel packages).
>
> 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 guess I can/should change the former line to:
>
> BuildRequires: openldap-ltb-debuginfo, cyrus-sasl-devel
>
> Note: The final Dovecot RPM and the associated executables (included
> therein) do not need any LDAP dynamic library in order to run with 
> LDAP
> support; i.e. after building, the produced package does not require 
> any
> ldap package on the system.
>
> Question 1: What other changes/additions should we make in the spec 
> file
> in order to specify that we will be using (if needed) 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
> native openldap-devel RPM)?
>
> Question 2: How the Obsoletes and Conflicts lines should be changed?
>
> Any other associated info would be appreciated.
>
> Thanks,
> Nick
> _______________________________________________


look my personal rpm source of dovecot
its more simply and stable

http://ns.fakessh.eu/rpms/dovecot-2.1.4-1.centme.el5.src.rpm
-- 
  http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
  gpg --keyserver pgp.mit.edu --recv-key C2626742

  http://urlshort.eu fakessh @
  http://gplus.to/sshfake
  http://gplus.to/sshswilting
  http://gplus.to/john.swilting
  https://lists.fakessh.eu/mailman/
  This list is moderated by me, but all applications will be accepted
  provided they receive a note of presentation