version 1.17, 2011/08/09 01:10:16 |
version 1.21, 2019/11/04 01:13:18 |
|
|
#!/bin/sh |
#!/bin/sh |
# $RedRiver: fill_chroot,v 1.16 2010/01/11 21:16:33 andrew Exp $ |
# $AFresh1: fill_chroot,v 1.20 2012/06/10 03:29:42 andrew Exp $ |
|
|
CHROOT=${CHROOT:=/home/andrew/www} |
CHROOT=${CHROOT:=/home/andrew/www} |
CHROOT=`echo $CHROOT | sed -e 's,/*$,,'` |
CHROOT=`echo $CHROOT | sed -e 's,/*$,,'` |
export CHROOT |
export CHROOT |
|
BINDIR=$( dirname $( readlink -f $0 ) ) |
|
|
_find="-type f -a (" |
_find="-type f -a (" |
_find="${_find} -name *.so.* -o -name *.so" |
_find="${_find} -name *.so.* -o -name *.so" |
_find="${_find} -o -path '*/usr/bin' -o -path '*/usr/sbin'" |
_find="${_find} -o -path */usr/bin/* -o -path */usr/sbin/*" |
|
_find="${_find} -o -path */usr/local/bin/* -o -path */usr/local/sbin/*" |
|
|
echo Installing Directory Structure |
echo Installing Directory Structure |
install -d -m 1750 -o www -g bin ${CHROOT}/tmp |
install -d -m 1750 -o www -g bin ${CHROOT}/tmp |
|
|
pax -r -w -L -p e $_f ${CHROOT} |
pax -r -w -L -p e $_f ${CHROOT} |
|
|
done |
done |
_find="${_find} -o -name perl" |
|
|
|
if [ -e /usr/local/sbin/femail ]; then |
if [ -e /usr/local/sbin/femail ]; then |
echo Installing femail into ${CHROOT} |
echo Installing femail into ${CHROOT} |
|
|
_find="${_find} -o -name speedy*" |
_find="${_find} -o -name speedy*" |
fi |
fi |
|
|
if [ -e ${CHROOT}/usr/bin/cvs ]; then |
if [ -e ${CHROOT}/cgi-bin/cvsweb ]; then |
|
echo Installing cvsweb depends |
|
for _f in \ |
|
/usr/bin/{co,cvs,diff,perl,rcsdiff,rlog,uname} \ |
|
; do |
|
echo pax -r -w -L -p e $_f ${CHROOT} |
|
pax -r -w -L -p e $_f ${CHROOT} |
|
done |
|
|
|
elif [ -e ${CHROOT}/usr/bin/cvs ]; then |
_f=/usr/bin/cvs |
_f=/usr/bin/cvs |
echo Installing cvs |
echo Installing cvs |
echo pax -r -w -L -p e $_f ${CHROOT} |
echo pax -r -w -L -p e $_f ${CHROOT} |
pax -r -w -L -p e $_f ${CHROOT} |
pax -r -w -L -p e $_f ${CHROOT} |
|
|
_find="${_find} -o -name cvs" |
|
fi |
fi |
|
|
_find="${_find} )" |
_find="${_find} )" |
echo Installing dependencies into ${CHROOT} |
echo Installing dependencies into ${CHROOT} |
find ${CHROOT}/usr ${_find} | |
find ${CHROOT}/usr ${_find} -print0 | |
xargs find_depends | \ |
xargs -0 "${BINDIR}"/find_depends | \ |
sort -u | \ |
sort -u | \ |
{ |
{ |
local _f |
local _f |
|
|
} |
} |
|
|
echo Fixing ldconfig \(/var/run/ld.so.hints\) |
echo Fixing ldconfig \(/var/run/ld.so.hints\) |
fix_ldconfig |
"${BINDIR}"/fix_ldconfig |