I'm currently doing a workout program involving squats, overhead press, deadlifts, and curls. All of this is done with a barbell and squat rack. However it means I'm now using the rack for 30-40 mins to myself. Is this bad etiquette? If so, what's the solution? (No, I will not clean/press up the barbell for the overhead)
Forty minutes is an absolutely acceptable amount of time to occupy a squat rack. (In the interest of changing your baseline: I know powerlifters who take a station for two hours because that's just how long it takes to get the work done.)
However, gym capacity and rules must be taken into account. If there aren't many stations and people are waiting, it's polite to let someone "work in" so they do their sets during your rest periods and vice versa.
Another point to consider, especially if other athletes are bugging you to use the rack, is whether you rrrrrreally need the squat rack for a given set or exercise. I don't say this to encourage being a doormat -- I am ruthless with maintaining one's workout "flow". But curls have zero place in the squat rack. Go do those somewhere else. And deadlifts require a bar, but not the rack. Overhead press, depending on your skills, can be done without a rack by power cleaning the bar to the shoulders. It sounds like you won't do that, which is fine. But for the curls? C'mon.
I mostly concur with the answers above.
Squats and OHP are absolutely fine in a squat rack. Deadlifts in the squat rack are a gray area. I used to not be flexible enough to deadlift from the floor, so then you do stiff legged deadlifts where you usually pick it up from the rack. BUT, while you use the rack you train your flexibility to be able to pick it up from the floor. Both for your own sake because full range of motion is better and everyone else's because you won't hog the squat rack.
However, as Dave has already pointed out... curls are absolutely unacceptable in a squat rack. It makes your question sound almost trollish. Even bicep freaks like Lee Priest (who could curl the bar with a plate on each side mind you) will get annoyed at someone who's curling in a squat rack.
To close off, if your workout takes an hour to complete and you need a squat rack for the full duration: "Just do it!". But don't use it unnecessarily and maybe let other people alternate sets with you when you're resting.
PS: Happy training bro. And remember: RERACK YOUR WEIGHTS!