Preheat oven to 325°F. Remove turkey giblets and neck, then pat turkey completely dry with paper towels.
Mix softened butter with sage, thyme, salt, and pepper. Gently loosen the skin over the breast and thighs, then spread herb butter underneath the skin.
Stuff the cavity with onion quarters and lemon halves. Tie legs together with kitchen twine and tuck wing tips under the body.
Place turkey breast-side up on a rack in a large roasting pan. Pour 2 cups of stock into the bottom of the pan.
Roast for 3 to 3.5 hours, basting every 30 minutes with pan drippings. If skin browns too quickly, tent loosely with foil. Turkey is done when internal temperature reaches 165°F in the thickest part of the thigh.
Transfer turkey to a cutting board and let rest for 30 minutes before carving.
For gravy: Pour pan drippings into a fat separator or measuring cup. Skim off fat and reserve 1/4 cup. Heat reserved fat in a saucepan over medium heat, whisk in flour and cook for 2 minutes. Gradually whisk in defatted drippings and remaining 2 cups stock. Simmer, stirring, until thickened, about 5-7 minutes. Season with salt and pepper to taste.