The comparison is just to the filename, not including the path. You may be right, but that check doesn't prove it.
Edit: Thanks for the reply! Apparently they are including the path.
I can create an RPM containing a filename "TRAILER!!!" just fine:
$ rpm -qlp /home/rjones/d/fedora/virt-what/master/x86_64/virt-what-1.20-1.fc33.x86_64.rpm
/TRAILER!!!
/usr/lib/.build-id
/usr/lib/.build-id/59
/usr/lib/.build-id/59/59c1cb95689b7babd5a6cb1b5bc58f12e20b3a
/usr/libexec/virt-what-cpuid-helper
/usr/sbin/virt-what
/usr/share/doc/virt-what
/usr/share/doc/virt-what/COPYING
/usr/share/doc/virt-what/README
/usr/share/man/man1/virt-what.1.gz
Furthermore I installed and uninstalled it with no ill effects, and the file was created and removed in /. So whatever problem cpio may have with this file does not affect the RPM-not-quite-cpio format.
In this case it's not possible to create such an archive using rpmbuild as all files added to RPMs much start with "/". I just tried it and got:
You cannot hack on your own rpmbuild because you wouldn't be able to make a signed RPM (as those can only be built through the Koji build system which doesn't have your hacked rpmbuild), so you couldn't distribute that RPM to Fedora or Red Hat Enterprise Linux.In other words this is essentially a non-problem for RPM.