=================================================================== RCS file: /cvs/openbsd/fill_chroot/fill_chroot,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- openbsd/fill_chroot/fill_chroot 2008/10/21 20:10:35 1.14 +++ openbsd/fill_chroot/fill_chroot 2009/05/11 22:07:35 1.15 @@ -1,18 +1,21 @@ #!/bin/sh -# $RedRiver: fill_chroot,v 1.13 2008/09/17 20:08:17 andrew Exp $ +# $RedRiver: fill_chroot,v 1.14 2008/10/21 19:10:35 andrew Exp $ CHROOT=${CHROOT:=/home/andrew/www} +CHROOT=`echo $CHROOT | sed -e 's,/*$,,'` export CHROOT -_find="-name *.so.* -o -name *.so -o ( -name perl -a -type f )" +_find="-type f -a (" +_find="${_find} -name *.so.* -o -name *.so" +echo Installing Directory Structure install -d -m 1750 -o www -g bin ${CHROOT}/tmp -for d in ${CHROOT}/{bin,sbin,usr,var,dev}/ \ +for _d in ${CHROOT}/{bin,sbin,usr,var,dev}/ \ ${CHROOT}/var/run/ \ ${CHROOT}/usr/{lib,bin,sbin,libexec,local}/ \ ${CHROOT}/usr/local/{lib,bin,sbin,share}/\ ; do - install -d -m 0555 -o root -g wheel $d + install -d -m 0555 -o root -g wheel $_d done echo Making devices @@ -21,8 +24,17 @@ cd ${OLDPWD} echo Installing perl into ${CHROOT} -perl_to_chroot +for _f in /usr/bin/perl \ + /usr/libdata/perl5 \ + /usr/local/libdata/perl5 \ + ; do + echo pax -r -w -L -p e $_f ${CHROOT} + pax -r -w -L -p e $_f ${CHROOT} + +done +_find="${_find} -o -name perl" + if [ -e /usr/local/sbin/femail ]; then echo Installing femail into ${CHROOT} echo pax -r -w -L -p e /usr/local/sbin/femail ${CHROOT} @@ -41,27 +53,41 @@ if [ -e /usr/local/bin/aspell ]; then echo Installing aspell into ${CHROOT} - for d in \ + for _f in \ /usr/local/bin/aspell \ /usr/local/lib/aspell \ /usr/local/share/aspell \ ; do - echo pax -r -w -L -p e $d ${CHROOT} - pax -r -w -L -p e $d ${CHROOT} + echo pax -r -w -L -p e $_f ${CHROOT} + pax -r -w -L -p e $_f ${CHROOT} done - _find="${_find} -o ( -name aspell -a -type f )" + _find="${_find} -o -name aspell" fi +if [ -e /usr/local/bin/speedy ]; then + echo Installing speedycgi into ${CHROOT} + for _f in \ + /usr/local/bin/speedy \ + /usr/local/bin/speedy_backend \ + ; do + echo pax -r -w -L -p e $_f ${CHROOT} + pax -r -w -L -p e $_f ${CHROOT} + done + + _find="${_find} -o -name speedy*" +fi + +_find="${_find} )" echo Installing dependencies into ${CHROOT} find ${CHROOT}/usr ${_find} | xargs find_depends | \ sort -u | \ { - local _d - while read _d; do - echo pax -r -w -L -p e ${_d##${CHROOT}} ${CHROOT} - pax -r -w -L -p e ${_d##${CHROOT}} ${CHROOT} + local _f + while read _f; do + echo pax -r -w -L -p e ${_f##${CHROOT}} ${CHROOT} + pax -r -w -L -p e ${_f##${CHROOT}} ${CHROOT} done }