I'd like to install software from source (e.g., third-party GitHub repos) to my machine. Generally /usr/local/bin and /usr/local/src are for non-distribution-specific software, right?
Taking ownership of /usr/local seems risky: anything running with my privileges could make nefarious changes to executables in /usr/local/bin, or to sources in /usr/local/src.
But the alternative, building and installing as root (
sudo), doesn't make sense to me. GitHub warns against running
git as root. Even if I copied the sources from a local repo elsewhere, I'd have to run
make install as
sudo, meaning the software I'm installing could hijack the rest of my machine.
I could just put everything in /home, but that seems like a cop-out -- isn't this what /usr/local is for?