From 3b32b2956e25ab47618c9fb3e72d05ba5de63000 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Wed, 20 Aug 2008 14:34:44 -0400 Subject: [PATCH] initchroot: add a workaround for #314334 jffs2 doesn't support shared mmap, so apt explodes (#314334). This was the reason why we were mounting /var/cache/apt/cache over tmpfs; readd the mount, and update apt.conf accordingly. Signed-off-by: Andres Salomon --- functions.sh | 1 + initchroot.sh | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/functions.sh b/functions.sh index 5a45aa0..226b8b4 100644 --- a/functions.sh +++ b/functions.sh @@ -48,6 +48,7 @@ tmpfs /dev/shm tmpfs defaults,size=15% 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 none /ofw promfs defaults 0 0 +tmpfs /var/cache/apt/cache tmpfs defaults 0 0 EOF } diff --git a/initchroot.sh b/initchroot.sh index ebcd74c..025f8c2 100755 --- a/initchroot.sh +++ b/initchroot.sh @@ -45,9 +45,11 @@ check_for_cmds debootstrap || exit 1 # create chroot debootstrap --arch i386 lenny ${ROOT_DIR} http://http.us.debian.org/debian +mkdir ${ROOT_DIR}/ofw +mkdir ${ROOT_DIR}/var/cache/apt/cache mount -t proc proc ${ROOT_DIR}/proc mount -t devpts devpts ${ROOT_DIR}/dev/pts -mkdir ${ROOT_DIR}/ofw +mount -t tmpfs tmpfs ${ROOT_DIR}/var/cache/apt/cache # allow daemons to be installed without breaking mv ${ROOT_DIR}/sbin/start-stop-daemon ${ROOT_DIR}/sbin/start-stop-daemon.REAL @@ -58,12 +60,18 @@ echo "Warning: Fake start-stop-daemon called, doing nothing" EOF chmod 755 ${ROOT_DIR}/sbin/start-stop-daemon -# set up apt +# set up apt (working around #314334) export DEBIAN_FRONTEND=noninteractive export DEBCONF_PRIORITY=critical cat >${ROOT_DIR}/etc/apt/apt.conf<${ROOT_DIR}/etc/apt/sources.list<