[CentOS] mock %post(pam) failure

Thu Apr 9 22:46:32 UTC 2009
Stuart Jansen <sjansen at gurulabs.com>

I recently upgraded an internal build server from C5.2 to C5.3 and now
I'm experiencing problems initializing the mock buildroot. Specifically,
I'm getting the following error:

------
/var/tmp/rpm-tmp.77062: line 6: cat: command not found
/var/tmp/rpm-tmp.77062: line 7: rm: command not found
/var/tmp/rpm-tmp.77062: line 22: install: command not found
/var/tmp/rpm-tmp.77062: line 25: install: command not found
error: %post(pam-0.99.6.2-4.el5.i386) scriptlet failed, exit status 127
------

Googling has revealed that Fedora had a similar problem about a year
ago, but doesn't reveal what to do about it. Apparently there is a
circular dependency between pam and coreutils. For some reason yum has
recently decided to install pam before coreutils.

Has anyone else seen this? More importantly, does anyone have any tips
how to resolve or work around the issue?