> Do prisons let prisoners contribute to free software?
No, I'd guess most prisoners don't have access to the internet, let alone a computer.
> There's a long history of having prisoners clean roads and make license plates.
That long history, at least in the United States, comes with a lot of baggage. The thirteenth amendment in the US Constitution forbids slavery except of prisoners, and many consider forced prison labor slavery. Prisoners have done things like clean roads, manufacture goods, work call centers, etc. In California, prisoners earn between $0.30 and $0.95 an hour before deductions.