Packaging updates from v4.1 branch (third attempt)

Ok, packaging updates are in their own branch now.