View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Instalar el valgrind en un pupitre_sc "nuevo" (debian 6.0.5, tmpfs)

1. Preparar un chroot en el pupitre_sc y ver las dependencias que faltan (después se deja esta ventana abierta, luego la necesitaremos):

 En pupitre_sc (en este caso pupitre_sc de valdeacederas, como root):
mkdir /tmp/chroot
mount --bind / /tmp/chroot
mount -o remount,rw /tmp/chroot
for i in dev dev/pts proc sys srv ; do mount --bind /$i /tmp/chroot/$i ; done
mount --bind /var/lib-saved /tmp/chroot/var/lib
mount -o remount,rw /
mount -o remount,rw /tmp/chroot/
mount -o remount,rw /tmp/chroot/var/lib
chroot /tmp/chroot/ /bin/bash
apt-get --print-uris install valgrind > /lista.txt
scp lista.txt metro@16.0.62.18:/tmp/


2. Se copia el resultado en un directorio de uiharu en el fichero lista.txt (Ya está hecho, no hace falta repetirlo, saltar este paso):

 en uiharu, como usuario:
cd /tmp
mkdir t
cd t
scp metro@16.0.62.18:/tmp/lista.txt
cat >> dl.sh <'EOF'
#!/bin/bash
for i in `cat lista.txt | cut -d "'" -f 2` ; do 
        f=`echo $i | cut -d '/' -f 5-`
        wget https://snapshot.debian.org/archive/debian/20120608T102353Z/$f
done
EOF
cat >> check.sh <'EOF'
#!/bin/bash
for i in `cat lista.txt | cut -d "'" -f 2` ; do 
        f=$(basename $(echo $i | cut -d '/' -f 5-))
        if [ ! -e $f ] ; then
                echo "ERROR: $f"
        fi
done
EOF
chmod 755 dl.sh check.sh
./dl.sh
./check.sh
tar -cvzf valgrind-pupitresc_debian605.tgz *deb
scp valgrind-pupitresc_debian605.tgz metro@main1:/incoming/


3. Se instala dicho fichero en el chroot del pupitre_sc. En la misma ventana donde se hizo el paso 1:

 En pupitre_sc, como root (en la ventana que se dejó abierta en paso 1):
scp metro@16.0.62.18:/incoming/valgrind-pupitresc_debian605.tgz /
cd /var/cache/apt/archives
tar -xvzf /valgrind-pupitresc_debian605.tgz
rm /valgrind-pupitresc_debian605.tgz
mount -o remount,rw /
apt-get install valgrind
exit
mount -o remount,ro /
mount -o remount,ro /tmp/chroot/
mount -o remount,ro /tmp/chroot/var/lib
for i in dev/pts dev proc sys srv var/lib ; do umount /tmp/chroot/$i ; done
umount /tmp/chroot
reboot