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).
I have tried the following:
1) Using alien
to convert the rpm to a tgz, un-tarball it, modify it, re-tarball it then convert it from tgz to rpm with alien
again
2) Installing the rpm, modifying the jars, then using a tool called rpmrebuild
( http://rpmrebuild.sourceforge.net/ ) to "regenerate" the package.
Both approaches resulted in a litany of error messages and failed.
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 ( https://fedoraproject.org/wiki/How_to_create_an_RPM_package#The_basics_of_building_RPM_packages )
Is this an exercise in futility? If not, are there alternate tools / processes I should try?