Briefly toast the chilli flakes with fenugreek seeds, black cumin, mustard seeds, cumin and fennel seeds in a pan in 1 tablespoon of oil and set aside.
Peel the onions, cut in half and thinly slice. In a heavy saucepan over medium heat, melt both types of sugar together to form a golden-brown caramel. Then add the onion rings to the liquid caramel and stir briefly. Deglaze with the vinegar and add the chunky tomatoes, stir the re-solidified sugar a little until smooth. Season with a pressed clove of garlic, the salt and the freshly grated ginger.
Add the roasted spices and let everything simmer over a medium heat for about 50 minutes, stirring from time to time until the mixture is noticeably thicker and has a jam-like consistency.
Carefully sterilize four small jars with lids in boiling water and pour in the hot mass. Close the jars and then put them on the lid for a few minutes.
Heavenly as a relish with pan-fried foods such as steaks, but also great with strong cheese. It can be used both warm and cold.