I've got an RPM that overlays particular files delivered by another package. What I'd like to do is tell RPM "if 'directory/file' exists and you're about to overwrite it, rename it to "filename.backup" first.
It doesn't look like %pre gets to know which %files are delivered by the RPM. Is there a way or keeping backups of original files that I'm missing?