Preheat oven (circulating air: 75 °C/E cooker and gas not suitable). Line 2-3 trays with baking paper. Wash and slice the tomatoes. Distribute on the trays. Wash the rosemary, dab dry and chop.
Sprinkle tomatoes with sugar and rosemary.
Dry in a hot oven with the oven door open (insert a wooden spoon between them) for 4-6 hours. The tomatoes are ready when they are dry, but can still be bent. Let them cool down.
Peel the garlic and cut in half. Put the tomatoes in clean twist-off jars and pour so much oil over them that everything is covered. Sprinkle with 2 tsp. salt. Seal and leave in a cool place for 1-2 weeks.
Tastes good on bread and as antipasti.