Tire sizes are Nominal, meaning they are NOT exact, you need to look up the detailed spec.
Detail spec for the OEM tires might be 30.6" overall diameter, while if you calculate it by the size specs it comes out 30.4". The best spec is "Revolutions per mile", if the tires have the same revs per mile, they are the exact same diameter.
Like mentioned, SD brakes can fit within 17" wheels, HD brakes will need 18" or larger wheels. The size of the rims make no difference in overall diameter of the tire, the wheels have to fit the tire and the car. Offset does make a difference, it doesn't have to be dead on, but wheels vary so much in offset, if you don't check it is possible to get a wheel with offset so far off it will never work or won't drive right at all.
The OEM Full Sized Spare is 245mm wide on an 18", I don't know the aspect ratio/profile for it. Its 245mm so the lid to the spare tire compartment can close fully. It might be a taller profile to match the diameter of the OEM 265mm tires, or it might be the same profile and thus slightly smaller in diameter than the OEM 265mm. Again, it should serve fine a spare tire, but just like the compact spare that says on it "Don't exceed 50mph", if its not the exact same diameter as the other tires, you'd want to drive slowly and not to far on it.
Someone said something about Open Diffs and not to worry, I don't think he was implying you don't have to worry about tire diameter if you have open diffs, but in case you took it that way, it's not true. A former Jeep engineer used to post at Allpar.com and he said he proved just the difference between tires worn to the tread bar on one axle and brand new on the other would create excessive wear on the center differential. The differential is designed to allow you to turn, and spend most of its time driving straight, and even when turning the speed the diff turns is relatively small, you have different sized tires the diff will spin constantly at a higher speed, it will overheat.