tools: Bring in some spec file fixes from Fedora build

Closes #1437