In the same skillet you used to cook the sausage, melt the butter over medium heat. Add the onions, garlic, oregano, rosemary, and red pepper flakes. Cook, stirring, for 4 to 5 minutes or until the onions soften. Add the tomatoes, salt, and sugar to the pan, and continue to cook and stir for 3 to 4 minutes, or until the flavors blend together and the sauce thickens. Set aside to cool.