简体   繁体   中英

How to create postfix rpm from source

I need/want to upgrade postfix from 2.11.6 to 2.11.11 on CentOS 6.7 the current 2.11.6 version is installed as RPM, and I need to find / create postfix 2.11.11 rpm so that I can use it on multiple machines for the upgrade.

I only found SRPM from SuSE for 2.11.11 and I tried to extract the SRPM and build it with the rpmbuild command but it fails with many errors so I guess its not possible to do it like that out of the box.

I also tried to build my own RPM from the postfix source code available on their website:

Postfix 2.11.11 source code

However creating a spec file from scratch is a bit too much for me and I'm not even certain if what I'm doing is correct or if it will break my current postfix installation if I attempt to upgrade it with my custom rpm.

So in short,

I need to create postfix 2.11.11 RPM so I can use it to upgrade my current postfix on multiple machines and I cannot find/don't know how to create a valid rpm.

Create a virtual machine similar to your server and build your rpm there. Check this out this https://www.thegeekstuff.com/2015/02/rpm-build-package-example .

Or this

http://lifeofageekadmin.com/build-rpms-centos/

I havent compile postfix in ages so I dont remember what params you might need so read this http://www.postfix.org/INSTALL.html , be sure to add support for the stuff you use. It is probably going to be trial an error. Dont compile nothing on a production server, you should never have compiling tools on it. Do everything on your virtual machine.

This might help you find out what options were used to compile your previous version of postfix: https://unix.stackexchange.com/questions/134914/how-do-i-determine-which-configuration-options-an-rpm-package-is-built-with .

I found this too https://www.digrouz.com/mediawiki/index.php/HOWTO_Rebuild_a_RPM_from_sources_with_specific_application_support

You can check on build system of suse.

https://build.opensuse.org/search?name=1&package=1&project=1

There are some package available for postfix, some are for centos...

that could be a good start.

You create start your own package too from this site.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM