Postfix rpm build with MySQL support

Well.. First off, I realise that this is not the best place to ask this question, however I didnt really want to subscribe to yet ANOTHER mailing list where my questions would probably never get answered ;) (im not having a go… people get busy and I realise that my question would be well down the food chain..)

Im trying to build a postfix rpm with mysql support for my fedora distro. If anyone knows of one that would be great… ,)

So I have installed the source rpm (as a non root user, would this be a problem? i have previously read that you should always build rpms as non root ??)

Then I have modified the spec file so that:

%define mysql 1

is set.

I then run.. rpmbuild -bb postfix.spec

And it complains that:

error: Failed build dependencies:

MySQL-shared is needed by postfix-2.1.3-4.rhel3

MySQL-devel is needed by postfix-2.1.3-4.rhel3

So. This is all very nice, however I think both of these are installed in /usr/include/mysql and /usr/lib/mysql however trying to get the specfile to see them is the problem.

I think they are installed for this reason. If I do a yum list installed mysql-devel comes up. The package mysql-shared does not, however perhaps that is part of the mysql server package?? as I the files libmysqlclient.so.10 and libmysqlclient_r.so.10 which are both in the mysql-shared package.

So I modified the spec file which has the lines…

%define mysql 1
%define mysql_redhat 0
%define mysql_paths /usr/include/mysql:/usr/lib/mysql
%define mysql_local %(test "%{mysql_paths}" != 0 && echo 1 || echo 0)
%define mysql_include %(echo "%{mysql_paths}" | cut -d: -f1)
%define mysql_lib %(echo "%{mysql_paths}" | cut -d: -f2)

To my way of thinking that should cut the mysqlpaths up for mysqllocal and mysql_lib but I still get the same errors :(

Anyone have any ideas? I tried changing the mysql_redhat flag, but same error.

Thanks

2 Replies

well… out of interest I tried building the package as root.

So far it appears to be working, so I guess it must be some error in my .rpmmacros file in my home dir.

hi, why there is no postfix rpm? :(

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct