I'm trying to create an RPM that needs a package from a 3rd party repository. I'd like to find out if it's possible for me to within the spec file tell RPM to add a .repo file in /etc/yum.repos.d so that yum is able to download and install the necessary packages contained in that repo.
Could that be done in the %pre stage of the spec file, or is that something that I'd have to do manually before the RPM build process is started? If I'm listing this 3rd party package in the BuildRequires list of the spec file, will it RPM check that it can find that package in the installed repos before it even begins to process anything I tell it?