[BACK]Return to fill_chroot CVS log [TXT][DIR] Up to [local] / openbsd / fill_chroot

Diff for /openbsd/fill_chroot/fill_chroot between version 1.12 and 1.15

version 1.12, 2008/09/16 23:38:35 version 1.15, 2009/05/11 22:07:35
Line 1 
Line 1 
 #!/bin/sh  #!/bin/sh
 # $RedRiver: fill_chroot,v 1.11 2008/09/16 22:28:04 andrew Exp $  # $RedRiver: fill_chroot,v 1.14 2008/10/21 19:10:35 andrew Exp $
   
 CHROOT=${CHROOT:=/home/andrew/www}  CHROOT=${CHROOT:=/home/andrew/www}
   CHROOT=`echo $CHROOT | sed -e 's,/*$,,'`
 export CHROOT  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  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}/var/run/ \
         ${CHROOT}/usr/{lib,bin,sbin,libexec,local}/ \          ${CHROOT}/usr/{lib,bin,sbin,libexec,local}/ \
         ${CHROOT}/usr/local/{lib,bin,sbin,share}/\          ${CHROOT}/usr/local/{lib,bin,sbin,share}/\
 ; do  ; do
         install -d -m 0555 -o root -g wheel $d          install -d -m 0555 -o root -g wheel $_d
 done  done
   
 echo Making devices  echo Making devices
Line 20 
Line 23 
 /dev/MAKEDEV std  /dev/MAKEDEV std
 cd ${OLDPWD}  cd ${OLDPWD}
   
 echo Installing perl  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  if [ -e /usr/local/sbin/femail ]; then
         echo Installing femail          echo Installing femail into ${CHROOT}
         echo pax -r -w -L -p e /usr/local/sbin/femail ${CHROOT}          echo pax -r -w -L -p e /usr/local/sbin/femail ${CHROOT}
         pax -r -w -L -p e /usr/local/sbin/femail ${CHROOT}          pax -r -w -L -p e /usr/local/sbin/femail ${CHROOT}
 else  else
Line 40 
Line 52 
 fi  fi
   
 if [ -e /usr/local/bin/aspell ]; then  if [ -e /usr/local/bin/aspell ]; then
         echo Installing aspell          echo Installing aspell into ${CHROOT}
         for d in \          for _f in \
                 /usr/local/bin/aspell \                  /usr/local/bin/aspell \
                 /usr/local/lib/aspell \                  /usr/local/lib/aspell \
                 /usr/local/share/aspell \                  /usr/local/share/aspell \
         ; do          ; do
                 echo pax -r -w -L -p e $d ${CHROOT}                  echo pax -r -w -L -p e $_f ${CHROOT}
                 pax -r -w -L -p e $d ${CHROOT}                  pax -r -w -L -p e $_f ${CHROOT}
         done          done
   
         _find="${_find} -o ( -name aspell -a -type f )"          _find="${_find} -o -name aspell"
 fi  fi
   
 echo Installing dependencies  if [ -e /usr/local/bin/speedy ]; then
 for d in `find ${CHROOT}/usr ${_find} | \          echo Installing speedycgi into ${CHROOT}
      xargs find_depends | \          for _f in \
      sort -u `; do                  /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
   
     echo pax -r -w -L -p e $d ${CHROOT}          _find="${_find} -o -name speedy*"
     pax -r -w -L -p e $d ${CHROOT}  fi
 done  
   _find="${_find} )"
   echo Installing dependencies into ${CHROOT}
   find ${CHROOT}/usr  ${_find} |
        xargs find_depends | \
        sort -u | \
   {
       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
   }
   
 echo Fixing ldconfig \(/var/run/ld.so.hints\)  echo Fixing ldconfig \(/var/run/ld.so.hints\)
 fix_ldconfig  fix_ldconfig

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.15

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>