title: Editing and repackaging a binary rpm?
body: <p>I have been asked to "unpack" a binary rpm from a third party, replace a few of the java jar files contained therein, and repackage it so that it installs like the original rpm (for internal use, not redistribution).</p>
  
  <p>I have tried the following:</p>
  
  <p>1) Using <code>alien</code> to convert the rpm to a tgz, un-tarball it, modify it, re-tarball it then convert it from tgz to rpm with <code>alien</code> again</p>
  
  <p>2) Installing the rpm, modifying the jars, then using a tool called <code>rpmrebuild</code> ( <a href="http://rpmrebuild.sourceforge.net/" rel="nofollow">http://rpmrebuild.sourceforge.net/</a> ) to "regenerate" the package.</p>
  
  <p>Both approaches resulted in a litany of error messages and failed.</p>
  
  <p>The docs I have been reading seem to indicate that trying to modify binary rpms may not be a good idea.  i.e. " it's not okay to start with pre-compiled code" from ( <a href="https://fedoraproject.org/wiki/How_to_create_an_RPM_package#The_basics_of_building_RPM_packages" rel="nofollow">https://fedoraproject.org/wiki/How_to_create_an_RPM_package#The_basics_of_building_RPM_packages</a> )</p>
  
  <p>Is this an exercise in futility?  If not, are there alternate tools / processes I should try?</p>