On 13/3/2012 7:58 μμ, Nikolaos Milas wrote:
As far as I know, most people creating RHEL Postfix RPMs are using S.
J. Mudd's src.rpm but I don't know if someone has extended the
included spec files to support custom LDAP paths.
I have been able to use S. J. Mudd's src.rpm to build RPM packages (on
CentOS 5.8 64bit) by manually editing postfix.spec.
First I generated postfix.spec by issuing:
export POSTFIX_LDAP=1
export POSTFIX_PCRE=1
export POSTFIX_SASL=2
export POSTFIX_TLS=1
export POSTFIX_DOVECOT=1
and then running ./make-postfix.spec.
I manually edited:
%if %{with_ldap}
Requires: openldap-ltb
BuildRequires: openldap-ltb-debuginfo
%endif
and:
%if %{with_ldap}
CCARGS="${CCARGS} -DHAS_LDAP -I/usr/local/openldap/include"
AUXLIBS="${AUXLIBS} -L/usr/local/openldap/lib -lldap -llber"
%endif
There were two rpms produced (x86_64):
postfix-2.9.1-1.pcre.sasl2.dovecot.rhel5.x86_64.rpm
postfix-debuginfo-2.9.1-1.pcre.sasl2.dovecot.rhel5.x86_64.rpm
However, I see that at the end of the build process, the "Requires"
section includes:
"... liblber-2.3.so.0()(64bit) libldap-2.3.so.0()(64bit) ..."
which are in /usr/lib64 and belong to native openldap v2.3.x while I
would expect to see libraries like:
"liblber-2.4-releng.so.2 ... libldap-2.4-releng.so.2"
or
"libldap.so... libldap.so"
which are in /usr/local/openldap/lib64 and belong to LTB v2.4.x
What am I doing wrong? Can somebody please correct me?
For reference, you can see the whole log of the build process and the
spec file used here:
https://vmail.noa.gr/files/build_postfix_rpm.zip
https://vmail.noa.gr/files/postfix.spec.zip
Thanks,
Nick