sync packager.patch with upstream