Description of problem: yum-builddep currently allows you to use yum to get the build dependencies of a SRPM. This is a very useful tool, but I think adding the ability to get the build deps from a .spec file would be a great feature. It would allow me, and other people working with packaging, to get the build dependencies specified in the spec automatically, instead of manually parsing the spec for the buildrequires and yum installing them as I do now. The build requires are there in the spec, so I assume it wouldn't be that hard to add this feature to the existing yum-builddep tool, then again, what do I know. Version-Release number of selected component (if applicable): 1.1.8-1 Steps to Reproduce: 1. Start building an RPM from scratch, by getting the source tarball and writing a .spec file. 2. Add the build deps you know of to the .spec 3. yum-builddep file.spec Actual results: No such package(s) file.spec.src Expected results: Install the build deps specified in the spec (along with the basic tools required for building any rpm package) with dep resolving and all so I can proceed with the packaging. Additional info: I know I can create a SRPM from a spec using some rpm trickery, the makefile in the fedora build system does this, but I'd still like to get the builddeps with yum-builddep
if you have a spec file then you can probably make a srpm out of it and just pass that to yum-builddep. Doesn't that achieve the same result?
There's no way to query build dependencies of a spec from rpm-python currently, that'd need doing first to properly handle it.
*** Bug 525580 has been marked as a duplicate of this bug. ***
(In reply to comment #1) > if you have a spec file then you can probably make a srpm out of it and just > pass that to yum-builddep. > > Doesn't that achieve the same result? Yes. That's what mock does. It's just slower. (In reply to comment #2) > There's no way to query build dependencies of a spec from rpm-python currently, > that'd need doing first to properly handle it. I am thinking of implementing this. It should only take a couple lines of code to expose the spec->buildRestrictions field to python.
Actually this has been implemented recently, in F >= 15 yum-builddep can be used on spec files directly.