As well as the military sense of "barrack", there is an unrelated verb meaning to
heckle, or to
disrupt with
catcalls or
jeering or other
hostile reception.
For example, a Google search finds a headline "Blair barracked by angry nurses", and inside the article it says "In the latest bout of public humiliation, Tony Blair has faced a barracking from nurses about the cost of living, while visiting Hemel Hempstead General Hospital in Hertfordshire." Other uses include "Blunkett barracked by Labour MPs" and "Musharraf barracked by MPs".
In another headline, "CSA barracked for Web advertising policy", the word has been almost completely bleached, and means nothing more than criticise or "slate": the CSA is the French audiovisual regulator, and there is obviously no real jeering going on.
The original use of the word was in sports matches, referring to the hostile cries against an opposing team.
The term appears to have originated in Australia. Today in Australia it has a much more specific meaning in sports: to "barrack for" a team is simply to support it, to be a supporter of it (American "root for"), and no longer has an implication of shouting. Note the "for" in this use: you barrack Tony Blair, or give him a barracking; but you barrack for Melbourne.
It is unclear where the word itself comes from. There is an old Northern Ireland dialect word "barrack", meaning "brag". But there is also an Australian Aboriginal word borak or burag, used in the expression "poke borak", to make fun of. It is probably not connected to the military housing.
montecarlo tells me it's also a Hungarian apricot brandy, though being a Hungarian word it's pronounced borrotsk.
See also a discussion in The Guardian on differences between British and Australian uses:
http://www.guardian.co.uk/Columnists/Column/0,5673,851960,00.html