Sunday, March 13, 2022

[SOLVED] how to patch changes to an rpm file

Issue

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)


Answered By - Chris Maes
Answer Checked By - David Marino (WPSolving Volunteer)