export env vars after disallowing sudo, fix spec, add missing sudo