Bug 379181 - RFE: Enable me to use yum-builddep on .spec files
RFE: Enable me to use yum-builddep on .spec files
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
: 525580 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-12 19:18 EST by Sindre Pedersen Bjørdal
Modified: 2011-03-21 11:19 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-21 16:36:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sindre Pedersen Bjørdal 2007-11-12 19:18:05 EST
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
Comment 1 Seth Vidal 2007-11-12 22:39:17 EST
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?
Comment 2 Panu Matilainen 2007-11-13 04:39:22 EST
There's no way to query build dependencies of a spec from rpm-python currently,
that'd need doing first to properly handle it.
Comment 3 Adam Williamson 2009-09-24 17:46:29 EDT
*** Bug 525580 has been marked as a duplicate of this bug. ***
Comment 4 Matt McCutchen 2011-03-21 11:07:09 EDT
(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.
Comment 5 Panu Matilainen 2011-03-21 11:19:19 EDT
Actually this has been implemented recently, in F >= 15 yum-builddep can be used on spec files directly.

Note You need to log in before you can comment on or make changes to this bug.