In a saucepot, simmer the sugar and water, stirring, until the sugar starts to dissolve. Add the cranberries, orange peel, and rosemary and simmer for 10 to 15 minutes. Strain out the liquid, discard the solids, and store in an airtight jar in the refrigerator for up to a month.