By the way, I also took a look into how scan-build could be run in
mock builds without modifying the source packages at all, and with
minimal mock config modifications. What I came up with so far is this
fugly hack which appears to work for many packages using autotools or
cmake.