"Jury rigging" is a very old sailor's term for an emergency repair, an expedient intended only to get the ship to a safe harbor where a proper permanent repair can be made.Its origin is obscure.
"Jerry-built" I have heard for defectively built houses
After seeing tsuwm/s post, I think there is merit in attributing it to the French word given for "jury".