Make the Spice Rub: In a medium bowl, whisk together the sugar, salt, smoked paprika, garlic powder, onion powder, cumin, oregano, ground mustard, and cayenne pepper.
Preheat the smoker to 225°F (110°C) or the oven to 300°F (150°C). (If using the oven, set one rack in the middle position and one rack in the top position.)
Remove the membrane that coats the underside of each rack of ribs: Using a butter knife, loosen the membrane around one of the end bones, scraping it away from the ribs. Once you get under it, grab the membrane with a paper towel and peel it off.
Coat the ribs evenly on both sides with about half of the spice rub. Allow the ribs to sit for about 15 minutes to 'sweat' and absorb the rub, then coat the racks with the remainder of the rub.
Smoker Method: Place the spice-coated ribs in the smoker and cook for 2 hours. Remove the ribs from the smoker and double wrap each rack in heavy-duty foil. Return to the smoker for 1½ hours. Remove the foil-wrapped ribs from the smoker and carefully unwrap, leaving the ribs on the foil, and brush to the top of each rack with about 3 tablespoons of the BBQ sauce. Fold the edges of the foil around the ribs, creating a makeshift 'pan' for each rack. Place the racks back in the smoker on the foil and cook for 45 minutes to 1 hour more, or until the racks are tender.
Oven or Oven-to-Grill Method: Line a baking sheet with heavy-duty aluminum foil. Place the spice-coated ribs on the prepared pan, cover the pan tightly with foil, and bake until tender, about 2 hours. Turn the oven to broil. Remove the foil from the ribs and brush each rack with 3 tablespoons of the barbecue sauce. Broil until the sauce just starts to bubble and caramelize, 2 to 4 minutes. Let the ribs cool for about 10 minutes, then slice and serve.
