FIX: Postfix without MySQL dependency

MySQL client libraries has been bundled with Postfix in RHEL 5. Unfortunately, this conflicts with the Oracle MySQL libraries when we try to update Postfix:

---> Package postfix.x86_64 2:2.3.3-6.el5 set to be updated
--> Processing Dependency: mysql for package: postfix
--> Running transaction check
---> Package mysql.x86_64 0:5.0.95-5.el5_9 set to be updated
--> Processing Conflict: MySQL-client conflicts mysql
--> Processing Conflict: MySQL-server conflicts mysql
--> Processing Conflict: mysql conflicts MySQL
--> Finished Dependency Resolution
mysql-5.0.95-5.el5_9.x86_64 from Updates has depsolving problems
  --> mysql conflicts with MySQL-server
MySQL-client-5.6.10-1.rhel5.i386 from installed has depsolving problems
  --> MySQL-client conflicts with mysql
MySQL-server-5.6.10-1.rhel5.i386 from installed has depsolving problems
  --> MySQL-server conflicts with mysql
Error: MySQL-server conflicts with mysql
Error: mysql conflicts with MySQL-server
Error: MySQL-client conflicts with mysql
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest

<rant>Adding MySQL support to Postfix introduced an unneccessary dependency. Clearly, the people who pushed for this did not think about the use case for those who install upstream MySQL packages.</rant>

Fortunately, someone in Red Hat noticed this abomination, and removed it in RHEL 6. But those still using RHEL 5 are out-of-luck: they either have to stick with the MySQL packages provided by Red Hat if they want to use it with Postfix, or use a different MTA if they want to use upstream MySQL.

This won't hold in our case. Our only recourse was to remove the MySQL dependency in Postfix. So, after downloading the source RPM, it was a simple matter of adding this to .rpmmacro:

%MYSQL 0

and running

rpmbuild --rebuild SRPMS/postfix-2.3.3-6.el5.src.rpm

The binary RPM was then added to our local repository. We had to remove Postfix first, update the rest of the packages, then re-install Postfix, but this time without the pesky MySQL dependency.

Comments

Popular posts from this blog

Pull files off Android phone