Dmitry Morozovsky writes: | Hi there colleagues, | | possibly stupid question: it there a way to fool jail (real, not "tinderbox" | one) that it's working under i386 kernel? This would be extremely useful for | local package building. | | Quick googling does not reveal anything, or did I miss something obvious? Mostly, OSVERSION= UNAME_m= UNAME_p= UNAME_r= UNAME_s= UNAME_v= then chroot or jail. I have a script: #!/bin/sh UNAME_s="FreeBSD" UNAME_m="i386" UNAME_p="i386" ROOT=$HOME/current_$UNAME_p REVISION=`cd ${ROOT}/sys/conf && grep REVISION= newvers.sh | cut -f2 -d'"'` BRANCH=`cd ${ROOT}/sys/conf && grep BRANCH= newvers.sh | head -n1 | cut -f2 -d' "'` UNAME_r=$REVISION-$BRANCH UNAME_v="$UNAME_s $UNAME_r #0: Thu May 4 07:54:55 PDT 2006 root_at_a21p:/data/ home/ambrisko/current/usr/src/sys/$UNAME_p/compile/THINK" OSVERSION=`awk '/\#define.*__FreeBSD_version/ { print $3 }' < ${ROOT}/sys/sys/pa ram.h` export UNAME_s UNAME_r UNAME_v UNAME_m UNAME_p OSVERSION ROOT if [ -r $ROOT/dev/zero ] then echo dev already mounted else sudo mount -t devfs dev $ROOT/dev fi sudo ln -sf ld-elf.so.1 $ROOT/libexec/ld-elf32.so.1 sudo sh -c '( echo "libpthread.so.2 libthr.so.2" ;\ echo "libpthread.so libthr.so") > ${ROOT}/etc/libmap.conf' sudo cp ${ROOT}/etc/libmap.conf ${ROOT}/etc/libmap32.conf sudo chroot $ROOT It could be made even smarter but looking at the dest and figuring out the release as well. We could make it a make target since you can do this into 6.2 world as well (amd64/current -> amd64/6.2, amd64/current -> i386/6.2 or amd64/current -> amd64/i386). I think I merged in the UNAME_/OSVERSION stuff before 6.2 went out. I also have local hacks to do this with 4.X. At work, our build machines are all loaded up with amd64 and we build i386 or amd64 SW on them. This includes whatever ports are needed. Doug A.Received on Mon Sep 17 2007 - 19:38:31 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:17 UTC