Photograph: Kate Whitaker
Make the ketchup. Preheat the oven to 180°C, fan 160°C, gas 4. Toss the first 6 ingredients in the oil and tip into a large roasting tin. Roast for 30 minutes or until the onions and garlic are soft. Turn off the oven. Press the garlic out of its skin and, in a food processor, whiz with the onions, tomatoes and spices. Pass through a sieve into a pan, pushing through as much pulp as you can. Discard the skin and seeds left in the sieve. Add the vinegar, sugar, tomato purée, Worcestershire sauce and a generous pinch of sea salt, stir and bring to a simmer. Simmer for about 50 minutes until thickened. Pour into a sterilised jar. Seal and leave to cool.
Remove the sausages from their skins and mix with the mace, sage and ¼ tsp each of sea salt and freshly ground black pepper.
Cut the pastry into four equal squares. On a lightly floured surface, roll one piece at a time to a very thin 35cm strip (don't roll widthways at all), keeping the spare pastry wrapped and chilled until needed. Put a quarter of the sausage meat lengthways along each strip. Brush the edges of the pastry with some of the egg, roll up tightly to make a long thin roll and trim off any excess pastry from the long edge. Freeze for 1 hour until very firm.
Reheat the oven to 200°C, fan 180°C, gas 6. Glaze the long sausage rolls with the remaining egg, then cut each one into 10 mini rolls. Sprinkle with a little cayenne, place seam-side down on a baking sheet lined with nonstick baking paper and bake for 20 minutes until golden brown. Leave on the tray for a few minutes then transfer to a wire rack to cool. Serve with the ketchup on the side.
Get ahead: make the ketchup a few days ahead; chill but bring to room temperature before serving. Cook the sausage rolls a few hours ahead. The ketchup and uncooked sausage rolls can also be frozen.
Recipe by Emma Franklin and Olia Hercules