White House officials said that President Obama would sign a spending bill that includes thousands of earmarks, despite campaign promises to put an end to the practice.