nethack

nethack

dgamelaunch

TODO

groupadd -r games
useradd -r -g games nethack
git clone 

nethack

TODO

scores script

TODO

copying shared libraries

cd /opt/nethack
for i in `ls bin`; do for l in `ldd bin/$i | tail -n +1 | cut -d'>' -f2 | awk '{print $1}'`; do if [ -f $l ]; then echo $l; cp $l lib64/; fi; done; done
for l in `ldd dgamelaunch | tail -n +1 | cut -d'>' -f2 | awk '{print $1}'`; do if [ -f $l ]; then echo $l; cp $l lib64/; fi; done
for l in `ldd nethack-3.7.0-r1/games/nethack | tail -n +1 | cut -d'>' -f2 | awk '{print $1}'`; do if [ -f $l ]; then echo $l; cp $l lib64/; fi; done

making device nodes

TODO! For now I mount all of /dev in the chroot :

#mknod -m 666 dev/ptmx c 5 2
mount -R /dev /opt/nethack/dev

debugging

gdb chroot
run --userspec=nethack:games /opt/nethack/ /dgamelaunch