What is `%setup -q` in RPM spec?
<p>If you create a <code>.spec</code> file with ViM, the editor will use a skeleton for it. Quite handy!</p>

<p>It bugs me however that the generated <code>%setup</code> macro has this <code>-q</code> flag which I could not find anywhere.</p>

<p>I didn't find any mention on the <a href="http://ftp.rpm.org/max-rpm/s1-rpm-specref-macros.html" rel="noreferrer">max-rpm guide page on macros</a>, and does not get expanded by <code>rpmspec</code>: <code>rpmspec --eval '%setup'</code> only returns <code>%setup</code>, and the <code>-p</code> does not change anything. It is not mentioned in other <a href="https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/index.html" rel="noreferrer">relevant docs</a> also.</p>

<p>With further investigation I noticed that there's plenty of macros which don't get expanded by <code>rpmspec</code>, even if I could find plenty of macros in <code>/usr/lib/rpm</code> (on my Fedora).</p>

<p>So I'm wondering:</p>

<ol>
<li>What is the <code>-q</code> for?</li>
<li>How come I cannot see all expansions? Am I missing something? </li>
<li>The aforementioned Max RPM guide claims the existence of a <code>--test</code> flag for <code>rpm -b</code> commands. I could see on my system there's no <code>rpm -b</code>, and actually I do all the job with <code>rpmbuild</code>. In <code>rpmbuild</code> there's no <code>--test</code> flag. How do I see the expanded scripts?</li>
</ol>