[CentOS] Mock Shell Arch Command

Mon May 3 17:40:00 UTC 2010
Ryan Wagoner <rswagoner at gmail.com>

I've successfully rebuilt Red Hat EL PHP 5.2.10 RPMs using mock on a
CentOS 5.4 i386. I wanted to be able to build both x86_64 and i386
versions so I reinstalled my builder system with CentOS 5.4 x86_64.
Now I can build the PHP RPM successful for x86_64, but i386 fails with
the following during configure

/usr/bin/net-snmp-config: line 43: net-snmp-config-x86_64: command not found

For the commands I am using

mock -r centos-5-x86_64 php-5.2.10-1.el5s2.src.rpm
mock -r centos-5-i386 php-5.2.10-1.el5s2.src.rpm

I went into the shell on the i386 build environment

mock -r centos-5-i386 shell

The contents of /usr/bin/net-snmp-config has

arch=`arch`
echo $arch | grep -q i.86
......
if [ "$arch" = "x86_64" ] ; then
    net-snmp-config-x86_64 $*
    exit 0
fi

When I run arch from the mock shell I get x86_64.

Shouldn't it see the correct architecture inside of mock? I thought
that was the point of mock so I could build both i386 and x86_64
versions on the same system.

Thanks,
Ryan