Place the salt on a small plate. Rub the rim of the glass with grapefruit juice. Dip the rim of the glasses into the salt and gently press the glass to cover it with a rim of salt.
Pour the mezcal, grapefruit juice, lime juice, sugar syrup and Aperol into a cocktail shaker. Fill the rest of the shaker with ice, put the lid on and shake vigorously until the outside of the shaker is icy, about 20 seconds.
Pour the cocktail through a strainer or slotted spoon into a chilled glass. Light the sprig of rosemary and then immediately extinguish. Add it while still smoking in the glass.
Notes
Make a simple sugar syrup by bringing equal parts sugar and water to a boil in a saucepan. Cook for 2 minutes, until all the sugar has dissolved, then let cool completely. Store, covered, in the refrigerator for up to 1 month.