title: when creating RPM package, how to auto install dependencies
body: <p>My program is basically a C-based MySQL server, it needs gcc, mysql-server, mysql-devel in order to run successfully.</p>
  
  <p>Now I have to pack the program into RPM package, and it should be able to auto install the dependencies so that the RPM package can be installed on a clean RHEL machine, and the program can run instantly after the installation.</p>
  
  <p>Problem is if I write the below script in SPEC file %pre section, it gets stuck during "transaction".</p>
  
  <pre><code>sudo yum groupinstall "Development Tools" -y
  sudo yum install mysql-server mysql-client -y
  </code></pre>
  
  <p>It seems you can't use another rpm installation tool in SPEC file.</p>
  
  <p>How do I do this?</p>