This fixes two issues #14337 and #13788

use-forking-daemon.patch -> #14337
the other patches are for #13788

With thanks to Tim Serong who created the patches.