How to Make It
Preheat the oven to 325°. In a small bowl, mash the garlic with the rosemary, cayenne, 2 tablespoons of the olive oil and 1 teaspoon each of salt and pepper.
Using a sharp paring knife, make 1-inch-deep slits all over the meat. Press as much of the spice paste into the slits as you can and spread the rest all over the skin. Set the pork in a large roasting pan and cover tightly with foil. Roast for 3 hours. Remove the foil and roast for about 1 hour and 45 minutes longer, until an instant-read thermometer inserted in the thickest part of the meat registers 165°.
Meanwhile, in a medium baking dish, toss the onions with the remaining 2 tablespoons of olive oil and the thyme sprigs and season with salt and pepper. Roast for 1 hour and 15 minutes, until the onions are tender and browned in spots.
Let the pork rest for 20 minutes. Remove the skin. Slice the meat as thinly as possible and serve with the onions.