Some fixes and cleanup of Fremantle easy-chroot scripts
authorN900 Easy Debian User <user@Nokia-N900-51-1.(none)>
Sat, 2 Jan 2010 05:17:01 +0000 (21:17 -0800)
committerN900 Easy Debian User <user@Nokia-N900-51-1.(none)>
Sat, 2 Jan 2010 05:17:01 +0000 (21:17 -0800)
fremantle/easy-chroot/build_easychroot.py
fremantle/easy-chroot/src/sbin/closechroot
fremantle/easy-chroot/src/sbin/qchroot
fremantle/easy-chroot/src/sbin/qmount
fremantle/easy-deb-chroot/build_easydebchroot.py
fremantle/easy-deb-chroot/control/changelog
fremantle/easy-deb-chroot/control/postinst
fremantle/easy-deb-chroot/src/home/user/.chroot
fremantle/easy-deb-chroot/src/home/user/img-install/debian-installer.sh

index 8f797cf..1887460 100755 (executable)
@@ -19,11 +19,12 @@ if __name__ == "__main__":
      except:
          pass
      print
-     p=py2deb.Py2deb("easy-chroot")   #This is the package name and MUST be in lowercase! 
+     p=py2deb.Py2deb("easy-chroot")   #This is the package name and MUST be in lowercase!
      p.description="Scripts to mount and chroot into images/partitions\nFremantle version;\n(This does NOT use the 'turbo-charged' dm-loop for mounting image files.)"
+     p.maemodispname="Easy Chroot" 
      p.author="Alan Bruce (qole)"
      p.mail="alan@thebruces.ca"
-     # p.depends = ""
+     p.depends = "libblkid1"
      p.section="user/system"
      p.icon = "cigar-48.png"
      p.arch="armel"              #should be all for python, any for all arch
@@ -39,7 +40,7 @@ if __name__ == "__main__":
      # p.preinstall=""
      # p.preremove=""
 
-     version = "0.2.2"   #Version of your software, e.g. "1.2.0" or "0.8.2"
+     version = "0.2.3"   #Version of your software, e.g. "1.2.0" or "0.8.2"
      build = "1fremantle1"         #Build number
      versionbuild = version + "-" + build
                          #Text with changelog information to be displayed in the package "Details" tab of the HAM
index 32ac256..9a4efdb 100755 (executable)
@@ -42,6 +42,10 @@ fi
 echo "..Unmounting bound dirs..."
 
 #Any external mounts
+
+umount -fl $CHROOT/home/user/MyDocs
+umount -fl $CHROOT/dev/pts
+
 MNTD=`cat /proc/mounts | grep " $CHROOT/" | awk '{print $2}'`
 for MDRV in $MNTD ; do
   echo "unmounting $MDRV"
index 8ae0c5e..2143465 100755 (executable)
@@ -67,9 +67,12 @@ if [ "$MOUNTSUCCESS" = "0" ] ; then
   #Make DBus work
   mount -o bind /var/run/dbus "$CHROOT/var/run/dbus"
 
+  #Make DBus 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 metalayer-crawler`
+  #renice 20 `pidof trackerd`
 
   # Sync the chroot if requested...
   if [ -f /home/user/.synchroot ] ; then 
index d9e0238..348bd9d 100755 (executable)
@@ -95,7 +95,8 @@ if [ ! -f "$MNTPT/var/lock/qmount-complete" ] ; then
    #fi
    #insmod "$MODULEPATH/mbcache.ko" 2>/dev/null
 
-   modprobe mbcache
+   # missing in Fremantle...
+   # modprobe mbcache
 
    if [ "$IMGFS" != "ext3" ] && [ "$IMGFS" != "ext2" ] ; then
      echo "Don't know $IMGFS: Using ext2 file system" >/dev/stderr
index ebe8af6..3d83087 100755 (executable)
@@ -44,8 +44,8 @@ if __name__ == "__main__":
      p.preremove=qoleprerm.read()
      # p.preremove=""
 
