Sunday, April 1, 2007

linux fedora fc5 missing rpmbuild OR can't find rpmbuild OR no rpmbuild

I was using a fedora core 5 (fc5) box today and ran into a problem with not being able to build any packages from source. I found that rpmbuild was not installed, and a cursory search showed that rpmbuild comes with the rpm package (as expected) ; however, while rpm was installed on this system (by default of course), there was no rpmbuild executable (or symlink) to be found.

Rpmbuild is usually found as /usr/bin/rpmbuild and on one box I checked, was a symlink to /usr/lib/rpm/rpmb. On the other (SuSE 10.1) box that had rpmbuild, I checked which package owned this file/symlink with the following result:

susemachine:~ # rpm -q --whatprovides /usr/bin/rpmbuild
rpm-4.4.2-43.4

After a couple minutes of googling and not finding much, I finally stumbled across a post that had the word rpm-build in it... this sent me on some cursory searches with the new keyword. I eventually found enough information showing that fedora provided rpmbuild in the rpm-build package instead of the rpm package.

To finally fix the problem, I installed the rpm-build package using the following command (note: 'yum update rpm-build' failed to do anything, since rpm-build wasn't already installed):

yum install rpm-build

This fixed the missing rpmbuild problem and shows the following:

[root@localhost ~]# rpm -q --whatprovides /usr/bin/rpmbuild
rpm-build-4.4.2-15.2

So there's another quirk between redhat fedora (I believe older redhat 8/9 releases provided rpmbuild in the rpm package.. but I did not verify this) and SuSE.

While trying to come up with a reason as to why they split it out from the rpm package, I could only come up with the fact that not all machines need package rebuild capabilities and in turn, they save a few bytes of space by not installing these pieces of the rpm system.

No comments: