> the key is not to have coffee (or anything that is claimed to be
> coffee) in mouth when reading these ridiculous statements
>

Not going to argue with that of course, correctness is what matters here not
friendliness. And someone who runs an ISP definitely knows better than a
newbie.

Trying to stick to the topic of the post what I did in a test bed was to
apply the cookie trick on a chroot environment after doing a CVS checkout of
ports. Then you build the software you need to include in your image and get
a detailed list of the files you need to deal with.

The following script when run in the chroot and adapted from Chris script
can be run against the output of the cookie trick to generate a final list.

I am sure the script can be improved as well...


#!/bin/ksh
list="$1"
distfile=`pwd`/$1
echo Procesando $distfile
mandir=`mktemp -d /tmp/mandir.XXXXXXXX`
manpages=`mktemp /tmp/flashdist.XXXXXXXX`
TA=`mktemp /tmp/flashdist.XXXXXXXX`
TB=`mktemp /tmp/flashdist.XXXXXXXX`


while read i; do
 test -z "$i" && continue
 if [ ! -f $i -a ! -h $i -a ! -d $i ]; then
  echo $i NOT FOUND
  notfound=1
 elif [ -x $i ]; then
  lib=`ldd $i 2>/dev/null | egrep 'rlib|rtld' | awk '{ print $7 }' | sort
-u`

   for z in $lib; do
     if [ ! -f $z ]; then
      echo "$z NOT FOUND (dependency of $i)"
      notfound=1
     else
      echo $z >> $TA
     fi
   done
 fi


 if echo $i | egrep ^/usr/local/man >/dev/null; then
   xx=`dirname $mandir/$i.gz`


   if [ ! -d "$xx" ]; then
     mkdir -p $xx
   fi

   gzip -9c /$i > $mandir/$i.gz
   echo $i.gz >> $manpages
 fi
done < $distfile


egrep -v ^/usr/local/man $distfile >> $TA
sort < $TA | uniq > $TB

cat $TB | sed s/^.// > lista.out

Reply via email to