pack: move find_pack_entry() and make it global