Issue
I need to create a single source RPM which can be used on both RHEL5 and RHEL6 OSes. Starting with RHEL6, Redhat switched to sha256 for the checksum. I know that I can create a rpm using either sha1 or sha256 but there is no way for rpm on either release to select a checksum algo. AFAIK, one can't even tell rpm to ignore the checksum.
So, is it possible to create a single RPM which is usable on both RHEL5 and RHEL6, and use the stock rpm command (ie, I don't want to have to use cpio to extract).
Solution
I regularly create one SRPM and then use it on anything from rh73 to rhel7. Just pick the oldest OS release (thus the oldest rpm version), and use that host to do the 'rpmbuild -bs'.
Answered By - user2066657 Answer Checked By - Terry (WPSolving Volunteer)