Build: rpm: restore ability to build RPMs without a git checkout
regression introduced in 2.1.2 by a3c5ca5741e