Usually on a metal roof a malleable ringed boot is installed and the ring is secured with roofing screws all around, too account for the aberrations of the humps and valleys.
OATEY No-Calk Master Flash 12-1/2 in. x 11-3/4 in. Rubber Vent Pipe Roof Flashing with Adjustable Diameter 14055 - The Home Depot
Oatey Master Flash Roof Flashings are designed for use with metal profiled roofs and can be installed on every type of roofing surface. Collars can be used on multiple size pipes and conform to most common