rpmbuild not in some fedora 7 installs, install.sh fails

Peter Crocker pete at petecrocker.com
Tue Nov 6 01:56:22 GMT 2007


Ok, this one took me quite a few hours to work out. I tried running ./ 
install.sh of an RPM install package of MailScanner, and couldn't  
figure out why it was failing. Output of the install.sh script is  
below. I kept getting "--rebuild: unknown option" errors every time  
the install script would try to rebuild the perl modules. I went down  
at least 10 different ratholes for hours before I finally figured it  
out.

My minimal install of fedora has a /usr/bin/rpm, but not a /usr/bin/ 
rpmbuild. And it turns out the "rebuild" portions that used to be in  
the /usr/bin/rpm binary have been moved out, but I guess there's still  
a few hooks for old-school compatibility.

The first few lines of the ./install.sh script checks this:

echo
if [ -x /bin/rpmbuild ]; then
   RPMBUILD=/bin/rpmbuild
elif [ -x /usr/bin/rpmbuild ]; then
   RPMBUILD=/usr/bin/rpmbuild
elif [ -x /bin/rpm ]; then
   RPMBUILD=/bin/rpm
elif [ -x /usr/bin/rpm ]; then
   RPMBUILD=/usr/bin/rpm

But that's not sufficient on my FC7 release. I don't know when this  
broke, but the proper check should be to make sure that either /usr/ 
bin/rpmbuild is in place, or that a call to /usr/bin/rpm --rebuild  
succeeds (which I'm guessing passes the call over to rpmbuild).

To get rpmbuild on my system, I had to install some fedora extras:
$ sudo yum install fedora-rpmdevtools

Being new to MailScanner, what's the best way to open a bug for this?  
I'm crap at rpm, so I don't think I could suggest the appropriate  
solution for...
I found this page (dated 2002!) from someone at redhat who's involved  
with the rpm package that explains the history of the code change:
http://www.rpm.org/hintskinks/rpmbuild/
cheers,
-pete


--------------------------------------------------------------------------------
Output of install.sh *without* /usr/bin/rpmbuild present:
--------------------------------------------------------------------------------

Good. You have the patch command.

Good, you have /usr/src/redhat in place.
You are running release 5 of RedHat, or a clone.
So I will not force the installation of any Perl modules.
But you are running Fedora, so I am going to force the installation
of the Perl modules that normally require it.

Good, unpackaged files will not break the build process.
Good, far-too-clever Perl requirements will be ignored.

Good, you appear to only have 1 copy of Perl installed.

I think you are running on RedHat Linux, Mandriva Linux or SuSE Linux.
Good, you appear to have the basic development tools installed.

This script will pause for a few seconds after each major step,
so do not worry if it appears to stop for a while.
If you want it to stop so you can scroll back through the output
then press Ctrl-S to stop the output and Ctrl-Q to start it again.


If this fails due to dependency checks, and you wish to ignore
these problems, you can run
     ./install.sh nodeps

Setting Perl5 search path

I think your system will build architecture-dependent modules for i386

Rebuilding all the Perl RPMs for your version of Perl

Oh good, module ExtUtils::MakeMaker version 6.32 is already installed.

Attempting to build and install perl-Net-CIDR-0.11-1
--rebuild: unknown option



Missing file /usr/src/redhat/RPMS/noarch/perl-Net- 
CIDR-0.11-1.noarch.rpm.
Maybe it did not build correctly?

Attempting to build and install perl-IO-stringy-2.108-1
--rebuild: unknown option



Missing file /usr/src/redhat/RPMS/noarch/perl-IO- 
stringy-2.108-1.noarch.rpm.
Maybe it did not build correctly?

Attempting to build and install perl-MIME-Base64-3.07-1
--rebuild: unknown option

<SNIP>

--------------------------------------------------------------------------------
Output of install.sh with /usr/bin/rpmbuild in place:
--------------------------------------------------------------------------------

Good. You have the patch command.

Good, you have /usr/src/redhat in place.
You are running release 5 of RedHat, or a clone.
So I will not force the installation of any Perl modules.
But you are running Fedora, so I am going to force the installation
of the Perl modules that normally require it.

Good, unpackaged files will not break the build process.
Good, far-too-clever Perl requirements will be ignored.

Good, you appear to only have 1 copy of Perl installed.

I think you are running on RedHat Linux, Mandriva Linux or SuSE Linux.
Good, you appear to have the basic development tools installed.

This script will pause for a few seconds after each major step,
so do not worry if it appears to stop for a while.
If you want it to stop so you can scroll back through the output
then press Ctrl-S to stop the output and Ctrl-Q to start it again.


If this fails due to dependency checks, and you wish to ignore
these problems, you can run
     ./install.sh nodeps

Setting Perl5 search path

I think your system will build architecture-dependent modules for i386

Rebuilding all the Perl RPMs for your version of Perl

Oh good, module ExtUtils::MakeMaker version 6.32 is already installed.

Attempting to build and install perl-Net-CIDR-0.11-1
Installing perl-Net-CIDR-0.11-1.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.88252
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf Net-CIDR-0.11
+ /bin/gzip -dc /usr/src/redhat/SOURCES/Net-CIDR-0.11.tar.gz
+ tar -xf -
+ STATUS=0

<SNIP>




More information about the MailScanner mailing list