MB4 254a: Garrisoned Troops and Eruv Chatzeros (384:2); Tzedukim and Karaites and Eruv Chatzeros (385:1)

If garrisoned troops come in to Jewish houses to live there on Shabbos does it ruin the eruv? What if due to דינא דמלכותא דינא they are allowed to demand quartering in the city? What if they do so illegally?

What if the mayor/head of the city has the authority to evict the troops from the houses?

In order to carry in a chatzer where tzedukim or karaim reside is if they perform bitul reshut (since they don't believe in the concept of Eruvin).