From: user Date: Tue, 17 Nov 2009 19:53:37 +0000 (-0800) Subject: Diablo easy-chroot now depending on dm-loop pkgs and building via autobuilder. X-Git-Url: http://vcs.maemo.org/git/?p=easy-deb-chroot;a=commitdiff_plain;h=25050f6f69f27135096786e0cf548d66f1d1289a Diablo easy-chroot now depending on dm-loop pkgs and building via autobuilder. --- diff --git a/diablo/easy-chroot/build_myapp.py b/diablo/easy-chroot/build_myapp.py deleted file mode 100755 index 4653058..0000000 --- a/diablo/easy-chroot/build_myapp.py +++ /dev/null @@ -1,63 +0,0 @@ - #!/usr/bin/python2.5 - # -*- coding: utf-8 -*- - ## This program 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; version 2 only. - ## - ## This program 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. - ## - -import py2deb -import os - -if __name__ == "__main__": - try: - os.chdir(os.path.dirname(sys.argv[0])) - except: - pass - print - 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.author="Alan Bruce (qole)" - p.mail="alan@thebruces.ca" - # now depends on dm-loop packages! Thanks qwerty12 and attila77 - p.depends = "dmsetup, libdevmapper1.02.1, kernel-diablo-modules-dmloop" - p.section="user/system" - p.icon = "/home/user/easychroot/cigar-48.png" - p.distribution="fremantle" - p.arch="armel" #should be all for python, any for all arch - p.urgency="low" #not used in maemo onl for deb os - p.distribution="fremantle" - p.repository="extras-devel" - qolepostinst = open("control/postinst", "r") - p.postinstall=qolepostinst.read() - qolepostrm = open("control/postrm", "r") - p.postremove=qolepostrm.read() - # p.postinstall="control/postinst" - # p.postremove="control/postrm" - # p.preinstall="" - # p.preremove="" - - version = "0.2.1" #Version of your software, e.g. "1.2.0" or "0.8.2" - build = "1diablo1" #Build number - versionbuild = version + "-" + build - #Text with changelog information to be displayed in the package "Details" tab of the HAM - changeloginformation = "First 'free' version for Diablo; thp's patches; depends on dm-loop packages. Thanks qwerty12 and attila77!" - # changelog="control/changelog" - dir_name = "src" #Name of the subfolder containing your package source files - - #Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list - for root, dirs, files in os.walk(dir_name): - real_dir = root[len(dir_name):] - fake_file = [] - for f in files: - fake_file.append(root + os.sep + f + "|" + f) - if len(fake_file) > 0: - p[real_dir] = fake_file - - print p - r = p.generate(version,build,changelog=changeloginformation,tar=True,dsc=True,changes=True,build=False,src=True) - # r = p.generate(versionbuild,changelog,tar=True,dsc=True,changes=True,build=False,src=True) diff --git a/diablo/easy-chroot/control/postinst b/diablo/easy-chroot/control/postinst index 06f210a..91544e1 100644 --- a/diablo/easy-chroot/control/postinst +++ b/diablo/easy-chroot/control/postinst @@ -2,6 +2,14 @@ set -e +if [ -f "/etc/osso-af-init/orig.matchbox.defs" ] ; then + mv /etc/osso-af-init/orig.matchbox.defs /etc/osso-af-init/matchbox.defs.orig +fi + +if [ -f "/usr/bin/matchbox-window-manager-orig" ] ; then + mv /usr/bin/matchbox-window-manager-orig /usr/bin/matchbox-window-manager.orig +fi + if [ ! -e "/sbin/dmlosetup" ] ; then ln -s /sbin/dmsetup /sbin/dmlosetup fi diff --git a/diablo/easy-chroot/control/prerm b/diablo/easy-chroot/control/prerm index 8658515..05973bc 100644 --- a/diablo/easy-chroot/control/prerm +++ b/diablo/easy-chroot/control/prerm @@ -1,4 +1,9 @@ #!/bin/sh +closechroot + cp /etc/osso-af-init/matchbox.defs.orig /etc/osso-af-init/matchbox.defs cp /usr/bin/matchbox-window-manager.orig /usr/bin/matchbox-window-manager +mv /etc/osso-af-init/matchbox.defs.orig /etc/osso-af-init/orig.matchbox.defs +mv /usr/bin/matchbox-window-manager.orig /usr/bin/matchbox-window-manager-orig + exit 0 \ No newline at end of file diff --git a/diablo/easy-chroot/src/etc/osso-af-init/matchbox.defs.orig b/diablo/easy-chroot/src/etc/osso-af-init/matchbox.defs.orig deleted file mode 100644 index 0c70f86..0000000 --- a/diablo/easy-chroot/src/etc/osso-af-init/matchbox.defs.orig +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# matchbox.defs - Matchbox defines - -TITLEBAR=yes -DESKTOPMODE=plain -LOWLIGHT=no -SHOWCURSOR=yes -DIALOGMODE=static -MBTHEME=$DEFAULTMBTHEME -SUPERMODAL=yes - -if [ -f $HOME/.osso/mbtheme ]; then - MBTHEME=`cat $HOME/.osso/mbtheme` -fi diff --git a/diablo/easy-chroot/src/sbin/qmount b/diablo/easy-chroot/src/sbin/qmount index dd70d37..4fe6c74 100755 --- a/diablo/easy-chroot/src/sbin/qmount +++ b/diablo/easy-chroot/src/sbin/qmount @@ -107,8 +107,16 @@ if [ ! -f "$MNTPT/var/lock/qmount-complete" ] ; then if [ "$LOOP" = "loop," ] ; then echo "mounting $IMGFILE on the turbo-loop ;)" >/dev/stderr - insmod /lib/modules/2.6.21-omap1/dm-mod.ko 2>/dev/null - insmod /lib/modules/2.6.21-omap1/dm-loop.ko 2>/dev/null + + if [ -d "/lib/modules/`uname -r`/extra" ] ; then + DMODULEPATH="/lib/modules/`uname -r`/extra" + else + DMODULEPATH=/lib/modules/2.6.21-omap1/extra + fi + + insmod $DMODULEPATH/dm-mod.ko 2>/dev/null + insmod $DMODULEPATH/dm-loop.ko 2>/dev/null + 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 diff --git a/diablo/easy-chroot/src/usr/bin/matchbox-window-manager.orig b/diablo/easy-chroot/src/usr/bin/matchbox-window-manager.orig deleted file mode 100755 index da83b94..0000000 Binary files a/diablo/easy-chroot/src/usr/bin/matchbox-window-manager.orig and /dev/null differ