I you ever found an rpm with these dependencies (rpm -qp package.rpm -R):
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
You won't be able to install into a RH5.
To solve the problem, is as easy as erasing a package, redhat-rpm-config where rpmbuild is installed.
This is because configurations detailed by that package to build rpms are only compatible with 4.8.0 version, since functions FileDigests and PayloadIsXz are newer.