Bug 712940 - RFE: rpmbuild should mention yum-builddep when there are missing dependencies
Summary: RFE: rpmbuild should mention yum-builddep when there are missing dependencies
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Fedora Packaging Toolset Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-13 16:52 UTC by Justin Clift
Modified: 2015-07-13 04:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-07 09:42:19 UTC
Type: ---


Attachments (Terms of Use)

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?


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