Bugzilla – Bug 151769
y2pmbuild fails to run su in chroot
Last modified: 2006-02-17 13:35:53 UTC
When trying to build a package according to the documentation found on http://en.opensuse.org/SUSE_Build_Tutorial, y2pmbuild reports su: incorrect password. A full trace of the run can be found at http://suse.pastebin.com/558515. stracing y2pmbuild shows that the failing call is chroot "$buildroot" su - -c /sbin/SuSEconfig on line 277 in runsuseconfig() in y2pmbuild. Trying to confirm that manually, I first did a chroot /var/tmp/build-root.root.10.0-i386/ /sbin/SuSEconfig, which worked just fine. Then I did chroot /var/tmp/build-root.root.10.0-i386/ su - -c /sbin/SuSEconfig which failed with su: incorrect password Removing the su - -c calls makes y2pmbuild to continue a bit further. It will then fail on the chroot "$buildroot" /usr/sbin/useradd -m $builduser -d $builduserhome call.
your BuildRequires/neededforbuild line is incomplete. You need to either add a full working set of packages or (better) remove the aaa_base requirement in which case y2pmbuild will complete the set for you depending on the distribution you are building for. The missing package leading to failing su specifically is pam-modules.