title: Test installation of RPM packages
body: <p>We are using rpm to deploy our web applications internally. The rpm installs the files, configures apache, cron, logging and so on.</p>
  
  <p>I would like to build a test version of the rpm that installs in a different location with a different configuration for apache, cron and logging. It should be possible to install both the production and test rpm on the same machine.</p>
  
  <p>With both rpms installed i would have something like</p>
  
  <pre><code>/opt/app/www/...
  /opt/app-test/www/...
  /etc/httpd/conf.d/app.conf
  /etc/httpd/conf.d/app-test.conf
  /etc/cron.d/app
  /etc/cron.d/app-test
  /etc/init.d/app
  /etc/init.d/app-test
  </code></pre>
  
  <p>What would be a good way to achieve this?</p>
  
  <ul>
  <li>Copy the spec and rename everything to "test"?</li>
  <li>Create different subpackages for prod/test?</li>
  <li>Use rpm macros to alter the location and names in the spec?</li>
  <li>Use rpm --relocate?</li>
  </ul>
  
  <p>Is there any existing rpm that tries to do this that i can look at?</p>