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
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
On 20/4/2012 11:10 μμ, fakessh wrote:
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
Thank you very much, I'll gladly check it.
Best regards, Nick
On 20/4/2012 11:10 μμ, fakessh wrote:
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
Hi fakessh,
I was looking at your: http://ns.fakessh.eu/rpms/dovecot-2.1.8-1.centme.src.rpm package (after adapting to build for 2.1.13) and I am trying to figure out how to build with custom LDAP libraries. I build Postfix using:
CCARGS="${CCARGS} -DHAS_LDAP -I/usr/local/openldap/include" AUXLIBS="${AUXLIBS} -L/usr/local/openldap/lib64 -lldap -llber"
and:
BuildRequires: openldap-ltb-debuginfo >= 2.4.33
Your Dovecot spec file (with respect to LDAP) only states:
BuildRequires: openldap-devel
So, I can change that to:
BuildRequires: openldap-ltb-debuginfo >= 2.4.33
but I will need to define custom locations for the libraries. How do I do that in your spec file?
Please advise. (Sorry, I am not an RPM-build guru.)
Thanks in advance.
Regards, Nick