Preheat oven to 350°F.
In a baking dish, stir together canola oil, onions, leeks, fennel, and garlic. Sprinkle with about 1/4 tsp kosher salt.
Roast vegetables for 45 minutes, or until tender and starting to caramelize.
Add brown sugar and vinegar, return to the oven, and roast an additional 20 minutes, or until all liquid is evaporated.
Meanwhile, drain, seed, and remove tough cores from tomatoes. Reserve liquid for another use. Puree about 1/2 of the tomato pulp in a food processor or blender until smooth. Roughly chop remaining tomato pulp.
In a small piece of muslin or a fine meshed tea-ball, combine bay leaf, peppercorns, smashed garlic, and thyme sprigs. Place in tomato mixture.
Add tomato sauce and pulp to the onion mixture, stirring to incorporate.
Roast sauce for 90 minutes, stirring every 30 minutes.
Remove and discard spices before seasoning with salt and pepper to taste and serving with pasta.