I manage many servers that span multiple environments (dev, qa, staging, and production). To help manage these, we have multiple repositories on a local webserver for our applications (e.g. app_1_el6, app_2_el7, etc.). We also mirror several upstream repos which provide dependencies for our custom rpms (e.g. EL Repo [1], EPEL [2], etc.) to reduce package download time.
Currently, a cron job syncs the our local with the upstream repositories. From time to time, we'll pull in an update that causes a problem (e.g. incompatibility with one of our packages). This ends up causing a lot of pain, which I'd like to avoid.
What'd I like to do is create some sort of version control for our local mirror of the upstream repos. I'd like to make sure, for instance, that if a new package is introduced in an upstream repo that breaks our custom rpms, that I have a way of rolling back or somehow isolating that package. What's the best way to go about this?