LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-29-2009, 08:52 PM   #1
justemail
LQ Newbie
 
Registered: Apr 2009
Posts: 29

Rep: Reputation: 15
How to build RPM from Postfix SRPM with PostgreSQL Support?


I do not know how to put this question but I am going to try!

I have SRPM for Postfix-2.5.? from Simon Mudd web site. I want to install Postfix with Postgres-8.3.7 support. I already have PostgreSQL installed on a LINUX CentOS 5.3 machine.

1. Can somebody either point me to a document which describe the procedure of creating a RPM from SRPM as described above -OR- instructions as how to do it,
 
Old 05-30-2009, 02:38 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
'postfix.spec', ref. specfile from postfix-2.5.5-1.fc10.src.rpm

Probably edit line 1 and 2
%{?!MYSQL: %define MYSQL 1}
%{?!PGSQL: %define PGSQL 0}

to
%{?!MYSQL: %define MYSQL 0}
%{?!PGSQL: %define PGSQL 1}

And keep the modified spec file in /home/"username"/
and point to it when doing # rpmbuild -bb postfix.spec

... Interesting 'postfix.spec', you can get it with

wget http://download.fedora.redhat.com/pu...1.fc10.src.rpm

and unpack the ' src.rpm ' with
rpm2cpio <package> | cpio -idmv
.....
Will build in 2 minutes with the above package on CentOS5.x.
( I have postgresql-8.1.11, don't know, if any problems with 8.3.7 ).
Result : postfix-2.5.5-1.i386.rpm postfix-pflogsumm-2.5.5-1.i386.rpm
You can edit line 43 " Release: 1%{?dist} " to Release: 1pg%{?dist}
( or your choice ) if you want a unique package identifier.
Buildrequires : postgresql-devel setup openldap-devel
pcre-devel cyrus-sasl-devel openssl-devel .
.....
Good luck !
.....

Last edited by knudfl; 05-30-2009 at 06:47 AM.
 
Old 05-30-2009, 11:57 PM   #3
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
In case you decide to go with Simon J. Mudd, the instructions for building the rpm from the srpm are here. Just export the variables you need -- at least POSTFIX_PGSQL=1, in your case. You might as well install postfix-2.6.1.
 
Old 05-31-2009, 09:33 AM   #4
justemail
LQ Newbie
 
Registered: Apr 2009
Posts: 29

Original Poster
Rep: Reputation: 15
I looked at Simon Mudd's instructions. I am not very experienced so they seem to be out of my league. This is what I did:

Go to http://ftp.w10.org/official/2.5/SRPM....6.1-1.srm.rpm
Click OK ; Down load SRPM file
Note: The file will start downloading.

Now rebuild the Postfix application:
%> rpmbuild --rebuild --define “with_pgsql 1” \
> --define “with_devecot 1” --define “with_sasl 1” \
> --define “with_devecot 1” --define “with_tls 1” \
> postfix-2.6.1-1.src.rpm

This will take a long time. If the installation is without errors: SUCCESS

Install the new RPM file created.
=======

Would somebody is kind enough to let me know if this installation is correct or not?

Jennifer K.
 
Old 05-31-2009, 10:41 AM   #5
justemail
LQ Newbie
 
Registered: Apr 2009
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Berhanie View Post
In case you decide to go with Simon J. Mudd, the instructions for building the rpm from the srpm are here. Just export the variables you need -- at least POSTFIX_PGSQL=1, in your case. You might as well install postfix-2.6.1.

I experimented with Simon Mudds instructions line-by-line and it seems to work. I need help with one item:

How to add a line to include 'Dovecot'?

I input the line as follows:

% export POSTFIX_dovecot=1

and it did not work.

Jennifer K.
 
Old 05-31-2009, 12:46 PM   #6
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Looks like you need to use capital letters. This is from make-postfix.spec:
Code:
...
#
# POSTFIX_ALT_PRIO      allow the alternative's priority to be changed (default 30)
# POSTFIX_CDB           support for Constant Database, CDB, by Michael Tokarev
#                       <mjt@corpit.ru>, as originally devised by djb.
# POSTFIX_DOVECOT       include support for Dovecot SASL
# POSTFIX_LDAP          include support for openldap packages
# POSTFIX_MYSQL         include support for MySQL's MySQL packages
# POSTFIX_MYSQL_REDHAT  include support for RedHat's mysql packages
# POSTFIX_MYSQL_PATHS   include support for locally installed mysql binary,
#                       providing the colon seperated include and
#                       library directories ( /usr/include/mysql:/usr/lib/mysql )
# POSTFIX_PCRE          include support for pcre maps
# POSTFIX_PGSQL         include support for PostGres database
# POSTFIX_SASL          include Cyrus SASL/AUTH support
#                               0 to disable sasl,
#                               1 for sasl v1, or
#                               2 for sasl v2
# POSTFIX_SMTPD_MULTILINE_GREETING
#                       include support for multitline SMTP banner
# POSTFIX_SPF           include support for libspf2
# POSTFIX_TLS           include support for TLS
# POSTFIX_VDA           include support for Virtual Delivery Agent
#
...
 
  


Reply

Tags
build, postfix, postgresql, rpm, rpmbuild, srpm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix .src.rpm fails to build mardanian Fedora 1 03-02-2007 06:21 AM
postfix srpm installing problem LinuxLover Linux - Software 3 01-30-2006 09:46 AM
ffmpeg srpm build error texi2html dtra Linux - Software 0 10-21-2005 12:39 AM
Cyrus SASL & Postfix RPM Build ghight SUSE / openSUSE 0 06-03-2005 09:46 AM
gnome 2.4 srpm build order on redhat AS 3.0 dnraikes Linux - General 1 12-19-2003 06:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration