You're conflating rpm
and yum
when you mention repolist
.
rpm
is a lower level and only knows about RPM files
yum
collects sets of RPMs into repositories and sits on top of RPM to handle dependencies
Now, to answer the question - rpmbuild
does not need anything from the Requires
field to build the RPM. If it does, then the RPMs should be listed as BuildRequires
in the specfile and only be in Requires
if the end user needs it to be installed to run the final product. For example, to build you might need foo-devel
but at runtime you only need libfoo
. Those should be declared appropriately.
Even if you fix the Requires
vs. BuildRequires
fields, it still won't help you - rpmbuild
cannot install RPMs itself because you should never run rpmbuild
as root. An error in a specfile can very easily nuke an entire machine if it's run as root.