US Senate approves a spending package to fund the government through January following a weekend of negotiations.