Heat the oil in a big saucepan over medium heat and saute the onions, garlic, and ginger together until some of the onions begin to brown. Stir every minute or two. This will take about fifteen minutes. (The ginger may turn the mixture pale green. Ignore this.)
Add all the other ingredients except the vinegar, bottled barbecue sauce, and Sririacha. Bring to a light simmer, the lower the heat as low as it will go. Simmer, covered, for eight hours, stirring thoroughly every fifteen minutes or so, scraping the bottom of the pot thoroughly when stirring. After four hours, add in the vinegar.
Strain sauce into a bowl. This will take awhile, and what you'll get is a very watery sauce and a lot of slurry. Puree the slurry in a food processor, and stir it into the watery part of the sauce.
Blend the barbecue sauce and Siriracha into the sauce. Adjust the seasonings and sugar to your taste.