Red Hat Bugzilla – Bug 441392
rpm fails to give a useful error message if rpm-build is not installed
Last modified: 2008-04-22 11:45:02 EDT
Version-Release number of selected component (if applicable): I encountered this
bug when attemping some builds on Fedora 8, so the F8 rpm is definitely
affected. I've been told that the problem persists in current rpm as well, but I
haven't verified that myself yet.
Steps to Reproduce:
1. Install Fedora 8 (or newer)
2. cvs co xorg-x11-xserver; cd xorg-x11-xserver/F-8
3. make prep
[cworth@mandolin F-8]$ make prep
rpm --define "_sourcedir /home/cworth/fedora/xorg-x11-server/F-8" --define
"_specdir /home/cworth/fedora/xorg-x11-server/F-8" --define "_builddir
/home/cworth/fedora/xorg-x11-server/F-8" --define "_srcrpmdir
/home/cworth/fedora/xorg-x11-server/F-8" --define "_rpmdir
/home/cworth/fedora/xorg-x11-server/F-8" --define "dist .fc8" --define "fedora
8" --nodeps -bp xorg-x11-server.spec
-bp: unknown option
make: *** [prep] Error 1
rpm: Error: The rpm-build package is required to perform the
requested information. Please execute "yum install rpm-build"
and then try again.
Or something to that effect. Without a useful error message like
this, I was totally mystified.
This isn't an rpm bug but one in the Fedora dist-cvs Makefile.common: "rpm"
command support building packages in many many years, but the Makefile.common
happily subsititutes rpmbuild for it if rpmbuild isn't available:
RPM := $(shell if test -f /usr/bin/rpmbuild ; then echo rpmbuild ; else echo rpm
Reassigning to infrastructure...
Duh, apologies for typos, that should've read:
"rpm" command hasn't supported building packages in many many years.
Falling back to "rpm" if "rpmbuild" isn't available doesn't make any sense as it
wont work, it just complain loudly if "rpmbuild" command can't be found.