Index: lib/tc_command.sh =================================================================== RCS file: /space/cvs/marcuscom-cvs/portstools/tinderbox/lib/tc_command.sh,v retrieving revision 1.135 diff -u -r1.135 tc_command.sh --- lib/tc_command.sh 1 May 2010 16:33:43 -0000 1.135 +++ lib/tc_command.sh 9 Jun 2010 07:56:40 -0000 @@ -1193,6 +1193,14 @@ fi } +wrap () { + cp $1 $1.orig + cat > $1 << _END +#!/bin/sh +\$0.orig \$@ | sed -e 's|amd64|i386|g' +_END +} + makeBuild () { # set up defaults buildName="" @@ -1246,6 +1254,12 @@ echo "makeBuild: extracting jail tarball" tar -C ${BUILD_DIR} -xpf ${JAIL_TARBALL} + if echo ${jailName} | grep -q i386; then + ln -s ld-elf.so.1 ${BUILD_DIR}/libexec/ld-elf32.so.1 + wrap ${BUILD_DIR}/usr/bin/uname + wrap ${BUILD_DIR}/sbin/sysctl + fi + execute_hook "postBuildExtract" "BUILD=${buildName} DESTDIR=${BUILD_DIR} JAIL=${jailName} PB=${pb} RC=0" # Finalize environment @@ -1438,6 +1452,7 @@ # XXX: though killall may not work since it's a dynamic executable cp -p /rescue/mount /rescue/umount ${buildRoot}/sbin cp -p /rescue/ps ${buildRoot}/bin + cp -p /rescue/tar ${buildRoot}/usr/bin # Mount /dev, since we're going to be chrooting shortly mount -t devfs devfs ${buildRoot}/dev >/dev/null 2>&1 @@ -1501,6 +1516,13 @@ fi fi + # install libmap + echo "tinderbuild: ${build}: Installing libmap" + if [ `echo ${jail} | cut -b 1` -lt 7 ]; then + echo 'libpthread.so.1 libthr.so.1' > ${buildRoot}/etc/libmap.conf + echo 'libpthread.so.2 libthr.so.2' >> ${buildRoot}/etc/libmap.conf + echo 'libkse.so.3 libthr.so.3' >> ${buildRoot}/etc/libmap.conf + fi if [ ${OPTIONS_ENABLED} -eq 1 ]; then optionsDir=$(tinderLoc options ${build})