rpm uses mktemp in build.c. Actually quite easy to fix.
Created attachment 94247 [details] patch to fix it
Thanks for patch, added to rpm-4.3.