Search code examples
patchrpmrhel

how to patch changes to an rpm file


I have a third party rpm (rabbitmq-server-3.5.4-noarch.rpm) and I need to make some text changes on a static-file (a text file) in this rpm as per my organization policy. I need to make changes before installing it on my server. Could someone guide me to do this.

I tried rpm2cpio command but was only able to see the contents displayed on the console, but I need to make the changes to the text inside the rpm.


Solution

  • afaik there is no way to patch an rpm as such. I would recommend to:

    • get the source rpm (.src.rpm)
    • install the source rpm
    • patch your license text file
    • rebuild a new rpm (preferably with another version number)