Setting up an RPM build environment
Back when I started this site I was recommending that users go through the process of chown-ing chmod-ing the /usr/src/redhat folder so that it was writable by a normal user account as opposed to only root. A few weeks back a user brought up the question of why I was doing this. Well, the answer is "it's just the way I've always done things"...
When I started using Linux a decade or so ago I was taught that this was where you built rpms. Later, when told that I shouldn't be compiling as root, I simply created a new user, changed the permissions on that folder tree, and went about my business. The truth is, there's absolutely nothing wrong with this process if you're the only user of the system. However, you can run into real permission problems and conflicts if there are multiple users on the box and more than one want to build an RPM...
As was mentioned earlier, about a month ago, a kind user, Colin Guthrie, questioned my process. Thankfully, in the spirit of sharing, he also posted an alternative method. While I think his process is a bit more time consuming to implement, it really does provide a safer environment, particularly if you have multiple users. As such, it has been detailed below (cleaned up slightly from his original post).
$ mkdir ~/rpms
$ cd ~/rpms
$ mkdir BUILD RPMS SOURCES SPECS SRPMS tmp
$ cat > ~/.rpmmacros
Make sure that you modify lines 5 & 6 so that "/home/username" is replaced by the correct path for your user's home directory.
From that point you're ready to go. Simply install your src.rpm as normal and the files will be unpacked in your new build tree.