Fix unittests on fedora

last commit fixes unittests on fedora, rest is from pulling in master. hmmm, github commandline PR stuff advice is a bit incomplete