Easy Chroot 0.3.1
authorAlan Bruce <qole@qole.org>
Mon, 23 Aug 2010 02:28:24 +0000 (19:28 -0700)
committerAlan <qole@qole.org>
Mon, 23 Aug 2010 02:31:16 +0000 (19:31 -0700)
37 files changed:
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/changelog [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/compat [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/control [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/copyright [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/dirs [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/optify [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/postinst [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/postrm [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/rules [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/etc/sudoers.d/chroot.sudoers [new file with mode: 0644]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/closechroot [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/cpu-ondemand [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/cpu-perform [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qchroot [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qmount [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qumount [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/synchroot [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/gxmessage [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/hostwin [new file with mode: 0755]
fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/quserchroot [new file with mode: 0755]
fremantle/easy-chroot/build_easychroot.py
fremantle/easy-chroot/control/changelog
fremantle/easy-chroot/src/sbin/closechroot
fremantle/easy-chroot/src/sbin/qchroot
fremantle/easy-chroot/src/sbin/qmount
fremantle/easy-chroot/src/sbin/qumount
fremantle/easy-deb-chroot/archive/MurrinaNightOrange/gtk-2.0/gtkrc [new file with mode: 0755]
fremantle/easy-deb-chroot/build_easydebchroot.py
fremantle/easy-deb-chroot/control/changelog
fremantle/easy-deb-chroot/src/home/user/.xbindkeysrc
fremantle/easy-deb-chroot/src/sbin/debsu [new file with mode: 0755]
fremantle/easy-deb-chroot/src/usr/bin/debbie-sue [new file with mode: 0755]
fremantle/easy-deb-chroot/src/usr/bin/debian-lxde [new file with mode: 0755]
fremantle/easy-deb-chroot/src/usr/bin/debwm [new file with mode: 0755]
fremantle/easy-deb-chroot/src/usr/bin/fixkbdfocus [new file with mode: 0755]
fremantle/easy-deb-chroot/src/usr/share/applications/hildon/lxde.desktop
fremantle/easy-deb-chroot/src/usr/share/applications/hildon/lxdefocus.desktop

diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/changelog b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/changelog
new file mode 100644 (file)
index 0000000..b7ab80a
--- /dev/null
@@ -0,0 +1,15 @@
+easy-chroot (0.3.1-1fremantle1) stable; urgency=low
+
+  0.2.1: First version for Fremantle, fifth package. Trying a new version of py2deb. 
+  0.2.2: Added thp's patches, some other fixes. 
+  0.2.3: First version in Extras! 
+  0.2.4: Fixed some small bugs and added a bugtracker field. 
+  0.2.5: Unmount /dev/shm in the closechroot script 
+  0.2.6: Include Debian's fuser as a workaround for broken busybox 
+  0.2.7: Remove the closechroot .desktop file, move to Easy Debian
+  0.2.8: Support dmsetup + kernel-module-dmloop packages, if installed
+  0.2.9: Use the 'cd /proc' workaround for broken fuser bug, add 'nodiratime,nobh' to mount options
+  0.3.0: Require dmlosetup to be present before attempting dm-loop.
+  0.3.1: Strip trailing slash on mountpoint in all scripts, fixed problems in multi-loop handling.
+
+ -- Alan Bruce (qole) <qole@qole.org>  Sun, 22 Aug 2010 15:11:03 +0000
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/compat b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/control b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/control
new file mode 100644 (file)
index 0000000..6bbdb6b
--- /dev/null
@@ -0,0 +1,57 @@
+Source: easy-chroot
+Section: user/system
+Priority: extra
+Maintainer: Alan Bruce (qole) <qole@qole.org>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: easy-chroot
+Architecture: armel
+Depends: libblkid1
+XSBC-Maemo-Display-Name: Easy Chroot
+Description: Scripts to mount and chroot into images/partitions, Fremantle version.
+ ---
+ This package provides the infrastructure for Easy Debian,
+ but it can be used for other purposes, like mounting a CD-ROM image
+ or setting up an on-device SDK for app development.
+ Install dmsetup and kernel-module-dmloop to use the (possibly faster) dm-loop.
+ ---
+ (If that didn't make any sense to you, don't install this)
+XSBC-Bugtracker: https://garage.maemo.org/tracker/?atid=3577&group_id=953&func=browse
+XB-Maemo-Icon-26:
+ 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
\ No newline at end of file
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/copyright b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/copyright
new file mode 100644 (file)
index 0000000..34b6076
--- /dev/null
@@ -0,0 +1,35 @@
+This package was py2debianized(0.5.3) by Alan Bruce (qole) <qole@qole.org> on
+Sun, 22 Aug 2010 15:11:03 +0000.
+
+It was downloaded from 
+
+Upstream Author: Alan Bruce (qole) <qole@qole.org>
+
+Copyright: 2010 by Alan Bruce (qole)
+
+License:
+
+
+    This package is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+
+The Debian packaging is (C) 2010, Alan Bruce (qole) <qole@qole.org> and
+is licensed under the GPL, see above.
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/dirs b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/dirs
new file mode 100644 (file)
index 0000000..3fa2141
--- /dev/null
@@ -0,0 +1,3 @@
+etc/sudoers.d/
+sbin/
+usr/bin/
\ No newline at end of file
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/optify b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/optify
new file mode 100644 (file)
index 0000000..c86c3f3
--- /dev/null
@@ -0,0 +1 @@
+none
\ No newline at end of file
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/postinst b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/postinst
new file mode 100644 (file)
index 0000000..ed8534e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+if  [ ! -e "/sbin/ezchroot" ] ; then 
+   ln -s /sbin/qchroot /sbin/ezchroot
+fi
+
+# yet another kludge; detect an upgrade (forced OFF)
+UPGRD='no'
+
+# this takes a while; that's why it's at the end...
+update-sudoers
+
+exit 0 
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/postrm b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/postrm
new file mode 100644 (file)
index 0000000..21b6405
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if  [ ! -e "/sbin/ezchroot" ] ; then 
+  rm /sbin/ezchroot
+fi
+
+update-sudoers
+
+exit 0
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/rules b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/debian/rules
new file mode 100755 (executable)
index 0000000..6f269cd
--- /dev/null
@@ -0,0 +1,110 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+       dh_testdir
+       touch build-stamp
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+       dh_clean
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k
+       dh_installdirs
+
+       # ======================================================
+       #$(MAKE) DESTDIR="$(CURDIR)/debian/easy-chroot" install
+       mkdir -p "$(CURDIR)/debian/easy-chroot"
+
+#      mkdir -p "$(CURDIR)/debian/easy-chroot/sbin/"
+       cp -a "src/sbin/closechroot" "$(CURDIR)/debian/easy-chroot/sbin/closechroot"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/sbin/"
+       cp -a "src/sbin/cpu-ondemand" "$(CURDIR)/debian/easy-chroot/sbin/cpu-ondemand"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/sbin/"
+       cp -a "src/sbin/cpu-perform" "$(CURDIR)/debian/easy-chroot/sbin/cpu-perform"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/sbin/"
+       cp -a "src/sbin/qchroot" "$(CURDIR)/debian/easy-chroot/sbin/qchroot"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/sbin/"
+       cp -a "src/sbin/qmount" "$(CURDIR)/debian/easy-chroot/sbin/qmount"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/sbin/"
+       cp -a "src/sbin/qumount" "$(CURDIR)/debian/easy-chroot/sbin/qumount"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/sbin/"
+       cp -a "src/sbin/synchroot" "$(CURDIR)/debian/easy-chroot/sbin/synchroot"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/usr/bin/"
+       cp -a "src/usr/bin/gxmessage" "$(CURDIR)/debian/easy-chroot/usr/bin/gxmessage"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/usr/bin/"
+       cp -a "src/usr/bin/hostwin" "$(CURDIR)/debian/easy-chroot/usr/bin/hostwin"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/usr/bin/"
+       cp -a "src/usr/bin/quserchroot" "$(CURDIR)/debian/easy-chroot/usr/bin/quserchroot"
+       mkdir -p "$(CURDIR)/debian/easy-chroot/etc/sudoers.d/"
+       cp -a "src/etc/sudoers.d/chroot.sudoers" "$(CURDIR)/debian/easy-chroot/etc/sudoers.d/chroot.sudoers"
+
+       # ======================================================
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs debian/changelog
+       dh_installdocs
+       dh_installexamples
+#      dh_install
+#      dh_installmenu
+#      dh_installdebconf
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip
+       dh_compress
+       dh_fixperms
+#      dh_perl
+#      dh_makeshlibs
+       dh_installdeb
+#      dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/etc/sudoers.d/chroot.sudoers b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/etc/sudoers.d/chroot.sudoers
new file mode 100644 (file)
index 0000000..defeda1
--- /dev/null
@@ -0,0 +1,2 @@
+Defaults env_keep+=GTK_MODULES
+user ALL = NOPASSWD: ALL
\ No newline at end of file
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/closechroot b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/closechroot
new file mode 100755 (executable)
index 0000000..cdb2c89
--- /dev/null
@@ -0,0 +1,87 @@
+#!/bin/sh
+#Close a mounted chroot; this means killing all the chroot apps and unmounting the bound directories.
+
+# By Alan M Bruce (qole)
+#
+# GPL licensed; keep code free!
+
+if [ "`whoami`" != "root" ] ; then
+  echo "please run me as root!"
+  exit 9
+fi
+
+#Try to get the chroot location from the first parameter
+CHROOT=$1
+
+#Try to get the chroot location from the config file... 
+if [ "x$CHROOT" = x ] ; then
+  #Pull in the config, if possible...
+  [ -f /home/user/.chroot ] && . /home/user/.chroot
+  #Still not set? Set to default
+  [ "x$CHROOT" != x ] || CHROOT=/debian
+fi
+
+# Strip off a trailing slash
+LASTCHAR=`echo $CHROOT | cut -c ${#CHROOT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   CHROOT=`echo $CHROOT | cut -c 0-$((${#CHROOT}-1))`
+fi
+
+#Abort if chroot not mounted.
+if [ ! -f "$CHROOT/var/lock/qmount-complete" ] ; then
+  echo "Nothing to do; chroot not mounted!"
+  exit 1
+fi
+
+echo "Closing the chroot..."
+
+# Fremantle's fuser command is broken.
+# We can either use Debian's one instead (as gfuser),
+# or we can use the workaround: "cd /proc" first.
+
+echo "...closing chroot apps..."
+
+TEST1=`mount | grep " $CHROOT "`
+if [ "x$TEST1" != "x" ] ; then
+  if [ -f "/bin/gfuser" ] ; then
+    gfuser -m "$CHROOT" -k
+  else
+    cd /proc
+    fuser -m "$CHROOT" -k
+  fi
+else
+  if [ -f "/bin/gfuser" ] ; then
+    gfuser "$CHROOT" -k
+  else
+    cd /proc
+    fuser "$CHROOT" -k
+  fi
+fi
+
+echo "..Unmounting bound dirs..."
+
+#Any external mounts
+
+umount -fl $CHROOT/home/user/MyDocs
+umount -fl $CHROOT/dev/pts
+umount -fl $CHROOT/dev/shm
+
+MNTD=`cat /proc/mounts | grep " $CHROOT/" | awk '{print $2}'`
+for MDRV in $MNTD ; do
+  echo "unmounting $MDRV"
+  umount -l "$MDRV"
+done
+
+if [ -f "$CHROOT/var/lock/qmount-complete" ] ; then
+  rm "$CHROOT/var/lock/qmount-complete"
+fi
+
+if [ -f "$CHROOT/var/lock/chroot-complete" ] ; then
+  rm "$CHROOT/var/lock/chroot-complete"
+fi
+
+/sbin/qumount $CHROOT
+
+echo "chroot closed."
+exit 0
\ No newline at end of file
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/cpu-ondemand b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/cpu-ondemand
new file mode 100755 (executable)
index 0000000..3c394fa
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# set cpu governor to on-demand mode
+# (based on lcuk's liqbase script)
+
+echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
\ No newline at end of file
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/cpu-perform b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/cpu-perform
new file mode 100755 (executable)
index 0000000..a3ad3b3
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# set cpu governor to on-demand mode
+# (based on lcuk's liqbase script)
+
+echo performance >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+sleep 1
+echo '' >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
\ No newline at end of file
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qchroot b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qchroot
new file mode 100755 (executable)
index 0000000..8955351
--- /dev/null
@@ -0,0 +1,163 @@
+#!/bin/sh
+# Sets up (if necessary) and chroots into a different environment.
+# Expects root privileges, does not drop them. 
+
+# By Alan M Bruce (qole) with help from Benson Mitchell and Thomas Perl
+#
+# GPL licensed; keep code free!
+
+# This script should have a wrapper to set up extra variables,
+# OR, it can be run as a command:
+# ezchroot <part/file/'none'> <chroot dir> <command> <params...>
+
+if [ "`whoami`" != "root" ] ; then
+  echo "please run me as root!"
+  exit 9
+fi
+
+IMGFILE=$1
+shift 1
+
+CHROOT=$1
+shift 1
+
+# echo ezchroot $IMGFILE $CHROOT $*
+
+# Strip off a trailing slash
+LASTCHAR=`echo $CHROOT | cut -c ${#CHROOT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   CHROOT=`echo $CHROOT | cut -c 0-$((${#CHROOT}-1))`
+fi
+
+qmount $IMGFILE $CHROOT
+MOUNTSUCCESS=$?
+
+if [ "$MOUNTSUCCESS" != "1" ] && [ "$MOUNTSUCCESS" != "0" ] ; then
+  echo Cancelling chroot...
+  exit $MOUNTSUCCESS
+fi
+
+if [ "$MOUNTSUCCESS" = "0" ] ; then
+  #Make the tablet's devices available to the chroot
+  echo . >/dev/stderr
+  mount -o bind /dev "$CHROOT/dev"
+  mount -o bind /proc "$CHROOT/proc"
+
+  #Gentoo wiki says this will make X work
+  echo .. >/dev/stderr
+  mount -t devpts none "$CHROOT/dev/pts"
+  mount -o bind /tmp "$CHROOT/tmp"
+
+  #Open e-mail attachments, etc
+  mount -o bind /var/tmp "$CHROOT/var/tmp"
+
+  #ArchLinux suggestions
+  mount -o bind /dev/shm "$CHROOT/dev/shm"
+  mount -o bind /sys "$CHROOT/sys"
+
+  #Any external devices
+  echo ... >/dev/stderr
+  MNTD=`cat /proc/mounts | grep ' /media/' | awk '{print $2}'`
+
+  for MDRV in $MNTD ; do
+    if [ ! -d "$CHROOT$MDRV" ] ; then
+      mkdir -p "$CHROOT$MDRV"
+    fi
+    mount -o bind "$MDRV" "$CHROOT$MDRV"
+  done
+
+  #Mount the user's home dir
+  echo .... >/dev/stderr
+  #mount -o bind /home/user "$CHROOT/home/user"
+
+  # Do it the Fremantle way.
+  mount /dev/mmcblk0p2 "$CHROOT/home"
+  mount /dev/mmcblk0p1 "$CHROOT/home/user/MyDocs"
+  
+  #Make DBus work
+  mount -o bind /var/run/dbus "$CHROOT/var/run/dbus"
+  mount -o bind /var/lib/dbus "$CHROOT/var/lib/dbus"
+
+  #Make pulseaudio work
+  mount -o bind /var/run/pulse "$CHROOT/var/run/pulse"
+
+  #Speed hacks: lower the priority of processes
+  #renice 0 `pidof mmcqd`
+  #renice 20 `pidof trackerd`
+
+  # Sync the chroot if requested...
+  if [ -f /home/user/.synchroot ] ; then 
+    /sbin/synchroot $CHROOT
+    rm /home/user/.synchroot
+  fi
+
+  # Place any commands you wish to run the first time you chroot
+  # into the /var/run/onfirstchroot-ext.rc file (inside your rootfs)
+
+  if [ -f "$CHROOT/var/run/onfirstchroot-ext.rc" ] ; then
+    . "$CHROOT/var/run/onfirstchroot-ext.rc"
+  fi
+
+  # Place any commands you wish to run from inside the chroot 
+  # the first time you chroot into the /var/run/onfirstchroot.rc
+  # file (inside your rootfs)
+
+  if [ -f "$CHROOT/var/run/onfirstchroot.rc" ] ; then
+    chroot $CHROOT "/var/run/onfirstchroot.rc"
+  fi
+
+fi
+
+# Place any commands you wish to run every time you chroot
+# into the /var/run/onchroot-ext.rc file (inside your rootfs)
+
+if [ -f "$CHROOT/var/run/onchroot-ext.rc" ] ; then
+  . "$CHROOT/var/run/onchroot-ext.rc"
+fi
+
+# Place any commands you wish to run from inside the chroot
+# every time you chroot into the /var/run/onchroot.rc
+# file (inside your rootfs)
+
+if [ -f "$CHROOT/var/run/onchroot.rc" ] ; then
+  chroot $CHROOT "/var/run/onchroot.rc"
+fi
+
+#All set up. Set flag for next time...
+
+if [ ! -d "$CHROOT/var/lock" ] ; then
+  mkdir -p "$CHROOT/var/lock"
+fi
+
+trap "rm -f $CHROOT/var/lock/chroot-complete ; echo -ne '\033]0;osso_xterm\007' ; exit" INT TERM EXIT
+echo $IMGFILE $@ > "$CHROOT/var/lock/chroot-complete"
+
+#Custom prompt and xterm title. Reduces confusion.
+CHRLABEL=`blkid -s LABEL $IMGFILE | cut -d' ' -f2 | cut -d'=' -f2 | sed 's/"//g'`
+
+#If the file is mounted on loop, use that label.
+if [ "x$CHRLABEL" = "x" ] ; then
+
+  # first find the loop
+  LOOPNO=`mount | grep loop | grep $CHROOT | awk '{print $1}'`
+
+  if [ "x$LOOPNO" != "x" ] ; then
+     CHRLABEL=`blkid -s LABEL $LOOPNO | cut -d' ' -f2 | cut -d'=' -f2 | sed 's/"//g'`
+  fi
+fi
+
+if [ "x$CHRLABEL" = "x" ] ; then
+  CHRLABEL=chroot
+fi
+
+echo -ne "\033]0;$CHRLABEL\007" >/dev/stderr
+export PS1="[\u@$CHRLABEL: \w]"
+
+#Actually chroot
+echo "Everything set up, running chroot..." >/dev/stderr
+chroot $CHROOT "$@"
+
+#All done, reset.
+exit 0
+
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qmount b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qmount
new file mode 100755 (executable)
index 0000000..12c808f
--- /dev/null
@@ -0,0 +1,205 @@
+#!/bin/sh
+# Sets up (if necessary) and chroots into a different environment.
+# Expects root privileges, does not drop them. 
+
+# By Alan M Bruce (qole) with help from Benson Mitchell and Thomas Perl
+#
+# GPL licensed; keep code free!
+
+# Hacked roughly to work with Fremantle. Help always appreciated. I can be found on talk.maemo.org.
+
+# This script should have a wrapper to set up extra variables,
+# OR, it can be run as a command:
+# qmount <partition/file/'none'> <mountpoint>
+
+if [ "`whoami`" != "root" ] ; then
+  echo "please run me as root!"
+  exit 9
+fi
+
+IMGFILE=$1
+MNTPT=$2
+
+# echo qmount $IMGFILE $MNTPT
+
+#Ensure that we have an image or partition to mount
+
+if [ ! -f "$IMGFILE" ] && [ ! -b "$IMGFILE" ] ; then
+  MSG1=`printf "ERROR!\n\nThe image specified ($IMGFILE) does not exist or is neither\na regular nor a block special file.\n\nFirst parameter must be an image file or partition"`
+  if [ ! -f "/usr/bin/gxmessage" ] ; then
+    echo $MSG1 >/dev/stderr
+  else
+    gxmessage -center -alignbuttons center -buttons GTK_STOCK_OK:0 -geometry 680x250 -title "EZ-CHROOT ERROR" "$MSG1"
+  fi
+  exit 9
+fi
+
+#Ensure that we have a chroot directory to mount the image or partition on
+
+if [ "x$MNTPT" = "x" ] || [ "x`echo $MNTPT | grep '/'`" = "x"  ] ; then
+  MSG1=`printf "ERROR!\n\nNo chroot directory specified!\n\nSecond parameter must be chroot dir (eg. /debian)"`
+  if [ ! -f "/usr/bin/gxmessage" ] ; then
+    echo $MSG1 >/dev/stderr
+  else
+    gxmessage -center -alignbuttons center -buttons GTK_STOCK_OK:0 -geometry 680x250 -title "EZ-CHROOT ERROR" "$MSG1"
+  fi
+  exit 9
+fi
+
+# Strip off a trailing slash
+LASTCHAR=`echo $MNTPT | cut -c ${#MNTPT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   MNTPT=`echo $MNTPT | cut -c 0-$((${#MNTPT}-1))`
+fi
+
+#Check to see if already mounted
+if [ -f "$MNTPT/var/lock/qmount-complete" ] ; then
+  echo "$MNTPT has a qmount already!" >/dev/stderr
+  MTDIMGFILE=`cat $MNTPT/var/lock/qmount-complete`
+  if [ "$IMGFILE" != "$MTDIMGFILE" ] ; then
+    echo $MTDIMGFILE already mounted here! >/dev/stderr
+    MSG1=`printf "Mount problem!\n\n$MTDIMGFILE already mounted on $MNTPT"`
+       if [ ! -f "/usr/bin/gxmessage" ] ; then
+         echo $MSG1 >/dev/stderr
+       else
+         gxmessage -center -alignbuttons center -buttons GTK_STOCK_OK:0 -geometry 680x250 -title "EZ-CHROOT ERROR" "$MSG1"
+       fi
+    exit 9
+    # Instead of failing, we could unmount instead...
+    # echo Unmounting...
+    # closechroot $MNTPT
+  else
+    echo $MTDIMGFILE already mounted on $MNTPT... >/dev/stderr
+    exit 1
+  fi
+fi 
+
+if [ ! -f "$MNTPT/var/lock/qmount-complete" ] ; then
+ echo "Mounting..."
+ if [ "$IMGFILE" != "none" ] ; then
+
+   if [ -f "$IMGFILE" ] ; then
+     LOOP=loop,
+     echo "using image file: $IMGFILE" >/dev/stderr
+     if [ "x$IMGFS" = x ] ; then
+       IMGFS=`echo $IMGFILE | awk -F '.' '{print $NF}'`
+       echo "fs type is $IMGFS" >/dev/stderr
+     fi
+   else
+     LOOP=
+     echo "using device: $IMGFILE" >/dev/stderr
+     PARTINFO="`blkid -s TYPE $IMGFILE`"
+     if [ "x$IMGFS" = x ] ; then
+       IMGFS=`echo $PARTINFO | awk '{print $NF}' | awk -F '=' '{print $NF}' | sed s/\"//g`
+     fi
+   fi
+
+   # missing in Fremantle...
+   # modprobe mbcache
+
+   if [ "$IMGFS" != "ext3" ] && [ "$IMGFS" != "ext2" ] ; then
+     echo "Don't know $IMGFS: Using ext2 file system" >/dev/stderr
+     IMGFS=ext2
+   fi
+
+   echo "Using $IMGFS file system"
+   if [ "$IMGFS" = ext3 ] ; then
+     #insmod "$MODULEPATH/jbd.ko" 2>/dev/null
+     modprobe jbd
+   fi
+
+   #insmod "$MODULEPATH/$IMGFS.ko" 2>/dev/null
+   modprobe $IMGFS
+
+   if [ -d "/lib/modules/`uname -r`" ] ; then
+     MODULEPATH="/lib/modules/`uname -r`"
+   else
+     MODULEPATH=/lib/modules/2.6.28-omap1
+   fi
+
+   if [ "$LOOP" = "loop," ] ; then
+
+   # Check for dm-loop kernel module and dmlosetup command. 
+   # If found, then use dm-loop instead of regular loop.
+
+     if [ -f "$MODULEPATH/dm-loop.ko" ] && [ -f "/sbin/dmlosetup" ]; then
+
+       # use dm-loop
+
+       echo "mounting $IMGFILE on the turbo-loop ;)"
+       #insmod $MODULEPATH/dm-mod.ko 2>/dev/null
+       modprobe dm-mod
+       #insmod $MODULEPATH/dm-loop.ko 2>/dev/null
+       modprobe dm-loop
+
+       NEXTLOOP=`ls -l /dev/dm-* 2>/dev/null | tail -1 | awk '{print $NF}' | awk -F '-' '{print $NF+1}'`
+       if [ "x$NEXTLOOP" = "x"  ] ; then
+         NEXTLOOP=0
+       fi
+
+       DMLOMSG=`dmlosetup loop$NEXTLOOP "$IMGFILE" 2>&1`
+       MNTMSG=`mount -t "$IMGFS" /dev/dm-$NEXTLOOP "$MNTPT" -o noatime,nobh,nodiratime 2>&1` 
+
+     else
+
+       # use "regular" loop
+
+       echo "mounting $IMGFILE on loop" >/dev/stderr
+       NEXTLOOP=`mount | grep loop | tail -1 | awk '{print $1}' | awk -F "/" '{print $3}' | cut -c 5-6 | awk '{print $0+1}'`
+       if [ "x$NEXTLOOP" = "x"  ] ; then
+         NEXTLOOP=0
+       fi
+
+       DMLOMSG=""
+       MNTMSG=`mount -t "$IMGFS" "$IMGFILE" "$MNTPT" -o loop,noatime,nobh,nodiratime 2>&1` 
+
+     fi
+
+     if [ "$?" != 0 ] ; then
+       MSG1=`printf "Mount failure!\n\n$IMGFILE failed to mount on loop$NEXTLOOP\n\n$DMLOMSG\n$MNTMSG"`
+       if [ ! -f "/usr/bin/gxmessage" ] ; then
+         echo $MSG1 >/dev/stderr
+       else
+         gxmessage -center -alignbuttons center -buttons GTK_STOCK_OK:0 -geometry 680x250 -title "EZ-CHROOT ERROR" "$MSG1"
+       fi
+       exit 2
+     fi
+     echo ...$IMGFILE mounted on loop$NEXTLOOP >/dev/stderr
+   else
+     echo "mounting device: $IMGFILE" >/dev/stderr
+     if ! mount -t "$IMGFS" "$IMGFILE" "$MNTPT" -o ${LOOP}noatime,nobh,nodiratime ; then
+       MSG1=`printf "Mount failure!\n\n$IMGFILE failed to mount on $MNTPT"`
+       if [ ! -f "/usr/bin/gxmessage" ] ; then
+         echo $MSG1 >/dev/stderr
+       else
+         gxmessage -center -alignbuttons center -buttons GTK_STOCK_OK:0 -geometry 680x250 -title "EZ-CHROOT ERROR" "$MSG1"
+       fi
+       exit 3
+     fi
+
+   fi
+
+  else
+    echo "Not mounting any filesystem, chroot is $MNTPT" >/dev/stderr
+  fi 
+
+#All set up. Set flag for next time...
+
+ if [ ! -d "$MNTPT/var/lock" ] ; then
+   mkdir -p "$MNTPT/var/lock"
+ fi
+
+ # Place any commands you wish to run the first time you mount
+ # into the $MNTPT/var/run/onmount.rc file
+
+  if [ -f "$MNTPT/var/run/onmount.rc" ] ; then
+    . "$MNTPT/var/run/onmount.rc"
+  fi
+
+ echo $IMGFILE > "$MNTPT/var/lock/qmount-complete"
+ exit 0
+
+fi
+
+exit 1
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qumount b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/qumount
new file mode 100755 (executable)
index 0000000..db98974
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/sh
+#Unmount a mounted MNTPT.
+# By Alan M Bruce (qole)
+#
+# GPL licensed; keep code free!
+
+if [ "`whoami`" != "root" ] ; then
+  echo "please run me as root!"
+  exit 9
+fi
+
+#Try to get the MNTPT location from the first parameter
+MNTPT=$1
+
+#Try to get the MNTPT location from the config file... 
+if [ "x$MNTPT" = x ] ; then
+  #Pull in the config, if possible...
+  [ -f /home/user/.chroot ] && . /home/user/.chroot
+  MNTPT=$CHROOT
+  #Still not set? FAIL
+  if [ "x$MNTPT" != x ] ; then
+    echo "No mountpoint to unmount!" >/dev/stderr
+    exit 8
+  fi
+fi
+
+# Strip off a trailing slash
+LASTCHAR=`echo $MNTPT | cut -c ${#MNTPT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   MNTPT=`echo $MNTPT | cut -c 0-$((${#MNTPT}-1))`
+fi
+
+TEST1=`mount | grep " $MNTPT "`
+
+if [ "x$TEST1" != "x" ] ; then
+  echo "..Unmounting $MNTPT..." >/dev/stderr
+  umount -ld "$MNTPT"
+
+  TEST2=`mount | grep " $MNTPT "`
+
+  if [ "x$TEST2" != "x" ] ; then
+    echo "...$MNTPT didn't unmount!" >/dev/stderr
+    exit 8
+  fi
+else
+  echo "$MNTPT is not mounted; Check for trailing slashes." >/dev/stderr
+fi
+
+if [ ! "x`grep device-mapper /proc/misc`" = "x" ] ; then
+  LOOPDEV=`echo $TEST1 | cut -f1 -d' '`
+  while [ "x`echo $LOOPDEV | grep dm-`" != "x" ] ; do
+    LOOPNO=`echo $LOOPDEV | awk -F '-' '{print $NF}'`
+    echo "..Unmounting turbo loop ($LOOPNO)..." >/dev/stderr
+    dmlosetup -d /dev/loop$LOOPNO
+    if [ "$?" != 0 ] || [ "x`dmsetup status | grep loop$LOOPNO`" != "x" ] ; then
+      echo "Waiting for apps to terminate, will try again." >/dev/stderr
+      sleep 5
+      dmlosetup -d /dev/loop$LOOPNO 
+      if [ "$?" != 0 ] ; then
+        echo "Can't unmount turbo-loop! Try dmlosetup -d /dev/loop$LOOPNO manually." >/dev/stderr
+        exit 9
+      fi
+    fi
+    LOOPDEV=`mount | grep " $MNTPT " | cut -f1 -d' '`
+  done
+fi
+
+echo "successful unmount..." >/dev/stderr
+exit 0
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/synchroot b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/sbin/synchroot
new file mode 100755 (executable)
index 0000000..c8dbe71
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+#Synch a mounted chroot; this means copying some important files to the chroot.
+
+#Try to get the chroot location from the config file... 
+if [ "x$CHROOT" = x ] ; then
+  #Pull in the config, if possible...
+  [ -f /home/user/.chroot ] && . /home/user/.chroot
+  #Still not set? Set to default
+  [ "x$CHROOT" != x ] || CHROOT=/debian
+fi
+
+#Abort if chroot not mounted.
+if [ ! -d "$CHROOT/etc/" ] ; then
+  echo "cannot sync; chroot not mounted!"
+  exit 99
+fi
+
+echo "synching the chroot..."
+
+#Just a somewhat-readable uniquifier so backups don't overwrite other backups.
+BOB=`date | awk '{print $1$2$3}'`
+
+#Make the Internet work.
+
+mv "$CHROOT/etc/resolv.conf" "$CHROOT/etc/resolv.conf.$BOB"
+cp /etc/resolv.conf "$CHROOT/etc/resolv.conf"
+mv "$CHROOT/etc/hosts" "$CHROOT/etc/hosts.$BOB"
+cp /etc/hosts "$CHROOT/etc/hosts"
+
+#Make permissions work.
+mv "$CHROOT/etc/group" "$CHROOT/etc/group.$BOB"
+cp /etc/group "$CHROOT/etc/group"
+mv "$CHROOT/etc/passwd" "$CHROOT/etc/passwd.$BOB"
+cp /etc/passwd "$CHROOT/etc/passwd"
+
+#Set the correct time.
+mv "$CHROOT/etc/localtime" "$CHROOT/etc/localtime.$BOB"
+cp -a /etc/localtime "$CHROOT/etc/localtime"
+
+#Help make N810 F-keys work
+mv "$CHROOT/usr/share/X11/xkb" "$CHROOT/usr/share/X11/xkb.$BOB"
+cp -r /usr/share/X11/xkb "$CHROOT/usr/share/X11"
\ No newline at end of file
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/gxmessage b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/gxmessage
new file mode 100755 (executable)
index 0000000..ddcd9c4
Binary files /dev/null and b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/gxmessage differ
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/hostwin b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/hostwin
new file mode 100755 (executable)
index 0000000..3a6eaa6
Binary files /dev/null and b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/hostwin differ
diff --git a/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/quserchroot b/fremantle/easy-chroot/.py2deb_build_folder/easy-chroot/src/usr/bin/quserchroot
new file mode 100755 (executable)
index 0000000..6963d7c
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Chroots and runs a shell or any command as non-root.
+
+# By Alan M Bruce (qole) and Benson Mitchell
+#
+# GPL licensed; keep code free!
+
+if [ "`whoami`" = "root" ] ; then
+  echo "please don't run me as root!"
+  exit 9
+fi
+
+if [ "$#" -lt "2" ] ; then
+  echo "You need at least 2 parameters:"
+  echo "    filesystem-location and mountpoint"
+  exit 9
+fi
+
+IMGFILE=$1
+shift 1
+
+CHROOT=$1
+shift 1
+
+# If CHROOTUSER is set, use it. 
+# Otherwise fall back on current user
+[ "x$CHROOTUSER" != x ] || CHROOTUSER=`whoami`
+
+#Note use of su below, so no chroot-side script req'd to drop privileges.
+#With no args, use a shell; su will get the right one, with no -c
+#With args, just run them as $CHROOTUSER.
+if [ $# = 0 ] ; then
+  echo As $CHROOTUSER, starting chroot shell...
+  sudo /sbin/qchroot $IMGFILE $CHROOT su $CHROOTUSER
+else
+  echo As $CHROOTUSER, starting chroot $1
+  sudo /sbin/qchroot $IMGFILE $CHROOT su $CHROOTUSER -c "$*"
+fi
index dc05744..39ad438 100755 (executable)
@@ -24,7 +24,7 @@ if __name__ == "__main__":
      p.description=qoledescript.read()
      p.xsbc_bugtracker="https://garage.maemo.org/tracker/?atid=3577&group_id=953&func=browse"
      p.maemodispname="Easy Chroot" 
-     version = "0.3.0"   #Version of your software, e.g. "1.2.0" or "0.8.2"
+     version = "0.3.1"   #Version of your software, e.g. "1.2.0" or "0.8.2"
      build = "1fremantle1"         #Build number
      versionbuild = version + "-" + build
      p.author="Alan Bruce (qole)"
index 9b22b36..cc62202 100644 (file)
@@ -7,4 +7,5 @@
 0.2.7: Remove the closechroot .desktop file, move to Easy Debian
 0.2.8: Support dmsetup + kernel-module-dmloop packages, if installed
 0.2.9: Use the 'cd /proc' workaround for broken fuser bug, add 'nodiratime,nobh' to mount options
-0.3.0: Require dmlosetup to be present before attempting dm-loop.
\ No newline at end of file
+0.3.0: Require dmlosetup to be present before attempting dm-loop.
+0.3.1: Strip trailing slash on mountpoint in all scripts, fixed problems in multi-loop handling.
\ No newline at end of file
index 2892bcf..cdb2c89 100755 (executable)
@@ -21,6 +21,13 @@ if [ "x$CHROOT" = x ] ; then
   [ "x$CHROOT" != x ] || CHROOT=/debian
 fi
 
+# Strip off a trailing slash
+LASTCHAR=`echo $CHROOT | cut -c ${#CHROOT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   CHROOT=`echo $CHROOT | cut -c 0-$((${#CHROOT}-1))`
+fi
+
 #Abort if chroot not mounted.
 if [ ! -f "$CHROOT/var/lock/qmount-complete" ] ; then
   echo "Nothing to do; chroot not mounted!"
index 799ae5b..8955351 100755 (executable)
@@ -23,6 +23,13 @@ shift 1
 
 # echo ezchroot $IMGFILE $CHROOT $*
 
+# Strip off a trailing slash
+LASTCHAR=`echo $CHROOT | cut -c ${#CHROOT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   CHROOT=`echo $CHROOT | cut -c 0-$((${#CHROOT}-1))`
+fi
+
 qmount $IMGFILE $CHROOT
 MOUNTSUCCESS=$?
 
@@ -126,14 +133,18 @@ fi
 trap "rm -f $CHROOT/var/lock/chroot-complete ; echo -ne '\033]0;osso_xterm\007' ; exit" INT TERM EXIT
 echo $IMGFILE $@ > "$CHROOT/var/lock/chroot-complete"
 
-#If the file is mounted on loop, use that label.
-
 #Custom prompt and xterm title. Reduces confusion.
 CHRLABEL=`blkid -s LABEL $IMGFILE | cut -d' ' -f2 | cut -d'=' -f2 | sed 's/"//g'`
 
 #If the file is mounted on loop, use that label.
 if [ "x$CHRLABEL" = "x" ] ; then
-  CHRLABEL=`blkid -s LABEL /dev/loop0 | cut -d' ' -f2 | cut -d'=' -f2 | sed 's/"//g'`
+
+  # first find the loop
+  LOOPNO=`mount | grep loop | grep $CHROOT | awk '{print $1}'`
+
+  if [ "x$LOOPNO" != "x" ] ; then
+     CHRLABEL=`blkid -s LABEL $LOOPNO | cut -d' ' -f2 | cut -d'=' -f2 | sed 's/"//g'`
+  fi
 fi
 
 if [ "x$CHRLABEL" = "x" ] ; then
index f44d3db..12c808f 100755 (executable)
@@ -46,6 +46,13 @@ if [ "x$MNTPT" = "x" ] || [ "x`echo $MNTPT | grep '/'`" = "x"  ] ; then
   exit 9
 fi
 
+# Strip off a trailing slash
+LASTCHAR=`echo $MNTPT | cut -c ${#MNTPT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   MNTPT=`echo $MNTPT | cut -c 0-$((${#MNTPT}-1))`
+fi
+
 #Check to see if already mounted
 if [ -f "$MNTPT/var/lock/qmount-complete" ] ; then
   echo "$MNTPT has a qmount already!" >/dev/stderr
@@ -139,7 +146,7 @@ if [ ! -f "$MNTPT/var/lock/qmount-complete" ] ; then
        # use "regular" loop
 
        echo "mounting $IMGFILE on loop" >/dev/stderr
-       NEXTLOOP=""
+       NEXTLOOP=`mount | grep loop | tail -1 | awk '{print $1}' | awk -F "/" '{print $3}' | cut -c 5-6 | awk '{print $0+1}'`
        if [ "x$NEXTLOOP" = "x"  ] ; then
          NEXTLOOP=0
        fi
index 03701a0..db98974 100755 (executable)
@@ -24,6 +24,12 @@ if [ "x$MNTPT" = x ] ; then
   fi
 fi
 
+# Strip off a trailing slash
+LASTCHAR=`echo $MNTPT | cut -c ${#MNTPT}`
+if [ "$LASTCHAR" = "/" ] ; then
+   echo "..stripping trailing slash..." >/dev/stderr
+   MNTPT=`echo $MNTPT | cut -c 0-$((${#MNTPT}-1))`
+fi
 
 TEST1=`mount | grep " $MNTPT "`
 
diff --git a/fremantle/easy-deb-chroot/archive/MurrinaNightOrange/gtk-2.0/gtkrc b/fremantle/easy-deb-chroot/archive/MurrinaNightOrange/gtk-2.0/gtkrc
new file mode 100755 (executable)
index 0000000..11920cb
--- /dev/null
@@ -0,0 +1,204 @@
+# theme by BaSS <bass@josealberto.org> www.josealberto.org
+# based in Murrine night
+style "theme-default"
+{
+  GtkButton      ::default_border    = { 0, 0, 0, 0 }
+  GtkRange       ::trough_border     = 0
+  GtkPaned       ::handle_size       = 6
+  GtkRange       ::slider_width      = 32
+  GtkRange       ::stepper_size      = 38
+
+  GtkScrollbar   ::min_slider_length = 30
+  GtkCheckButton ::indicator_size    = 14
+  GtkMenuBar     ::internal-padding  = 0
+  GtkTreeView    ::expander_size     = 14
+  GtkExpander    ::expander_size     = 16
+  GtkScale       ::slider-length     = 24
+  # cursor
+  GtkWidget      ::cursor_color      = "#FF993F"
+  
+  xthickness = 1
+  ythickness = 1
+
+  # texto general
+  fg[NORMAL]        = "#aeaeae" 
+  # texto y detalles mouseover
+  fg[PRELIGHT]      = "#FF993F" 
+  # texto activo
+  fg[ACTIVE]        = "#cccccc" 
+  fg[SELECTED]      = "#cccccc" 
+  # texto inactivo
+  fg[INSENSITIVE]   = "#5c5c5c" 
+
+  # fondo general
+  bg[NORMAL]        = "#3c3c3c" 
+  # fondo elementos seleccionado
+  bg[PRELIGHT]      = "#292929" 
+  # fondo seleccion
+  bg[ACTIVE]        = "#2c2c2c" 
+  # elementos seleccionados (chekcboxes...)
+  bg[SELECTED]      = "#272727" 
+  # fondo elementos inactivos
+  bg[INSENSITIVE]   = "#353535" 
+  
+  # fondo general
+  base[NORMAL]      = "#191919" 
+  base[PRELIGHT]    = "#272727" 
+  # fondo activo
+  base[ACTIVE]      = "#333333" 
+  base[SELECTED]    = "#404040" 
+  base[INSENSITIVE] = "#333333" 
+  
+  text[NORMAL]      = "#aeaeae" 
+  text[PRELIGHT]    = "#aeaeae" 
+  text[ACTIVE]      = "#aeaeae" 
+  text[SELECTED]    = "#aeaeae" 
+  text[INSENSITIVE] = "#000000" 
+
+  GnomeHRef::link_color         ="#424449" 
+  GtkIMHtmlr::hyperlink-color   ="#424449"
+
+  NautilusIconContainer::normal_alpha = 0
+  NautilusIconContainer::frame_text   = 1
+  #NautilusIconContainer::dark_info_color   = "#827B69"
+  #NautilusIconContainer::light_info_color  = "#827B69"
+  #NautilusIconContainer::highlight_alpha   = 70
+
+  engine "murrine" 
+  {
+    scrollbarstyle = 4 # Enable or disable circles, stripes, handles
+    listviewstyle = 1 # 0 = nothing, 1 = dotted
+    scrollbar_color     = "#252525"
+    contrast            = 1.0
+    glazestyle = 3 # 0 = flat hilight, 1 = curved hilight, 2 = concave style, 3 = top curved hilight, 4 = beryl style
+    menubarstyle = 1 # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
+    menubaritemstyle = 0 # 0 = menuitem look, 1 = button look
+    menuitemstyle = 2 # 0 = flat, 1 = glassy, 2 = striped
+    listviewheaderstyle = 2 # 0 = flat, 1 = glassy, 2 = raised
+    roundness = 7 # 0 = squared, 1 = old default, more will increase roundness
+    animation = TRUE # FALSE = disabled, TRUE = enabled
+  }
+}
+
+style "theme-wide" = "theme-default"
+{
+  xthickness = 2
+  ythickness = 2
+}
+
+style "theme-wider" = "theme-default"
+{
+  xthickness = 3
+  ythickness = 3
+}
+
+style "theme-entry" = "theme-wider"
+{
+  bg[SELECTED] = "#262626"
+}
+
+style "theme-button" = "theme-wider"
+{
+  bg[NORMAL] = "#404040"
+  bg[ACTIVE] = "#303030"
+}
+
+style "theme-notebook" = "theme-wide" {}
+
+style "theme-tasklist" = "theme-default"
+{
+  xthickness = 5
+  ythickness = 3
+}
+
+style "theme-menu" = "theme-default"
+{
+  xthickness = 2
+  ythickness = 1
+}
+
+style "theme-menu-item" = "theme-default"
+{
+  ythickness = 3
+  fg[PRELIGHT] = "#FF993F"
+  text[PRELIGHT] = "#cccccc"
+}
+
+style "theme-menubar" = "theme-default"
+{
+  bg[NORMAL] = "#2c2c2c"
+}
+
+style "theme-menubar-item"
+{
+  ythickness = 4
+  bg[PRELIGHT] = "#272727"
+}
+
+style "theme-tree" = "theme-default"
+{
+  xthickness = 2
+  ythickness = 2
+}
+
+style "theme-frame-title" = "theme-default"
+{
+  fg[NORMAL] = "#aeaeae" 
+}
+
+style "theme-tooltips" = "theme-default"
+{
+  xthickness = 4
+  ythickness = 4
+  bg[NORMAL] = "#2c2c2c"
+}
+
+style "theme-progressbar" = "theme-wide"
+{
+  xthickness = 1
+  ythickness = 1
+  fg[PRELIGHT] = "#000000"
+}
+
+style "theme-combo" = "theme-button" {}
+
+style "EditorStyle" {
+  base[NORMAL] = "#111111"
+  text[NORMAL] = "#aeaeae"
+  text[PRELIGHT] = "#aeaeae"
+  text[ACTIVE] = "#aeaeae"
+  text[INSENSITIVE] = "#aeaeae"
+}
+
+class "GtkWidget"      style "theme-default"
+class "GtkButton"      style "theme-button"
+class "GtkScale"       style "theme-button"
+class "GtkCombo"       style "theme-button"
+class "GtkRange"       style "theme-wide"
+class "GtkFrame"       style "theme-wide"
+class "GtkMenu"        style "theme-menu"
+class "GtkEntry"       style "theme-entry"
+class "GtkMenuItem"    style "theme-menu-item"
+class "GtkNotebook"    style "theme-notebook"
+class "GtkProgressBar" style "theme-progressbar"
+class "*MenuBar*"      style "theme-menubar"
+
+widget_class "*MenuItem.*" style "theme-menu-item"
+widget_class "*MenuBar.*"  style "theme-menubar-item"
+
+widget_class "*.GtkComboBox.GtkButton" style "theme-combo"
+widget_class "*.GtkCombo.GtkButton"    style "theme-combo"
+
+widget_class "*.tooltips.*.GtkToggleButton" style "theme-tasklist"
+widget "gtk-tooltips" style "theme-tooltips"
+
+widget_class "*.GtkTreeView.GtkButton"  style "theme-tree"
+widget_class "*.GtkCTree.GtkButton"     style "theme-tree"
+widget_class "*.GtkList.GtkButton"      style "theme-tree"
+widget_class "*.GtkCList.GtkButton"     style "theme-tree"
+widget_class "*.GtkFrame.GtkLabel"      style "theme-frame-title"
+
+widget_class "*.GtkNotebook.*.GtkEventBox" style "theme-notebook"
+widget_class "*.GtkNotebook.*.GtkViewport" style "theme-notebook"
+
+class "GtkTextView" style "EditorStyle"
index ff65c32..5d64fa9 100755 (executable)
@@ -24,13 +24,13 @@ if __name__ == "__main__":
      p.description=qoledescript.read()
      p.xsbc_bugtracker="http://talk.maemo.org/showthread.php?t=34550"
      p.maemodispname="Easy Debian" 
-     version = "0.9.46"   #Version of your software, e.g. "1.2.0" or "0.8.2"
+     version = "0.9.53"   #Version of your software, e.g. "1.2.0" or "0.8.2"
      build = "1fremantle1"         #Build number
      qolechangelog = open("control/changelog", "r")
      changeloginformation = qolechangelog.read()
      p.author="Alan Bruce (qole)"
      p.mail="qole@qole.org"
-     p.depends = "easy-chroot (>=0.2.7), lzma, wget"
+     p.depends = "easy-chroot (>=0.2.7), lzma, wget, wmctrl, zenity, murrinanightorange"
      p.section="user/system"
      p.icon = "deblet-48.png"
      p.arch="armel"              #should be all for python, any for all arch
index c65d9a1..9e9e59e 100644 (file)
@@ -7,4 +7,11 @@
 0.9.43: Removed Evince icon; Maemo version is just as good. Don't overwrite user's .xbindkeysrc
 0.9.44: Added notification (noise, vibration, LED) to install script, ready to push to Extras!
 0.9.45: Fixed ~/.xbindkeysrc file to work with all keyboards. Installer now triggers synchroot script.
-0.9.46: Deleted theme line from /home/user/.config/lxde/config
\ No newline at end of file
+0.9.46: Deleted theme line from /home/user/.config/lxde/config
+0.9.47: PR 1.2 keyboard focus workaround, added debsu and debbie-sue
+0.9.48: A less image-dependent keyboard focus workaround, /usr/bin/fixkbdfocus
+0.9.49: Cleaned up the fixkbdfocus script.
+0.9.50: Made a new script that first attempts to raise the existing LXDE window, and if that fails, it starts a new LXDE session. This allows one icon to work for both starting and restoring LXDE. Thanks rebhana. Ready for Extras-Testing now.
+0.9.51: New Maemo-side script to launch LXDE with full keyboard focus!
+0.9.52: Tweaked Maemo-side script to avoid timing issues.
+0.9.53: Moved MurrinaNightOrange out, depends on it now. Depends on wmctrl too.
\ No newline at end of file
index 29252e0..2addc5c 100644 (file)
 "xvkbd -xsendevent -text '\r'"
    Shift + KP_Enter
 
+# debernardis and rebhana suggest TAB and Esc
+
+"xvkbd -xsendevent -text '\t'"
+  Shift+Mod5 + Right
+
+"xvkbd -xsendevent -text '\e'"
+  Shift+Mod5 + Left
+
 # F1-F12 mapped to Shift+Fn + keys from upper row (thanks, rebhana):
 
-"xvkbd -text "\[F1]""
+"xvkbd -xsendevent -text "\[F1]""
  m:0x81 + c:24
 
-"xvkbd -text "\[F2]""
+"xvkbd -xsendevent -text "\[F2]""
  m:0x81 + c:25
 
-"xvkbd -text "\[F3]""
+"xvkbd -xsendevent -text "\[F3]""
  m:0x81 + c:26
 
-"xvkbd -text "\[F4]""
+"xvkbd -xsendevent -text "\[F4]""
  m:0x81 + c:27
 
-"xvkbd -text "\[F5]""
+"xvkbd -xsendevent -text "\[F5]""
  m:0x81 + c:28
 
-"xvkbd -text "\[F6]""
+"xvkbd -xsendevent -text "\[F6]""
  m:0x81 + c:29
 
-"xvkbd -text "\[F7]""
+"xvkbd -xsendevent -text "\[F7]""
  m:0x81 + c:30
 
-"xvkbd -text "\[F8]""
+"xvkbd -xsendevent -text "\[F8]""
  m:0x81 + c:31
 
-"xvkbd -text "\[F9]""
+"xvkbd -xsendevent -text "\[F9]""
  m:0x81 + c:32
 
-"xvkbd -text "\[F10]""
+"xvkbd -xsendevent -text "\[F10]""
  m:0x81 + c:33
 
-"xvkbd -text "\[F11]""
+"xvkbd -xsendevent -text "\[F11]""
  m:0x81 + c:59
 
-"xvkbd -text "\[F12]""
+"xvkbd -xsendevent -text "\[F12]""
  m:0x81 + c:22
 
 # Examples of commands:
diff --git a/fremantle/easy-deb-chroot/src/sbin/debsu b/fremantle/easy-deb-chroot/src/sbin/debsu
new file mode 100755 (executable)
index 0000000..e4f1785
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Sets up (if necessary) for chroot into a Debian environment.
+# Expects root privileges, does not drop them. 
+# Look to /usr/bin/debbie-sue for a friendly wrapper.
+
+# By Alan M Bruce (qole) 
+# with help from Benson Mitchell, Thomas Perl, Anton Rebhan
+#
+# GPL licensed; keep code free!
+
+if [ "`whoami`" != "root" ] ; then
+  echo "please run me as root!"
+  exit 9
+fi
+
+#Pull in the config, if possible...
+if [ -f "/home/user/.chroot" ] ; then
+
+. /home/user/.chroot
+
+else
+  echo "No ~/.chroot file." >/dev/stderr
+fi
+
+#This comes from the config file... If not, fall back on '/debian'
+if [ "x$CHROOT" = "x" ] ; then
+  CHROOT=/.debian
+  echo "No chroot dir specified; using $CHROOT" >/dev/stderr
+else
+  echo "Chroot dir specified: $CHROOT" >/dev/stderr
+fi
+
+#This comes from the config. If not, search for debian*.img.ext2
+if [ "x$IMGFILE" = "x" ] ; then
+  echo "No image file or partition specified." >/dev/stderr
+  IMGMMC="`ls -1 /home/user/MyDocs/debian*.img* /media/mmc1/debian*.img* | head -1`"
+  if [ "x$IMGMMC" != x ] ; then
+    IMGFILE="$IMGMMC"
+  else
+    MSG1=`printf "ERROR!\n\nYou have no debian.img.ext2 file on your memory cards.\n\nPlease use the Debian Image Installer in Extras."`
+    if [ ! -f "/usr/bin/gxmessage" ] ; then
+      echo $MSG1 >/dev/stderr
+    else
+      gxmessage -center -alignbuttons center -buttons GTK_STOCK_OK:0 -geometry 680x250 -title "MISSING DISK IMAGE" "$MSG1"
+    fi
+    exit 9
+  fi
+else
+  echo "$IMGFILE specified in ~/.chroot" >/dev/stderr
+fi
+
+#
+#Make the temp dir bigger for OpenOffice etc.
+#
+#This comes from the config file... 
+#If not, fall back to a 6MB /tmp dir
+#
+
+[ "x$TMPSIZE" != x ] || TMPSIZE=6M
+mount -o remount,size=$TMPSIZE /tmp
+
+# All exported variables need to be defined in the chroot with this script.
+
+qchroot $IMGFILE $CHROOT su - "$@"
diff --git a/fremantle/easy-deb-chroot/src/usr/bin/debbie-sue b/fremantle/easy-deb-chroot/src/usr/bin/debbie-sue
new file mode 100755 (executable)
index 0000000..e9ee1c0
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Chroots to Debian and runs a shell, or any command-line as non-root.
+
+# By Alan M Bruce (qole), Benson Mitchell and Thomas Perl
+#
+# GPL licensed; keep code free!
+
+if [ "`whoami`" = "root" ] ; then
+  echo "please don't run me as root!"
+  exit 9
+fi
+
+#Pull in the config, if possible...
+[ -f /home/user/.chroot ] && . /home/user/.chroot
+
+#This comes from the config file... If not, fall back on 'user'
+#[ "x$DEBUSER" != x ] || DEBUSER=user
+DEBUSER=$USER
+
+CHROOTUSER=$DEBUSER
+
+#If display's not given, go to primary display. If it's set, let's not
+#mangle it to allow convenient use of USB VGA out, or multiple Xomaps.
+[ "x$DISPLAY" != x ] || export DISPLAY=:0.0
+
+#This enables long-hold-to-right-click in all GTK+ apps.
+#Maybe we'd be better to add libgtkstylus.so anyway, but for now, we'll
+#just leave it if they've got any non-empty GTK_MODULES 
+[ "x$GTK_MODULES" != x ] || export GTK_MODULES=libgtkstylus.so
+
+#Note use of su below, so no Debian-side script req'd to drop privileges.
+#With no args, use a shell; su will get the right one, with no -c
+#With args, just run them as $DEBUSER.
+
+if [ $# = 0 ] ; then
+  echo Starting Debian shell... >/dev/stderr
+  sudo /sbin/debian su - $DEBUSER
+else
+  # Workaround to allow "debbie" to be used as login shell
+  if [ "$1" == "-c" ]; then
+    shift
+  fi
+  echo Starting Debian $* >/dev/stderr
+  sudo /sbin/debian su - $DEBUSER -c "$*"
+fi
diff --git a/fremantle/easy-deb-chroot/src/usr/bin/debian-lxde b/fremantle/easy-deb-chroot/src/usr/bin/debian-lxde
new file mode 100755 (executable)
index 0000000..33cfdc2
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+##################################
+#Change these two variables to the WM of your choice.
+WMEXEC="$1"
+[ "x$WMEXEC" != x ] ||  WMEXEC="startlxde1"
+##################################
+export DISPLAY=:0
+# export TSLIB_TSDEVICE=/dev/input/event3
+debbie-sue 'echo "chroot is now open!"'
+debbie-sue '/usr/bin/Xephyr :1 -screen 800x480 -br -ac' &
+while [ "x$PARWIN" = "x" ] ; do
+  # wait for Xephyr window to appear
+  export PARWIN=`wmctrl -l | grep -i "N/A Xephyr" | awk '{print $1}'`
+done
+echo "Xephyr window ID is ($PARWIN)"
+DISPLAY=:1 ; debbie-sue "habak -mf /usr/share/fonts/truetype/DroidSans-Bold.ttf \
+     -ht 'Ctrl-back to return to dashboard.'"
+DISPLAY=:0 ; wmctrl -i -r $PARWIN -T 'Easy Debian'
+wmctrl -i -r $PARWIN -b toggle,fullscreen
+zenity --display=:0 --info --title="Information" --text="Welcome to Easy Debian LXDE. This window is needed to gain keyboard focus in LXDE." &
+while [ "x$TWOWIN" = "x" ] ; do
+  # wait for Zenity dialog to pop up...
+  export TWOWIN=`wmctrl -l | grep -i Information | awk '{print $1}'`
+done
+sudo debian /sbin/qobi-wmhint-fix $PARWIN
+debbie-sue /usr/bin/$WMEXEC
+killall Xephyr
+export DISPLAY=:0
diff --git a/fremantle/easy-deb-chroot/src/usr/bin/debwm b/fremantle/easy-deb-chroot/src/usr/bin/debwm
new file mode 100755 (executable)
index 0000000..3ceadd0
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# This script first attempts to raise an existing Debian WM,
+# and if that fails, it will start a new Debian WM.
+
+# Thanks again, rebhana!
+
+fixkbdfocus "N/A Easy Debian"
+if [ "$?" = 2 ] ; then
+  debian-lxde
+fi
\ No newline at end of file
diff --git a/fremantle/easy-deb-chroot/src/usr/bin/fixkbdfocus b/fremantle/easy-deb-chroot/src/usr/bin/fixkbdfocus
new file mode 100755 (executable)
index 0000000..76ef544
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# A small keyboard focus hack that uses qobi's workaround
+#
+# Provide the unique name of your window and get keyboard focus in it.
+# GPL licenced. Share your code!
+
+if [ "x$1" = "x" ] ; then
+  gxmessage "Please specify a window name to focus."
+  exit 1
+fi
+
+WINLIST=`wmctrl -l`
+FOCUSWIN=`echo "$WINLIST" | grep -i "$1" | awk '{print $1}'`
+
+if [ "x$FOCUSWIN" = "x" ] ; then
+  # gxmessage "No window found with the name $1"
+  echo "No window found with the name $1"
+  exit 2
+fi
+
+#FOCUSCMD="sudo debian qobi-wmhint-fix $FOCUSWIN ; wmctrl -i -a $FOCUSWIN"
+#osso-xterm "$FOCUSCMD"
+
+sudo debian qobi-wmhint-fix $FOCUSWIN
+wmctrl -i -a $FOCUSWIN
index 90da7c4..346a844 100644 (file)
@@ -2,7 +2,7 @@
 Encoding=UTF-8
 Name=Debian LXDE
 GenericName=Debian LXDE
-Exec=/usr/bin/debbie xephwm5
+Exec=/usr/bin/debwm
 Icon=deblet
 X-Osso-Type=application/x-executable
 X-HildonDesk-ShowInToolbar=true
index ebf2f9d..390830e 100644 (file)
@@ -2,7 +2,7 @@
 Encoding=UTF-8
 Name=Fix LXDE kbd
 GenericName=Fix LXDE keyboard
-Exec=/usr/bin/debbie xephfocus
+Exec=fixkbdfocus "N/A Easy Debian"
 Icon=fix-kbd-focus
 X-Osso-Type=application/x-executable
 X-HildonDesk-ShowInToolbar=true