Mock creates chroots and builds packages in them. However, the default is to build against CentOS and EPEL, which isn’t ideal when you’re using a RHEL environment.
Thankfully, it’s easy to point Mock to use the RHN channels your system is subscribed to. However, this does limit you to building packages for the RHEL release your system is running. For the example below you’d create this file as /etc/mock/rhel-6-x86_64.cfg.
What if you want to build for RHEL5 on your RHEL6 build machine, or some future version of RHEL? You’ll need to have a local RHN Satellite, but you can reference the kickstart tree. Unfortunately, not all channels will work as yum repositories, only the kickstart trees, like as shown in the baseurl= line are accessible: