President Donald Trump signed stopgap spending legislation early Thursday to avert a government shutdown weeks before the presidential election, the White House said. (Bloomberg)