Patching the SRPM package

In this tutorial we will discuss howto unpack source rpm’s, generate a patch  with diff command from the changed sources and create a new rpm, tihs case you aready have the src-rpm and need to patching the SRPM. I assume you have the non-root build environment set up as per previous tutorial building an RPM without having root access

In my previous tutorial you maybe asked yourself if there is src-rpm then sure i will find the rpm for my platform so why i need to build the rpm again !!!!!!

the answer is,  in normal case you will not need to build the exact same src-rpm but what if you need to add some changes in source ?

we will add our patch to spec file then compile , there may be other patches already being applied to this package, so give yours a unique number in the specfile, and be careful that your patch doesn’t break others. Usually the next available number will work fine, and your patch will be applied after all others.
let see howto patching the SRPM

Adding a patch to SRPM packaged content

Adding a patch to SRPM packaged content

Ref : http://www.owlriver.com/tips/patching_srpms/


Leave a Reply