Bug 712940

Summary: RFE: rpmbuild should mention yum-builddep when there are missing dependencies
Product: [Fedora] Fedora Reporter: Justin Clift <jclift>
Component: rpmAssignee: Fedora Packaging Toolset Team <packaging-team>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: elad, ffesti, jnovy, kwade, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-07 09:42:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Justin Clift 2011-06-13 16:52:54 UTC
Description of problem:

  rpmbuild presently has a sanity check when building from a spec file, to ensure all the (listed)
  dependencies are installed.  i.e:

  $ rpmbuild -bb condor.spec 
  error: Failed build dependencies:
  	imake is needed by condor-7.6.0-3dcloud.fc14.x86_64
	flex is needed by condor-7.6.0-3dcloud.fc14.x86_64
	byacc is needed by condor-7.6.0-3dcloud.fc14.x86_64
	pcre-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	postgresql-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	openssl-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	krb5-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	gsoap-devel >= 2.7.12-1 is needed by condor-7.6.0-3dcloud.fc14.x86_64
	libvirt-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	bind-utils is needed by condor-7.6.0-3dcloud.fc14.x86_64
	autoconf is needed by condor-7.6.0-3dcloud.fc14.x86_64
	classads-devel >= 1.0.4 is needed by condor-7.6.0-3dcloud.fc14.x86_64
	libX11-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	libdeltacloud-devel = 0.7 is needed by condor-7.6.0-3dcloud.fc14.x86_64
	cmake is needed by condor-7.6.0-3dcloud.fc14.x86_64

  In the case where there are many missing dependencies, it's a pain to have to manually cut-n-paste
  the listed dependencies into a "yum install" line.

  As a time saving / user friendliness measure, rpmbuild could offer to install of missing dependencies
  itself (ie kick off yum behind the scenes, etc).  May be a pain to implement though.

  An easier to implement alternative, would be for yum to display a 1 line yum install command the
  user could cut-n-paste.

  Example using the above dependency list:

  ***********************

  error: Failed build dependencies:
  	imake is needed by condor-7.6.0-3dcloud.fc14.x86_64
	flex is needed by condor-7.6.0-3dcloud.fc14.x86_64
	byacc is needed by condor-7.6.0-3dcloud.fc14.x86_64
	pcre-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	postgresql-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	openssl-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	krb5-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	gsoap-devel >= 2.7.12-1 is needed by condor-7.6.0-3dcloud.fc14.x86_64
	libvirt-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	bind-utils is needed by condor-7.6.0-3dcloud.fc14.x86_64
	autoconf is needed by condor-7.6.0-3dcloud.fc14.x86_64
	classads-devel >= 1.0.4 is needed by condor-7.6.0-3dcloud.fc14.x86_64
	libX11-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
	libdeltacloud-devel = 0.7 is needed by condor-7.6.0-3dcloud.fc14.x86_64
	cmake is needed by condor-7.6.0-3dcloud.fc14.x86_64

  You can try installing them with yum using the following line:

	yum install imake flex byacc pcre-devel postgresql-devel openssl-devel krb5-devel gsoap-devel libvirt-devel bind-utils autoconf classads-devel libX11-devel libdeltacloud-devel-0.7 cmake

  ***********************

Comment 1 Elad Alfassa 2011-06-13 17:28:09 UTC
Just use yum-builddep package or yum-builddep specfile.spec

(I'd close this bug as WONTFIX if I were an RPM developer)



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Justin Clift 2011-06-13 19:00:11 UTC
Thanks Elad, that's useful info and works fine.

I'm kind of thinking it would be nifty for rpmbuild to display this kind of message then:

***********************

  error: Failed build dependencies:
   imake is needed by condor-7.6.0-3dcloud.fc14.x86_64
   flex is needed by condor-7.6.0-3dcloud.fc14.x86_64
   byacc is needed by condor-7.6.0-3dcloud.fc14.x86_64
   pcre-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
   postgresql-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
   openssl-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
   krb5-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
   gsoap-devel >= 2.7.12-1 is needed by condor-7.6.0-3dcloud.fc14.x86_64
   libvirt-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
   bind-utils is needed by condor-7.6.0-3dcloud.fc14.x86_64
   autoconf is needed by condor-7.6.0-3dcloud.fc14.x86_64
   classads-devel >= 1.0.4 is needed by condor-7.6.0-3dcloud.fc14.x86_64
   libX11-devel is needed by condor-7.6.0-3dcloud.fc14.x86_64
   libdeltacloud-devel = 0.7 is needed by condor-7.6.0-3dcloud.fc14.x86_64
   cmake is needed by condor-7.6.0-3dcloud.fc14.x86_64

  You can try installing them using "yum-builddep", from the yum-utils package.

***********************

Even though I've used rpmbuild on and off for years, I'd never known about yum-builddep.  A message like that would help to educate users. :)

Comment 3 Fedora Admin XMLRPC Client 2012-04-13 23:06:38 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora Admin XMLRPC Client 2012-04-13 23:10:15 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Panu Matilainen 2012-05-07 09:42:19 UTC
(In reply to comment #1)
> Just use yum-builddep package or yum-builddep specfile.spec
> 
> (I'd close this bug as WONTFIX if I were an RPM developer)

Nod, rpm isn't in the business of recommending higher level tools for any particular task (just like gcc doesn't tell you how to deal with eg missing includes/libraries either, it just spits an error). Even if it would be reasonable in current Fedora ecosystem, this would be an inherently Fedora-specific patch and the general direction should be less, not more of those.

Comment 6 Justin Clift 2012-05-07 15:21:38 UTC
This recommendation seems directly against improvements in the user friendliness of our tools, which is pretty much the opposite direction we should be going (for increased user adoption anyway).

Is there a decent way of making this user friendly improvement without it being a Fedora-specific patch?