I am converting a Debian box running Postfix, Courier and MySQL to a CentOS box running Postfix, Dovecot and MySQL. I have the Postfix with MySQL support taken care of with the RPM from the centosplus repo. It appears that the stock RPM for Dovecot comes with Postgres, but not MySQL support.
It looks like I need to download the source RPM and then rebuild it with MySQL support. Could someone outline the steps I need to do this or point me to a good resource? I have not worked with source RPMs in the past, but it looks like it is time to learn!
Also, if I build it from a source RPM, should I then exclude it from my repos to keep a future update from overriding the one I built?
Thanks! Jeffrey
Jeffrey Tadlock wrote:
It appears that the stock RPM for Dovecot comes with Postgres, but not MySQL support.
It looks like I need to download the source RPM and then rebuild it with MySQL support. Could someone outline the steps I need to do this or point me to a good resource? I have not worked with source RPMs in the past, but it looks like it is time to learn!
This morning I pulled down the source RPM for Dovecot in an attempt to get MySQL support. The first thing I tried was the steps here:
http://www3.sympatico.ca/sarrazip/dev/rpm-building-crash-course.html
Where I created my own build area under my user directory and then ran
rpmbuild -bb dovecot.spec
This started failing here:
+ aclocal configure.in:272: warning: underquoted definition of AC_TYPEOF run info '(automake)Extending aclocal' or see http://sources.redhat.com/automake/automake.html#Extending-aclocal configure.in:497: warning: underquoted definition of AC_CHECKTYPE2 aclocal:configure.in:15: warning: macro `AM_ICONV' not found in library configure.in:13: warning: AC_ARG_PROGRAM invoked multiple times + autoconf configure.in:13: warning: AC_ARG_PROGRAM invoked multiple times configure.in:15: error: possibly undefined macro: AM_ICONV If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. error: Bad exit status from /var/tmp/rpm-tmp.90381 (%build)
I then tried rpmbuild -ba dovecot.spec and it too failed with a similar message to above.
From that point I re-downloaded dovecot-0.99.11-2.EL4.1.src.rpm from a CentOS 4.2 mirror and tried this:
rpmbuild --rebuild dovecot-0.99.11-2.EL4.1.src.rpm
Which also errored out with this:
+ aclocal configure.in:272: warning: underquoted definition of AC_TYPEOF run info '(automake)Extending aclocal' or see http://sources.redhat.com/automake/automake.html#Extending-aclocal configure.in:497: warning: underquoted definition of AC_CHECKTYPE2 aclocal:configure.in:15: warning: macro `AM_ICONV' not found in library configure.in:13: warning: AC_ARG_PROGRAM invoked multiple times + autoconf configure.in:13: warning: AC_ARG_PROGRAM invoked multiple times configure.in:15: error: possibly undefined macro: AM_ICONV If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. error: Bad exit status from /var/tmp/rpm-tmp.91975 (%build)
I am probably missing something obvious, but not sure what. In the end I just want a dovecot RPM with MySQL support. If there is a better, more maintainable way to acheive that goal than working with the source RPMs I am open to suggestions.
Thanks! Jeffrey
Jeffrey Tadlock wrote:
It appears that the stock RPM for Dovecot comes with Postgres, but not MySQL support.
It looks like I need to download the source RPM and then rebuild it with MySQL support. Could someone outline the steps I need to do this or point me to a good resource? I have not worked with source RPMs in the past, but it looks like it is time to learn!
This morning I pulled down the source RPM for Dovecot in an attempt to get MySQL support. The first thing I tried was the steps here:
well, if you just look at the .spec file included in dovecot's src.rpm - you will find its already built with mysql support.
having said that, I had to get a dovecot install going with mysql support, and I took the easy way around, and left dovecot auth working against pam, and setting up pam_mysql to handle the backend.
pam_mysql is available at http://centos.karan.org/ in the Extras repo, for both i386 and x86_64 CentOS4.
- K
Karanbir Singh wrote:
well, if you just look at the .spec file included in dovecot's
src.rpm -
you will find its already built with mysql support.
having said that, I had to get a dovecot install going with mysql support, and I took the easy way around, and left dovecot auth working against pam, and setting up pam_mysql to handle the backend.
Thank you! I should have looked a little closer before just trying to rebuild the source RPM. Sure enough I was able to get Dovecot working with a MySQL database by just doing 'yum install dovecot' and adding in the pointers to a configured dovecot-mysql.conf file.
Thanks again for the nudge in the right direction!
Jeffrey