Fixes to get Diablo version into Extras
authorN900 Easy Debian User <user@Puppy.(none)>
Mon, 11 Jan 2010 04:07:42 +0000 (20:07 -0800)
committerN900 Easy Debian User <user@Puppy.(none)>
Mon, 11 Jan 2010 04:07:42 +0000 (20:07 -0800)
diablo/easy-chroot/build_easychroot.py [new file with mode: 0755]
diablo/easy-chroot/control/changes
diablo/easy-chroot/src/sbin/closechroot
diablo/easy-chroot/src/usr/share/applications/hildon/closechroot.desktop [new file with mode: 0644]
diablo/easy-deb-chroot/build_easydebchroot.py [new file with mode: 0755]
diablo/easy-deb-chroot/control/changes
diablo/easy-deb-chroot/src/usr/bin/debbie
diablo/easy-deb-chroot/src/usr/share/applications/hildon/closechroot.desktop [deleted file]
fremantle/easy-chroot/src/usr/share/applications/hildon/closechroot.desktop

diff --git a/diablo/easy-chroot/build_easychroot.py b/diablo/easy-chroot/build_easychroot.py
new file mode 100755 (executable)
index 0000000..980e92e
--- /dev/null
@@ -0,0 +1,62 @@
+ #!/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\nUses the dmsetup and dm-loop package for turbo speed!"
+     p.maemodispname="Easy Chroot" 
+     p.author="Alan Bruce (qole)"
+     p.mail="alan@thebruces.ca"
+     p.depends = "dmsetup, libdevmapper1.02.1, kernel-diablo-modules-dmloop, libblkid1"
+     p.section="user/system"
+     p.icon = "cigar-48.png"
+     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="diablo"
+     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.3"   #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
+     qolechanges = open("control/changes", "r")
+     changeloginformation = qolechanges.read()
+     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)
index 86dfb85..8bcd299 100644 (file)
@@ -1,3 +1,6 @@
 25-Feb-2009, 0.1.4: Separated qmount from ezchroot. Rebuilt package after big data loss
 26-Feb-2009, 0.1.5: Better turbo-loop mount error message
 25-Jun-2009, 0.1.10: Recovered lost package from repository. Added thp's patches. Added blkid.
+November 09, 0.2.1-1diablo1: First free package using py2deb
+November 09, 0.2.2-1diablo1: Now depending on dm-loop packages
+10-Jan-2010, 0.2.3-1diablo1: Closechroot bugfix
index 32ac256..7ef9b9f 100755 (executable)
@@ -41,6 +41,8 @@ fi
 
 echo "..Unmounting bound dirs..."
 
+umount -fl $CHROOT/dev/pts
+
 #Any external mounts
 MNTD=`cat /proc/mounts | grep " $CHROOT/" | awk '{print $2}'`
 for MDRV in $MNTD ; do
diff --git a/diablo/easy-chroot/src/usr/share/applications/hildon/closechroot.desktop b/diablo/easy-chroot/src/usr/share/applications/hildon/closechroot.desktop
new file mode 100644 (file)
index 0000000..0799e3e
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Close Debian
+GenericName=Close Debian
+Exec=osso-xterm 'sudo closechroot'
+Icon=deblet
+X-Osso-Type=application/x-executable
+X-HildonDesk-ShowInToolbar=true
+Type=Application
+StartupNotify=true
\ No newline at end of file
diff --git a/diablo/easy-deb-chroot/build_easydebchroot.py b/diablo/easy-deb-chroot/build_easydebchroot.py
new file mode 100755 (executable)
index 0000000..6d3d82d
--- /dev/null
@@ -0,0 +1,65 @@
+ #!/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-deb-chroot")   #This is the package name and MUST be in lowercase! 
+     p.description="Scripts to run Debian applications easily in maemo\n for users not familiar with the command line.\n NB: A large image file must be downloaded\n and installed before this package will work!\n  You will need approx. 1.5 GB free in either\n your internal or external memory.\n Instructions and an automated installer\n are provided in the package.\n (This is the Easy Debian 'Stable Lenny' Diablo version.)"
+
+     p.author="Alan Bruce (qole)"
+     p.mail="alan@thebruces.ca"
+     p.depends = "easy-chroot, bzip2, gnutar, wget"
+     p.section="user/system"
+     p.icon = "deblet-48.png"
+     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="Diablo"
+     p.repository="extras-devel"
+     qolepostinst = open("control/postinst", "r")
+     p.postinstall=qolepostinst.read()
+     qolepostrm = open("control/postrm", "r")
+     p.postremove=qolepostrm.read()
+     qolepreinst = open("control/preinst", "r")
+     p.preinstall=qolepreinst.read()
+     # p.postinstall="postinst"
+     # p.postremove="postrm"
+     # p.preinstall="preinst"
+     qoleprerm = open("control/prerm", "r")
+     p.preremove=qoleprerm.read()
+     # p.preremove=""
+
+     version = "0.9.35"   #Version of your software, e.g. "1.2.0" or "0.8.2"
+     build = "2diablo1"         #Build number
+                         #Text with changelog information to be displayed in the package "Details" tab of the HAM
+     qolechangelog = open("control/changes", "r")
+     changeloginformation = qolechangelog.read()
+     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)
+
index 2ff3eb6..dac4673 100644 (file)
@@ -20,3 +20,6 @@
  0.9.24, 29-Apr-09: Version ready for extras; fixed postinst, menu items, etc
  0.9.25, 30-Apr-09: New image file with proper locales, java-alternatives set up               
  0.9.26, 25-Oct-09: Patches by Thomas Perl to allow ssh shell to chroot, using py2deb to make autobuilder package
+ 0.9.30, November 09: Depends on dm-loop packages now 
+ 0.9.35, 10-Oct-10: Bugfix to get debbie setting the correct username.
+                  : Minor packaging error; closechroot removed.
\ No newline at end of file
index 9726148..954c551 100755 (executable)
@@ -13,9 +13,11 @@ 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
+# This comes from the config file... 
+# If not, fall back on $USER, then 'user'
+[ "x$DEBUSER" != x ] || DEBUSER=$USER
+[ "x$DEBUSER" != x ] || DEBUSER=user
+#DEBUSER=$USER
 
 CHROOTUSER=$DEBUSER
 
diff --git a/diablo/easy-deb-chroot/src/usr/share/applications/hildon/closechroot.desktop b/diablo/easy-deb-chroot/src/usr/share/applications/hildon/closechroot.desktop
deleted file mode 100644 (file)
index 9ea7348..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=Close Debian
-GenericName=Close Debian
-Exec=osso-xterm 'sudo closechroot /debian'
-Icon=deblet
-X-Osso-Type=application/x-executable
-X-HildonDesk-ShowInToolbar=true
-Type=Application
-StartupNotify=true
\ No newline at end of file
index 9ea7348..0799e3e 100644 (file)
@@ -2,7 +2,7 @@
 Encoding=UTF-8
 Name=Close Debian
 GenericName=Close Debian
-Exec=osso-xterm 'sudo closechroot /debian'
+Exec=osso-xterm 'sudo closechroot'
 Icon=deblet
 X-Osso-Type=application/x-executable
 X-HildonDesk-ShowInToolbar=true