Adopt patches 5 and 9 from Debian (Peter Pentchev)
Adopt 8th Debian patch