In a large Dutch oven or heavy bottomed pot over medium heat, cook the bacon, stirring frequently, until it’s crisp, about 5 minutes.
Remove the bacon to a plate, reserving the remaining bacon fat.
Add onions and sauté, until softened, about 10 minutes.
Return the bacon to the pot along with maple syrup, water, vinegar, rosemary, salt, pepper, and optional cayenne pepper; stir to combine. Bring to a boil, then reduce heat to a simmer.
Simmer for 1 hour or until it has reached a jam-like consistency.
Allow to cool. Transfer to a food processor or blender. Pulse a few times, being careful not to over puree, to achieve a thick yet chunky consistency.
Add additional salt or pepper to taste.
Store in an airtight container in the refrigerator for up to a month.