Feb 232010

I’ve Built SRPM package for postfix 2.8.0 on my spare time today, based on Simon J. Mudd’s template of course 🙂

The Hardest parts was testing and applies the right patches, but it seems okay when it compiled

Here’s the srpm file:


This how to rebuild the source :

$ rpm -Uvh postfix-2.8.0.src.rpm

Set the environments

$ export POSTFIX_LDAP=1
$ export POSTFIX_PCRE=1
$ export POSTFIX_PGSQL=1
$ export POSTFIX_SASL=2
$ export POSTFIX_TLS=1
$ export POSTFIX_VDA=1
$ export POSTFIX_DB=4

Create postfix.spec file and go to rpm spec directory

$ sh `rpm --eval '%{_sourcedir}'`/make-postfix.spec
$ cd `rpm --eval '%{_specdir}'`

rebuild rpms/srpms

$ rpmbuild -ba postfix.spec


note: tested only on centos 4.7 i386 machine, initial rpm source was build on centos 5.4 x86_64 (ibm blade) but not installed, you might want to test/check it first before installing on production machine

Feb 082010

I used to have Simon J. Mudd when building postfix rpm package, but seems he’s not releasing official postfix 2.7.0 yet, here’s a way for impatient one

First make RedHat Linux the standard directory structure in our homedir

$ mkdir rpmbuild
$ mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp}

Create .rpmmacros file

$ vi .rpmmacros
%_topdir                %(echo $HOME)/rpmbuild
%_tmppath               %(echo $HOME)/rpmbuild/tmp

Create tempoerary working directory for postfix

$ mkdir postfix
$ cd postfix

Continue reading »