diff options
67 files changed, 1055 insertions, 142 deletions
@@ -1,4 +1,3 @@ -jhbuild *.pyc *~ source diff --git a/config/modulesets/extra-activities.modules b/config/modulesets/extra-activities.modules index d446187..449f38f 100644 --- a/config/modulesets/extra-activities.modules +++ b/config/modulesets/extra-activities.modules @@ -1,6 +1,8 @@ <?xml version="1.0"?><!--*- mode: nxml; indent-tabs-mode: nil -*--> <?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> <moduleset> + <repository type="git" name="git.sugarlabs.org" default="yes" + href="git://git.sugarlabs.org"/> <repository type="git" name="dev.laptop.org" href="git://dev.laptop.org/"/> <repository type="git" name="dev.laptop.org/projects" @@ -31,7 +33,8 @@ <branch repo="dev.laptop.org/projects" /> </bundle> <bundle id="cartoon-builder"> - <branch repo="dev.laptop.org/mamamedia" /> + <branch module="cartoon-builder/mainline.git" + checkoutdir="cartoon-builder"/> </bundle> <bundle id="jigsaw-puzzle"> <branch repo="dev.laptop.org/mamamedia" /> @@ -45,8 +48,8 @@ <bundle id="mamamedia-teacher-center"> <branch repo="dev.laptop.org/mamamedia" /> </bundle> - <bundle id="poll-builder"> - <branch repo="dev.laptop.org/mamamedia" /> + <bundle id="poll"> + <branch module="poll/mainline.git" checkoutdir="poll"/> </bundle> <bundle id="slider-puzzle"> <branch repo="dev.laptop.org/mamamedia" /> @@ -55,7 +58,7 @@ <branch repo="dev.laptop.org/mamamedia" /> </bundle> <bundle id="flipsticks"> - <branch repo="dev.laptop.org/mamamedia" /> + <branch module="flipsticks/mainline.git" checkoutdir="flipsticks"/> </bundle> <bundle id="analyze-activity"> <branch repo="dev.laptop.org/projects" /> @@ -63,4 +66,28 @@ <bundle id="acoustic-measure-activity"> <branch repo="dev.laptop.org/projects" /> </bundle> + <metamodule id="meta-extra-activities"> + <dependencies> + <dep package="block-party-activity"/> + <dep package="penguintv"/> + <dep package="video-chat-activity"/> + <dep package="connect-activity"/> + <dep package="oficina"/> + <dep package="jukebox-activity"/> + <dep package="hellomesh"/> + <dep package="gmail-activity"/> + <dep package="cartoon-builder"/> + <dep package="jigsaw-puzzle"/> + <dep package="joke-machine"/> + <dep package="mamamedia-activity-center"/> + <dep package="mamamedia-teacher-center"/> + <dep package="poll-builder"/> + <dep package="slider-puzzle"/> + <dep package="story-builder"/> + <dep package="flipsticks"/> + <dep package="memorygame"/> + <dep package="analyze-activity"/> + <dep package="acoustic-measure-activity"/> + </dependencies> + </metamodule> </moduleset> diff --git a/config/modulesets/extra.modules b/config/modulesets/extra.modules index 377cf7e..4dde9e3 100644 --- a/config/modulesets/extra.modules +++ b/config/modulesets/extra.modules @@ -41,5 +41,14 @@ <dependencies> </dependencies> </tarball> + <metamodule id="meta-extra"> + <dependencies> + <dep package="libjingle"/> + <dep package="gst-plugins-farsight"/> + <dep package="farsight"/> + <dep package="telepathy-stream-engine"/> + <dep package="gst-ffmpeg"/> + </dependencies> + </metamodule> </moduleset> diff --git a/config/modulesets/fructose.modules b/config/modulesets/fructose.modules index 6c12c47..f06b9ad 100644 --- a/config/modulesets/fructose.modules +++ b/config/modulesets/fructose.modules @@ -28,7 +28,7 @@ <branch module="terminal/mainline.git" checkoutdir="terminal" /> </bundle> <bundle id="write"> - <branch module="write/mainline.git" checkoutdir="write" /> + <branch repo="dev.laptop.org/projects" /> </bundle> <autotools id="etoys"> <branch repo="dev.laptop.org/projects" /> diff --git a/config/modulesets/glucose-external.modules b/config/modulesets/glucose-external.modules index 4278731..b9363ca 100644 --- a/config/modulesets/glucose-external.modules +++ b/config/modulesets/glucose-external.modules @@ -6,7 +6,7 @@ <repository type="svn" name="svn.gnome.org" href="http://svn.gnome.org/svn/"/> <repository type="svn" name="squeakvm.org" - href="http://squeakvm.org/svn/squeak/branches/" trunk-path=""/> + href="http://squeakvm.org/svn/squeak/branches/" trunk-template="olpc"/> <repository type="git" name="git.imendio.com" href="git://git.imendio.com/projects/"/> <repository type="svn" name="matchbox.o-hand.com" @@ -17,6 +17,10 @@ href="http://dev.laptop.org/pub/sugar/xulrunner/"/> <repository type="git" name="dev.laptop.org/users/dsd" href="git://dev.laptop.org/users/dsd/"/> + <repository type="tarball" name="dbus" + href="http://dbus.freedesktop.org/releases/"/> + <repository type="git" name="git.sugarlabs.org" default="yes" + href="git://git.sugarlabs.org"/> <tarball id="pygobject" version="2.14"> <source href="http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.14/pygobject-2.14.2.tar.bz2" md5sum="0e9e9300e81847f4f7266f49d3bebbaf" size="366808"/> @@ -47,9 +51,9 @@ <patch file="xulrunner-perms.patch" strip="0"/> </patches> </autotools> - <tarball id="abiword" autogenargs="--enable-libabiword --enable-debug --disable-bonobo --disable-gnomevfs --disable-gnomeui --disable-gucharmap --disable-printing" makefile="GNUmakefile" version="2.6.5"> - <source href="http://abisource.com/downloads/abiword/2.6.5/source/abiword-2.6.5.tar.gz" - size="9514729" md5sum="edce76a1da515dfc102a0e030f722002"/> + <tarball id="abiword" autogenargs="--enable-libabiword --enable-debug --disable-bonobo --disable-gnomevfs --disable-gnomeui --disable-gucharmap --disable-printing" makefile="GNUmakefile" version="2.6.6"> + <source href="http://abisource.com/downloads/abiword/2.6.6/source/abiword-2.6.6.tar.gz" + size="9534259" md5sum="b9de84f03f555d4490b63e5b7f53e2f1"/> <patches> <patch file="libabiword-2.5.2-defaultfont.patch" strip="1"/> <patch file="libabiword-2.6.0.svn20071031-draghandles.patch" strip="1"/> @@ -57,9 +61,9 @@ <patch file="libabiword-2.6.0.svn20071106-noassertinput.patch" strip="1"/> </patches> </tarball> - <tarball id="abiword-plugins" autogenargs="--enable-libabiword --enable-debug --disable-all --enable-OpenDocument --enable-abicollab --with-abicollab-sugar-backend --enable-abicollab-record-always --enable-loadbindings --with-abiword=../abiword-2.6.5" makefile="GNUmakefile" version="2.6.5"> - <source href="http://abisource.com/downloads/abiword/2.6.5/source/abiword-plugins-2.6.5.tar.gz" - size="1930003" md5sum="6e38e0efc40421591ae4cc0d5202a796"/> + <tarball id="abiword-plugins" autogenargs="--enable-libabiword --enable-debug --disable-all --enable-OpenDocument --enable-abicollab --with-abicollab-sugar-backend --enable-abicollab-record-always --enable-loadbindings --with-abiword=../abiword-2.6.6" makefile="GNUmakefile" version="2.6.6"> + <source href="http://abisource.com/downloads/abiword/2.6.6/source/abiword-plugins-2.6.6.tar.gz" + size="1970233" md5sum="45dabc491976e3f21d943817e61b9d89"/> <dependencies> <dep package="abiword"/> </dependencies> @@ -77,7 +81,7 @@ </dependencies> </autotools> <autotools id="hulahop"> - <branch repo="dev.laptop.org/projects"/> + <branch module="hulahop/mainline.git" checkoutdir="hulahop"/> <dependencies> <dep package="xulrunner"/> </dependencies> @@ -91,14 +95,15 @@ <autotools id="telepathy-gabble" autogen-sh="configure"> <branch repo="telepathy" - version="0.7.16" - module="telepathy-gabble/telepathy-gabble-0.7.16.tar.gz" - size="1417532" md5sum="8a4be460b5d8233afa170f433ca116cc"> + version="0.7.20" + module="telepathy-gabble/telepathy-gabble-0.7.20.tar.gz" + size="1587285" md5sum="0b8b6097de5b3fbd07aaddc96fed70ee"> <patch file="telepathy-gabble-chmod-unix-socket.patch" strip="1"/> <patch file="telepathy-gabble-olpc-no-dbus-uid-check.patch" strip="1"/> </branch> <dependencies> <dep package="telepathy-glib"/> + <dep package="dbus-glib"/> </dependencies> </autotools> <autotools id="telepathy-salut" @@ -115,9 +120,9 @@ </dependencies> </autotools> <autotools id="telepathy-glib" autogen-sh="configure"> - <branch repo="telepathy" version="0.7.22" - module="telepathy-glib/telepathy-glib-0.7.22.tar.gz" - size="2250849" md5sum="558d463816ca71955ca27fdcddf715c2" /> + <branch repo="telepathy" version="0.7.25" + module="telepathy-glib/telepathy-glib-0.7.25.tar.gz" + size="2326926" md5sum="7a676676e902f0d73ec7ec407fbf04f1" /> </autotools> <distutils id="telepathy-python"> <branch module="telepathy-python/telepathy-python-0.15.6.tar.gz" @@ -127,9 +132,17 @@ <dep package="telepathy-gabble"/> </dependencies> </distutils> - <autotools id="sugar-evince" autogenargs="--disable-static --disable-binary --enable-embed --without-libgnome --disable-scrollkeeper --disable-schemas-install --disable-dvi --without-print --enable-pixbuf --disable-thumbnailer --disable-djvu --disable-comics --disable-nautilus --without-keyring"> - <branch repo="dev.laptop.org/users/dsd" /> - </autotools> + <tarball id="evince" autogenargs="--disable-static --disable-scrollkeeper --disable-schemas-install --disable-dvi --enable-pixbuf --disable-thumbnailer --disable-djvu --disable-comics --disable-nautilus --without-keyring"> + <source href="http://download.gnome.org/sources/evince/2.25/evince-2.25.90.tar.bz2" + version="2.25.90" size="1790620" md5sum="931b4d5fb4c5a2e4e079a62662b9d224"/> + </tarball> + <tarball id="gnome-python-desktop"> + <source href="http://download.gnome.org/sources/gnome-python-desktop/2.25/gnome-python-desktop-2.25.90.tar.bz2" + version="2.25.90" size="571621" md5sum="9bc794079fb4dd02f4d0651ff04bbace"/> + <dependencies> + <dep package="evince"/> + </dependencies> + </tarball> <tarball id="GConf-dbus"> <source href="http://ftp.gnome.org/pub/gnome/sources/GConf-dbus/2.16/GConf-dbus-2.16.0.tar.bz2" version="2.16.0" size="1363876" md5sum="3e7d648f75949b5362af807f5408546b"/> @@ -137,4 +150,9 @@ <patch file="gconf-dbus-defaultpath.patch" strip="0"/> </patches> </tarball> + <autotools id="dbus-glib" autogen-sh="configure"> + <branch repo="dbus" version="0.78" + module="dbus-glib/dbus-glib-0.78.tar.gz" + size="683454" md5sum="d4aa04b9df35b4bd663be38e959941c8" /> + </autotools> </moduleset> diff --git a/config/modulesets/glucose.modules b/config/modulesets/glucose.modules index d70b05f..07322d6 100644 --- a/config/modulesets/glucose.modules +++ b/config/modulesets/glucose.modules @@ -51,7 +51,7 @@ <dep package="pyabiword"/> <dep package="abiword-plugins"/> <dep package="squeak"/> - <dep package="sugar-evince"/> + <dep package="gnome-python-desktop"/> <dep package="hulahop"/> </dependencies> </metamodule> diff --git a/config/modulesets/patches/telepathy-gabble-chmod-unix-socket.patch b/config/modulesets/patches/telepathy-gabble-chmod-unix-socket.patch index bb16883..17988ca 100644 --- a/config/modulesets/patches/telepathy-gabble-chmod-unix-socket.patch +++ b/config/modulesets/patches/telepathy-gabble-chmod-unix-socket.patch @@ -1,14 +1,11 @@ -diff -rN -u old-telepathy-gabble-rainbow/src/tube-stream.c new-telepathy-gabble-rainbow/src/tube-stream.c ---- old-telepathy-gabble-rainbow/src/tube-stream.c 2007-12-11 16:28:48.000000000 +0100 -+++ new-telepathy-gabble-rainbow/src/tube-stream.c 2007-12-11 16:28:48.000000000 +0100 -@@ -650,6 +650,9 @@ - "Error binding socket: %s", g_strerror (errno)); +--- a/src/tube-stream.c ++++ b/src/tube-stream.c +@@ -667,6 +667,8 @@ tube_stream_open (GabbleTubeStream *self, + g_free (path); return FALSE; } -+ + /* Everyone can use the socket */ -+ chmod (addr.sun_path, 0777); ++ chmod (path, 0777); + g_free (path); } else if (priv->address_type == TP_SOCKET_ADDRESS_TYPE_IPV4) - { - diff --git a/config/modulesets/sugar.modules b/config/modulesets/sugar.modules new file mode 100644 index 0000000..cc18300 --- /dev/null +++ b/config/modulesets/sugar.modules @@ -0,0 +1,18 @@ +<?xml version="1.0"?><!--*- mode: nxml; indent-tabs-mode: nil -*--> +<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> +<moduleset> + + <include href="tools.modules"/> + <include href="glucose-external.modules"/> + <include href="glucose.modules"/> + <include href="fructose.modules"/> + <include href="extra.modules"/> + <include href="extra-activities.modules"/> + <metamodule id="meta-sugar"> + <dependencies> + <dep package="meta-tools"/> + <dep package="meta-glucose"/> + <dep package="meta-fructose"/> + </dependencies> + </metamodule> +</moduleset> diff --git a/config/sysdeps/debian-5.0.xml b/config/sysdeps/debian-5.0.xml new file mode 100644 index 0000000..118a72a --- /dev/null +++ b/config/sysdeps/debian-5.0.xml @@ -0,0 +1,69 @@ +<?xml version="1.0"?> +<dependencies> + <package name="libwnck-dev"/> + <package name="python-cairo-dev"/> + <package name="automake1.9"/> + <package name="libpoppler-glib-dev"/> + <package name="libtool"/> + <package name="libsqlite3-dev"/> + <package name="libnspr4-dev"/> + <package name="docbook-xsl"/> + <package name="intltool"/> + <package name="librsvg2-dev"/> + <package name="gtk-doc-tools"/> + <package name="libglade2-dev"/> + <package name="icon-naming-utils"/> + <package name="cdbs"/> + <package name="devscripts"/> + <package name="quilt"/> + <package name="patchutils"/> + <package name="python-dev"/> + <package name="python-central"/> + <package name="debhelper"/> + <package name="libglib2.0-dev"/> + <package name="python-gtk2-dev"/> + <package name="gettext"/> + <package name="shared-mime-info"/> + <package name="python-empy"/> + <package name="libgconf2-dev"/> + <package name="libgsf-1-dev"/> + <package name="libenchant-dev"/> + <package name="libwv-dev"/> + <package name="libboost-dev"/> + <package name="libgnomevfs2-dev"/> + <package name="gcc"/> + <package name="g++"/> + <package name="libgtk2.0-dev"/> + <package name="python-gtk2-dev"/> + <package name="libcroco3-dev"/> + <package name="libfribidi-dev"/> + <package name="libxt-dev"/> + <package name="gnome-doc-utils"/> + <package name="libexpat1-dev"/> + <package name="gettext"/> + <package name="zlib1g-dev"/> + <package name="gnome-common"/> + <package name="python-numpy"/> + <package name="xserver-xephyr"/> + <package name="make"/> + <package name="librsvg2-dev"/> + <package name="python-cjson"/> + <package name="subversion"/> + <package name="libglade2-dev"/> + <package name="libidl-dev"/> + <package name="libgconf2-dev"/> + <package name="gnome-icon-theme"/> + <package name="icon-naming-utils"/> + <package name="x11-utils"/> + <package name="libasound2-dev"/> + <package name="python-xapian"/> + <package name="libxapian15"/> + <package name="python-dbus"/> + <package name="libdbus-1-dev"/> + <package name="libdbus-glib-1-dev"/> + <package name="libloudmouth1-dev"/> + <package name="libavahi-gobject-dev"/> + <package name="python-avahi"/> + <package name="libsoup2.4-dev"/> + <package name="libpoppler-glib-dev"/> +</dependencies> diff --git a/config/sysdeps/debian-unstable.xml b/config/sysdeps/debian-unstable.xml index 118a72a..0971c58 100644 --- a/config/sysdeps/debian-unstable.xml +++ b/config/sysdeps/debian-unstable.xml @@ -64,6 +64,6 @@ <package name="libloudmouth1-dev"/> <package name="libavahi-gobject-dev"/> <package name="python-avahi"/> - <package name="libsoup2.4-dev"/> + <package name="libsoup2.2-dev"/> <package name="libpoppler-glib-dev"/> </dependencies> diff --git a/config/sysdeps/fedora-10.xml b/config/sysdeps/fedora-10.xml index 9335495..190db8c 100644 --- a/config/sysdeps/fedora-10.xml +++ b/config/sysdeps/fedora-10.xml @@ -46,7 +46,7 @@ <package name="dbus-devel"/> <package name="dbus-glib-devel"/> <package name="loudmouth-devel"/> - <package name="libsoup-devel"/> + <package name="libsoup22-devel"/> <package name="poppler-glib-devel"/> <package name="avahi" diff --git a/config/sysdeps/fedora-rawhide.xml b/config/sysdeps/fedora-rawhide.xml index 9335495..190db8c 100644 --- a/config/sysdeps/fedora-rawhide.xml +++ b/config/sysdeps/fedora-rawhide.xml @@ -46,7 +46,7 @@ <package name="dbus-devel"/> <package name="dbus-glib-devel"/> <package name="loudmouth-devel"/> - <package name="libsoup-devel"/> + <package name="libsoup22-devel"/> <package name="poppler-glib-devel"/> <package name="avahi" diff --git a/config/sysdeps/olpc-4.xml b/config/sysdeps/olpc-4.xml index 250113c..5afef5a 100644 --- a/config/sysdeps/olpc-4.xml +++ b/config/sysdeps/olpc-4.xml @@ -46,7 +46,7 @@ <package name="dbus-devel"/> <package name="dbus-glib-devel"/> <package name="loudmouth-devel"/> - <package name="libsoup-devel"/> + <package name="libsoup22-devel"/> <package name="avahi" source="avahi"/> diff --git a/config/sysdeps/ubuntu-8.04.xml b/config/sysdeps/ubuntu-8.04.xml new file mode 100644 index 0000000..a06f28d --- /dev/null +++ b/config/sysdeps/ubuntu-8.04.xml @@ -0,0 +1,60 @@ +<?xml version="1.0"?> +<dependencies> + <package name="intltool"/> + <package name="libtool"/> + <package name="python-dev"/> + <package name="gcc"/> + <package name="g++"/> + <package name="libgtk2.0-dev"/> + <package name="python-gtk2-dev"/> + <package name="python-cairo-dev"/> + <package name="libcroco3-dev"/> + <package name="libgsf-1-dev"/> + <package name="libenchant-dev"/> + <package name="libfribidi-dev"/> + <package name="libboost-dev"/> + <package name="libxt-dev"/> + <package name="gnome-doc-utils"/> + <package name="libexpat1-dev"/> + <package name="gettext"/> + <package name="libwv-dev"/> + <package name="zlib1g-dev"/> + <package name="gnome-common"/> + <package name="python-numpy"/> + <package name="libwnck-dev"/> + <package name="xserver-xephyr"/> + <package name="make"/> + <package name="librsvg2-dev"/> + <package name="python-cjson"/> + <package name="automake1.9"/> + <package name="subversion"/> + <package name="gtk-doc-tools"/> + <package name="libglade2-dev"/> + <package name="libidl-dev"/> + <package name="libgconf2-dev"/> + <package name="libgnomevfs2-dev"/> + <package name="libpoppler-glib-dev"/> + <package name="gnome-icon-theme"/> + <package name="icon-naming-utils"/> + <package name="x11-utils"/> + <package name="icon-slicer"/> + <package name="libasound2-dev"/> + <package name="python-xapian"/> + <package name="libxapian15"/> + <package name="python-gtksourceview2"/> + <package name="python-gconf"/> + <package name="python-dbus"/> + <package name="libdbus-1-dev"/> + <package name="libdbus-glib-1-dev"/> + <package name="libloudmouth1-dev"/> + <package name="libavahi-gobject-dev"/> + <package name="python-avahi"/> + <package name="libpoppler-dev"/> + <package name="python-gobject" + source="pygobject"/> + <package name="xulrunner-1.9-dev" + source="xulrunner"/> + <package name="libsoup2.4-dev"/> + <package name="libglib2.0-dev"/> + <package name="libpoppler-glib-dev"/> +</dependencies> diff --git a/config/sysdeps/ubuntu-8.10.xml b/config/sysdeps/ubuntu-8.10.xml index a06f28d..c601230 100644 --- a/config/sysdeps/ubuntu-8.10.xml +++ b/config/sysdeps/ubuntu-8.10.xml @@ -21,7 +21,7 @@ <package name="zlib1g-dev"/> <package name="gnome-common"/> <package name="python-numpy"/> - <package name="libwnck-dev"/> + <package name="python-gnome2-desktop"/> <package name="xserver-xephyr"/> <package name="make"/> <package name="librsvg2-dev"/> diff --git a/sbuildbot/.svnignore b/sbuildbot/.svnignore new file mode 100644 index 0000000..2769657 --- /dev/null +++ b/sbuildbot/.svnignore @@ -0,0 +1,5 @@ +builddir +changes.pck +twistd.log* +twistd.pid +slaves.csv diff --git a/sbuildbot/AUTHORS b/sbuildbot/AUTHORS new file mode 100644 index 0000000..01194e8 --- /dev/null +++ b/sbuildbot/AUTHORS @@ -0,0 +1,5 @@ +John Carr <john.carr@unrouted.co.uk> +Frederic Peters <fpeters@0d.be> +Alejandro Piñeiro <apinheiro@igalia.com> +Iago Toral <itoral@igalia.com> +Jose Dapena <jdapena@igalia.com> diff --git a/sbuildbot/Makefile b/sbuildbot/Makefile new file mode 100644 index 0000000..5f79e59 --- /dev/null +++ b/sbuildbot/Makefile @@ -0,0 +1,19 @@ +# -*- makefile -*- + +# This is a simple makefile which lives in a buildmaster/buildslave +# directory (next to the buildbot.tac file). It allows you to start/stop the +# master or slave by doing 'make start' or 'make stop'. + +# The 'reconfig' target will tell a buildmaster to reload its config file. + +start: + twistd --no_save -y buildbot.tac --nodaemon + +stop: + kill `cat twistd.pid` + +reconfig: + kill -HUP `cat twistd.pid` + +log: + tail -f twistd.log diff --git a/sbuildbot/README b/sbuildbot/README new file mode 100644 index 0000000..cafbebb --- /dev/null +++ b/sbuildbot/README @@ -0,0 +1,5 @@ +You must at minimum edit those two lines in master.cfg: + c['jhbuild'] = "~/bin/jhbuild" + c['jhbuildrc'] = "/home/fred/.jhbuildrc" + +You must also define slaves in the slaves.csv file. diff --git a/sbuildbot/buildbot.tac b/sbuildbot/buildbot.tac new file mode 100644 index 0000000..e97e732 --- /dev/null +++ b/sbuildbot/buildbot.tac @@ -0,0 +1,12 @@ +from twisted.application import service +from buildbot.master import BuildMaster +import os + +basedir = os.path.dirname(os.path.abspath(__file__)) +if not os.path.exists(os.path.join(basedir, 'builddir')): + os.makedirs(os.path.join(basedir, 'builddir')) +configfile = r'master.cfg' + +application = service.Application('buildmaster') +BuildMaster(basedir, configfile).setServiceParent(application) + diff --git a/sbuildbot/master.cfg b/sbuildbot/master.cfg new file mode 100644 index 0000000..731aef6 --- /dev/null +++ b/sbuildbot/master.cfg @@ -0,0 +1,83 @@ +# -*- python -*- +# ex: set syntax=python: + +# This is a sample buildmaster config file. It must be installed as +# 'master.cfg' in your buildmaster's base directory (although the filename +# can be changed with the --basedir option to 'mktap buildbot master'). + +# It has one job: define a dictionary named BuildmasterConfig. This +# dictionary has a variety of keys to control different aspects of the +# buildmaster. They are documented in docs/config.xhtml . + +import buildbot + +# This is the dictionary that the buildmaster pays attention to. We also use +# a shorter alias to save typing. +c = BuildmasterConfig = {} + +# 'slavePortnum' defines the TCP port to listen on. This must match the value +# configured into the buildslaves (with their --master option) + +c['slavePortnum'] = 9070 + +####### STATUS TARGETS + +# 'status' is a list of Status Targets. The results of each build will be +# pushed to these targets. buildbot/status/*.py has a variety to choose from, +# including web pages, email senders, and IRC bots. + +c['status'] = [] + +mailNotify = ['dfarning@sugarlabs.org', 'marcopg@sugarlabs.org'] + +from buildbot.status import mail +c['status'].append(mail.MailNotifier(fromaddr="buildbot@sugarlabs.org", + mode = 'failing', + extraRecipients = mailNotify, + sendToInterestedUsers=False)) +# +from buildbot.status import words +c['status'].append(words.IRC(host="irc.freenode.net", nick="buildbot", + channels=["#sugar"], port=8001)) +# +# from buildbot.status import client +# c['status'].append(client.PBListener(9988)) + + +####### DEBUGGING OPTIONS + +# if you set 'debugPassword', then you can connect to the buildmaster with +# the diagnostic tool in contrib/debugclient.py . From this tool, you can +# manually force builds and inject changes, which may be useful for testing +# your buildmaster without actually commiting changes to your repository (or +# before you have a functioning 'sources' set up). The debug tool uses the +# same port number as the slaves do: 'slavePortnum'. + +#c['debugPassword'] = "debugpassword" + +# if you set 'manhole', you can ssh into the buildmaster and get an +# interactive python shell, which may be useful for debugging buildbot +# internals. It is probably only useful for buildbot developers. You can also +# use an authorized_keys file, or plain telnet. +#from buildbot import manhole +#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1", +# "admin", "password") + + +####### PROJECT IDENTITY + +# the 'projectName' string will be used to describe the project that this +# buildbot is working on. For example, it is used as the title of the +# waterfall HTML page. The 'projectURL' string will be used to provide a link +# from buildbot HTML pages to your project's home page. + +c['projectName'] = "Sugar Labs Buildbot" +c['projectURL'] = "http://www.sugarlabs.org/" + +# the 'buildbotURL' string should point to the location where the buildbot's +# internal web server (usually the html.Waterfall page) is visible. This +# typically uses the port number set in the Waterfall 'status' entry, but +# with an externally-visible host name which the buildbot cannot figure out +# without some help. + +c['buildbotURL'] = "http://buildbot.sugarlabs.org/" diff --git a/sbuildbot/public_html/bar.png b/sbuildbot/public_html/bar.png Binary files differnew file mode 100644 index 0000000..e5b354e --- /dev/null +++ b/sbuildbot/public_html/bar.png diff --git a/sbuildbot/public_html/building.png b/sbuildbot/public_html/building.png Binary files differnew file mode 100644 index 0000000..46ad8a0 --- /dev/null +++ b/sbuildbot/public_html/building.png diff --git a/sbuildbot/public_html/cyan-bar.png b/sbuildbot/public_html/cyan-bar.png Binary files differnew file mode 100644 index 0000000..6c44fdf --- /dev/null +++ b/sbuildbot/public_html/cyan-bar.png diff --git a/sbuildbot/public_html/download.png b/sbuildbot/public_html/download.png Binary files differnew file mode 100644 index 0000000..cf1945c --- /dev/null +++ b/sbuildbot/public_html/download.png diff --git a/sbuildbot/public_html/emptyimg.png b/sbuildbot/public_html/emptyimg.png Binary files differnew file mode 100644 index 0000000..9b63c56 --- /dev/null +++ b/sbuildbot/public_html/emptyimg.png diff --git a/sbuildbot/public_html/error.png b/sbuildbot/public_html/error.png Binary files differnew file mode 100644 index 0000000..4c485f7 --- /dev/null +++ b/sbuildbot/public_html/error.png diff --git a/sbuildbot/public_html/feed-atom.png b/sbuildbot/public_html/feed-atom.png Binary files differnew file mode 100644 index 0000000..c8d70ca --- /dev/null +++ b/sbuildbot/public_html/feed-atom.png diff --git a/sbuildbot/public_html/feed.png b/sbuildbot/public_html/feed.png Binary files differnew file mode 100644 index 0000000..eb47e19 --- /dev/null +++ b/sbuildbot/public_html/feed.png diff --git a/sbuildbot/public_html/figure.png b/sbuildbot/public_html/figure.png Binary files differnew file mode 100644 index 0000000..18aac33 --- /dev/null +++ b/sbuildbot/public_html/figure.png diff --git a/sbuildbot/public_html/foot-16.png b/sbuildbot/public_html/foot-16.png Binary files differnew file mode 100644 index 0000000..95c4ff6 --- /dev/null +++ b/sbuildbot/public_html/foot-16.png diff --git a/sbuildbot/public_html/foot.png b/sbuildbot/public_html/foot.png Binary files differnew file mode 100644 index 0000000..1138da1 --- /dev/null +++ b/sbuildbot/public_html/foot.png diff --git a/sbuildbot/public_html/general_bg.png b/sbuildbot/public_html/general_bg.png Binary files differnew file mode 100644 index 0000000..8840fe2 --- /dev/null +++ b/sbuildbot/public_html/general_bg.png diff --git a/sbuildbot/public_html/general_separator.png b/sbuildbot/public_html/general_separator.png Binary files differnew file mode 100644 index 0000000..bd865e8 --- /dev/null +++ b/sbuildbot/public_html/general_separator.png diff --git a/sbuildbot/public_html/gnome-16.png b/sbuildbot/public_html/gnome-16.png Binary files differnew file mode 100644 index 0000000..95c4ff6 --- /dev/null +++ b/sbuildbot/public_html/gnome-16.png diff --git a/sbuildbot/public_html/gnome-64.png b/sbuildbot/public_html/gnome-64.png Binary files differnew file mode 100644 index 0000000..09a3184 --- /dev/null +++ b/sbuildbot/public_html/gnome-64.png diff --git a/sbuildbot/public_html/gnome-gtp.png b/sbuildbot/public_html/gnome-gtp.png Binary files differnew file mode 100644 index 0000000..c7ed133 --- /dev/null +++ b/sbuildbot/public_html/gnome-gtp.png diff --git a/sbuildbot/public_html/green-bar.png b/sbuildbot/public_html/green-bar.png Binary files differnew file mode 100644 index 0000000..d02dd14 --- /dev/null +++ b/sbuildbot/public_html/green-bar.png diff --git a/sbuildbot/public_html/idle.png b/sbuildbot/public_html/idle.png Binary files differnew file mode 100644 index 0000000..4f031b7 --- /dev/null +++ b/sbuildbot/public_html/idle.png diff --git a/sbuildbot/public_html/images.jpeg b/sbuildbot/public_html/images.jpeg Binary files differnew file mode 100644 index 0000000..54730ee --- /dev/null +++ b/sbuildbot/public_html/images.jpeg diff --git a/sbuildbot/public_html/info.png b/sbuildbot/public_html/info.png Binary files differnew file mode 100644 index 0000000..bbd5dba --- /dev/null +++ b/sbuildbot/public_html/info.png diff --git a/sbuildbot/public_html/lgo.css b/sbuildbot/public_html/lgo.css new file mode 100644 index 0000000..861cc83 --- /dev/null +++ b/sbuildbot/public_html/lgo.css @@ -0,0 +1,365 @@ +body { + margin: 0px; + padding: 0px; + font-family: sans-serif; + background: white; + color: black; + height: 101%; +} + +body.with-star { + background: white url(star.png) -100px -200px no-repeat; +} + +#page { + margin: 0px; + padding: 0px; +} + +div.in-column { + margin: 0 0 2em 1em; + float: right; + max-width: 12em; +} + +hr { + color: #888; + background: #888; + border: 0; + height: 1px; + width: 90%; + text-align: center; + clear: both; +} + + +div.body { + clear: both; +} + + +div.sidebar { + position: absolute; + text-align: left; + right: 0px; + top: 60px; + width: 27ex; + padding-left: 1ex; + border-left: 1ex solid #eee; + margin-top: 4em; +} + +div.sidebar h2 { + margin-top: 0; + padding: 5px 2ex 5px 2ex; + background: url(t.png) top left repeat-y; + font-size: 100%; +} + +#general { + list-style: none; + background: #2E3436 url(general_bg.png) 0 100% repeat-x; + text-align: right; + padding: 0 1ex; + margin: 0; + font-size: 70%; +} + +#general li { + display: inline; + background: url(general_separator.png) 0 0 no-repeat; + padding-top: 10px; + padding-bottom: 8px; + margin-left: 0px; + margin-top: 0px; +} + +#general li a { + font-weight: bold; + color: #FFFFFF; + margin: 0 2ex; + text-decoration: none; + line-height: 30px; +} + +#general li a:hover { + text-decoration: underline; +} + +#general .home { + float: left; + background: url(general_separator.png) 100% 0 no-repeat; + padding-top: 0; + padding-bottom: 0; +} + +#general .home a { + float: left; + background: url(foot.png) 7px 50% no-repeat; + margin-left: 0; + padding-left: 27px; +} + + +#header { + background: #729FCF url(robot.png) 15px 12px no-repeat; + float: left; + width: 100%; + font-size: 75%; +} + +#header h1 { + margin: 0; + margin-left: 85px; + padding-top: 25px; + font-size: 200%; + color: #eeeeec; +} + +#header h1 a { + text-decoration: inherit; + color: inherit; +} + +#tabs { + background: url(bar.png) 0 100% repeat-x; + width: 100%; + float: left; + margin: 0; + padding: 0; +} + +#portal-globalnav { + float: right; + list-style: none; + margin: 0; + margin-right: 3ex; +} + +#portal-globalnav li { + float: left; + margin: 0; + margin-left: 0.2ex; + font-size: 2ex; +} + +#portal-globalnav li a:hover { + color: #111111; +} + +#portal-globalnav li a { + float: left; + text-decoration: none; + color: #555555; + background: url(tab_left.png) 0 0 no-repeat; + padding: 7px 0 7px 7px; + border-bottom: 2px solid #CCCCCC; +} + +#portal-globalnav li span { + background: url(tab_right.png) 100% 0 no-repeat; + padding: 7px 28px 7px 19px; +} + +#portal-globalnav li.selected a { + color: #3566A5; + background: url(tab_left.png) 0 -57px no-repeat; + border-bottom: none; + padding-top: 8px; + padding-bottom: 8px; +} + +#portal-globalnav li.selected a span { + background: url(tab_right.png) 100% -57px no-repeat; + padding-top: 8px; + padding-bottom: 8px; +} + +div.body { + background-color: transparent; + border: none; + padding: 1em; +} + +div.body-sidebar { + margin-right: 27ex; +} + +a { + color: #3465a4; +} + +div.navbar { + margin: 0 29ex 0 2ex; +} + +a img { + border: none; +} + +div#footer { + border-top: 1px solid gray; + color: #888; + font-size: 80%; + margin: 3em 3em 1em; + padding-top: 1.5em; + text-align: center; +} + +/* Buildbot stuff */ + +table.ProjectSummary tbody th { + text-align: left; +} + +table.ProjectSummary thead td { + text-align: center; +} + +table.ProjectSummary tbody td { + border: 1px solid #888; + padding: 0 3px; + text-align: center; +} + +table.ProjectSummary tbody td.feed { + border: none; + padding-right: 2px; +} + +th.offline, th.idle, th.building { + background: white url(offline.png) center right no-repeat; + padding: 0 16px; + cursor: help; +} + +th.idle { + background-image: url(idle.png); +} + +th.building { + background-image: url(building.png); +} + +th.offline { + color: #888; +} + +.success { + background: #8f8; +} + +.failure { + background: #f88; +} +td.running, +td.building { + background: #ff8; +} +td.idle { + color: #888; + background: #f8f8f8; +} +td.offline { + color: #000; + background: #f88; +} +td.failedchecks { + background: #fa4; +} + + +table.waterfall { +} + +table.waterfall td.Time { + background: #e0e0e0; + border: 1px solid #888; + text-align: center; + padding: 0 2px; +} + +table.waterfall td.LastBuild, +table.waterfall td.BuildStep { + border: 1px solid #888; +} + +table.waterfall .Change { + padding-right: 1em; +} + +table.waterfall td.start { + background: #ff8; + font-weight: bold; +} + +table.waterfall td.start a { + text-decoration: none; +} + +table.waterfall td.exception { + border: 3px solid red; + background: #c66; +} + +/* From classic */ +/* +td.Change, td.Time, td.Event { + background: #e0e0e0; +} + +td.Event, td.BuildStep, td.Activity, td.Change, td.Time, td.Builder, td.LastBuild { + border-top: 1px solid; + border-right: 1px solid; + border-bottom: 1px solid; + border-left: 1px solid; +} +*/ + +tr.totals td { + padding-top: 1ex; + text-align: center; + font-weight: bold; +} + +div.changeset ul { + margin-left: 0em; + padding-left: 0em; + list-style: none; +} + +div.changeset ul ul { + padding-left: 1em; +} + +ul#tests-summary { + margin: 1em; + padding: 0; + list-style: none; + -webkit-column-width: 15em; + -moz-column-width: 15em; + column-width: 15em; + -webkit-column-gap: 1em; + -moz-column-gap: 1em; + column-gap: 1em; +} + +ul#tests-summary li { + margin-bottom: 1ex; +} + +li.changeset { + border: 1px dashed #555; + background: #eee; + padding: 1ex; + font-size: 80%; + margin-bottom: 1em; +} + +li.changeset p { + margin: 0; +} + +li.changeset pre { + margin: 0; +} diff --git a/sbuildbot/public_html/logo.png b/sbuildbot/public_html/logo.png Binary files differnew file mode 100644 index 0000000..06e0940 --- /dev/null +++ b/sbuildbot/public_html/logo.png diff --git a/sbuildbot/public_html/media b/sbuildbot/public_html/media new file mode 120000 index 0000000..b8424c4 --- /dev/null +++ b/sbuildbot/public_html/media @@ -0,0 +1 @@ +/var/www/sugarlabs/media/
\ No newline at end of file diff --git a/sbuildbot/public_html/nobody.png b/sbuildbot/public_html/nobody.png Binary files differnew file mode 100644 index 0000000..dee7669 --- /dev/null +++ b/sbuildbot/public_html/nobody.png diff --git a/sbuildbot/public_html/offline.png b/sbuildbot/public_html/offline.png Binary files differnew file mode 100644 index 0000000..bc9a1b7 --- /dev/null +++ b/sbuildbot/public_html/offline.png diff --git a/sbuildbot/public_html/purple-bar.png b/sbuildbot/public_html/purple-bar.png Binary files differnew file mode 100644 index 0000000..0c35c53 --- /dev/null +++ b/sbuildbot/public_html/purple-bar.png diff --git a/sbuildbot/public_html/red-bar.png b/sbuildbot/public_html/red-bar.png Binary files differnew file mode 100644 index 0000000..3439fd5 --- /dev/null +++ b/sbuildbot/public_html/red-bar.png diff --git a/sbuildbot/public_html/robot.png b/sbuildbot/public_html/robot.png Binary files differnew file mode 100644 index 0000000..65a5304 --- /dev/null +++ b/sbuildbot/public_html/robot.png diff --git a/sbuildbot/public_html/robots.txt b/sbuildbot/public_html/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/sbuildbot/public_html/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/sbuildbot/public_html/star.png b/sbuildbot/public_html/star.png Binary files differnew file mode 100644 index 0000000..a152a93 --- /dev/null +++ b/sbuildbot/public_html/star.png diff --git a/sbuildbot/public_html/t.png b/sbuildbot/public_html/t.png Binary files differnew file mode 100644 index 0000000..7b67341 --- /dev/null +++ b/sbuildbot/public_html/t.png diff --git a/sbuildbot/public_html/tab_left.png b/sbuildbot/public_html/tab_left.png Binary files differnew file mode 100644 index 0000000..0ead7a1 --- /dev/null +++ b/sbuildbot/public_html/tab_left.png diff --git a/sbuildbot/public_html/tab_right.png b/sbuildbot/public_html/tab_right.png Binary files differnew file mode 100644 index 0000000..2ee74d6 --- /dev/null +++ b/sbuildbot/public_html/tab_right.png diff --git a/sbuildbot/public_html/warn.png b/sbuildbot/public_html/warn.png Binary files differnew file mode 100644 index 0000000..9a8c5bb --- /dev/null +++ b/sbuildbot/public_html/warn.png diff --git a/sbuildbot/public_html/webpage.png b/sbuildbot/public_html/webpage.png Binary files differnew file mode 100644 index 0000000..e5d80c1 --- /dev/null +++ b/sbuildbot/public_html/webpage.png diff --git a/sbuildbot/slaves.csv b/sbuildbot/slaves.csv new file mode 100644 index 0000000..76d9939 --- /dev/null +++ b/sbuildbot/slaves.csv @@ -0,0 +1,2 @@ +Fedora10,nice +Fedora-Rawhide,nice diff --git a/sbuildbot/template.html b/sbuildbot/template.html new file mode 100644 index 0000000..281c85d --- /dev/null +++ b/sbuildbot/template.html @@ -0,0 +1,46 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="en"><head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title>@@GNOME_BUILDBOT_TITLE@@</title> + <link rel="stylesheet" type="text/css" href="/lgo.css"> + <link rel="icon" type="image/x-icon" href="/media/images/favicon.ico"> + <link rel="SHORTCUT ICON" type="image/x-icon" href="/media/images/favicon.ico"> +</head> +<body class="with-star"> +<div id="page"> +<ul id="general"> +<li id="siteaction-sugarlabs_home" class="home"><a href="http://wiki.sugarlabs.org/">Home</a></li> +<li id="siteaction-sugarlabs_trac"><a href="http://dev.sugarlabs.org/">Trac</a></li> +<li id="siteaction-sugarlabs_plant"><a href="http://planet.sugarlabs.org/">Planet</a></li> +<li id="siteaction-sugarlabs_list"><a href="http://lists.sugarlabs.org/">Lists</a></li> +<li id="siteaction-sugarlabs_schools"><a href="http://schools.sugarlabs.org/">Schools</a></li> +<li id="siteaction-sugarlabs_download"><a href="http://download.sugarlabs.org/">Download</a></li> +<li id="siteaction-sugarlabs_api"><a href="http://api.sugarlabs.org/">API</a></li> +<li id="siteaction-sugarlabs_git"><a href="http://git.sugarlabs.org/">Gitorious</a></li> +</ul> +<div id="header"> +<h1><a href="/">@@GNOME_BUILDBOT_TITLE@@</a></h1> + + <div id="tabs"> + <ul id="portal-globalnav"> + <li id="portaltab-0" class="selected"><a href="http://buildbot.sugarlabs.org"><span>Sugar</span></a></li> + <li id="portaltab-1"><a href="http://sugarlabs.org/go/DevelopmentTeam"><span>Developers</span></a></li> + </ul> + </div> +</div> +</div> +<div class="body"> + +@@GNOME_BUILDBOT_BODY@@ + + + <div id="footer"> + Copyright © 2008 <a href="http://www.sugarlabs.org/">The Sugar Learning Project</a>.<br /> + <br/> + Powered by <a href="http://buildbot.net">Buildbot</a>. + </div> + + +</div> <!-- end of .body --> +</body> +</html> diff --git a/scripts/main.py b/scripts/main.py index fd06471..4f3d1f8 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -18,70 +18,108 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import sys, os +import sys, os, errno import optparse import traceback -import jhbuild.main +import gettext +localedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../mo')) +gettext.install('jhbuild', localedir=localedir, unicode=True) +import __builtin__ +__builtin__.__dict__['N_'] = lambda x: x + import jhbuild.commands from jhbuild.errors import UsageError, FatalError +from jhbuild.utils.cmds import get_output +from jhbuild.moduleset import warn_local_modulesets import bundlemodule import depscheck -import check -import report import clear from config import Config +if sys.platform == 'darwin': + # work around locale.getpreferredencoding() returning an empty string in + # Mac OS X, see http://bugzilla.gnome.org/show_bug.cgi?id=534650 and + # http://bazaar-vcs.org/DarwinCommandLineArgumentDecoding + sys.platform = 'posix' + try: + import locale + finally: + sys.platform = 'darwin' +else: + import locale + +try: + _encoding = locale.getpreferredencoding() + assert _encoding +except (locale.Error, AssertionError): + _encoding = 'ascii' + +def uencode(s): + if type(s) is unicode: + return s.encode(_encoding, 'replace') + else: + return s + +def uprint(*args): + '''Print Unicode string encoded for the terminal''' + for s in args[:-1]: + print uencode(s), + s = args[-1] + print uencode(s) + +__builtin__.__dict__['uprint'] = uprint +__builtin__.__dict__['uencode'] = uencode + def help_commands(option, opt_str, value, parser): - commands = [ - ('build', 'update and compile (the default)'), - ('build-base', 'build the base sugar dependencies'), - ('buildone', 'modules build a single module'), - ('update', 'update from version control'), - ('updateone', 'update a fixed set of modules'), - ('list', 'list what modules would be built'), - ('info', 'prints information about modules'), - ('tinderbox', 'build non-interactively with logging'), - ('gui', 'build targets from a gui app'), - ('run', 'run a command in the build environment'), - ('shell', 'start a shell in the build environment'), - ('depscheck', 'check that required dependencies exists'), - ('dot', 'output a dependency graph for processing with graphviz'), - ] - print 'sugar-jhbuild commands are:' - for (cmd, description) in commands: - print ' %-15s %s' % (cmd, description) + thisdir = os.path.abspath(os.path.dirname(__file__)) + + # import all available commands + for fname in os.listdir(os.path.join(thisdir, 'commands')): + name, ext = os.path.splitext(fname) + if not ext == '.py': + continue + try: + __import__('jhbuild.commands.%s' % name) + except ImportError: + pass + + uprint(_('JHBuild commands are:')) + commands = [(x.name, x.doc) for x in jhbuild.commands.get_commands().values()] + commands.sort() + for name, description in commands: + uprint(' %-15s %s' % (name, description)) print - print 'For more information run "sugar-jhbuild <command> --help"' + uprint(_('For more information run "jhbuild <command> --help"')) parser.exit() -def main(args): +def main(base_dir, args): parser = optparse.OptionParser( - usage='%prog [ -f config ] command [ options ... ]', - description='Build sugar and his dependencies.') + usage=_('%prog [ -f config ] command [ options ... ]'), + description=_('Build a set of modules from diverse repositories in correct dependency order (such as GNOME).')) parser.disable_interspersed_args() parser.add_option('--help-commands', action='callback', callback=help_commands, - help='Information about available jhbuild commands') + help=_('Information about available jhbuild commands')) parser.add_option('-f', '--file', action='store', metavar='CONFIG', type='string', dest='configfile', - default=os.path.join(os.environ['HOME'], '.sugar.jhbuildrc'), - help='use a non default configuration file') + default=os.environ.get("JHBUILDRC", os.path.join(os.environ['HOME'], '.jhbuildrc')), + help=_('use a non default configuration file')) parser.add_option('-m', '--moduleset', action='store', metavar='URI', type='string', dest='moduleset', default=None, - help='use a non default module set') + help=_('use a non default module set')) parser.add_option('--no-interact', action='store_true', dest='nointeract', default=False, - help='do not prompt for input') + help=_('do not prompt for input')) options, args = parser.parse_args(args) try: - config = Config(options.configfile) + config = Config(base_dir, options.configfile) except FatalError, exc: - sys.stderr.write('sugar-jhbuild: %s\n' % (str(exc))) + sys.stderr.write('sugar-jhbuild: %s\n' % exc.args[0].encode(_encoding, 'replace')) sys.exit(1) if options.moduleset: config.moduleset = options.moduleset @@ -93,24 +131,30 @@ def main(args): command = args[0] args = args[1:] - if command == 'build' and len(args) == 0: - print 'Checking dependencies...' - jhbuild.commands.run('depscheck', config, []) - elif command == 'run' and len(args) == 0: + if command == 'run' and len(args) == 0: args.append('sugar-emulator') + warn_local_modulesets(config) + try: - return jhbuild.commands.run(command, config, args) + rc = jhbuild.commands.run(command, config, args) except UsageError, exc: - sys.stderr.write('sugar-jhbuild %s: %s\n' % (command, str(exc))) + sys.stderr.write('sugar-jhbuild %s: %s\n' % (command, exc.args[0].encode(_encoding, 'replace'))) parser.print_usage() sys.exit(1) except FatalError, exc: - sys.stderr.write('sugar-jhbuild %s: %s\n' % (command, str(exc))) + sys.stderr.write('sugar-jhbuild %s: %s\n' % (command, exc.args[0].encode(_encoding, 'replace'))) sys.exit(1) except KeyboardInterrupt: - print "Interrupted" + uprint(_('Interrupted')) sys.exit(1) except EOFError: - print "EOF" + uprint(_('EOF')) sys.exit(1) + except IOError, e: + if e.errno != errno.EPIPE: + raise + sys.exit(0) + if rc: + sys.exit(rc) + diff --git a/scripts/report.py b/scripts/report.py index 0ac8659..3617ee2 100644 --- a/scripts/report.py +++ b/scripts/report.py @@ -183,9 +183,4 @@ try: register_command(cmd_report) except ImportError: - try: - import cjson as json - json.read = json.decode - json.write = json.encode - except ImportError: - print 'Disable report, neither json-py nor python-cjson are not installed.' + print 'Disable report, json-py is not installed.' diff --git a/scripts/bundlemodule.py b/sjhbuild/bundlemodule.py index 3a662c1..3a662c1 100644 --- a/scripts/bundlemodule.py +++ b/sjhbuild/bundlemodule.py diff --git a/scripts/config.py b/sjhbuild/config.py index 0d7a1b8..4efe4e6 100644 --- a/scripts/config.py +++ b/sjhbuild/config.py @@ -6,69 +6,31 @@ import jhbuild.config import sysdeps class Config(jhbuild.config.Config): - def __init__(self, rc_file): - scripts_dir = os.path.dirname(__file__) - self._base_dir = os.path.dirname(scripts_dir) - self._set_dir = os.path.join(self._base_dir, 'config', 'modulesets') - - jhbuild.config.Config.__init__(self, self._ensure_rc_file(rc_file)) - + def __init__(self, base_dir, rc_file): + self.base_dir = base_dir + jhbuild.config.Config.__init__(self, os.path.join(self.base_dir, 'sugar.jhbuildrc')) self._setup() - def get_user_path(self): - user_path = os.path.expanduser('~/.sugar-jhbuild') - if not os.path.exists(user_path): - os.mkdir(user_path) - return user_path - - def _ensure_rc_file(self, rc_file): - if not os.path.exists(rc_file): - f = open(rc_file, 'w') - f.write('# Created by sugar-jhbuild') - f.close - return rc_file - def _setup(self): self.autogenargs = '' - self.moduleset = [] - self._add_moduleset('glucose-external.modules') - self._add_moduleset('tools.modules') - self._add_moduleset('extra.modules') - self._add_moduleset('extra-activities.modules') - - release_dir = None - for f in os.listdir(self._set_dir): - if f.startswith('release-'): - release_dir = f - - self._add_moduleset('glucose.modules', release_dir) - self._add_moduleset('fructose.modules', release_dir) - - self.modules = [ 'meta-tools', - 'meta-glucose', - 'meta-fructose' ] - - self.checkoutroot = os.path.join(self._base_dir, 'source') - self.tarballdir = self.checkoutroot - + self.checkoutroot = os.path.join(self.base_dir, 'source') + self.tarballdir = os.path.join(self.base_dir, 'source') + for package, source in sysdeps.get_packages(): if source and source not in self.skip: self.skip.append(source) - def _add_moduleset(self, moduleset, release_dir=None): - if release_dir: - path = os.path.join(self._set_dir, release_dir) - else: - path = self._set_dir - - self.moduleset.append(os.path.join(path, moduleset)) - def setup_env(self): # Hack to replace the default prefix if self.prefix == '/opt/gnome2': - self.prefix = os.path.join(self._base_dir, 'install') + self.prefix = os.path.join(self.base_dir, 'install') + + #Hack to allow sugar-jhbuild to find its self again. + MY_PATH = os.getenv('PATH', 'Error') + os.environ["PATH"] = MY_PATH + ':' + self.base_dir + jhbuild.config.Config.setup_env(self) jhbuild.config.addpath('XDG_DATA_DIRS', '/usr/share') diff --git a/scripts/depscheck.py b/sjhbuild/depscheck.py index f318404..f318404 100644 --- a/scripts/depscheck.py +++ b/sjhbuild/depscheck.py diff --git a/sjhbuild/main.py b/sjhbuild/main.py new file mode 100644 index 0000000..3fa1bb1 --- /dev/null +++ b/sjhbuild/main.py @@ -0,0 +1,159 @@ +#!/usr/bin/env python +# jhbuild - a build script for GNOME 1.x and 2.x +# Copyright (C) 2001-2006 James Henstridge +# +# main.py: parses command line arguments and starts the build +# +# 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; either version 2 of the License, or +# (at your option) any later version. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +import sys, os, errno +import optparse +import traceback + +import gettext +localedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../mo')) +gettext.install('jhbuild', localedir=localedir, unicode=True) +import __builtin__ +__builtin__.__dict__['N_'] = lambda x: x + +import jhbuild.commands +from jhbuild.errors import UsageError, FatalError +from jhbuild.utils.cmds import get_output +from jhbuild.moduleset import warn_local_modulesets + +import bundlemodule +import depscheck + +from config import Config + +if sys.platform == 'darwin': + # work around locale.getpreferredencoding() returning an empty string in + # Mac OS X, see http://bugzilla.gnome.org/show_bug.cgi?id=534650 and + # http://bazaar-vcs.org/DarwinCommandLineArgumentDecoding + sys.platform = 'posix' + try: + import locale + finally: + sys.platform = 'darwin' +else: + import locale + +try: + _encoding = locale.getpreferredencoding() + assert _encoding +except (locale.Error, AssertionError): + _encoding = 'ascii' + +def uencode(s): + if type(s) is unicode: + return s.encode(_encoding, 'replace') + else: + return s + +def uprint(*args): + '''Print Unicode string encoded for the terminal''' + for s in args[:-1]: + print uencode(s), + s = args[-1] + print uencode(s) + +__builtin__.__dict__['uprint'] = uprint +__builtin__.__dict__['uencode'] = uencode + +def help_commands(option, opt_str, value, parser): + thisdir = os.path.abspath(os.path.dirname(__file__)) + + # import all available commands + for fname in os.listdir(os.path.join(thisdir, 'commands')): + name, ext = os.path.splitext(fname) + if not ext == '.py': + continue + try: + __import__('jhbuild.commands.%s' % name) + except ImportError: + pass + + uprint(_('JHBuild commands are:')) + commands = [(x.name, x.doc) for x in jhbuild.commands.get_commands().values()] + commands.sort() + for name, description in commands: + uprint(' %-15s %s' % (name, description)) + print + uprint(_('For more information run "jhbuild <command> --help"')) + parser.exit() + +def main(base_dir, args): + parser = optparse.OptionParser( + usage=_('%prog [ -f config ] command [ options ... ]'), + description=_('Build a set of modules from diverse repositories in correct dependency order (such as GNOME).')) + parser.disable_interspersed_args() + parser.add_option('--help-commands', action='callback', + callback=help_commands, + help=_('Information about available jhbuild commands')) + parser.add_option('-f', '--file', action='store', metavar='CONFIG', + type='string', dest='configfile', + default=os.environ.get("JHBUILDRC", os.path.join(os.environ['HOME'], '.jhbuildrc')), + help=_('use a non default configuration file')) + parser.add_option('-m', '--moduleset', action='store', metavar='URI', + type='string', dest='moduleset', default=None, + help=_('use a non default module set')) + parser.add_option('--no-interact', action='store_true', + dest='nointeract', default=False, + help=_('do not prompt for input')) + + options, args = parser.parse_args(args) + + try: + config = Config(base_dir, options.configfile) + except FatalError, exc: + sys.stderr.write('sugar-jhbuild: %s\n' % exc.args[0].encode(_encoding, 'replace')) + sys.exit(1) + + if options.moduleset: config.moduleset = options.moduleset + if options.nointeract: config.interact = False + + if not args or args[0][0] == '-': + command = 'build' # default to cvs update + compile + else: + command = args[0] + args = args[1:] + + if command == 'run' and len(args) == 0: + args.append('sugar-emulator') + + warn_local_modulesets(config) + + try: + rc = jhbuild.commands.run(command, config, args) + except UsageError, exc: + sys.stderr.write('sugar-jhbuild %s: %s\n' % (command, exc.args[0].encode(_encoding, 'replace'))) + parser.print_usage() + sys.exit(1) + except FatalError, exc: + sys.stderr.write('sugar-jhbuild %s: %s\n' % (command, exc.args[0].encode(_encoding, 'replace'))) + sys.exit(1) + except KeyboardInterrupt: + uprint(_('Interrupted')) + sys.exit(1) + except EOFError: + uprint(_('EOF')) + sys.exit(1) + except IOError, e: + if e.errno != errno.EPIPE: + raise + sys.exit(0) + if rc: + sys.exit(rc) + diff --git a/scripts/sysdeps.py b/sjhbuild/sysdeps.py index b398cff..b398cff 100644 --- a/scripts/sysdeps.py +++ b/sjhbuild/sysdeps.py diff --git a/sugar-jhbuild b/sugar-jhbuild index f185923..cb64ba0 100755 --- a/sugar-jhbuild +++ b/sugar-jhbuild @@ -5,9 +5,11 @@ import sys import subprocess base_dir = os.path.abspath(os.path.dirname(__file__)) -jhbuild_dir = os.path.join(base_dir, 'jhbuild') -sys.path.append(os.path.join(base_dir, 'scripts')) +sjhbuild_dir = os.path.join(base_dir, 'sjhbuild') +sys.path.append(sjhbuild_dir) + +jhbuild_dir = os.path.join(base_dir, 'jhbuild') sys.path.append(jhbuild_dir) args = sys.argv[1:] @@ -23,22 +25,25 @@ if os.path.exists(jhbuild_dir): cwd = os.getcwd() os.chdir(jhbuild_dir) + print 'Updating upstream jhbuild...' + retcode = subprocess.call(['git', 'pull']) if retcode: - print 'Failed to update jhbuild.' + print 'Failed to update upstream jhbuild.' os.chdir(cwd) else: cwd = os.getcwd() os.chdir(base_dir) - jhbuild_repo = 'git://dev.laptop.org/users/marco/jhbuild' + print 'Cloning upstream jhbuild' + jhbuild_repo = 'git://git.gnome.org/preview/jhbuild' retcode = subprocess.call(['git', 'clone', jhbuild_repo]) if retcode: - print 'Failed to clone sugar-jhbuild.' + print 'Failed to clone upstream jhbuild.' os.chdir(cwd) import main -sys.exit(main.main(sys.argv[1:])) +sys.exit(main.main(base_dir, sys.argv[1:])) diff --git a/sugar.jhbuildrc b/sugar.jhbuildrc new file mode 100644 index 0000000..0a76683 --- /dev/null +++ b/sugar.jhbuildrc @@ -0,0 +1,6 @@ +use_local_modulesets = True +modulesets_dir = os.path.join(os.path.dirname(__file__), 'config/modulesets') +moduleset = 'sugar' + +modules = ['meta-sugar'] + |