Bug 379181 - RFE: Enable me to use yum-builddep on .spec files
Summary: RFE: Enable me to use yum-builddep on .spec files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-utils
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 525580 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-13 00:18 UTC by Sindre Pedersen Bjørdal
Modified: 2011-03-21 15:19 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-11-21 21:36:00 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sindre Pedersen Bjørdal 2007-11-13 00:18:05 UTC
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-13 03:39:17 UTC
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 09:39:22 UTC
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 21:46:29 UTC
*** Bug 525580 has been marked as a duplicate of this bug. ***

Comment 4 Matt McCutchen 2011-03-21 15:07:09 UTC
(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 15:19:19 UTC
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.