lightstrike
lightstrike

Reputation: 974

Installing a package with yum from a 3rd party repo while building a package with RPM

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?

Upvotes: 0

Views: 483

Answers (1)

Thomas Vander Stichele
Thomas Vander Stichele

Reputation: 36549

It won't help to install the .repo file as part of your rpm. You'll need to install it separately.

If you list the 3rd party package in BuildRequires, then yes, when you install your rpm with yum, it will look at the 3rd party repository and install the dependency.

Upvotes: 0

Related Questions