-     version = "0.9.34"   #Version of your software, e.g. "1.2.0" or "0.8.2"
-     build = "2fremantle1"         #Build number
+     version = "0.9.35"   #Version of your software, e.g. "1.2.0" or "0.8.2"
+     build = "3fremantle1"         #Build number
                          #Text with changelog information to be displayed in the package "Details" tab of the HAM
      qolechangelog = open("control/changelog", "r")
      changeloginformation = qolechangelog.read()
index 9e697fd..11bec93 100644 (file)
@@ -1,2 +1,3 @@
 0.9.30 First version for Fremantle. Stripped down, but works.
-0.9.34 Using a hack by qobi, LXDE in Xephyr works now!
\ No newline at end of file
+0.9.34 Using a hack by qobi, LXDE in Xephyr works now!
+0.9.35 Fixed the image installer script. The 2G file is "too large"
\ No newline at end of file
index d61c396..a66e2ec 100644 (file)
@@ -1,11 +1,14 @@
 #!/bin/sh
 
+closechroot
+
 set -e
 
-CHROOT=/debian
+CHROOT=/.debian
 TSTFILE=/usr/bin/hilda
+
 if [ ! -d "$CHROOT" ] ; then
-    mkdir /debian
+    mkdir /.debian
 # else
 #    if [ -f "$CHROOT$TSTFILE" ] || [ ! "x`/sbin/debian echo hello | grep hello`" = "x" ] ; then
 #       closechroot
index c8a4616..b1b4fc9 100755 (executable)
@@ -14,7 +14,7 @@
 
 # Mount point for Debian.
 # Default: /debian
-#CHROOT=/debian
+CHROOT=/.debian
 
 # New /tmp dir size for printing / PDF creation
 # Default: 6M
index baf8550..1b3780a 100755 (executable)
@@ -29,17 +29,17 @@ export INSTPATH="/home/user/img-install"
 export TARPATH="$SDCARD"
 export DLURL="http://qole.org/files"
 #This doesn't work:
-#export BZ2CMD1="bzcat"
-#export BZ2CMD2="| tar xf -"
 export GZCMD1="tar -xzf"
 
 export EXTPATH1=$TARPATH
 export PKGNAME1="EASY DEBIAN IMAGE FILE"
 export BIGTAR1="debian-m5-v2.img.ext2.bz2"
 export BIGIMG1="debian-m5-v2.img.ext2"
-export BZ2CMD1="bzip2 -dc "
-export BZ2CMD2=" > $TARPATH/$BIGIMG1"
-export TARCMD1="$BZ2CMD1 $TARPATH/$BIGTAR1 $BZ2CMD2"
+# export BZ2CMD1="bzip2 -d "
+# export BZ2CMD2=" > $TARPATH/$BIGIMG1"
+# export BZ2CMD1="cat "
+# export BZ2CMD2=" | bunzip2 > "
+# export TARCMD1="cat $TARPATH/$BIGTAR1 | bunzip2 > $TARPATH/$BIGIMG1"
 export MD51="1c02d35d6453fd35390ae025bd930ba2"
 export EXTCMD1=""
 
@@ -101,13 +101,15 @@ do
      cd $EXTPATH1
      echo Extracting the image file. This will take some time.
 
-     TARERR=`$TARCMD1 2>&1`
-     # TARERR="unspecified bzip2 error"
      # echo $TARCMD1
-     $BZ2CMD1 $TARPATH/$BIGTAR1 
-     # > $TARPATH/$BIGIMG1
+     # echo 'cat $TARPATH/$BIGTAR1 | bunzip2 > $TARPATH/$BIGIMG1'
+     # TARERR=`$TARCMD1 2>&1`
+     TARERR="Unknown bzip2 error"
+     # read -p 'press enter' key
+     #$TARCMD1
+     cat $TARPATH/$BIGTAR1 | bunzip2 > $TARPATH/$BIGIMG1
      if [ "$?" = 0 ] ; then
-        # rm -rf $TARPATH/$BIGTAR1
+        rm -rf $TARPATH/$BIGTAR1
          $EXTCMD1
          export MSG1=`printf "CONGRATULATIONS!\n\nAll has gone well!\n\nSuccess installing $PKGNAME1 package!"`
          gxmessage -center -alignbuttons right -buttons GTK_STOCK_OK:0 -geometry 640x250 -title "SUCCESS!" "$MSG1"